@steerprotocol/data-connector-loader 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +4 -6
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -8,12 +8,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.DataConnectorExecution = void 0;
|
|
16
|
-
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
14
|
+
const axios = require('axios');
|
|
17
15
|
const pluginManager_1 = require("./pluginManager");
|
|
18
16
|
class DataConnectorExecution {
|
|
19
17
|
constructor(dataConnector) {
|
|
@@ -61,7 +59,7 @@ class DataConnectorExecution {
|
|
|
61
59
|
}
|
|
62
60
|
else {
|
|
63
61
|
// Axios logic (off-chain)
|
|
64
|
-
const ax_instance =
|
|
62
|
+
const ax_instance = axios.create();
|
|
65
63
|
response = (yield ax_instance.request(parsedRequest)).data;
|
|
66
64
|
}
|
|
67
65
|
// break;
|
|
@@ -75,7 +73,7 @@ class DataConnectorExecution {
|
|
|
75
73
|
}
|
|
76
74
|
downloadWasmBundle(ipfsHash) {
|
|
77
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
-
const response = yield
|
|
76
|
+
const response = yield axios.get(`https://steerprotocol.mypinata.cloud/ipfs/${ipfsHash}`, {
|
|
79
77
|
responseType: 'arraybuffer',
|
|
80
78
|
});
|
|
81
79
|
const wasmFile = new Uint8Array(response.data);
|