@shapeshiftoss/unchained-client 9.8.2 → 9.8.3
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/dist/cosmos/parser/index.js +6 -6
- package/dist/cosmos/parser/utils.js +9 -9
- package/dist/evm/ethereum/parser/abi/foxyStaking.js +161 -161
- package/dist/evm/ethereum/parser/abi/shapeShiftRouter.js +119 -119
- package/dist/evm/ethereum/parser/abi/thor.js +28 -28
- package/dist/evm/ethereum/parser/abi/uniV2.js +55 -55
- package/dist/evm/ethereum/parser/abi/uniV2StakingRewards.js +95 -95
- package/dist/evm/ethereum/parser/abi/weth.js +66 -66
- package/dist/evm/ethereum/parser/abi/yearnVault.js +95 -95
- package/dist/evm/ethereum/parser/cowswap.js +3 -3
- package/dist/evm/ethereum/parser/foxy.js +3 -3
- package/dist/evm/ethereum/parser/index.js +1 -1
- package/dist/evm/ethereum/parser/thor.js +2 -2
- package/dist/evm/ethereum/parser/uniV2.js +12 -12
- package/dist/evm/ethereum/parser/weth.js +9 -9
- package/dist/evm/ethereum/parser/yearn.js +4 -4
- package/dist/evm/parser/abi/erc20.js +69 -69
- package/dist/evm/parser/erc20.js +4 -4
- package/dist/evm/parser/index.js +4 -4
- package/dist/evm/parser/zrx.js +3 -3
- package/dist/utils.js +2 -2
- package/dist/utxo/parser/index.js +1 -1
- package/dist/websocket.js +4 -4
- package/package.json +1 -1
package/dist/websocket.js
CHANGED
|
@@ -8,7 +8,7 @@ const logger_1 = require("@shapeshiftoss/logger");
|
|
|
8
8
|
const isomorphic_ws_1 = __importDefault(require("isomorphic-ws"));
|
|
9
9
|
const logger = new logger_1.Logger({
|
|
10
10
|
namespace: ['unchained-client', 'websocket'],
|
|
11
|
-
level: process.env.LOG_LEVEL
|
|
11
|
+
level: process.env.LOG_LEVEL,
|
|
12
12
|
});
|
|
13
13
|
const NORMAL_CLOSURE_CODE = 1000;
|
|
14
14
|
class Client {
|
|
@@ -19,7 +19,7 @@ class Client {
|
|
|
19
19
|
this.txs = {};
|
|
20
20
|
this.url = url;
|
|
21
21
|
this.connections = {
|
|
22
|
-
txs: undefined
|
|
22
|
+
txs: undefined,
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
async initialize() {
|
|
@@ -138,7 +138,7 @@ class Client {
|
|
|
138
138
|
async subscribeTxs(subscriptionId, data, onMessage, onError) {
|
|
139
139
|
var _a, _b, _c, _d;
|
|
140
140
|
const addresses = [
|
|
141
|
-
...new Set([...((_c = (_b = (_a = this.txs[subscriptionId]) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.addresses) !== null && _c !== void 0 ? _c : []), ...data.addresses])
|
|
141
|
+
...new Set([...((_c = (_b = (_a = this.txs[subscriptionId]) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.addresses) !== null && _c !== void 0 ? _c : []), ...data.addresses]),
|
|
142
142
|
];
|
|
143
143
|
// keep track of all subscribed addresses and onMessage/onError handlers associated with each subscriptionId
|
|
144
144
|
this.txs[subscriptionId] = { onMessage, onError, data: { topic: 'txs', addresses } };
|
|
@@ -183,7 +183,7 @@ class Client {
|
|
|
183
183
|
const payload = {
|
|
184
184
|
subscriptionId: subscriptionId !== null && subscriptionId !== void 0 ? subscriptionId : '',
|
|
185
185
|
method: 'unsubscribe',
|
|
186
|
-
data: { topic: 'txs', addresses: (_d = data === null || data === void 0 ? void 0 : data.addresses) !== null && _d !== void 0 ? _d : [] }
|
|
186
|
+
data: { topic: 'txs', addresses: (_d = data === null || data === void 0 ? void 0 : data.addresses) !== null && _d !== void 0 ? _d : [] },
|
|
187
187
|
};
|
|
188
188
|
(_e = this.connections.txs) === null || _e === void 0 ? void 0 : _e.ws.send(JSON.stringify(payload));
|
|
189
189
|
}
|