thirdweb 5.105.9 → 5.105.10
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/cjs/chains/chain-definitions/t-rex-testnet.js +20 -0
- package/dist/cjs/chains/chain-definitions/t-rex-testnet.js.map +1 -0
- package/dist/cjs/exports/chains.js +3 -1
- package/dist/cjs/exports/chains.js.map +1 -1
- package/dist/cjs/insight/common.js +0 -5
- package/dist/cjs/insight/common.js.map +1 -1
- package/dist/cjs/pay/buyWithCrypto/getStatus.js.map +1 -1
- package/dist/cjs/pay/buyWithFiat/isSwapRequiredPostOnramp.js +0 -44
- package/dist/cjs/pay/buyWithFiat/isSwapRequiredPostOnramp.js.map +1 -1
- package/dist/cjs/pay/utils/commonTypes.js +1 -2
- package/dist/cjs/pay/utils/commonTypes.js.map +1 -1
- package/dist/cjs/react/core/hooks/useBridgeQuote.js +3 -1
- package/dist/cjs/react/core/hooks/useBridgeQuote.js.map +1 -1
- package/dist/cjs/react/core/hooks/usePaymentMethods.js +6 -1
- package/dist/cjs/react/core/hooks/usePaymentMethods.js.map +1 -1
- package/dist/cjs/react/core/utils/storage.js +1 -2
- package/dist/cjs/react/core/utils/storage.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/BridgeOrchestrator.js +7 -2
- package/dist/cjs/react/web/ui/Bridge/BridgeOrchestrator.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-selection/PaymentSelection.js +3 -2
- package/dist/cjs/react/web/ui/Bridge/payment-selection/PaymentSelection.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-selection/TokenSelection.js +4 -3
- package/dist/cjs/react/web/ui/Bridge/payment-selection/TokenSelection.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js +11 -6
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/MenuButton.js +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/MenuButton.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/NetworkSelector.js +1 -7
- package/dist/cjs/react/web/ui/ConnectWallet/NetworkSelector.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/WalletSelector.js +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/WalletSelector.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.js +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.js +0 -112
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/utils.js +0 -9
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/utils.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ReceiveFunds.js +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ReceiveFunds.js.map +1 -1
- package/dist/cjs/react/web/ui/PayEmbed.js +1 -30
- package/dist/cjs/react/web/ui/PayEmbed.js.map +1 -1
- package/dist/cjs/react/web/ui/TransactionButton/DepositScreen.js +0 -1
- package/dist/cjs/react/web/ui/TransactionButton/DepositScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/components/Modal.js +3 -3
- package/dist/cjs/react/web/ui/components/Modal.js.map +1 -1
- package/dist/cjs/react/web/ui/components/buttons.js +0 -2
- package/dist/cjs/react/web/ui/components/buttons.js.map +1 -1
- package/dist/cjs/react/web/ui/components/text.js +0 -1
- package/dist/cjs/react/web/ui/components/text.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/GetStartedScreen.js +0 -1
- package/dist/cjs/react/web/wallets/shared/GetStartedScreen.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/OTPLoginUI.js +0 -1
- package/dist/cjs/react/web/wallets/shared/OTPLoginUI.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/chains/chain-definitions/t-rex-testnet.js +17 -0
- package/dist/esm/chains/chain-definitions/t-rex-testnet.js.map +1 -0
- package/dist/esm/exports/chains.js +1 -0
- package/dist/esm/exports/chains.js.map +1 -1
- package/dist/esm/insight/common.js +0 -4
- package/dist/esm/insight/common.js.map +1 -1
- package/dist/esm/pay/buyWithCrypto/getStatus.js.map +1 -1
- package/dist/esm/pay/buyWithFiat/isSwapRequiredPostOnramp.js +0 -43
- package/dist/esm/pay/buyWithFiat/isSwapRequiredPostOnramp.js.map +1 -1
- package/dist/esm/pay/utils/commonTypes.js +2 -1
- package/dist/esm/pay/utils/commonTypes.js.map +1 -1
- package/dist/esm/react/core/hooks/useBridgeQuote.js +3 -1
- package/dist/esm/react/core/hooks/useBridgeQuote.js.map +1 -1
- package/dist/esm/react/core/hooks/usePaymentMethods.js +6 -1
- package/dist/esm/react/core/hooks/usePaymentMethods.js.map +1 -1
- package/dist/esm/react/core/utils/storage.js +0 -1
- package/dist/esm/react/core/utils/storage.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/BridgeOrchestrator.js +7 -2
- package/dist/esm/react/web/ui/Bridge/BridgeOrchestrator.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-selection/PaymentSelection.js +3 -2
- package/dist/esm/react/web/ui/Bridge/payment-selection/PaymentSelection.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-selection/TokenSelection.js +4 -3
- package/dist/esm/react/web/ui/Bridge/payment-selection/TokenSelection.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Details.js +12 -7
- package/dist/esm/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/MenuButton.js +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/MenuButton.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/NetworkSelector.js +1 -7
- package/dist/esm/react/web/ui/ConnectWallet/NetworkSelector.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/WalletSelector.js +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/WalletSelector.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.js +1 -110
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/utils.js +0 -8
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/utils.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ReceiveFunds.js +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ReceiveFunds.js.map +1 -1
- package/dist/esm/react/web/ui/PayEmbed.js +3 -32
- package/dist/esm/react/web/ui/PayEmbed.js.map +1 -1
- package/dist/esm/react/web/ui/TransactionButton/DepositScreen.js +0 -1
- package/dist/esm/react/web/ui/TransactionButton/DepositScreen.js.map +1 -1
- package/dist/esm/react/web/ui/components/Modal.js +1 -1
- package/dist/esm/react/web/ui/components/Modal.js.map +1 -1
- package/dist/esm/react/web/ui/components/buttons.js +0 -2
- package/dist/esm/react/web/ui/components/buttons.js.map +1 -1
- package/dist/esm/react/web/ui/components/text.js +0 -1
- package/dist/esm/react/web/ui/components/text.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/GetStartedScreen.js +0 -1
- package/dist/esm/react/web/wallets/shared/GetStartedScreen.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/OTPLoginUI.js +0 -1
- package/dist/esm/react/web/wallets/shared/OTPLoginUI.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/types/chains/chain-definitions/t-rex-testnet.d.ts +7 -0
- package/dist/types/chains/chain-definitions/t-rex-testnet.d.ts.map +1 -0
- package/dist/types/exports/chains.d.ts +1 -0
- package/dist/types/exports/chains.d.ts.map +1 -1
- package/dist/types/insight/common.d.ts +0 -1
- package/dist/types/insight/common.d.ts.map +1 -1
- package/dist/types/pay/buyWithCrypto/getStatus.d.ts +0 -3
- package/dist/types/pay/buyWithCrypto/getStatus.d.ts.map +1 -1
- package/dist/types/pay/buyWithFiat/isSwapRequiredPostOnramp.d.ts +0 -7
- package/dist/types/pay/buyWithFiat/isSwapRequiredPostOnramp.d.ts.map +1 -1
- package/dist/types/pay/utils/commonTypes.d.ts +2 -1
- package/dist/types/pay/utils/commonTypes.d.ts.map +1 -1
- package/dist/types/react/core/hooks/useBridgeQuote.d.ts +2 -1
- package/dist/types/react/core/hooks/useBridgeQuote.d.ts.map +1 -1
- package/dist/types/react/core/hooks/usePaymentMethods.d.ts.map +1 -1
- package/dist/types/react/core/utils/storage.d.ts +0 -1
- package/dist/types/react/core/utils/storage.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/BridgeOrchestrator.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/payment-selection/PaymentSelection.d.ts +5 -1
- package/dist/types/react/web/ui/Bridge/payment-selection/PaymentSelection.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/payment-selection/TokenSelection.d.ts +2 -1
- package/dist/types/react/web/ui/Bridge/payment-selection/TokenSelection.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Details.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/MenuButton.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/NetworkSelector.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.d.ts +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/types.d.ts +0 -29
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/types.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.d.ts +0 -26
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/utils.d.ts +0 -6
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/utils.d.ts.map +1 -1
- package/dist/types/react/web/ui/PayEmbed.d.ts +1 -1
- package/dist/types/react/web/ui/PayEmbed.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/Modal.d.ts +0 -4
- package/dist/types/react/web/ui/components/Modal.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/buttons.d.ts +2 -1
- package/dist/types/react/web/ui/components/buttons.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/text.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/chains/chain-definitions/t-rex-testnet.ts +17 -0
- package/src/exports/chains.ts +1 -0
- package/src/insight/common.ts +0 -5
- package/src/pay/buyWithCrypto/getStatus.ts +0 -5
- package/src/pay/buyWithFiat/isSwapRequiredPostOnramp.ts +0 -56
- package/src/pay/utils/commonTypes.ts +1 -1
- package/src/react/core/hooks/useBridgeQuote.ts +4 -0
- package/src/react/core/hooks/usePaymentMethods.ts +8 -1
- package/src/react/core/utils/storage.ts +0 -1
- package/src/react/web/ui/Bridge/BridgeOrchestrator.tsx +9 -1
- package/src/react/web/ui/Bridge/payment-selection/PaymentSelection.tsx +8 -0
- package/src/react/web/ui/Bridge/payment-selection/TokenSelection.tsx +6 -0
- package/src/react/web/ui/ConnectWallet/Details.tsx +52 -43
- package/src/react/web/ui/ConnectWallet/MenuButton.tsx +0 -1
- package/src/react/web/ui/ConnectWallet/NetworkSelector.tsx +5 -9
- package/src/react/web/ui/ConnectWallet/WalletSelector.tsx +0 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/main/types.ts +0 -39
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.ts +0 -160
- package/src/react/web/ui/ConnectWallet/screens/Buy/utils.ts +0 -9
- package/src/react/web/ui/ConnectWallet/screens/ReceiveFunds.tsx +0 -1
- package/src/react/web/ui/PayEmbed.tsx +3 -66
- package/src/react/web/ui/TransactionButton/DepositScreen.tsx +0 -1
- package/src/react/web/ui/components/Modal.tsx +1 -1
- package/src/react/web/ui/components/buttons.tsx +1 -3
- package/src/react/web/ui/components/text.tsx +0 -1
- package/src/react/web/wallets/shared/GetStartedScreen.tsx +0 -1
- package/src/react/web/wallets/shared/OTPLoginUI.tsx +0 -1
- package/src/version.ts +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +0 -468
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js +0 -116
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/EstimatedTimeAndFees.js +0 -29
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/EstimatedTimeAndFees.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/LazyBuyScreen.js +0 -11
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/LazyBuyScreen.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/PayProviderSelection.js +0 -28
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/PayProviderSelection.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.js +0 -26
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.js +0 -58
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/Stepper.js +0 -59
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/Stepper.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js +0 -118
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.js +0 -32
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js +0 -108
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js +0 -45
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js +0 -532
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/Providers.js +0 -21
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/Providers.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.js +0 -39
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js +0 -134
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/openOnRamppopup.js +0 -11
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/openOnRamppopup.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js +0 -106
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.js +0 -23
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.js +0 -50
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.js +0 -68
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js +0 -225
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/ErrorText.js +0 -12
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/ErrorText.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.js +0 -39
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js +0 -55
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.js +0 -49
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.js +0 -176
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.js +0 -69
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.js +0 -34
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.js +0 -194
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.js +0 -344
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.js +0 -15
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/fetchBalancesForWallet.js +0 -198
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/fetchBalancesForWallet.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/pendingSwapTx.js +0 -15
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/pendingSwapTx.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/usePayerSetup.js +0 -54
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/usePayerSetup.js.map +0 -1
- package/dist/cjs/react/web/ui/components/Drawer.js +0 -123
- package/dist/cjs/react/web/ui/components/Drawer.js.map +0 -1
- package/dist/cjs/react/web/ui/components/StepBar.js +0 -16
- package/dist/cjs/react/web/ui/components/StepBar.js.map +0 -1
- package/dist/cjs/react/web/ui/components/SwitchNetwork.js +0 -19
- package/dist/cjs/react/web/ui/components/SwitchNetwork.js.map +0 -1
- package/dist/cjs/react/web/ui/components/token/TokenRow.js +0 -43
- package/dist/cjs/react/web/ui/components/token/TokenRow.js.map +0 -1
- package/dist/cjs/react/web/utils/errors.js +0 -44
- package/dist/cjs/react/web/utils/errors.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +0 -465
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js +0 -113
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/EstimatedTimeAndFees.js +0 -26
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/EstimatedTimeAndFees.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/LazyBuyScreen.js +0 -8
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/LazyBuyScreen.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/PayProviderSelection.js +0 -24
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/PayProviderSelection.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.js +0 -23
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.js +0 -55
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/Stepper.js +0 -55
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/Stepper.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js +0 -115
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.js +0 -29
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js +0 -105
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js +0 -42
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js +0 -529
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/Providers.js +0 -18
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/Providers.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.js +0 -36
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js +0 -129
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/openOnRamppopup.js +0 -8
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/openOnRamppopup.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js +0 -103
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.js +0 -20
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.js +0 -47
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.js +0 -65
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js +0 -221
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/ErrorText.js +0 -9
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/ErrorText.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.js +0 -35
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js +0 -52
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.js +0 -46
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.js +0 -173
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.js +0 -66
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.js +0 -31
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.js +0 -191
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.js +0 -341
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.js +0 -12
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/fetchBalancesForWallet.js +0 -195
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/fetchBalancesForWallet.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/pendingSwapTx.js +0 -11
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/pendingSwapTx.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/usePayerSetup.js +0 -51
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/usePayerSetup.js.map +0 -1
- package/dist/esm/react/web/ui/components/Drawer.js +0 -119
- package/dist/esm/react/web/ui/components/Drawer.js.map +0 -1
- package/dist/esm/react/web/ui/components/StepBar.js +0 -13
- package/dist/esm/react/web/ui/components/StepBar.js.map +0 -1
- package/dist/esm/react/web/ui/components/SwitchNetwork.js +0 -16
- package/dist/esm/react/web/ui/components/SwitchNetwork.js.map +0 -1
- package/dist/esm/react/web/ui/components/token/TokenRow.js +0 -40
- package/dist/esm/react/web/ui/components/token/TokenRow.js.map +0 -1
- package/dist/esm/react/web/utils/errors.js +0 -41
- package/dist/esm/react/web/utils/errors.js.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts +0 -26
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.d.ts +0 -18
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/EstimatedTimeAndFees.d.ts +0 -6
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/EstimatedTimeAndFees.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/LazyBuyScreen.d.ts +0 -3
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/LazyBuyScreen.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayProviderSelection.d.ts +0 -12
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayProviderSelection.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.d.ts +0 -14
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.d.ts +0 -16
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/Stepper.d.ts +0 -10
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/Stepper.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.d.ts +0 -18
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.d.ts +0 -6
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.d.ts +0 -26
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.d.ts +0 -8
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.d.ts +0 -20
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/Providers.d.ts +0 -10
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/Providers.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.d.ts +0 -15
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.d.ts +0 -55
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/openOnRamppopup.d.ts +0 -2
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/openOnRamppopup.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.d.ts +0 -14
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.d.ts +0 -10
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.d.ts +0 -16
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.d.ts +0 -18
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.d.ts +0 -32
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/ErrorText.d.ts +0 -5
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/ErrorText.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.d.ts +0 -15
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.d.ts +0 -23
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.d.ts +0 -21
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.d.ts +0 -32
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.d.ts +0 -18
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.d.ts +0 -15
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.d.ts +0 -22
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.d.ts +0 -25
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.d.ts +0 -26
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/fetchBalancesForWallet.d.ts +0 -25
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/fetchBalancesForWallet.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/pendingSwapTx.d.ts +0 -14
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/pendingSwapTx.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/usePayerSetup.d.ts +0 -6
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/usePayerSetup.d.ts.map +0 -1
- package/dist/types/react/web/ui/components/Drawer.d.ts +0 -25
- package/dist/types/react/web/ui/components/Drawer.d.ts.map +0 -1
- package/dist/types/react/web/ui/components/StepBar.d.ts +0 -5
- package/dist/types/react/web/ui/components/StepBar.d.ts.map +0 -1
- package/dist/types/react/web/ui/components/SwitchNetwork.d.ts +0 -6
- package/dist/types/react/web/ui/components/SwitchNetwork.d.ts.map +0 -1
- package/dist/types/react/web/ui/components/token/TokenRow.d.ts +0 -14
- package/dist/types/react/web/ui/components/token/TokenRow.d.ts.map +0 -1
- package/dist/types/react/web/utils/errors.d.ts +0 -8
- package/dist/types/react/web/utils/errors.d.ts.map +0 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx +0 -1075
- package/src/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.tsx +0 -286
- package/src/react/web/ui/ConnectWallet/screens/Buy/EstimatedTimeAndFees.tsx +0 -85
- package/src/react/web/ui/ConnectWallet/screens/Buy/LazyBuyScreen.tsx +0 -13
- package/src/react/web/ui/ConnectWallet/screens/Buy/PayProviderSelection.tsx +0 -68
- package/src/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.tsx +0 -48
- package/src/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.tsx +0 -104
- package/src/react/web/ui/ConnectWallet/screens/Buy/Stepper.tsx +0 -91
- package/src/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.tsx +0 -395
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.tsx +0 -61
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.tsx +0 -263
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.tsx +0 -85
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.tsx +0 -775
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/Providers.tsx +0 -54
- package/src/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.ts +0 -65
- package/src/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.ts +0 -193
- package/src/react/web/ui/ConnectWallet/screens/Buy/openOnRamppopup.tsx +0 -12
- package/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.tsx +0 -294
- package/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.tsx +0 -56
- package/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.test.ts +0 -80
- package/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.ts +0 -77
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.tsx +0 -154
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.tsx +0 -377
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/ErrorText.tsx +0 -20
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.tsx +0 -109
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.tsx +0 -114
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.tsx +0 -117
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.tsx +0 -359
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.tsx +0 -232
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.tsx +0 -111
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.tsx +0 -448
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.tsx +0 -558
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.tsx +0 -56
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/fetchBalancesForWallet.tsx +0 -282
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/pendingSwapTx.ts +0 -23
- package/src/react/web/ui/ConnectWallet/screens/Buy/usePayerSetup.tsx +0 -61
- package/src/react/web/ui/components/Drawer.tsx +0 -171
- package/src/react/web/ui/components/StepBar.tsx +0 -25
- package/src/react/web/ui/components/SwitchNetwork.tsx +0 -35
- package/src/react/web/ui/components/token/TokenRow.tsx +0 -135
- package/src/react/web/utils/errors.ts +0 -52
@@ -1,54 +0,0 @@
|
|
1
|
-
import type { FiatProvider } from "../../../../../../../pay/utils/commonTypes.js";
|
2
|
-
import { Container } from "../../../../components/basic.js";
|
3
|
-
import { Button } from "../../../../components/buttons.js";
|
4
|
-
import { Link } from "../../../../components/text.js";
|
5
|
-
import { getProviderLabel } from "../utils.js";
|
6
|
-
/**
|
7
|
-
* @internal
|
8
|
-
*/
|
9
|
-
|
10
|
-
export function Providers(props: {
|
11
|
-
supportedProviders: FiatProvider[];
|
12
|
-
preferredProvider?: FiatProvider;
|
13
|
-
onSelect: (provider: FiatProvider) => void;
|
14
|
-
}) {
|
15
|
-
return (
|
16
|
-
<Container
|
17
|
-
expand
|
18
|
-
flex="column"
|
19
|
-
gap="sm"
|
20
|
-
style={{
|
21
|
-
alignItems: "flex-start",
|
22
|
-
}}
|
23
|
-
>
|
24
|
-
{props.supportedProviders.map((provider) => (
|
25
|
-
<Container
|
26
|
-
expand
|
27
|
-
flex="row"
|
28
|
-
key={provider}
|
29
|
-
style={{
|
30
|
-
justifyContent: "space-between",
|
31
|
-
}}
|
32
|
-
>
|
33
|
-
<Button
|
34
|
-
fullWidth
|
35
|
-
onClick={() => props.onSelect(provider)}
|
36
|
-
variant={"link"}
|
37
|
-
>
|
38
|
-
<Link
|
39
|
-
color={
|
40
|
-
props.preferredProvider === provider
|
41
|
-
? "primaryText"
|
42
|
-
: "secondaryText"
|
43
|
-
}
|
44
|
-
hoverColor="primaryText"
|
45
|
-
size="sm"
|
46
|
-
>
|
47
|
-
{getProviderLabel(provider)}
|
48
|
-
</Link>
|
49
|
-
</Button>
|
50
|
-
</Container>
|
51
|
-
))}
|
52
|
-
</Container>
|
53
|
-
);
|
54
|
-
}
|
@@ -1,65 +0,0 @@
|
|
1
|
-
import type { Chain } from "../../../../../../../chains/types.js";
|
2
|
-
import { NATIVE_TOKEN_ADDRESS } from "../../../../../../../constants/addresses.js";
|
3
|
-
import type { PayUIOptions } from "../../../../../../core/hooks/connection/ConnectButtonProps.js";
|
4
|
-
import { type ERC20OrNativeToken, isNativeToken } from "../../nativeToken.js";
|
5
|
-
import type { SupportedChainAndTokens } from "../swap/useSwapSupportedChains.js";
|
6
|
-
|
7
|
-
// Based on what toToken, toChain, and supportedDestinations are, determine which payment methods should be enabled
|
8
|
-
// change the current method if it should be disabled
|
9
|
-
// return whether the payment selection should be shown or not ( if only one payment method is enabled, don't show the selection )
|
10
|
-
export type PaymentMethods = {
|
11
|
-
buyWithFiatEnabled: boolean;
|
12
|
-
buyWithCryptoEnabled: boolean;
|
13
|
-
};
|
14
|
-
|
15
|
-
export function useEnabledPaymentMethods(options: {
|
16
|
-
payOptions: PayUIOptions;
|
17
|
-
supportedDestinations: SupportedChainAndTokens;
|
18
|
-
toChain: Chain;
|
19
|
-
toToken: ERC20OrNativeToken;
|
20
|
-
}): PaymentMethods {
|
21
|
-
const { payOptions, supportedDestinations, toChain, toToken } = options;
|
22
|
-
|
23
|
-
function getEnabledPayMethodsForSelectedToken(): {
|
24
|
-
fiat: boolean;
|
25
|
-
swap: boolean;
|
26
|
-
} {
|
27
|
-
const chain = supportedDestinations.find((c) => c.chain.id === toChain.id);
|
28
|
-
if (!chain) {
|
29
|
-
return {
|
30
|
-
fiat: false,
|
31
|
-
swap: false,
|
32
|
-
};
|
33
|
-
}
|
34
|
-
|
35
|
-
const toTokenAddress = isNativeToken(toToken)
|
36
|
-
? NATIVE_TOKEN_ADDRESS
|
37
|
-
: toToken.address;
|
38
|
-
|
39
|
-
const tokenInfo = chain.tokens.find(
|
40
|
-
(t) => t.address.toLowerCase() === toTokenAddress.toLowerCase(),
|
41
|
-
);
|
42
|
-
|
43
|
-
if (!tokenInfo) {
|
44
|
-
return {
|
45
|
-
fiat: true,
|
46
|
-
swap: true,
|
47
|
-
};
|
48
|
-
}
|
49
|
-
|
50
|
-
return {
|
51
|
-
fiat: tokenInfo.buyWithFiatEnabled,
|
52
|
-
swap: tokenInfo.buyWithCryptoEnabled,
|
53
|
-
};
|
54
|
-
}
|
55
|
-
|
56
|
-
const { fiat, swap } = getEnabledPayMethodsForSelectedToken();
|
57
|
-
|
58
|
-
const buyWithFiatEnabled = payOptions.buyWithFiat !== false && fiat;
|
59
|
-
const buyWithCryptoEnabled = payOptions.buyWithCrypto !== false && swap;
|
60
|
-
|
61
|
-
return {
|
62
|
-
buyWithCryptoEnabled,
|
63
|
-
buyWithFiatEnabled,
|
64
|
-
};
|
65
|
-
}
|
@@ -1,193 +0,0 @@
|
|
1
|
-
import { useEffect, useState } from "react";
|
2
|
-
import { polygon } from "../../../../../../../chains/chain-definitions/polygon.js";
|
3
|
-
import type { Chain } from "../../../../../../../chains/types.js";
|
4
|
-
import type {
|
5
|
-
FundWalletOptions,
|
6
|
-
PayUIOptions,
|
7
|
-
} from "../../../../../../core/hooks/connection/ConnectButtonProps.js";
|
8
|
-
import { useActiveWalletChain } from "../../../../../../core/hooks/wallets/useActiveWalletChain.js";
|
9
|
-
import type { TokenInfo } from "../../../../../../core/utils/defaultTokens.js";
|
10
|
-
import { useDebouncedValue } from "../../../../hooks/useDebouncedValue.js";
|
11
|
-
import { type ERC20OrNativeToken, NATIVE_TOKEN } from "../../nativeToken.js";
|
12
|
-
import {
|
13
|
-
type CurrencyMeta,
|
14
|
-
currencies,
|
15
|
-
usdCurrency,
|
16
|
-
} from "../fiat/currencies.js";
|
17
|
-
import type { SupportedChainAndTokens } from "../swap/useSwapSupportedChains.js";
|
18
|
-
|
19
|
-
type SupportedSourcesInputData = {
|
20
|
-
chain: Chain;
|
21
|
-
tokens: {
|
22
|
-
address: string;
|
23
|
-
buyWithCryptoEnabled: boolean;
|
24
|
-
buyWithFiatEnabled: boolean;
|
25
|
-
name: string;
|
26
|
-
symbol: string;
|
27
|
-
}[];
|
28
|
-
};
|
29
|
-
|
30
|
-
// handle states for token and chain selection
|
31
|
-
export function useToTokenSelectionStates(options: {
|
32
|
-
payOptions: PayUIOptions;
|
33
|
-
supportedDestinations: SupportedChainAndTokens;
|
34
|
-
}) {
|
35
|
-
const { payOptions, supportedDestinations } = options;
|
36
|
-
// --------------------------------------------------------------------------
|
37
|
-
// buy token amount ---------------------------------------------------------
|
38
|
-
// NOTE - for transaction / direct payment modes, the token amount is set when the user tap continue
|
39
|
-
const prefillBuy = (payOptions as FundWalletOptions)?.prefillBuy;
|
40
|
-
const activeChain = useActiveWalletChain();
|
41
|
-
const initialTokenAmount = prefillBuy?.amount || "";
|
42
|
-
const [tokenAmount, setTokenAmount] = useState<string>(initialTokenAmount);
|
43
|
-
const deferredTokenAmount = useDebouncedValue(tokenAmount, 300);
|
44
|
-
|
45
|
-
useEffect(() => {
|
46
|
-
if (prefillBuy?.amount) {
|
47
|
-
setTokenAmount(prefillBuy.amount);
|
48
|
-
}
|
49
|
-
if (prefillBuy?.chain) {
|
50
|
-
setToChain(prefillBuy.chain);
|
51
|
-
}
|
52
|
-
if (prefillBuy?.token) {
|
53
|
-
setToToken(prefillBuy.token as TokenInfo);
|
54
|
-
}
|
55
|
-
}, [prefillBuy?.amount, prefillBuy?.chain, prefillBuy?.token]);
|
56
|
-
|
57
|
-
// Destination chain and token selection -----------------------------------
|
58
|
-
const [toChain, setToChain] = useState<Chain>(
|
59
|
-
// use prefill chain if available
|
60
|
-
prefillBuy?.chain ||
|
61
|
-
(payOptions.mode === "transaction" && payOptions.transaction?.chain) ||
|
62
|
-
(payOptions.mode === "direct_payment" && payOptions.paymentInfo?.chain) ||
|
63
|
-
// use active chain if its supported as destination
|
64
|
-
supportedDestinations.find((x) => x.chain.id === activeChain?.id)
|
65
|
-
?.chain ||
|
66
|
-
// default to the first chain in supportedDestinations, or polygon if nothing is found at all
|
67
|
-
supportedDestinations[0]?.chain ||
|
68
|
-
polygon,
|
69
|
-
);
|
70
|
-
|
71
|
-
const [toToken, setToToken] = useState<ERC20OrNativeToken>(
|
72
|
-
(prefillBuy?.token as TokenInfo) ||
|
73
|
-
(payOptions.mode === "direct_payment" && payOptions.paymentInfo.token) ||
|
74
|
-
NATIVE_TOKEN,
|
75
|
-
);
|
76
|
-
|
77
|
-
return {
|
78
|
-
deferredTokenAmount,
|
79
|
-
setToChain,
|
80
|
-
setTokenAmount,
|
81
|
-
setToToken,
|
82
|
-
toChain,
|
83
|
-
tokenAmount,
|
84
|
-
toToken,
|
85
|
-
};
|
86
|
-
}
|
87
|
-
|
88
|
-
export function useFromTokenSelectionStates(options: {
|
89
|
-
payOptions: PayUIOptions;
|
90
|
-
supportedSources: SupportedSourcesInputData[];
|
91
|
-
}) {
|
92
|
-
const { payOptions } = options;
|
93
|
-
|
94
|
-
// TODO (pay) - auto select token based on connected wallet balances
|
95
|
-
|
96
|
-
// Source token and chain selection ---------------------------------------------------
|
97
|
-
const [fromChain_, setFromChain] = useState<Chain>();
|
98
|
-
|
99
|
-
// use prefill chain if available
|
100
|
-
const fromChainDevSpecified =
|
101
|
-
(payOptions.buyWithCrypto !== false &&
|
102
|
-
payOptions.buyWithCrypto?.prefillSource?.chain) ||
|
103
|
-
(payOptions.mode === "transaction" && payOptions.transaction?.chain) ||
|
104
|
-
(payOptions.mode === "direct_payment" && payOptions.paymentInfo?.chain);
|
105
|
-
|
106
|
-
const fromChain = fromChain_ || fromChainDevSpecified || undefined;
|
107
|
-
|
108
|
-
const [fromToken_, setFromToken] = useState<ERC20OrNativeToken>();
|
109
|
-
|
110
|
-
// use prefill token if available
|
111
|
-
const fromTokenDevSpecified =
|
112
|
-
(payOptions.buyWithCrypto !== false &&
|
113
|
-
payOptions.buyWithCrypto?.prefillSource?.token) ||
|
114
|
-
(payOptions.mode === "direct_payment" && payOptions.paymentInfo.token);
|
115
|
-
|
116
|
-
// supported tokens query in here
|
117
|
-
const fromToken = fromToken_ || fromTokenDevSpecified || undefined;
|
118
|
-
|
119
|
-
return {
|
120
|
-
fromChain,
|
121
|
-
fromToken,
|
122
|
-
setFromChain,
|
123
|
-
setFromToken,
|
124
|
-
};
|
125
|
-
}
|
126
|
-
|
127
|
-
export function useFiatCurrencySelectionStates(options: {
|
128
|
-
payOptions: PayUIOptions;
|
129
|
-
}) {
|
130
|
-
const { payOptions } = options;
|
131
|
-
|
132
|
-
// --------------------------------------------------------------------------
|
133
|
-
const devSpecifiedDefaultCurrency =
|
134
|
-
payOptions.buyWithFiat !== false
|
135
|
-
? payOptions.buyWithFiat?.prefillSource?.currency
|
136
|
-
: undefined;
|
137
|
-
|
138
|
-
const defaultSelectedCurrencyShorthand =
|
139
|
-
devSpecifiedDefaultCurrency || getDefaultCurrencyBasedOnLocation();
|
140
|
-
|
141
|
-
const [selectedCurrency, setSelectedCurrency] = useState(
|
142
|
-
currencies.find((x) => x.shorthand === defaultSelectedCurrencyShorthand) ||
|
143
|
-
usdCurrency,
|
144
|
-
);
|
145
|
-
|
146
|
-
return {
|
147
|
-
selectedCurrency,
|
148
|
-
setSelectedCurrency,
|
149
|
-
};
|
150
|
-
}
|
151
|
-
|
152
|
-
function getDefaultCurrencyBasedOnLocation(): CurrencyMeta["shorthand"] {
|
153
|
-
// if Intl is not supported - browser throws
|
154
|
-
try {
|
155
|
-
const timeZone = Intl.DateTimeFormat()
|
156
|
-
.resolvedOptions()
|
157
|
-
.timeZone.toLowerCase();
|
158
|
-
|
159
|
-
// Europe/London -> GBP
|
160
|
-
if (timeZone.includes("london")) {
|
161
|
-
return "GBP";
|
162
|
-
}
|
163
|
-
|
164
|
-
// Europe/* -> EUR
|
165
|
-
if (timeZone.includes("europe")) {
|
166
|
-
return "EUR";
|
167
|
-
}
|
168
|
-
|
169
|
-
// Japan
|
170
|
-
if (timeZone.includes("japan")) {
|
171
|
-
return "JPY";
|
172
|
-
}
|
173
|
-
|
174
|
-
// canada
|
175
|
-
if (timeZone.includes("canada")) {
|
176
|
-
return "CAD";
|
177
|
-
}
|
178
|
-
|
179
|
-
// australia
|
180
|
-
if (timeZone.includes("australia")) {
|
181
|
-
return "AUD";
|
182
|
-
}
|
183
|
-
|
184
|
-
// new zealand
|
185
|
-
if (timeZone.includes("new zealand")) {
|
186
|
-
return "NZD";
|
187
|
-
}
|
188
|
-
|
189
|
-
return "USD";
|
190
|
-
} catch {
|
191
|
-
return "USD";
|
192
|
-
}
|
193
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
export function openOnrampPopup(link: string, theme: string) {
|
2
|
-
const height = 750;
|
3
|
-
const width = 500;
|
4
|
-
const top = (window.innerHeight - height) / 2;
|
5
|
-
const left = (window.innerWidth - width) / 2;
|
6
|
-
|
7
|
-
return window.open(
|
8
|
-
`${link}&theme=${theme}`,
|
9
|
-
"thirdweb Pay",
|
10
|
-
`width=${width}, height=${height}, top=${top}, left=${left}`,
|
11
|
-
);
|
12
|
-
}
|
@@ -1,294 +0,0 @@
|
|
1
|
-
import { ExternalLinkIcon } from "@radix-ui/react-icons";
|
2
|
-
import { getCachedChain } from "../../../../../../../chains/utils.js";
|
3
|
-
import type { ThirdwebClient } from "../../../../../../../client/client.js";
|
4
|
-
import type { BuyWithCryptoQuote } from "../../../../../../../pay/buyWithCrypto/getQuote.js";
|
5
|
-
import type { ValidBuyWithCryptoStatus } from "../../../../../../../pay/buyWithCrypto/getStatus.js";
|
6
|
-
import { formatExplorerTxUrl } from "../../../../../../../utils/url.js";
|
7
|
-
import {
|
8
|
-
fontSize,
|
9
|
-
iconSize,
|
10
|
-
spacing,
|
11
|
-
} from "../../../../../../core/design-system/index.js";
|
12
|
-
import {
|
13
|
-
useChainExplorers,
|
14
|
-
useChainName,
|
15
|
-
} from "../../../../../../core/hooks/others/useChainQuery.js";
|
16
|
-
import { Container, Line } from "../../../../components/basic.js";
|
17
|
-
import { ButtonLink } from "../../../../components/buttons.js";
|
18
|
-
import { Spacer } from "../../../../components/Spacer.js";
|
19
|
-
import { Text } from "../../../../components/text.js";
|
20
|
-
import { WalletRow } from "../swap/WalletRow.js";
|
21
|
-
import { getBuyWithCryptoStatusMeta, type StatusMeta } from "./statusMeta.js";
|
22
|
-
import { TokenInfoRow } from "./TokenInfoRow.js";
|
23
|
-
|
24
|
-
type SwapTxDetailsData = {
|
25
|
-
fromToken: {
|
26
|
-
chainId: number;
|
27
|
-
symbol: string;
|
28
|
-
address: string;
|
29
|
-
amount: string;
|
30
|
-
};
|
31
|
-
quotedToToken: {
|
32
|
-
chainId: number;
|
33
|
-
symbol: string;
|
34
|
-
address: string;
|
35
|
-
amount: string;
|
36
|
-
};
|
37
|
-
gotToken?: {
|
38
|
-
chainId: number;
|
39
|
-
symbol: string;
|
40
|
-
address: string;
|
41
|
-
amount: string;
|
42
|
-
};
|
43
|
-
statusMeta?: StatusMeta;
|
44
|
-
sourceTxHash?: string;
|
45
|
-
destinationTxHash?: string;
|
46
|
-
isPartialSuccess: boolean;
|
47
|
-
estimatedDuration: number;
|
48
|
-
fromAddress: string;
|
49
|
-
toAddress: string;
|
50
|
-
};
|
51
|
-
|
52
|
-
export function SwapTxDetailsTable(
|
53
|
-
props:
|
54
|
-
| {
|
55
|
-
type: "quote";
|
56
|
-
quote: BuyWithCryptoQuote;
|
57
|
-
client: ThirdwebClient;
|
58
|
-
}
|
59
|
-
| {
|
60
|
-
client: ThirdwebClient;
|
61
|
-
type: "status";
|
62
|
-
status: ValidBuyWithCryptoStatus;
|
63
|
-
hideStatusRow?: boolean;
|
64
|
-
},
|
65
|
-
) {
|
66
|
-
let uiData: SwapTxDetailsData;
|
67
|
-
let showStatusRow = true;
|
68
|
-
if (props.type === "status") {
|
69
|
-
const status = props.status;
|
70
|
-
if (props.hideStatusRow) {
|
71
|
-
showStatusRow = false;
|
72
|
-
}
|
73
|
-
|
74
|
-
const isPartialSuccess =
|
75
|
-
status.status === "COMPLETED" && status.subStatus === "PARTIAL_SUCCESS";
|
76
|
-
|
77
|
-
uiData = {
|
78
|
-
destinationTxHash: status.destination?.transactionHash,
|
79
|
-
estimatedDuration: status.quote.estimated.durationSeconds || 0,
|
80
|
-
fromAddress: status.fromAddress,
|
81
|
-
fromToken: {
|
82
|
-
address: status.quote.fromToken.tokenAddress,
|
83
|
-
amount: status.quote.fromAmount,
|
84
|
-
chainId: status.quote.fromToken.chainId,
|
85
|
-
symbol: status.quote.fromToken.symbol || "",
|
86
|
-
},
|
87
|
-
gotToken: status.destination
|
88
|
-
? {
|
89
|
-
address: status.destination.token.tokenAddress,
|
90
|
-
amount: status.destination.amount,
|
91
|
-
chainId: status.destination.token.chainId,
|
92
|
-
symbol: status.destination.token.symbol || "",
|
93
|
-
}
|
94
|
-
: undefined,
|
95
|
-
isPartialSuccess,
|
96
|
-
quotedToToken: {
|
97
|
-
address: status.quote.toToken.tokenAddress,
|
98
|
-
amount: status.quote.toAmount,
|
99
|
-
chainId: status.quote.toToken.chainId,
|
100
|
-
symbol: status.quote.toToken.symbol || "",
|
101
|
-
},
|
102
|
-
sourceTxHash: status.source?.transactionHash,
|
103
|
-
statusMeta: getBuyWithCryptoStatusMeta(status),
|
104
|
-
toAddress: status.toAddress,
|
105
|
-
};
|
106
|
-
} else {
|
107
|
-
const quote = props.quote;
|
108
|
-
uiData = {
|
109
|
-
estimatedDuration: quote.swapDetails.estimated.durationSeconds || 0,
|
110
|
-
fromAddress: quote.swapDetails.fromAddress,
|
111
|
-
fromToken: {
|
112
|
-
address: quote.swapDetails.fromToken.tokenAddress,
|
113
|
-
amount: quote.swapDetails.fromAmount,
|
114
|
-
chainId: quote.swapDetails.fromToken.chainId,
|
115
|
-
symbol: quote.swapDetails.fromToken.symbol || "",
|
116
|
-
},
|
117
|
-
isPartialSuccess: false,
|
118
|
-
quotedToToken: {
|
119
|
-
address: quote.swapDetails.toToken.tokenAddress,
|
120
|
-
amount: quote.swapDetails.toAmount,
|
121
|
-
chainId: quote.swapDetails.toToken.chainId,
|
122
|
-
symbol: quote.swapDetails.toToken.symbol || "",
|
123
|
-
},
|
124
|
-
toAddress: quote.swapDetails.toAddress,
|
125
|
-
};
|
126
|
-
}
|
127
|
-
|
128
|
-
const { client } = props;
|
129
|
-
|
130
|
-
const {
|
131
|
-
fromToken,
|
132
|
-
quotedToToken: toToken,
|
133
|
-
statusMeta,
|
134
|
-
sourceTxHash,
|
135
|
-
destinationTxHash,
|
136
|
-
isPartialSuccess,
|
137
|
-
gotToken,
|
138
|
-
} = uiData;
|
139
|
-
|
140
|
-
const fromChainId = fromToken.chainId;
|
141
|
-
const toChainId = toToken.chainId;
|
142
|
-
|
143
|
-
const fromChainName = useChainName(getCachedChain(fromChainId));
|
144
|
-
const fromChainExplorers = useChainExplorers(getCachedChain(fromChainId));
|
145
|
-
const toChainName = useChainName(getCachedChain(toChainId));
|
146
|
-
const toChainExplorers = useChainExplorers(getCachedChain(toChainId));
|
147
|
-
|
148
|
-
const lineSpacer = (
|
149
|
-
<>
|
150
|
-
<Spacer y="md" />
|
151
|
-
<Line />
|
152
|
-
<Spacer y="md" />
|
153
|
-
</>
|
154
|
-
);
|
155
|
-
|
156
|
-
return (
|
157
|
-
<div>
|
158
|
-
{/* Pay */}
|
159
|
-
<TokenInfoRow
|
160
|
-
chainId={fromToken.chainId}
|
161
|
-
client={client}
|
162
|
-
label="Paid"
|
163
|
-
tokenAddress={fromToken.address}
|
164
|
-
tokenAmount={fromToken.amount}
|
165
|
-
tokenSymbol={fromToken.symbol || ""}
|
166
|
-
/>
|
167
|
-
|
168
|
-
{lineSpacer}
|
169
|
-
{isPartialSuccess && gotToken ? (
|
170
|
-
// Expected + Got
|
171
|
-
<>
|
172
|
-
{/* Expected */}
|
173
|
-
<TokenInfoRow
|
174
|
-
chainId={toToken.chainId}
|
175
|
-
client={client}
|
176
|
-
label={isPartialSuccess ? "Expected" : "Received"}
|
177
|
-
tokenAddress={toToken.address}
|
178
|
-
tokenAmount={toToken.amount}
|
179
|
-
tokenSymbol={toToken.symbol || ""}
|
180
|
-
/>
|
181
|
-
|
182
|
-
{lineSpacer}
|
183
|
-
|
184
|
-
{/* Got */}
|
185
|
-
<TokenInfoRow
|
186
|
-
chainId={gotToken.chainId}
|
187
|
-
client={client}
|
188
|
-
label="Got"
|
189
|
-
tokenAddress={gotToken.address}
|
190
|
-
tokenAmount={gotToken.amount}
|
191
|
-
tokenSymbol={gotToken.symbol || ""}
|
192
|
-
/>
|
193
|
-
</>
|
194
|
-
) : (
|
195
|
-
// Receive
|
196
|
-
<TokenInfoRow
|
197
|
-
chainId={toToken.chainId}
|
198
|
-
client={client}
|
199
|
-
label="Received"
|
200
|
-
tokenAddress={toToken.address}
|
201
|
-
tokenAmount={toToken.amount}
|
202
|
-
tokenSymbol={toToken.symbol || ""}
|
203
|
-
/>
|
204
|
-
)}
|
205
|
-
|
206
|
-
{lineSpacer}
|
207
|
-
<Container
|
208
|
-
flex="row"
|
209
|
-
style={{
|
210
|
-
justifyContent: "space-between",
|
211
|
-
}}
|
212
|
-
>
|
213
|
-
<Text size="sm">Recipient</Text>
|
214
|
-
<WalletRow address={uiData.toAddress} client={client} iconSize="sm" />
|
215
|
-
</Container>
|
216
|
-
|
217
|
-
{/* Status */}
|
218
|
-
{statusMeta && showStatusRow && (
|
219
|
-
<>
|
220
|
-
{lineSpacer}
|
221
|
-
<Container
|
222
|
-
flex="row"
|
223
|
-
style={{
|
224
|
-
justifyContent: "space-between",
|
225
|
-
}}
|
226
|
-
>
|
227
|
-
<Text size="sm">Status</Text>
|
228
|
-
<Container
|
229
|
-
center="y"
|
230
|
-
flex="column"
|
231
|
-
gap="3xs"
|
232
|
-
style={{
|
233
|
-
alignItems: "flex-end",
|
234
|
-
}}
|
235
|
-
>
|
236
|
-
<Text color={statusMeta.color} size="sm">
|
237
|
-
{statusMeta.status}
|
238
|
-
</Text>
|
239
|
-
</Container>
|
240
|
-
</Container>
|
241
|
-
</>
|
242
|
-
)}
|
243
|
-
|
244
|
-
<Spacer y="lg" />
|
245
|
-
|
246
|
-
{/* source chain Tx hash link */}
|
247
|
-
{fromChainExplorers.explorers?.[0]?.url && sourceTxHash && (
|
248
|
-
<ButtonLink
|
249
|
-
fullWidth
|
250
|
-
gap="xs"
|
251
|
-
href={formatExplorerTxUrl(
|
252
|
-
fromChainExplorers.explorers[0]?.url,
|
253
|
-
sourceTxHash,
|
254
|
-
)}
|
255
|
-
style={{
|
256
|
-
fontSize: fontSize.sm,
|
257
|
-
padding: spacing.sm,
|
258
|
-
}}
|
259
|
-
target="_blank"
|
260
|
-
variant="outline"
|
261
|
-
>
|
262
|
-
View on {fromChainName.name} Explorer
|
263
|
-
<ExternalLinkIcon height={iconSize.sm} width={iconSize.sm} />
|
264
|
-
</ButtonLink>
|
265
|
-
)}
|
266
|
-
|
267
|
-
{/* destination chain tx hash link */}
|
268
|
-
{destinationTxHash &&
|
269
|
-
sourceTxHash !== destinationTxHash &&
|
270
|
-
toChainExplorers?.explorers?.[0]?.url && (
|
271
|
-
<>
|
272
|
-
<Spacer y="sm" />
|
273
|
-
<ButtonLink
|
274
|
-
fullWidth
|
275
|
-
gap="xs"
|
276
|
-
href={formatExplorerTxUrl(
|
277
|
-
toChainExplorers.explorers[0]?.url,
|
278
|
-
destinationTxHash,
|
279
|
-
)}
|
280
|
-
style={{
|
281
|
-
fontSize: fontSize.sm,
|
282
|
-
padding: spacing.sm,
|
283
|
-
}}
|
284
|
-
target="_blank"
|
285
|
-
variant="outline"
|
286
|
-
>
|
287
|
-
View on {toChainName.name} Explorer
|
288
|
-
<ExternalLinkIcon height={iconSize.sm} width={iconSize.sm} />
|
289
|
-
</ButtonLink>
|
290
|
-
</>
|
291
|
-
)}
|
292
|
-
</div>
|
293
|
-
);
|
294
|
-
}
|
@@ -1,56 +0,0 @@
|
|
1
|
-
import { useMemo } from "react";
|
2
|
-
import { getCachedChain } from "../../../../../../../chains/utils.js";
|
3
|
-
import type { ThirdwebClient } from "../../../../../../../client/client.js";
|
4
|
-
import { formatNumber } from "../../../../../../../utils/formatNumber.js";
|
5
|
-
import { useChainName } from "../../../../../../core/hooks/others/useChainQuery.js";
|
6
|
-
import { Container } from "../../../../components/basic.js";
|
7
|
-
import { Text } from "../../../../components/text.js";
|
8
|
-
import { PayTokenIcon } from "../PayTokenIcon.js";
|
9
|
-
|
10
|
-
export function TokenInfoRow(props: {
|
11
|
-
tokenSymbol: string;
|
12
|
-
tokenAmount: string;
|
13
|
-
tokenAddress: string;
|
14
|
-
chainId: number;
|
15
|
-
label: string;
|
16
|
-
client: ThirdwebClient;
|
17
|
-
}) {
|
18
|
-
const chainObj = useMemo(
|
19
|
-
() => getCachedChain(props.chainId),
|
20
|
-
[props.chainId],
|
21
|
-
);
|
22
|
-
const { name } = useChainName(chainObj);
|
23
|
-
|
24
|
-
return (
|
25
|
-
<Container
|
26
|
-
flex="row"
|
27
|
-
style={{
|
28
|
-
justifyContent: "space-between",
|
29
|
-
}}
|
30
|
-
>
|
31
|
-
<Text size="sm">{props.label}</Text>
|
32
|
-
<Container
|
33
|
-
flex="column"
|
34
|
-
gap="3xs"
|
35
|
-
style={{
|
36
|
-
alignItems: "flex-end",
|
37
|
-
}}
|
38
|
-
>
|
39
|
-
<Container center="y" flex="row" gap="xs">
|
40
|
-
<PayTokenIcon
|
41
|
-
chain={chainObj}
|
42
|
-
client={props.client}
|
43
|
-
size="sm"
|
44
|
-
token={{
|
45
|
-
address: props.tokenAddress,
|
46
|
-
}}
|
47
|
-
/>
|
48
|
-
<Text color="primaryText" size="sm">
|
49
|
-
{formatNumber(Number(props.tokenAmount), 6)} {props.tokenSymbol}
|
50
|
-
</Text>
|
51
|
-
</Container>
|
52
|
-
<Text size="xs">{name}</Text>
|
53
|
-
</Container>
|
54
|
-
</Container>
|
55
|
-
);
|
56
|
-
}
|