@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,128 +1,175 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { useConfig } from 'wagmi'
|
|
15
|
-
import AppSettings from '../../../../../../lib/AppSettings';
|
|
16
|
-
import WalletMessage from '../../Messages/Message';
|
|
17
|
-
const LoopringWalletWithdraw = ({ network, token, swapId, callData, depositAddress, amount }) => {
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
|
|
1
|
+
// import { ArrowLeftRight, Lock } from 'lucide-react';
|
|
2
|
+
// import { FC, useCallback, useEffect, useState } from 'react'
|
|
3
|
+
// import toast from 'react-hot-toast';
|
|
4
|
+
// import { useAccount } from 'wagmi';
|
|
5
|
+
// import { ButtonWrapper, ChangeNetworkButton, ConnectWalletButton } from '../WalletTransfer/buttons';
|
|
6
|
+
// import { useSwapTransactionStore } from '../../../../../../stores/swapTransactionStore';
|
|
7
|
+
// import SignatureIcon from '../../../../../Icons/SignatureIcon';
|
|
8
|
+
// import { ActivationTokenPicker } from './ActivationTokentPicker';
|
|
9
|
+
// import { useActivationData, useLoopringAccount, useLoopringTokens } from './hooks';
|
|
10
|
+
// import { LoopringAPI } from '../../../../../../lib/loopring/LoopringAPI';
|
|
11
|
+
// import { ChainId, UnlockedAccount } from '../../../../../../lib/loopring/defs';
|
|
12
|
+
// import { BackendTransactionStatus } from '../../../../../../lib/layerSwapApiClient';
|
|
13
|
+
// import { WithdrawPageProps } from '../WalletTransferContent';
|
|
14
|
+
// import { useConfig } from 'wagmi'
|
|
15
|
+
// import AppSettings from '../../../../../../lib/AppSettings';
|
|
16
|
+
// import WalletMessage from '../../Messages/Message';
|
|
17
|
+
// const LoopringWalletWithdraw: FC<WithdrawPageProps> = ({ network, token, swapId, callData, depositAddress, amount }) => {
|
|
18
|
+
// const [loading, setLoading] = useState(false);
|
|
19
|
+
// const [transferDone, setTransferDone] = useState<boolean>();
|
|
20
|
+
// const [activationPubKey, setActivationPubKey] = useState<{ x: string; y: string }>()
|
|
21
|
+
// const [selectedActivationAsset, setSelectedActivationAsset] = useState<string>()
|
|
22
|
+
// const { setSwapTransaction } = useSwapTransactionStore();
|
|
23
|
+
// const { isConnected, address: fromAddress, chain } = useAccount();
|
|
24
|
+
// const { account: accInfo, isLoading: loadingAccount, noAccount, mutate: refetchAccount } = useLoopringAccount({ address: fromAddress })
|
|
25
|
+
// const { availableBalances, defaultValue, loading: activationDataIsLoading, feeData } = useActivationData(accInfo?.accountId)
|
|
26
|
+
// const [unlockedAccount, setUnlockedAccount] = useState<UnlockedAccount | undefined>()
|
|
27
|
+
// const { tokens } = useLoopringTokens()
|
|
28
|
+
// const loopringToken = tokens?.find(t => t.symbol === selectedActivationAsset)
|
|
29
|
+
// const config = useConfig()
|
|
30
|
+
// useEffect(() => {
|
|
31
|
+
// if (fromAddress) {
|
|
32
|
+
// setUnlockedAccount(undefined)
|
|
33
|
+
// }
|
|
34
|
+
// }, [fromAddress])
|
|
35
|
+
// const handleUnlockAccount = useCallback(async () => {
|
|
36
|
+
// setLoading(true)
|
|
37
|
+
// try {
|
|
38
|
+
// if (!accInfo)
|
|
39
|
+
// return
|
|
40
|
+
// const res = await LoopringAPI.userAPI.unlockAccount(accInfo, config)
|
|
41
|
+
// setUnlockedAccount(res)
|
|
42
|
+
// }
|
|
43
|
+
// catch (e) {
|
|
44
|
+
// toast(e.message)
|
|
45
|
+
// }
|
|
46
|
+
// finally {
|
|
47
|
+
// setLoading(false)
|
|
48
|
+
// }
|
|
49
|
+
// }, [accInfo, config])
|
|
50
|
+
// const activateAccout = useCallback(async () => {
|
|
51
|
+
// setLoading(true)
|
|
52
|
+
// try {
|
|
53
|
+
// if (!accInfo || !selectedActivationAsset || !loopringToken)
|
|
54
|
+
// return
|
|
55
|
+
// const publicKey = await LoopringAPI.userAPI.activateAccount(
|
|
56
|
+
// {
|
|
57
|
+
// accInfo,
|
|
58
|
+
// token: { id: loopringToken?.tokenId, symbol: loopringToken?.symbol }
|
|
59
|
+
// }, config)
|
|
60
|
+
// setActivationPubKey(publicKey)
|
|
61
|
+
// await refetchAccount()
|
|
62
|
+
// }
|
|
63
|
+
// catch (e) {
|
|
64
|
+
// toast(e.message)
|
|
65
|
+
// }
|
|
66
|
+
// finally {
|
|
67
|
+
// setLoading(false)
|
|
68
|
+
// }
|
|
69
|
+
// }, [accInfo, selectedActivationAsset, refetchAccount, loopringToken])
|
|
70
|
+
// const handleTransfer = useCallback(async () => {
|
|
71
|
+
// setLoading(true)
|
|
72
|
+
// try {
|
|
73
|
+
// if (!swapId || !accInfo || !unlockedAccount || !token || !amount)
|
|
74
|
+
// return
|
|
75
|
+
// const transferResult = await LoopringAPI.userAPI.transfer({
|
|
76
|
+
// accInfo,
|
|
77
|
+
// amount: amount.toString(),
|
|
78
|
+
// depositAddress: depositAddress as `0x${string}`,
|
|
79
|
+
// call_data: callData,
|
|
80
|
+
// token,
|
|
81
|
+
// unlockedAccount
|
|
82
|
+
// }, config)
|
|
83
|
+
// if (transferResult.hash) {
|
|
84
|
+
// setSwapTransaction(swapId, BackendTransactionStatus.Pending, transferResult.hash);
|
|
85
|
+
// setTransferDone(true)
|
|
86
|
+
// }
|
|
87
|
+
// else {
|
|
88
|
+
// toast(transferResult.resultInfo?.message || "Unexpected error.")
|
|
89
|
+
// }
|
|
90
|
+
// }
|
|
91
|
+
// catch (e) {
|
|
92
|
+
// if (e?.message)
|
|
93
|
+
// toast(e.message)
|
|
94
|
+
// }
|
|
95
|
+
// setLoading(false)
|
|
96
|
+
// }, [swapId, network, depositAddress, accInfo, unlockedAccount, token, amount, callData])
|
|
97
|
+
// if (noAccount) {
|
|
98
|
+
// //TODO fix text
|
|
99
|
+
// return <WalletMessage
|
|
100
|
+
// status="error"
|
|
101
|
+
// header='Account is not activated'
|
|
102
|
+
// details={`Make a deposit to your address for activating Loopring account`} />
|
|
103
|
+
// }
|
|
104
|
+
// if (accInfo?.frozen) {
|
|
105
|
+
// if (accInfo.publicKey.x === activationPubKey?.x
|
|
106
|
+
// && accInfo.publicKey.y === activationPubKey?.y) {
|
|
107
|
+
// return <WalletMessage
|
|
108
|
+
// status="pending"
|
|
109
|
+
// header='Your account is beeing activated'
|
|
110
|
+
// details={`You will be able to make transfers in 3-5 minutes.`} />
|
|
111
|
+
// }
|
|
112
|
+
// else {
|
|
113
|
+
// return <WalletMessage
|
|
114
|
+
// status="pending"
|
|
115
|
+
// header='Your account is frozen'
|
|
116
|
+
// details={`If you have just activated your account it will be unfrozen in couple of minutes.`} />
|
|
117
|
+
// }
|
|
118
|
+
// }
|
|
119
|
+
// if (!isConnected) {
|
|
120
|
+
// return <ConnectWalletButton />
|
|
121
|
+
// }
|
|
122
|
+
// let walletChainId = AppSettings.ApiVersion === "sandbox" ? ChainId.SEPOLIA : ChainId.MAINNET
|
|
123
|
+
// if (network && chain?.id !== Number(walletChainId)) {
|
|
124
|
+
// return (
|
|
125
|
+
// <ChangeNetworkButton
|
|
126
|
+
// chainId={Number(walletChainId)}
|
|
127
|
+
// network={network?.display_name}
|
|
128
|
+
// />
|
|
129
|
+
// )
|
|
130
|
+
// }
|
|
131
|
+
// const shouldActivate = accInfo && !(accInfo.publicKey.x
|
|
132
|
+
// || accInfo.publicKey.y)
|
|
133
|
+
// if (shouldActivate && !activationDataIsLoading && (!availableBalances || !defaultValue || !feeData))
|
|
134
|
+
// return <WalletMessage
|
|
135
|
+
// status="error"
|
|
136
|
+
// header='Not enough fee'
|
|
137
|
+
// details={`The balance of the account is not enough to activate it․`} />
|
|
138
|
+
// return (
|
|
139
|
+
// <>
|
|
140
|
+
// <div className="w-full space-y-5 flex flex-col justify-between h-full text-secondary-text">
|
|
141
|
+
// <div className='space-y-4'>
|
|
142
|
+
// {
|
|
143
|
+
// (accInfo && unlockedAccount) ?
|
|
144
|
+
// <ButtonWrapper isDisabled={!!(loading || transferDone)} isSubmitting={!!(loading || transferDone)} onClick={handleTransfer} icon={<ArrowLeftRight className="h-5 w-5 ml-2" aria-hidden="true" />} >
|
|
145
|
+
// Send from wallet
|
|
146
|
+
// </ButtonWrapper>
|
|
147
|
+
// :
|
|
148
|
+
// <>
|
|
149
|
+
// {shouldActivate &&
|
|
150
|
+
// <ActivationTokenPicker
|
|
151
|
+
// onChange={setSelectedActivationAsset}
|
|
152
|
+
// availableBalances={availableBalances}
|
|
153
|
+
// defaultValue={defaultValue}
|
|
154
|
+
// feeData={feeData}
|
|
155
|
+
// />
|
|
156
|
+
// }
|
|
157
|
+
// <ButtonWrapper
|
|
158
|
+
// isDisabled={loadingAccount || !accInfo || loading || activationDataIsLoading}
|
|
159
|
+
// isSubmitting={loadingAccount || loading}
|
|
160
|
+
// onClick={shouldActivate ? activateAccout : handleUnlockAccount}
|
|
161
|
+
// icon={shouldActivate ?
|
|
162
|
+
// <SignatureIcon className="h-5 w-5 ml-2" aria-hidden="true" />
|
|
163
|
+
// : <Lock className="h-5 w-5 ml-2" aria-hidden="true" />
|
|
164
|
+
// }
|
|
165
|
+
// >
|
|
166
|
+
// {shouldActivate ? <>Activate account</> : <>Unlock account</>}
|
|
167
|
+
// </ButtonWrapper>
|
|
168
|
+
// </>
|
|
169
|
+
// }
|
|
170
|
+
// </div>
|
|
171
|
+
// </div>
|
|
172
|
+
// </>
|
|
173
|
+
// )
|
|
174
|
+
// }
|
|
175
|
+
// export default LoopringWalletWithdraw
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { Transaction, Connection } from '@solana/web3.js';
|
|
3
|
-
import { SignerWalletAdapterProps } from '@solana/wallet-adapter-base';
|
|
4
|
-
import { WithdrawPageProps } from '../WalletTransferContent';
|
|
5
|
-
declare const SVMWalletWithdrawStep: FC<WithdrawPageProps>;
|
|
6
|
-
export default SVMWalletWithdrawStep;
|
|
7
|
-
export declare const configureAndSendCurrentTransaction: (transaction: Transaction, connection: Connection, signTransaction: SignerWalletAdapterProps["signTransaction"]) => Promise<string | undefined>;
|
|
@@ -1,116 +1,138 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import useWallet from '
|
|
6
|
-
import {
|
|
7
|
-
import { useSwapTransactionStore } from '../../../../../../stores/swapTransactionStore';
|
|
8
|
-
import WalletIcon from '../../../../../Icons/WalletIcon';
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
1
|
+
// import { FC, useCallback, useState } from 'react'
|
|
2
|
+
// import { BackendTransactionStatus } from '../../../../../../lib/layerSwapApiClient';
|
|
3
|
+
// import { Transaction, Connection, LAMPORTS_PER_SOL } from '@solana/web3.js';
|
|
4
|
+
// import useWallet from '../../../../../../hooks/useWallet';
|
|
5
|
+
// import { useWallet as useSolanaWallet } from '@solana/wallet-adapter-react';
|
|
6
|
+
// import { SignerWalletAdapterProps } from '@solana/wallet-adapter-base';
|
|
7
|
+
// import { useSwapTransactionStore } from '../../../../../../stores/swapTransactionStore';
|
|
8
|
+
// import WalletIcon from '../../../../../Icons/WalletIcon';
|
|
9
|
+
// import { WithdrawPageProps } from '../WalletTransferContent';
|
|
10
|
+
// import { ButtonWrapper, ConnectWalletButton } from '../WalletTransfer/buttons';
|
|
11
|
+
// import useSWRBalance from '../../../../../../lib/balances/useSWRBalance';
|
|
12
|
+
// import { useSettingsState } from '../../../../../../context/settings';
|
|
13
|
+
// import WalletMessage from '../../Messages/Message';
|
|
14
|
+
// import TransactionMessages from '../../Messages/TransactionMessages';
|
|
15
|
+
// import { datadogRum } from '@datadog/browser-rum';
|
|
16
|
+
// import { transactionSenderAndConfirmationWaiter } from './transactionSender';
|
|
17
|
+
// const SVMWalletWithdrawStep: FC<WithdrawPageProps> = ({ network, callData, swapId, token, amount }) => {
|
|
18
|
+
// const [loading, setLoading] = useState(false);
|
|
19
|
+
// const [error, setError] = useState<string | undefined>()
|
|
20
|
+
// const [insufficientTokens, setInsufficientTokens] = useState<string[]>([])
|
|
21
|
+
// const { provider } = useWallet(network, 'withdrawal');
|
|
22
|
+
// const { setSwapTransaction } = useSwapTransactionStore();
|
|
23
|
+
// const wallet = provider?.activeWallet
|
|
24
|
+
// const { wallet: solanaWallet, signTransaction } = useSolanaWallet();
|
|
25
|
+
// const walletPublicKey = solanaWallet?.adapter.publicKey
|
|
26
|
+
// const solanaNode = network?.node_url
|
|
27
|
+
// const networkName = network?.name
|
|
28
|
+
// const { networks } = useSettingsState()
|
|
29
|
+
// const networkWithTokens = networks.find(n => n.name === networkName)
|
|
30
|
+
// const { balance } = useSWRBalance(wallet?.address, networkWithTokens)
|
|
31
|
+
// const handleTransfer = useCallback(async () => {
|
|
32
|
+
// setLoading(true)
|
|
33
|
+
// setError(undefined)
|
|
34
|
+
// try {
|
|
35
|
+
// if (!signTransaction) throw new Error('Missing signTransaction')
|
|
36
|
+
// if (!callData) throw new Error('Missing callData')
|
|
37
|
+
// if (!swapId) throw new Error('Missing swapId')
|
|
38
|
+
// const connection = new Connection(
|
|
39
|
+
// `${solanaNode}`,
|
|
40
|
+
// "confirmed"
|
|
41
|
+
// );
|
|
42
|
+
// const arrayBufferCallData = Uint8Array.from(atob(callData), c => c.charCodeAt(0))
|
|
43
|
+
// const transaction = Transaction.from(arrayBufferCallData)
|
|
44
|
+
// const feeInLamports = await transaction.getEstimatedFee(connection)
|
|
45
|
+
// const feeInSol = feeInLamports / LAMPORTS_PER_SOL
|
|
46
|
+
// const nativeTokenBalance = balance?.find(b => b.token == network?.token?.symbol)
|
|
47
|
+
// const tokenbalanceData = balance?.find(b => b.token == token?.symbol)
|
|
48
|
+
// const tokenBalanceAmount = tokenbalanceData?.amount
|
|
49
|
+
// const nativeTokenBalanceAmount = nativeTokenBalance?.amount
|
|
50
|
+
// const insufficientTokensArr: string[] = []
|
|
51
|
+
// if (network?.token && (Number(nativeTokenBalanceAmount) < feeInSol || isNaN(Number(nativeTokenBalanceAmount)))) {
|
|
52
|
+
// insufficientTokensArr.push(network.token?.symbol);
|
|
53
|
+
// }
|
|
54
|
+
// if (network?.token?.symbol !== token?.symbol && amount && token?.symbol && Number(tokenBalanceAmount) < amount) {
|
|
55
|
+
// insufficientTokensArr.push(token?.symbol);
|
|
56
|
+
// }
|
|
57
|
+
// setInsufficientTokens(insufficientTokensArr)
|
|
58
|
+
// const signature = await configureAndSendCurrentTransaction(
|
|
59
|
+
// transaction,
|
|
60
|
+
// connection,
|
|
61
|
+
// signTransaction
|
|
62
|
+
// );
|
|
63
|
+
// if (signature) {
|
|
64
|
+
// setSwapTransaction(swapId, BackendTransactionStatus.Pending, signature);
|
|
65
|
+
// }
|
|
66
|
+
// }
|
|
67
|
+
// catch (e) {
|
|
68
|
+
// if (e?.message) {
|
|
69
|
+
// if (e?.logs?.some(m => m?.includes('insufficient funds')) || e.message.includes('Attempt to debit an account')) setError('insufficientFunds')
|
|
70
|
+
// else setError(e.message)
|
|
71
|
+
// return
|
|
72
|
+
// }
|
|
73
|
+
// }
|
|
74
|
+
// finally {
|
|
75
|
+
// setLoading(false)
|
|
76
|
+
// }
|
|
77
|
+
// }, [swapId, callData, walletPublicKey, signTransaction, network])
|
|
78
|
+
// if (!wallet || !walletPublicKey) {
|
|
79
|
+
// return <ConnectWalletButton />
|
|
80
|
+
// }
|
|
81
|
+
// return (
|
|
82
|
+
// <div className="w-full space-y-3 flex flex-col justify-between h-full text-primary-text">
|
|
83
|
+
// <TransactionMessage
|
|
84
|
+
// error={error}
|
|
85
|
+
// isLoading={loading}
|
|
86
|
+
// insufficientTokens={insufficientTokens}
|
|
87
|
+
// />
|
|
88
|
+
// {
|
|
89
|
+
// wallet && !loading &&
|
|
90
|
+
// <ButtonWrapper isDisabled={!!loading || !callData} isSubmitting={!!loading || !callData} onClick={handleTransfer} icon={<WalletIcon className="stroke-2 w-6 h-6" aria-hidden="true" />} >
|
|
91
|
+
// {error ? 'Try again' : 'Send from wallet'}
|
|
92
|
+
// </ButtonWrapper>
|
|
93
|
+
// }
|
|
94
|
+
// </div>
|
|
95
|
+
// )
|
|
96
|
+
// }
|
|
97
|
+
// const TransactionMessage: FC<{ isLoading: boolean, error: string | undefined, insufficientTokens: string[] }> = ({ isLoading, error, insufficientTokens }) => {
|
|
98
|
+
// if (isLoading) {
|
|
99
|
+
// return <TransactionMessages.ConfirmTransactionMessage />
|
|
100
|
+
// }
|
|
101
|
+
// else if (error === "insufficientFunds") {
|
|
102
|
+
// return <WalletMessage
|
|
103
|
+
// status="error"
|
|
104
|
+
// header='Insufficient funds'
|
|
105
|
+
// details={`The balance of ${insufficientTokens?.join(" and ")} in the connected wallet is not enough`} />
|
|
106
|
+
// }
|
|
107
|
+
// else if (error === "User rejected the request.") {
|
|
108
|
+
// return <TransactionMessages.TransactionRejectedMessage />
|
|
109
|
+
// }
|
|
110
|
+
// else if (error) {
|
|
111
|
+
// const swapWithdrawalError = new Error(error);
|
|
112
|
+
// swapWithdrawalError.name = `SwapWithdrawalError`;
|
|
113
|
+
// swapWithdrawalError.cause = error;
|
|
114
|
+
// datadogRum.addError(swapWithdrawalError);
|
|
115
|
+
// return <TransactionMessages.UexpectedErrorMessage message={error} />
|
|
116
|
+
// }
|
|
117
|
+
// else return <></>
|
|
118
|
+
// }
|
|
119
|
+
// export default SVMWalletWithdrawStep;
|
|
120
|
+
// export const configureAndSendCurrentTransaction = async (
|
|
121
|
+
// transaction: Transaction,
|
|
122
|
+
// connection: Connection,
|
|
123
|
+
// signTransaction: SignerWalletAdapterProps['signTransaction']
|
|
124
|
+
// ) => {
|
|
125
|
+
// const blockHash = await connection.getLatestBlockhash();
|
|
126
|
+
// transaction.recentBlockhash = blockHash.blockhash;
|
|
127
|
+
// transaction.lastValidBlockHeight = blockHash.lastValidBlockHeight;
|
|
128
|
+
// const signed = await signTransaction(transaction);
|
|
129
|
+
// const res = await transactionSenderAndConfirmationWaiter({
|
|
130
|
+
// connection,
|
|
131
|
+
// serializedTransaction: signed.serialize(),
|
|
132
|
+
// blockhashWithExpiryBlockHeight: blockHash,
|
|
133
|
+
// });
|
|
134
|
+
// if (res?.meta?.err) {
|
|
135
|
+
// throw new Error(res.meta.err.toString())
|
|
136
|
+
// }
|
|
137
|
+
// return res?.transaction.signatures[0];
|
|
138
|
+
// };
|
package/dist/components/Pages/SwapPages/Withdraw/Wallet/SVMWalletWithdraw/transactionSender.d.ts
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { BlockhashWithExpiryBlockHeight, Connection, VersionedTransactionResponse } from "@solana/web3.js";
|
|
2
|
-
type TransactionSenderAndConfirmationWaiterArgs = {
|
|
3
|
-
connection: Connection;
|
|
4
|
-
serializedTransaction: Buffer;
|
|
5
|
-
blockhashWithExpiryBlockHeight: BlockhashWithExpiryBlockHeight;
|
|
6
|
-
};
|
|
7
|
-
export declare function transactionSenderAndConfirmationWaiter({ connection, serializedTransaction, blockhashWithExpiryBlockHeight, }: TransactionSenderAndConfirmationWaiterArgs): Promise<VersionedTransactionResponse | null>;
|
|
8
|
-
export {};
|