Socket
Socket
Sign inDemoInstall

tso-data-models

Package Overview
Dependencies
Maintainers
1
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tso-data-models - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

23

lib/models/exchange-api/ExchangeAPI.js

@@ -38,7 +38,3 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var node_fetch_1 = __importDefault(require("node-fetch"));
var ExchangeAPI = /** @class */ (function () {

@@ -52,17 +48,10 @@ function ExchangeAPI(endpoint, exchangeInterface) {

return __awaiter(this, void 0, void 0, function () {
var resultData, data, listOfResults;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!this._dueForUpdate()) return [3 /*break*/, 3];
return [4 /*yield*/, (0, node_fetch_1.default)(this.endpoint)];
case 1:
resultData = _a.sent();
return [4 /*yield*/, resultData.json()];
case 2:
data = _a.sent();
listOfResults = this.exchangeInterface.processResponse(data);
_a.label = 3;
case 3: return [2 /*return*/];
if (this._dueForUpdate()) {
// const resultData = await fetch(this.endpoint);
// const data = await resultData.json();
// const listOfResults: DataPoint[] = this.exchangeInterface.processResponse(data);
// this._writeDataToCSV(listOfResults);
}
return [2 /*return*/];
});

@@ -69,0 +58,0 @@ });

{
"name": "tso-data-models",
"version": "1.0.6",
"version": "1.0.7",
"description": "",

@@ -16,6 +16,4 @@ "main": "lib/index.js",

"dependencies": {
"@types/node-fetch": "^3.0.3",
"ethers": "^5.4.6",
"node-fetch": "^3.0.0"
"ethers": "^5.4.6"
}
}

@@ -1,2 +0,2 @@

import fetch from 'node-fetch';
//import fetch from 'node-fetch';
import DataPoint, { DataPointFactory } from '../data-point/DataPoint';

@@ -17,5 +17,5 @@ import ExchangeInterface from './ExchangeInterface'

if (this._dueForUpdate()) {
const resultData = await fetch(this.endpoint);
const data = await resultData.json();
const listOfResults: DataPoint[] = this.exchangeInterface.processResponse(data);
// const resultData = await fetch(this.endpoint);
// const data = await resultData.json();
// const listOfResults: DataPoint[] = this.exchangeInterface.processResponse(data);
// this._writeDataToCSV(listOfResults);

@@ -22,0 +22,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc