@imtbl/sdk 0.17.3 → 0.17.4
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/blockchain_data.js +1 -1
- package/dist/browser/checkout.js +2 -2
- package/dist/checkout_sdk.js +28 -9
- package/dist/checkout_widgets.js +1 -1
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +31 -12
- package/dist/index.js +31 -12
- package/dist/passport.js +2 -2
- package/package.json +1 -1
package/dist/checkout_sdk.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ethers, ContractFactory, utils, Contract as Contract$1, BigNumber as BigNumber$1, providers, constants as constants$1 } from 'ethers';
|
|
2
|
-
import { Web3Provider, JsonRpcProvider } from '@ethersproject/providers';
|
|
3
2
|
import $7v2Z6$axios, { HttpStatusCode } from 'axios';
|
|
3
|
+
import { Web3Provider, JsonRpcProvider } from '@ethersproject/providers';
|
|
4
4
|
import $7v2Z6$metamaskdetectprovider from '@metamask/detect-provider';
|
|
5
5
|
import { TradeType, Token, CurrencyAmount, Percent } from '@uniswap/sdk-core';
|
|
6
6
|
import assert from 'assert';
|
|
@@ -16974,6 +16974,7 @@ const constants = {
|
|
|
16974
16974
|
|
|
16975
16975
|
|
|
16976
16976
|
|
|
16977
|
+
|
|
16977
16978
|
var $aa144554f9ef124b$export$226b052ecb8ca80;
|
|
16978
16979
|
(function(BuyStatusType) {
|
|
16979
16980
|
BuyStatusType["SUCCESS"] = "SUCCESS";
|
|
@@ -17109,12 +17110,6 @@ const $d85ad1457a3f1a83$export$161d4a74df65fc08 = {
|
|
|
17109
17110
|
const $d85ad1457a3f1a83$export$72176e2233d7d5d = true;
|
|
17110
17111
|
const $d85ad1457a3f1a83$export$566b5975cc83d6b4 = true;
|
|
17111
17112
|
const $d85ad1457a3f1a83$export$261cde2078dba35b = true;
|
|
17112
|
-
const $d85ad1457a3f1a83$export$fc55ed5a42b458ba = {
|
|
17113
|
-
[($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET]: {
|
|
17114
|
-
url: "https://explorer.testnet.immutable.com",
|
|
17115
|
-
nativeToken: $d85ad1457a3f1a83$var$ZKEVM_NATIVE_TOKEN
|
|
17116
|
-
}
|
|
17117
|
-
};
|
|
17118
17113
|
const $d85ad1457a3f1a83$export$f6043d7fce62d71b = {
|
|
17119
17114
|
[(Environment$1).SANDBOX]: "https://global-stg.transak.com",
|
|
17120
17115
|
[(Environment$1).PRODUCTION]: "https://global.transak.com/"
|
|
@@ -17212,6 +17207,16 @@ const $d85ad1457a3f1a83$export$3a9ebede6a150274 = new Map([
|
|
|
17212
17207
|
}
|
|
17213
17208
|
]
|
|
17214
17209
|
]);
|
|
17210
|
+
const $d85ad1457a3f1a83$export$fc55ed5a42b458ba = {
|
|
17211
|
+
[($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET]: {
|
|
17212
|
+
url: "https://explorer.testnet.immutable.com",
|
|
17213
|
+
nativeToken: $d85ad1457a3f1a83$export$3e81fc0987227f10.get(($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET).nativeCurrency
|
|
17214
|
+
},
|
|
17215
|
+
[($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_MAINNET]: {
|
|
17216
|
+
url: "https://explorer.mainnet.immutable.com",
|
|
17217
|
+
nativeToken: $d85ad1457a3f1a83$export$6f24f3cef7d501c4.get(($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_MAINNET).nativeCurrency
|
|
17218
|
+
}
|
|
17219
|
+
};
|
|
17215
17220
|
const $d85ad1457a3f1a83$export$db5daa1b5156ccfe = [
|
|
17216
17221
|
{
|
|
17217
17222
|
constant: true,
|
|
@@ -17986,7 +17991,14 @@ const $1564e43dde50bb61$export$8c978679845804d4 = async (walletAddress, chainId,
|
|
|
17986
17991
|
items.push(...resp.items);
|
|
17987
17992
|
}while (resp.next_page_params);
|
|
17988
17993
|
} catch (err) {
|
|
17989
|
-
|
|
17994
|
+
// In case of a 404, the wallet is a new wallet that hasn't been indexed by
|
|
17995
|
+
// the Blockscout just yet. This happens when a wallet hasn't had any
|
|
17996
|
+
// activity on the chain. In this case, simply ignore the error and return
|
|
17997
|
+
// no currencies.
|
|
17998
|
+
// In case of a malformed wallet address, Blockscout returns a 422, which
|
|
17999
|
+
// means we are safe to assume that a 404 is a missing wallet due to inactivity
|
|
18000
|
+
// or simply an incorrect wallet address was provided.
|
|
18001
|
+
if (err?.code !== (HttpStatusCode).NotFound) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(err.message || "InternalServerError | getTokensByWalletAddress", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_INDEXER_BALANCE_ERROR, err);
|
|
17990
18002
|
}
|
|
17991
18003
|
try {
|
|
17992
18004
|
const respNative = await $1564e43dde50bb61$var$blockscoutClient.getNativeTokenByWalletAddress({
|
|
@@ -17994,7 +18006,14 @@ const $1564e43dde50bb61$export$8c978679845804d4 = async (walletAddress, chainId,
|
|
|
17994
18006
|
});
|
|
17995
18007
|
items.push(respNative);
|
|
17996
18008
|
} catch (err) {
|
|
17997
|
-
|
|
18009
|
+
// In case of a 404, the wallet is a new wallet that hasn't been indexed by
|
|
18010
|
+
// the Blockscout just yet. This happens when a wallet hasn't had any
|
|
18011
|
+
// activity on the chain. In this case, simply ignore the error and return
|
|
18012
|
+
// no currencies.
|
|
18013
|
+
// In case of a malformed wallet address, Blockscout returns a 422, which
|
|
18014
|
+
// means we are safe to assume that a 404 is a missing wallet due to inactivity
|
|
18015
|
+
// or simply an incorrect wallet address was provided.
|
|
18016
|
+
if (err?.code !== (HttpStatusCode).NotFound) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(err.message || "InternalServerError | getNativeTokenByWalletAddress", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_INDEXER_BALANCE_ERROR, err);
|
|
17998
18017
|
}
|
|
17999
18018
|
return {
|
|
18000
18019
|
balances: items.map((item)=>{
|
package/dist/checkout_widgets.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useEffect } from 'react';
|
|
|
4
4
|
function $parcel$export(e, n, v, s) {
|
|
5
5
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
6
6
|
}
|
|
7
|
-
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.17.
|
|
7
|
+
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.17.4";
|
|
8
8
|
const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
|
|
9
9
|
const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
|
|
10
10
|
|
|
@@ -16,7 +16,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
16
16
|
chainID,
|
|
17
17
|
coreContractAddress,
|
|
18
18
|
registrationContractAddress,
|
|
19
|
-
sdkVersion: 'ts-immutable-sdk-0.17.
|
|
19
|
+
sdkVersion: 'ts-immutable-sdk-0.17.4',
|
|
20
20
|
});
|
|
21
21
|
/**
|
|
22
22
|
* Sets `sdkVersion` at the time of build
|