carbon-js-sdk 0.3.42 → 0.3.43
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/clients/ETHClient.js
CHANGED
|
@@ -39,7 +39,7 @@ class ETHClient {
|
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
40
|
const tokenQueryResults = yield api.token.getAllTokens();
|
|
41
41
|
const lockProxyAddress = this.getLockProxyAddress().toLowerCase();
|
|
42
|
-
const tokens = tokenQueryResults.filter((token) => blockchain_1.blockchainForChainId(token.chainId.toNumber()) == this.blockchain &&
|
|
42
|
+
const tokens = tokenQueryResults.filter((token) => blockchain_1.blockchainForChainId(token.chainId.toNumber(), api.network) == this.blockchain &&
|
|
43
43
|
token.tokenAddress.length == 40 &&
|
|
44
44
|
token.bridgeAddress.toLowerCase() == generic_1.stripHexPrefix(lockProxyAddress) &&
|
|
45
45
|
(!whitelistDenoms || whitelistDenoms.includes(token.denom)) &&
|
|
@@ -239,7 +239,7 @@ class ETHClient {
|
|
|
239
239
|
if (!feeInfo.deposit_fee) {
|
|
240
240
|
throw new Error("unsupported token");
|
|
241
241
|
}
|
|
242
|
-
if (blockchain_1.blockchainForChainId(token.chainId.toNumber()) !== this.blockchain) {
|
|
242
|
+
if (blockchain_1.blockchainForChainId(token.chainId.toNumber(), this.configProvider.getConfig().network) !== this.blockchain) {
|
|
243
243
|
throw new Error("unsupported token");
|
|
244
244
|
}
|
|
245
245
|
let feeAmount = ethers_1.ethers.BigNumber.from(feeInfo.deposit_fee);
|
package/lib/clients/NEOClient.js
CHANGED
|
@@ -64,7 +64,7 @@ class NEOClient {
|
|
|
64
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
65
65
|
const tokenQueryResults = yield sdk.token.getAllTokens();
|
|
66
66
|
const account = new Neon.wallet.Account(address);
|
|
67
|
-
const tokens = tokenQueryResults.filter((token) => blockchain_1.blockchainForChainId(token.chainId.toNumber()) == this.blockchain &&
|
|
67
|
+
const tokens = tokenQueryResults.filter((token) => blockchain_1.blockchainForChainId(token.chainId.toNumber(), sdk.network) == this.blockchain &&
|
|
68
68
|
token.tokenAddress.length == 40 &&
|
|
69
69
|
token.bridgeAddress.length == 40);
|
|
70
70
|
const client = new Neon.rpc.RPCClient(url, "2.5.2"); // TODO: should we change the RPC version??
|
package/lib/clients/ZILClient.js
CHANGED
|
@@ -72,7 +72,7 @@ class ZILClient {
|
|
|
72
72
|
getExternalBalances(sdk, address, whitelistDenoms) {
|
|
73
73
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
74
|
const tokenQueryResults = yield sdk.token.getAllTokens();
|
|
75
|
-
const tokens = tokenQueryResults.filter((token) => blockchain_1.blockchainForChainId(token.chainId.toNumber()) == this.blockchain &&
|
|
75
|
+
const tokens = tokenQueryResults.filter((token) => blockchain_1.blockchainForChainId(token.chainId.toNumber(), sdk.network) == this.blockchain &&
|
|
76
76
|
token.tokenAddress.length == 40 &&
|
|
77
77
|
(!whitelistDenoms || whitelistDenoms.includes(token.denom)));
|
|
78
78
|
const requests = tokens.map((token) => token.tokenAddress === zeroAddress
|