@layerswap/widget 0.1.4 → 0.1.14
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/README.md +78 -3
- package/dist/Models/Theme.d.ts +7 -6
- package/dist/Models/Theme.js +7 -7
- package/dist/Models/WalletProvider.d.ts +0 -4
- package/dist/Models/WalletProvider.js +2 -0
- package/dist/components/Buttons/copyButton.js +4 -3
- package/dist/components/ColorSchema.js +79 -45
- package/dist/components/Common/AddressIcon.js +1 -0
- package/dist/components/Common/AverageCompletionTime.js +1 -1
- package/dist/components/Common/CountDownTimer.js +2 -2
- package/dist/components/Common/FormattedAverageCompletionTime.js +1 -1
- package/dist/components/HeaderWithMenu/index.js +1 -8
- package/dist/components/Input/Address/AddressNote.js +3 -2
- package/dist/components/Input/Address/AddressPicker/AddressWithIcon.js +2 -2
- package/dist/components/Input/Address/AddressPicker/ConnectedWallets/ConnectWalletButton.js +12 -5
- package/dist/components/Input/Address/AddressPicker/ExchangeNote.d.ts +1 -1
- package/dist/components/Input/Address/AddressPicker/ExchangeNote.js +1 -1
- package/dist/components/Input/RouteIcon.js +1 -1
- package/dist/components/LayerswapMenu/MenuList.js +2 -56
- package/dist/components/Pages/404/index.js +1 -0
- package/dist/components/Pages/Auth/Steps/CodeStep/VerifyEmailCode.js +1 -0
- package/dist/components/Pages/Auth/index.d.ts +1 -1
- package/dist/components/Pages/Auth/index.js +3 -2
- package/dist/components/Pages/Campaigns/Details/Leaderboard.js +1 -0
- package/dist/components/Pages/Campaigns/Details/index.d.ts +1 -1
- package/dist/components/Pages/Campaigns/Details/index.js +3 -2
- package/dist/components/Pages/Campaigns/index.d.ts +1 -1
- package/dist/components/Pages/Campaigns/index.js +3 -2
- package/dist/components/Pages/Maintanance/index.js +1 -0
- package/dist/components/Pages/NoCookies/index.js +1 -0
- package/dist/components/Pages/SwapHistory/History.js +1 -2
- package/dist/components/Pages/SwapHistory/index.d.ts +1 -1
- package/dist/components/Pages/SwapHistory/index.js +4 -3
- package/dist/components/Pages/SwapPages/Form/FeeDetails/Campaign.js +1 -0
- package/dist/components/Pages/SwapPages/Form/Form.js +1 -4
- package/dist/components/Pages/SwapPages/Form/SecondaryComponents/ValidationError.js +1 -1
- package/dist/components/Pages/SwapPages/Form/Select/Popover/PopoverSelect.js +1 -1
- package/dist/components/Pages/SwapPages/Form/index.js +1 -0
- package/dist/components/Pages/SwapPages/Withdraw/Coinbase/Carousel.js +8 -6
- package/dist/components/Pages/SwapPages/Withdraw/Processing/Processing.js +2 -2
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/FuelWalletWithdrawal.d.ts +0 -4
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/FuelWalletWithdrawal.js +159 -125
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/ImtblxWalletWithdrawStep.d.ts +0 -4
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/ImtblxWalletWithdrawStep.js +69 -51
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/Loopring/ActivationTokentPicker.d.ts +0 -8
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/Loopring/ActivationTokentPicker.js +87 -45
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/Loopring/hooks.d.ts +0 -40
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/Loopring/hooks.js +73 -46
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/Loopring/index.d.ts +0 -4
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/Loopring/index.js +175 -128
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/SVMWalletWithdraw/index.d.ts +0 -7
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/SVMWalletWithdraw/index.js +138 -116
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/SVMWalletWithdraw/transactionSender.d.ts +0 -8
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/SVMWalletWithdraw/transactionSender.js +96 -75
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/SophonWalletWithdraw.js +2 -2
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/StarknetWalletWithdraw.d.ts +0 -4
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/StarknetWalletWithdraw.js +88 -71
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/TonWalletWithdraw.d.ts +0 -4
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/TonWalletWithdraw.js +146 -136
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/TronWalletWithdraw.d.ts +0 -4
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/TronWalletWithdraw.js +120 -99
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/WalletTransfer/TransferToken.js +3 -3
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/WalletTransfer/buttons.js +1 -0
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/WalletTransfer/index.js +1 -1
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/WalletTransfer/transactionMessage.js +2 -2
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/WalletTransferContent.js +101 -33
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/paradex/Evm.d.ts +0 -4
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/paradex/Evm.js +60 -55
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/paradex/Starknet.d.ts +0 -4
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/paradex/Starknet.js +71 -55
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/paradex/buttons.js +1 -0
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/paradex/index.d.ts +0 -4
- package/dist/components/Pages/SwapPages/Withdraw/Wallet/paradex/index.js +56 -52
- package/dist/components/Pages/SwapPages/Withdraw/index.d.ts +1 -1
- package/dist/components/Pages/SwapPages/Withdraw/index.js +3 -2
- package/dist/components/Wallet/WalletModal/Connector.js +1 -1
- package/dist/components/Wallet/WalletProviders/FuelProvider.d.ts +0 -5
- package/dist/components/Wallet/WalletProviders/FuelProvider.js +25 -20
- package/dist/components/Wallet/WalletProviders/ImtblPassportProvider.d.ts +0 -5
- package/dist/components/Wallet/WalletProviders/ImtblPassportProvider.js +39 -36
- package/dist/components/Wallet/WalletProviders/SolanaProvider.d.ts +0 -5
- package/dist/components/Wallet/WalletProviders/SolanaProvider.js +49 -38
- package/dist/components/Wallet/WalletProviders/StarknetProvider.d.ts +0 -5
- package/dist/components/Wallet/WalletProviders/StarknetProvider.js +112 -117
- package/dist/components/Wallet/WalletProviders/TonConnectProvider.d.ts +0 -6
- package/dist/components/Wallet/WalletProviders/TonConnectProvider.js +58 -50
- package/dist/components/Wallet/WalletProviders/TronProvider.d.ts +0 -3
- package/dist/components/Wallet/WalletProviders/TronProvider.js +23 -15
- package/dist/components/Wallet/WalletProviders/Wagmi.d.ts +1 -1
- package/dist/components/Wallet/WalletProviders/Wagmi.js +20 -10
- package/dist/components/Wallet/WalletProviders/index.js +13 -6
- package/dist/components/Widget/Footer.d.ts +2 -1
- package/dist/components/Widget/Footer.js +13 -4
- package/dist/components/Widget/Index.d.ts +1 -1
- package/dist/components/Widget/Index.js +1 -1
- package/dist/components/WidgetLoading.d.ts +1 -0
- package/dist/components/WidgetLoading.js +5 -0
- package/dist/components/Wizard/Wizard.js +1 -1
- package/dist/components/shadcn/command.js +1 -1
- package/dist/components/themeWrapper.js +3 -2
- package/dist/context/{LayerswapContext.d.ts → LayerswapProvider.d.ts} +3 -8
- package/dist/context/{LayerswapContext.js → LayerswapProvider.js} +8 -9
- package/dist/context/authContext.js +1 -0
- package/dist/context/walletHooksProvider.js +1 -0
- package/dist/hooks/useWallet.js +10 -14
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -5
- package/dist/index.js +2 -4
- package/dist/index.mjs +19 -0
- package/dist/lib/AppSettings.d.ts +7 -3
- package/dist/lib/AppSettings.js +8 -7
- package/dist/lib/address/formatter/index.js +8 -9
- package/dist/lib/address/validator/index.js +18 -20
- package/dist/lib/axiosInterceptor.js +1 -2
- package/dist/lib/balances/balanceResolver.js +16 -16
- package/dist/lib/balances/providers/evmBalanceProvider.js +3 -3
- package/dist/lib/balances/providers/loopringBalanceProvider.d.ts +0 -6
- package/dist/lib/balances/providers/loopringBalanceProvider.js +56 -43
- package/dist/lib/balances/providers/paradexBalanceProvider.d.ts +0 -6
- package/dist/lib/balances/providers/paradexBalanceProvider.js +42 -42
- package/dist/lib/balances/providers/solanaBalanceProvider.d.ts +0 -6
- package/dist/lib/balances/providers/solanaBalanceProvider.js +70 -71
- package/dist/lib/balances/providers/starknetBalanceProvider.d.ts +0 -6
- package/dist/lib/balances/providers/starknetBalanceProvider.js +48 -45
- package/dist/lib/balances/providers/tonBalanceProvider.d.ts +0 -18
- package/dist/lib/balances/providers/tonBalanceProvider.js +104 -100
- package/dist/lib/balances/providers/tronBalanceResolver.js +2 -3
- package/dist/lib/fuels/common/FakeAccount.d.ts +0 -24
- package/dist/lib/fuels/common/FakeAccount.js +58 -36
- package/dist/lib/fuels/common/PredicateConnector.d.ts +0 -54
- package/dist/lib/fuels/common/PredicateConnector.js +292 -205
- package/dist/lib/fuels/common/PredicateFactory.d.ts +0 -29
- package/dist/lib/fuels/common/PredicateFactory.js +123 -76
- package/dist/lib/fuels/common/PredicateWalletAdapter.d.ts +0 -17
- package/dist/lib/fuels/common/PredicateWalletAdapter.js +44 -29
- package/dist/lib/fuels/common/index.d.ts +0 -4
- package/dist/lib/fuels/common/index.js +4 -4
- package/dist/lib/fuels/connectors/fuel-wallet/FuelWalletConnector.d.ts +0 -51
- package/dist/lib/fuels/connectors/fuel-wallet/FuelWalletConnector.js +268 -234
- package/dist/lib/fuels/connectors/fuel-wallet/index.d.ts +0 -2
- package/dist/lib/fuels/connectors/fuel-wallet/index.js +2 -2
- package/dist/lib/fuels/connectors/fuel-wallet/types.d.ts +0 -50
- package/dist/lib/fuels/connectors/fuel-wallet/types.js +53 -9
- package/dist/lib/fuels/connectors/fuelet-wallet/FueletWalletConnector.d.ts +0 -7
- package/dist/lib/fuels/connectors/fuelet-wallet/FueletWalletConnector.js +20 -19
- package/dist/lib/fuels/connectors/fuelet-wallet/index.d.ts +0 -1
- package/dist/lib/fuels/connectors/fuelet-wallet/index.js +1 -1
- package/dist/lib/gases/gasResolver.d.ts +1 -1
- package/dist/lib/gases/gasResolver.js +10 -10
- package/dist/lib/gases/providers/evmGasProvider.js +5 -4
- package/dist/lib/gases/providers/loopringGasProvider.d.ts +0 -6
- package/dist/lib/gases/providers/loopringGasProvider.js +27 -24
- package/dist/lib/gases/providers/solanaGasProvider.d.ts +0 -7
- package/dist/lib/gases/providers/solanaGasProvider.js +32 -31
- package/dist/lib/gases/providers/starknetGasProvider.d.ts +0 -7
- package/dist/lib/gases/providers/starknetGasProvider.js +34 -33
- package/dist/lib/imtbl.d.ts +0 -69
- package/dist/lib/imtbl.js +63 -60
- package/dist/lib/internalApiClient.d.ts +0 -2
- package/dist/lib/internalApiClient.js +1 -4
- package/dist/lib/layerSwapApiClient.js +3 -3
- package/dist/lib/logError.js +2 -2
- package/dist/lib/nft/nftBalanceResolver.js +1 -2
- package/dist/lib/nft/providers/starknetNftProvider.d.ts +0 -6
- package/dist/lib/nft/providers/starknetNftProvider.js +49 -50
- package/dist/lib/wallets/connectors/EthereumProvider.d.ts +2 -2
- package/dist/lib/wallets/connectors/useSyncProviders/store.d.ts +1 -4
- package/dist/lib/wallets/fuel/Bako.d.ts +0 -15
- package/dist/lib/wallets/fuel/Bako.js +34 -29
- package/dist/lib/wallets/fuel/Basko.d.ts +0 -15
- package/dist/lib/wallets/fuel/Basko.js +34 -29
- package/dist/lib/wallets/fuel/useFuel.d.ts +0 -2
- package/dist/lib/wallets/fuel/useFuel.js +211 -192
- package/dist/lib/wallets/imtblX/useImtblX.d.ts +0 -2
- package/dist/lib/wallets/imtblX/useImtblX.js +87 -87
- package/dist/lib/wallets/paradex/Authorize/Ethereum.d.ts +0 -2
- package/dist/lib/wallets/paradex/Authorize/Ethereum.js +24 -23
- package/dist/lib/wallets/paradex/Authorize/Starknet.d.ts +0 -2
- package/dist/lib/wallets/paradex/Authorize/Starknet.js +14 -13
- package/dist/lib/wallets/paradex/lib/account.d.ts +0 -28
- package/dist/lib/wallets/paradex/lib/account.js +102 -53
- package/dist/lib/wallets/paradex/lib/index.d.ts +0 -24
- package/dist/lib/wallets/paradex/lib/index.js +20 -20
- package/dist/lib/wallets/paradex/lib/paraclear-provider.d.ts +0 -6
- package/dist/lib/wallets/paradex/lib/paraclear-provider.js +13 -9
- package/dist/lib/wallets/paradex/lib/paraclear.d.ts +0 -137
- package/dist/lib/wallets/paradex/lib/paraclear.js +258 -131
- package/dist/lib/wallets/paradex/lib/starknet-account-support.d.ts +0 -22
- package/dist/lib/wallets/paradex/lib/starknet-account-support.js +296 -220
- package/dist/lib/wallets/paradex/lib/starknet-signer.d.ts +0 -15
- package/dist/lib/wallets/paradex/lib/starknet-signer.js +120 -94
- package/dist/lib/wallets/paradex/useParadex.d.ts +0 -7
- package/dist/lib/wallets/paradex/useParadex.js +197 -194
- package/dist/lib/wallets/solana/transactionBuilder.d.ts +0 -4
- package/dist/lib/wallets/solana/transactionBuilder.js +63 -39
- package/dist/lib/wallets/solana/useSVM.d.ts +0 -5
- package/dist/lib/wallets/solana/useSVM.js +139 -142
- package/dist/lib/wallets/starknet/useStarknet.d.ts +0 -2
- package/dist/lib/wallets/starknet/useStarknet.js +139 -139
- package/dist/lib/wallets/ton/client.d.ts +0 -3
- package/dist/lib/wallets/ton/client.js +7 -7
- package/dist/lib/wallets/ton/useTON.d.ts +0 -2
- package/dist/lib/wallets/ton/useTON.js +121 -122
- package/dist/lib/wallets/tron/connectors/bitkeep.d.ts +0 -61
- package/dist/lib/wallets/tron/connectors/bitkeep.js +326 -303
- package/dist/lib/wallets/tron/connectors/index.d.ts +0 -4
- package/dist/lib/wallets/tron/connectors/index.js +4 -4
- package/dist/lib/wallets/tron/connectors/okxWallet.d.ts +0 -66
- package/dist/lib/wallets/tron/connectors/okxWallet.js +364 -336
- package/dist/lib/wallets/tron/connectors/tokenPocket.d.ts +0 -72
- package/dist/lib/wallets/tron/connectors/tokenPocket.js +337 -308
- package/dist/lib/wallets/tron/connectors/tronLink/index.d.ts +0 -102
- package/dist/lib/wallets/tron/connectors/tronLink/index.js +560 -520
- package/dist/lib/wallets/tron/connectors/tronLink/types.d.ts +0 -56
- package/dist/lib/wallets/tron/connectors/tronLink/types.js +53 -1
- package/dist/lib/wallets/tron/connectors/tronLink/utils.d.ts +0 -14
- package/dist/lib/wallets/tron/connectors/tronLink/utils.js +64 -61
- package/dist/lib/wallets/tron/useTron.d.ts +0 -2
- package/dist/lib/wallets/tron/useTron.js +111 -111
- package/dist/lib/wallets/utils/resolveWalletIcon.js +1 -0
- package/package.json +26 -77
- package/dist/hooks/useCopyClipboard.d.ts +0 -1
- package/dist/hooks/useCopyClipboard.js +0 -21
- package/dist/index.cjs +0 -125
- package/dist/lib/abis/ERC20.json +0 -258
- package/dist/lib/fuels/connectors/walletConnect/WalletConnectConnector.d.ts +0 -42
- package/dist/lib/fuels/connectors/walletConnect/WalletConnectConnector.js +0 -357
- package/dist/lib/fuels/connectors/walletConnect/constants.d.ts +0 -6
- package/dist/lib/fuels/connectors/walletConnect/constants.js +0 -7
- package/dist/lib/fuels/connectors/walletConnect/index.d.ts +0 -3
- package/dist/lib/fuels/connectors/walletConnect/index.js +0 -3
- package/dist/lib/fuels/connectors/walletConnect/types.d.ts +0 -12
- package/dist/lib/fuels/connectors/walletConnect/types.js +0 -1
- package/dist/lib/fuels/connectors/walletConnect/utils/index.d.ts +0 -1
- package/dist/lib/fuels/connectors/walletConnect/utils/index.js +0 -1
- package/dist/lib/fuels/connectors/walletConnect/utils/subscribeAndEnforceChain.d.ts +0 -2
- package/dist/lib/fuels/connectors/walletConnect/utils/subscribeAndEnforceChain.js +0 -39
- package/dist/lib/fuels/connectors/walletConnect/web3Modal.d.ts +0 -10
- package/dist/lib/fuels/connectors/walletConnect/web3Modal.js +0 -38
- package/dist/lib/loopring/LoopringAPI.d.ts +0 -12
- package/dist/lib/loopring/LoopringAPI.js +0 -13
- package/dist/lib/loopring/defs.d.ts +0 -425
- package/dist/lib/loopring/defs.js +0 -217
- package/dist/lib/loopring/eddsa.d.ts +0 -29
- package/dist/lib/loopring/eddsa.js +0 -208
- package/dist/lib/loopring/field.d.ts +0 -17
- package/dist/lib/loopring/field.js +0 -61
- package/dist/lib/loopring/formatter.d.ts +0 -137
- package/dist/lib/loopring/formatter.js +0 -516
- package/dist/lib/loopring/helpers.d.ts +0 -36
- package/dist/lib/loopring/helpers.js +0 -140
- package/dist/lib/loopring/jubjub.d.ts +0 -19
- package/dist/lib/loopring/jubjub.js +0 -79
- package/dist/lib/loopring/permutation.d.ts +0 -22
- package/dist/lib/loopring/permutation.js +0 -198
- package/dist/lib/loopring/poseidon/EDDSAUtil.d.ts +0 -14
- package/dist/lib/loopring/poseidon/EDDSAUtil.js +0 -61
- package/dist/lib/loopring/poseidon/babyJub.d.ts +0 -6
- package/dist/lib/loopring/poseidon/babyJub.js +0 -51
- package/dist/lib/loopring/poseidon/eddsa.d.ts +0 -29
- package/dist/lib/loopring/poseidon/eddsa.js +0 -210
- package/dist/lib/loopring/utils.d.ts +0 -76
- package/dist/lib/loopring/utils.js +0 -230
- package/dist/styles/dialog-transition.css +0 -28
- package/dist/styles/globals.css +0 -372
- package/dist/styles/manual-trasnfer-svg.css +0 -299
- package/dist/styles/vaul.css +0 -256
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
1
|
+
// import type { ConnectorMetadata } from 'fuels';
|
|
2
|
+
// import { APP_IMAGE_DARK, APP_IMAGE_LIGHT } from './constants';
|
|
3
|
+
// import { FuelWalletConnector } from '../fuel-wallet';
|
|
4
|
+
// export class FueletWalletConnector extends FuelWalletConnector {
|
|
5
|
+
// name = 'Fuelet Wallet';
|
|
6
|
+
// metadata: ConnectorMetadata = {
|
|
7
|
+
// image: {
|
|
8
|
+
// light: APP_IMAGE_LIGHT,
|
|
9
|
+
// dark: APP_IMAGE_DARK,
|
|
10
|
+
// },
|
|
11
|
+
// install: {
|
|
12
|
+
// action: 'Install',
|
|
13
|
+
// description: 'Install Fuelet Wallet in order to connect it.',
|
|
14
|
+
// link: 'https://fuelet.app/download/',
|
|
15
|
+
// },
|
|
16
|
+
// };
|
|
17
|
+
// constructor() {
|
|
18
|
+
// super('Fuelet Wallet');
|
|
19
|
+
// }
|
|
20
|
+
// }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { FueletWalletConnector } from './FueletWalletConnector';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FueletWalletConnector } from './FueletWalletConnector';
|
|
1
|
+
// export { FueletWalletConnector } from './FueletWalletConnector';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GasProps } from "../../Models/Balance";
|
|
2
2
|
export declare class GasResolver {
|
|
3
3
|
private providers;
|
|
4
|
-
getGas({ address, network, token, recipientAddress }: GasProps): Promise<
|
|
4
|
+
getGas({ address, network, token, recipientAddress }: GasProps): Promise<number | undefined> | undefined;
|
|
5
5
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { EVMGasProvider } from "./providers/evmGasProvider";
|
|
2
|
-
import { FuelGasProvider } from "./providers/fuelGasProvider";
|
|
3
|
-
import { LoopringGasProvider } from "./providers/loopringGasProvider";
|
|
4
|
-
import { SolanaGasProvider } from "./providers/solanaGasProvider";
|
|
5
|
-
import { StarknetGasProvider } from "./providers/starknetGasProvider";
|
|
6
|
-
import { TronGasProvider } from "./providers/tronGasProvider";
|
|
2
|
+
// import { FuelGasProvider } from "./providers/fuelGasProvider";
|
|
3
|
+
// import { LoopringGasProvider } from "./providers/loopringGasProvider";
|
|
4
|
+
// import { SolanaGasProvider } from "./providers/solanaGasProvider";
|
|
5
|
+
// import { StarknetGasProvider } from "./providers/starknetGasProvider";
|
|
6
|
+
// import { TronGasProvider } from "./providers/tronGasProvider";
|
|
7
7
|
import { ZkSyncGasProvider } from "./providers/zkSyncGasProvider";
|
|
8
8
|
export class GasResolver {
|
|
9
9
|
constructor() {
|
|
10
10
|
this.providers = [
|
|
11
|
-
new StarknetGasProvider(),
|
|
11
|
+
// new StarknetGasProvider(),
|
|
12
12
|
new EVMGasProvider(),
|
|
13
|
-
new FuelGasProvider(),
|
|
14
|
-
new LoopringGasProvider(),
|
|
15
|
-
new SolanaGasProvider(),
|
|
13
|
+
// new FuelGasProvider(),
|
|
14
|
+
// new LoopringGasProvider(),
|
|
15
|
+
// new SolanaGasProvider(),
|
|
16
16
|
new ZkSyncGasProvider(),
|
|
17
|
-
new TronGasProvider()
|
|
17
|
+
// new TronGasProvider()
|
|
18
18
|
];
|
|
19
19
|
}
|
|
20
20
|
getGas({ address, network, token, recipientAddress }) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NetworkType } from "../../../Models/Network";
|
|
2
2
|
import { createPublicClient, encodeFunctionData, http, serializeTransaction } from "viem";
|
|
3
3
|
import { erc20Abi } from "viem";
|
|
4
|
-
import { datadogRum } from "@datadog/browser-rum";
|
|
4
|
+
// import { datadogRum } from "@datadog/browser-rum";
|
|
5
5
|
import formatAmount from "../../formatAmount";
|
|
6
6
|
import { publicActionsL2 } from 'viem/op-stack';
|
|
7
7
|
import resolveChain from "../../resolveChain";
|
|
@@ -81,7 +81,7 @@ class getEVMGas {
|
|
|
81
81
|
const error = new Error(e);
|
|
82
82
|
error.name = "GasPriceError";
|
|
83
83
|
error.cause = e;
|
|
84
|
-
datadogRum.addError(error);
|
|
84
|
+
// datadogRum.addError(error);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
async estimateFeesPerGas() {
|
|
@@ -92,7 +92,7 @@ class getEVMGas {
|
|
|
92
92
|
const error = new Error(e);
|
|
93
93
|
error.name = "FeesPerGasError";
|
|
94
94
|
error.cause = e;
|
|
95
|
-
datadogRum.addError(error);
|
|
95
|
+
// datadogRum.addError(error);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
async estimateMaxPriorityFeePerGas() {
|
|
@@ -103,7 +103,7 @@ class getEVMGas {
|
|
|
103
103
|
const error = new Error(e);
|
|
104
104
|
error.name = "MaxPriorityFeePerGasError";
|
|
105
105
|
error.cause = e;
|
|
106
|
-
datadogRum.addError(error);
|
|
106
|
+
// datadogRum.addError(error);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
async estimateNativeGasLimit() {
|
|
@@ -202,6 +202,7 @@ export default class getOptimismGas extends getEVMGas {
|
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
204
|
const fee = await this.client.estimateL1Fee({
|
|
205
|
+
chain: resolveChain(this.from),
|
|
205
206
|
data: serializedTransaction,
|
|
206
207
|
to: this.destination,
|
|
207
208
|
account: this.account,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Network } from "../../../Models/Network";
|
|
2
|
-
import { GasProps } from "../../../Models/Balance";
|
|
3
|
-
export declare class LoopringGasProvider {
|
|
4
|
-
supportsNetwork(network: Network): boolean;
|
|
5
|
-
getGas: ({ address, network, token }: GasProps) => Promise<number | undefined>;
|
|
6
|
-
}
|
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
import axios from "axios";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
1
|
+
// import axios from "axios";
|
|
2
|
+
// import { Network } from "../../../Models/Network";
|
|
3
|
+
// import formatAmount from "../../formatAmount";
|
|
4
|
+
// import KnownInternalNames from "../../knownIds";
|
|
5
|
+
// import { LOOPRING_URLs, LpFee } from "../../loopring/defs";
|
|
6
|
+
// import { LoopringAPI } from "../../loopring/LoopringAPI";
|
|
7
|
+
// import { GasProps } from "../../../Models/Balance";
|
|
8
|
+
// export class LoopringGasProvider {
|
|
9
|
+
// supportsNetwork(network: Network): boolean {
|
|
10
|
+
// return (KnownInternalNames.Networks.LoopringMainnet.includes(network.name) || KnownInternalNames.Networks.LoopringGoerli.includes(network.name))
|
|
11
|
+
// }
|
|
12
|
+
// getGas = async ({ address, network, token }: GasProps) => {
|
|
13
|
+
// try {
|
|
14
|
+
// const account: { data: AccountInfo } = await axios.get(`${LoopringAPI.BaseApi}${LOOPRING_URLs.ACCOUNT_ACTION}?owner=${address}`)
|
|
15
|
+
// const accInfo = account.data
|
|
16
|
+
// const result: { data: LpFee } = await axios.get(`${LoopringAPI.BaseApi}${LOOPRING_URLs.GET_OFFCHAIN_FEE_AMT}?accountId=${accInfo.accountId}&requestType=3`)
|
|
17
|
+
// const formatedGas = formatAmount(result.data.fees.find(f => f?.token === token.symbol)?.fee, Number(token.decimals));
|
|
18
|
+
// return formatedGas
|
|
19
|
+
// }
|
|
20
|
+
// catch (e) {
|
|
21
|
+
// console.log(e)
|
|
22
|
+
// }
|
|
23
|
+
// }
|
|
24
|
+
// }
|
|
25
|
+
// interface AccountInfo {
|
|
26
|
+
// accountId: number;
|
|
27
|
+
// }
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { GasProps } from "../../../Models/Balance";
|
|
2
|
-
import { Network } from "../../../Models/Network";
|
|
3
|
-
import { Provider } from "./types";
|
|
4
|
-
export declare class SolanaGasProvider implements Provider {
|
|
5
|
-
supportsNetwork(network: Network): boolean;
|
|
6
|
-
getGas: ({ address, network, token }: GasProps) => Promise<number | undefined>;
|
|
7
|
-
}
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
1
|
+
// import { GasProps } from "../../../Models/Balance";
|
|
2
|
+
// import { Network, NetworkType } from "../../../Models/Network";
|
|
3
|
+
// import formatAmount from "../../formatAmount";
|
|
4
|
+
// import { Provider } from "./types";
|
|
5
|
+
// export class SolanaGasProvider implements Provider {
|
|
6
|
+
// supportsNetwork(network: Network): boolean {
|
|
7
|
+
// return network.type === NetworkType.Solana
|
|
8
|
+
// }
|
|
9
|
+
// getGas = async ({ address, network, token }: GasProps) => {
|
|
10
|
+
// if (!address)
|
|
11
|
+
// return
|
|
12
|
+
// const { PublicKey, Connection } = await import("@solana/web3.js");
|
|
13
|
+
// const walletPublicKey = new PublicKey(address)
|
|
14
|
+
// const connection = new Connection(
|
|
15
|
+
// `${network.node_url}`,
|
|
16
|
+
// "confirmed"
|
|
17
|
+
// );
|
|
18
|
+
// if (!walletPublicKey) return
|
|
19
|
+
// try {
|
|
20
|
+
// const transactionBuilder = ((await import("../../wallets/solana/transactionBuilder")).default);
|
|
21
|
+
// const transaction = await transactionBuilder(network, token, walletPublicKey)
|
|
22
|
+
// if (!transaction || !network.token) return
|
|
23
|
+
// const message = transaction.compileMessage();
|
|
24
|
+
// const result = await connection.getFeeForMessage(message)
|
|
25
|
+
// const formatedGas = formatAmount(result.value, network.token?.decimals)
|
|
26
|
+
// return formatedGas
|
|
27
|
+
// }
|
|
28
|
+
// catch (e) {
|
|
29
|
+
// console.log(e)
|
|
30
|
+
// }
|
|
31
|
+
// }
|
|
32
|
+
// }
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { GasProps } from "../../../Models/Balance";
|
|
2
|
-
import { Network } from "../../../Models/Network";
|
|
3
|
-
import { Provider } from "./types";
|
|
4
|
-
export declare class StarknetGasProvider implements Provider {
|
|
5
|
-
supportsNetwork(network: Network): boolean;
|
|
6
|
-
getGas: ({ address, network, token }: GasProps) => Promise<number | undefined>;
|
|
7
|
-
}
|
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
1
|
+
// import { GasProps } from "../../../Models/Balance";
|
|
2
|
+
// import { Network } from "../../../Models/Network";
|
|
3
|
+
// import formatAmount from "../../formatAmount";
|
|
4
|
+
// import KnownInternalNames from "../../knownIds";
|
|
5
|
+
// import InternalApiClient from "../../internalApiClient";
|
|
6
|
+
// import { ApiResponse } from "../../../Models/ApiResponse";
|
|
7
|
+
// import { EstimateFee } from "starknet";
|
|
8
|
+
// import { Provider } from "./types";
|
|
9
|
+
// export class StarknetGasProvider implements Provider {
|
|
10
|
+
// supportsNetwork(network: Network): boolean {
|
|
11
|
+
// return (KnownInternalNames.Networks.StarkNetMainnet.includes(network.name) || KnownInternalNames.Networks.StarkNetGoerli.includes(network.name) || KnownInternalNames.Networks.StarkNetSepolia.includes(network.name))
|
|
12
|
+
// }
|
|
13
|
+
// getGas = async ({ address, network, token }: GasProps) => {
|
|
14
|
+
// const nodeUrl = network.node_url
|
|
15
|
+
// const contract_address = token?.contract
|
|
16
|
+
// const testnetWatchdog = '0x0423074c4bf903478daaa719bb3b1539d23af07db07101d263c78d75e5e6e0a3'
|
|
17
|
+
// const mainnetWatchdog = '0x022993789c33e54e0d296fc266a9c9a2e9dcabe2e48941f5fa1bd5692ac4a8c4'
|
|
18
|
+
// const mainnetRecipient = '0x19252B1dEef483477C4D30cFcc3e5Ed9C82FAFEA44669c182A45A01b4FdB97a'
|
|
19
|
+
// const testnetRecipient = '0x065a93bf9a33c87346f534a3b6c825e5c9e86a8e612cba683d0271aae5062d21'
|
|
20
|
+
// const version = (network.name.split('_').pop() === 'SEPOLIA' || network.name.split('_').pop() === 'GOERLI') ? 'sandbox' : 'prod'
|
|
21
|
+
// const recipient = version === 'prod' ? mainnetRecipient : testnetRecipient
|
|
22
|
+
// const watchdogContract = version === 'prod' ? mainnetWatchdog : testnetWatchdog
|
|
23
|
+
// if (!token || !network.token) return
|
|
24
|
+
// const client = new InternalApiClient()
|
|
25
|
+
// const basePath = window.location.pathname ? `/${window.location.pathname.split('/')[0]}` : '/'
|
|
26
|
+
// const feeEstimateResponse: ApiResponse<EstimateFee> = await client.GetStarknetFee(`nodeUrl=${nodeUrl}&walletAddress=${address}&contractAddress=${contract_address}&recipient=${recipient}&watchDogContract=${watchdogContract}`, basePath)
|
|
27
|
+
// if (!feeEstimateResponse?.data?.suggestedMaxFee) {
|
|
28
|
+
// throw new Error(`Couldn't get fee estimation for the transfer. Response: ${JSON.stringify(feeEstimateResponse)}`);
|
|
29
|
+
// };
|
|
30
|
+
// const feeInWei = feeEstimateResponse.data.suggestedMaxFee.toString();
|
|
31
|
+
// const gas = formatAmount(feeInWei, network.token.decimals)
|
|
32
|
+
// return gas
|
|
33
|
+
// }
|
|
34
|
+
// }
|
package/dist/lib/imtbl.d.ts
CHANGED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { ERC20TokenType, ETHTokenType, Link, LinkResults } from '@imtbl/imx-sdk';
|
|
2
|
-
import { Token } from '../Models/Network';
|
|
3
|
-
export default class ImtblClient {
|
|
4
|
-
link: Link;
|
|
5
|
-
constructor(network_internal_name: string);
|
|
6
|
-
Sign(): Promise<LinkResults.Sign>;
|
|
7
|
-
ConnectWallet(): Promise<LinkResults.Setup>;
|
|
8
|
-
Transfer(amount: string, token: Token, deposit_address: string): Promise<{
|
|
9
|
-
result: (({
|
|
10
|
-
type: import("@imtbl/imx-sdk").ERC721TokenType;
|
|
11
|
-
tokenId: string;
|
|
12
|
-
tokenAddress: string;
|
|
13
|
-
} & {
|
|
14
|
-
toAddress: string;
|
|
15
|
-
} & {
|
|
16
|
-
status: "success";
|
|
17
|
-
txId: number;
|
|
18
|
-
}) | ({
|
|
19
|
-
type: import("@imtbl/imx-sdk").ERC721TokenType;
|
|
20
|
-
tokenId: string;
|
|
21
|
-
tokenAddress: string;
|
|
22
|
-
} & {
|
|
23
|
-
toAddress: string;
|
|
24
|
-
} & {
|
|
25
|
-
status: "error";
|
|
26
|
-
message: string;
|
|
27
|
-
}) | ({
|
|
28
|
-
type: import("@imtbl/imx-sdk/dist/src/types").ETHTokenType;
|
|
29
|
-
} & {
|
|
30
|
-
amount: string;
|
|
31
|
-
} & {
|
|
32
|
-
toAddress: string;
|
|
33
|
-
} & {
|
|
34
|
-
status: "success";
|
|
35
|
-
txId: number;
|
|
36
|
-
}) | ({
|
|
37
|
-
type: import("@imtbl/imx-sdk/dist/src/types").ETHTokenType;
|
|
38
|
-
} & {
|
|
39
|
-
amount: string;
|
|
40
|
-
} & {
|
|
41
|
-
toAddress: string;
|
|
42
|
-
} & {
|
|
43
|
-
status: "error";
|
|
44
|
-
message: string;
|
|
45
|
-
}) | ({
|
|
46
|
-
type: import("@imtbl/imx-sdk/dist/src/types").ERC20TokenType;
|
|
47
|
-
tokenAddress: string;
|
|
48
|
-
symbol: string;
|
|
49
|
-
} & {
|
|
50
|
-
amount: string;
|
|
51
|
-
} & {
|
|
52
|
-
toAddress: string;
|
|
53
|
-
} & {
|
|
54
|
-
status: "success";
|
|
55
|
-
txId: number;
|
|
56
|
-
}) | ({
|
|
57
|
-
type: import("@imtbl/imx-sdk/dist/src/types").ERC20TokenType;
|
|
58
|
-
tokenAddress: string;
|
|
59
|
-
symbol: string;
|
|
60
|
-
} & {
|
|
61
|
-
amount: string;
|
|
62
|
-
} & {
|
|
63
|
-
toAddress: string;
|
|
64
|
-
} & {
|
|
65
|
-
status: "error";
|
|
66
|
-
message: string;
|
|
67
|
-
}))[];
|
|
68
|
-
} | undefined>;
|
|
69
|
-
}
|
package/dist/lib/imtbl.js
CHANGED
|
@@ -1,60 +1,63 @@
|
|
|
1
|
-
import { ERC20TokenType, ETHTokenType, Link } from '@imtbl/imx-sdk'
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
1
|
+
// import { ERC20TokenType, ETHTokenType, Link, LinkResults } from '@imtbl/imx-sdk'
|
|
2
|
+
// import { Token } from '../Models/Network'
|
|
3
|
+
// import KnownInternalNames from './knownIds'
|
|
4
|
+
// import { SwapItem } from './layerSwapApiClient'
|
|
5
|
+
// import NetworkSettings from './NetworkSettings'
|
|
6
|
+
// export default class ImtblClient {
|
|
7
|
+
// link: Link
|
|
8
|
+
// constructor(network_internal_name: string) {
|
|
9
|
+
// const url = NetworkSettings.ImmutableXSettings[network_internal_name].linkUri
|
|
10
|
+
// this.link = new Link(url)
|
|
11
|
+
// }
|
|
12
|
+
// async Sign(): Promise<LinkResults.Sign> {
|
|
13
|
+
// let result = await this.link.sign({
|
|
14
|
+
// "message": "Your address must be verified once before it can be used for a swap. Signing does not require gas and does not permit us to perform transactions with your wallet.",
|
|
15
|
+
// "description": "Your address must be verified once before it can be used for a swap. Signing does not require gas and does not permit us to perform transactions with your wallet."
|
|
16
|
+
// })
|
|
17
|
+
// return result
|
|
18
|
+
// }
|
|
19
|
+
// async ConnectWallet(): Promise<LinkResults.Setup> {
|
|
20
|
+
// try {
|
|
21
|
+
// let result = await this.link.setup({})
|
|
22
|
+
// return result
|
|
23
|
+
// }
|
|
24
|
+
// catch (e) {
|
|
25
|
+
// if (e.code === 1003)
|
|
26
|
+
// throw new Error("You closed ImmutableX connect wallet window")
|
|
27
|
+
// else
|
|
28
|
+
// throw e
|
|
29
|
+
// }
|
|
30
|
+
// }
|
|
31
|
+
// async Transfer(amount: string, token: Token, deposit_address: string) {
|
|
32
|
+
// try {
|
|
33
|
+
// if (token.symbol === KnownInternalNames.Currencies.ETH) {
|
|
34
|
+
// const res = await this.link.transfer([
|
|
35
|
+
// {
|
|
36
|
+
// type: ETHTokenType.ETH,
|
|
37
|
+
// amount: amount,
|
|
38
|
+
// toAddress: deposit_address
|
|
39
|
+
// }
|
|
40
|
+
// ])
|
|
41
|
+
// return res;
|
|
42
|
+
// }
|
|
43
|
+
// else {
|
|
44
|
+
// if (!token.contract) {
|
|
45
|
+
// throw Error("immutable contract_address is not defined")
|
|
46
|
+
// }
|
|
47
|
+
// const res = await this.link.transfer([
|
|
48
|
+
// {
|
|
49
|
+
// type: ERC20TokenType.ERC20,
|
|
50
|
+
// amount: amount,
|
|
51
|
+
// toAddress: deposit_address,
|
|
52
|
+
// tokenAddress: token.contract.toLowerCase(),
|
|
53
|
+
// symbol: token.symbol
|
|
54
|
+
// }
|
|
55
|
+
// ])
|
|
56
|
+
// return res;
|
|
57
|
+
// }
|
|
58
|
+
// }
|
|
59
|
+
// catch (e) {
|
|
60
|
+
// console.log(e)
|
|
61
|
+
// }
|
|
62
|
+
// }
|
|
63
|
+
// }
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
2
|
import { ApiResponse } from "../Models/ApiResponse";
|
|
3
|
-
import { EstimateFee } from "starknet";
|
|
4
3
|
export default class InternalApiClient {
|
|
5
4
|
authInterceptor: AxiosInstance;
|
|
6
5
|
constructor();
|
|
7
6
|
VerifyWallet(queryParams: string): Promise<ApiResponse<void>>;
|
|
8
|
-
GetStarknetFee(queryParams: string, basePath: string): Promise<ApiResponse<EstimateFee>>;
|
|
9
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InitializeAuthInstance } from "./axiosInterceptor";
|
|
2
|
-
import axios from "axios";
|
|
3
2
|
import TokenService from "./TokenService";
|
|
3
|
+
// import { EstimateFee } from "starknet";
|
|
4
4
|
export default class InternalApiClient {
|
|
5
5
|
constructor() {
|
|
6
6
|
this.authInterceptor = InitializeAuthInstance();
|
|
@@ -9,7 +9,4 @@ export default class InternalApiClient {
|
|
|
9
9
|
let token = TokenService.getAuthData()?.access_token;
|
|
10
10
|
return await this.authInterceptor(`/api/network_account${queryParams}`, { method: "GET", headers: { 'Access-Control-Allow-Origin': '*', "Authorization": `Bearer ${token}` } });
|
|
11
11
|
}
|
|
12
|
-
async GetStarknetFee(queryParams, basePath) {
|
|
13
|
-
return await axios.get(`${basePath}/api/get_starknet_fee?${queryParams}`);
|
|
14
|
-
}
|
|
15
12
|
}
|
|
@@ -4,7 +4,7 @@ import { v4 as uuidv4 } from 'uuid';
|
|
|
4
4
|
import { AuthRefreshFailedError } from "./Errors/AuthRefreshFailedError";
|
|
5
5
|
import { EmptyApiResponse } from "../Models/ApiResponse";
|
|
6
6
|
import LayerSwapAuthApiClient from "./userAuthApiClient";
|
|
7
|
-
import { datadogRum } from '@datadog/browser-rum';
|
|
7
|
+
// import { datadogRum } from '@datadog/browser-rum';
|
|
8
8
|
class LayerSwapApiClient {
|
|
9
9
|
constructor() {
|
|
10
10
|
this.fetcher = (url) => this.AuthenticatedRequest("GET", url);
|
|
@@ -66,7 +66,7 @@ class LayerSwapApiClient {
|
|
|
66
66
|
const renderingError = new Error(`API request error with uri:${uri}`);
|
|
67
67
|
renderingError.name = `APIError`;
|
|
68
68
|
renderingError.cause = reason;
|
|
69
|
-
datadogRum.addError(renderingError);
|
|
69
|
+
// datadogRum.addError(renderingError);
|
|
70
70
|
return Promise.reject(reason);
|
|
71
71
|
}
|
|
72
72
|
});
|
|
@@ -88,7 +88,7 @@ class LayerSwapApiClient {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
LayerSwapApiClient.apiBaseEndpoint = AppSettings.LayerswapApiUri;
|
|
91
|
-
LayerSwapApiClient.apiKey = AppSettings.
|
|
91
|
+
LayerSwapApiClient.apiKey = AppSettings.LayerswapApiKeys[AppSettings.ApiVersion || 'mainnet'];
|
|
92
92
|
export default LayerSwapApiClient;
|
|
93
93
|
export var DepositAddressSource;
|
|
94
94
|
(function (DepositAddressSource) {
|
package/dist/lib/logError.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { datadogRum } from "@datadog/browser-rum";
|
|
1
|
+
// import { datadogRum } from "@datadog/browser-rum";
|
|
2
2
|
import AppSettings from "./AppSettings";
|
|
3
3
|
const logError = (message) => {
|
|
4
4
|
const error = new Error(message + ` env: ${AppSettings.ApiVersion ?? 'prod'}`);
|
|
5
5
|
error.name = 'AlertUI';
|
|
6
6
|
error.cause = error;
|
|
7
|
-
datadogRum.addError(error);
|
|
7
|
+
// datadogRum.addError(error);
|
|
8
8
|
};
|
|
9
9
|
export default logError;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { StarknetNftProvider } from "./providers/starknetNftProvider";
|
|
2
1
|
export class NftBalanceResolver {
|
|
3
2
|
constructor() {
|
|
4
3
|
this.providers = [
|
|
5
|
-
|
|
4
|
+
// new StarknetNftProvider()
|
|
6
5
|
];
|
|
7
6
|
}
|
|
8
7
|
async getBalance({ address, network, contractAddress }) {
|