@cityofzion/bs-ethereum 2.12.4 → 2.12.6
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.
|
@@ -47,26 +47,22 @@ class MoralisEDSEthereum extends blockchain_service_1.CryptoCompareEDS {
|
|
|
47
47
|
throw new Error('Exchange is not supported on this network');
|
|
48
48
|
const client = MoralisBDSEthereum_1.MoralisBDSEthereum.getClient(__classPrivateFieldGet(this, _MoralisEDSEthereum_network, "f"));
|
|
49
49
|
const nativeToken = BSEthereumHelper_1.BSEthereumHelper.getNativeAsset(__classPrivateFieldGet(this, _MoralisEDSEthereum_network, "f"));
|
|
50
|
+
const tokensBody = [];
|
|
50
51
|
let wrappedNativeToken;
|
|
51
52
|
if (params.tokens.some(token => token.symbol === nativeToken.symbol)) {
|
|
52
53
|
try {
|
|
53
54
|
wrappedNativeToken = yield __classPrivateFieldGet(this, _MoralisEDSEthereum_instances, "m", _MoralisEDSEthereum_getWrappedNativeToken).call(this);
|
|
55
|
+
if (wrappedNativeToken) {
|
|
56
|
+
tokensBody.push({ token_address: wrappedNativeToken.hash });
|
|
57
|
+
}
|
|
54
58
|
}
|
|
55
59
|
catch (_a) {
|
|
56
60
|
/* empty */
|
|
57
61
|
}
|
|
58
62
|
}
|
|
59
|
-
|
|
60
|
-
params.tokens.map(token => {
|
|
63
|
+
params.tokens.forEach(token => {
|
|
61
64
|
if (token.symbol !== nativeToken.symbol) {
|
|
62
|
-
tokensBody.push({
|
|
63
|
-
token_address: token.hash,
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
if (wrappedNativeToken) {
|
|
67
|
-
tokensBody.push({
|
|
68
|
-
token_address: wrappedNativeToken.hash,
|
|
69
|
-
});
|
|
65
|
+
tokensBody.push({ token_address: token.hash });
|
|
70
66
|
}
|
|
71
67
|
});
|
|
72
68
|
if (tokensBody.length === 0)
|
|
@@ -54,7 +54,7 @@ const ethers_1 = require("ethers");
|
|
|
54
54
|
const properties_1 = require("@ethersproject/properties");
|
|
55
55
|
const events_1 = __importDefault(require("events"));
|
|
56
56
|
const shouldRetry = (error) => {
|
|
57
|
-
return (error === null || error === void 0 ? void 0 : error.id)
|
|
57
|
+
return (error === null || error === void 0 ? void 0 : error.id) === 'TransportLocked';
|
|
58
58
|
};
|
|
59
59
|
class EthersLedgerSigner extends ethers_1.Signer {
|
|
60
60
|
constructor(transport, bip44Path, provider, emitter) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cityofzion/bs-ethereum",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.6",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"repository": "https://github.com/CityOfZion/blockchain-services",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"dotenv": "16.3.1",
|
|
33
33
|
"eslint": "^8.48.0",
|
|
34
34
|
"jest": "29.6.2",
|
|
35
|
-
"ts-jest": "29.
|
|
36
|
-
"ts-node": "10.9.
|
|
35
|
+
"ts-jest": "~29.4.0",
|
|
36
|
+
"ts-node": "~10.9.2",
|
|
37
37
|
"typescript": "4.9.5"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|