thirdweb 5.105.9 → 5.105.11-nightly-692cedf9211fb5a6c24406df69155b920f7d2557-20250709000414
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 -5
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/NetworkSelector.js +1 -5
- package/dist/cjs/react/web/ui/ConnectWallet/NetworkSelector.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/WalletEntryButton.js +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/WalletEntryButton.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/PayEmbed.js +1 -30
- package/dist/cjs/react/web/ui/PayEmbed.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/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 -6
- package/dist/esm/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/NetworkSelector.js +1 -5
- package/dist/esm/react/web/ui/ConnectWallet/NetworkSelector.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/WalletEntryButton.js +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/WalletEntryButton.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/PayEmbed.js +3 -32
- package/dist/esm/react/web/ui/PayEmbed.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/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/NetworkSelector.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/WalletEntryButton.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/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/package.json +4 -4
- 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 -42
- package/src/react/web/ui/ConnectWallet/NetworkSelector.tsx +5 -7
- package/src/react/web/ui/ConnectWallet/WalletEntryButton.tsx +1 -0
- 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/PayEmbed.tsx +3 -66
- package/src/react/web/ui/components/Modal.tsx +1 -1
- package/src/react/web/ui/components/buttons.tsx +1 -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
@@ -12,12 +12,14 @@ interface UseBridgeQuoteParams {
|
|
12
12
|
destinationAmount: bigint;
|
13
13
|
client: ThirdwebClient;
|
14
14
|
enabled?: boolean;
|
15
|
+
feePayer?: "sender" | "receiver";
|
15
16
|
}
|
16
17
|
|
17
18
|
export function useBridgeQuote({
|
18
19
|
originToken,
|
19
20
|
destinationToken,
|
20
21
|
destinationAmount,
|
22
|
+
feePayer,
|
21
23
|
client,
|
22
24
|
enabled = true,
|
23
25
|
}: UseBridgeQuoteParams) {
|
@@ -35,6 +37,7 @@ export function useBridgeQuote({
|
|
35
37
|
amount: destinationAmount,
|
36
38
|
chainId: originToken.chainId,
|
37
39
|
client,
|
40
|
+
feePayer,
|
38
41
|
receiver: destinationToken.address,
|
39
42
|
sender: originToken.address,
|
40
43
|
tokenAddress: originToken.address,
|
@@ -59,6 +62,7 @@ export function useBridgeQuote({
|
|
59
62
|
destinationToken.chainId,
|
60
63
|
destinationToken.address,
|
61
64
|
destinationAmount.toString(),
|
65
|
+
feePayer,
|
62
66
|
],
|
63
67
|
refetchInterval: 60000, // 30 seconds
|
64
68
|
retry: 3, // 1 minute
|
@@ -141,11 +141,18 @@ export function usePaymentMethods(options: {
|
|
141
141
|
limit: 100,
|
142
142
|
maxSteps: 3,
|
143
143
|
originChainId: chainId,
|
144
|
-
sortBy: "popularity",
|
145
144
|
});
|
146
145
|
|
147
146
|
// Add all origin tokens from this chain's routes
|
148
147
|
for (const route of routesForChain) {
|
148
|
+
// Skip if the origin token is the same as the destination token, will be added later only if includeDestinationToken is true
|
149
|
+
if (
|
150
|
+
route.originToken.chainId === destinationToken.chainId &&
|
151
|
+
route.originToken.address.toLowerCase() ===
|
152
|
+
destinationToken.address.toLowerCase()
|
153
|
+
) {
|
154
|
+
continue;
|
155
|
+
}
|
149
156
|
const tokenKey = `${route.originToken.chainId}-${route.originToken.address.toLowerCase()}`;
|
150
157
|
allValidOriginTokens.set(tokenKey, route.originToken);
|
151
158
|
}
|
@@ -2,7 +2,6 @@ import type { AsyncStorage } from "../../../utils/storage/AsyncStorage.js";
|
|
2
2
|
import type { AuthArgsType } from "../../../wallets/in-app/core/authentication/types.js";
|
3
3
|
|
4
4
|
export const LAST_AUTH_PROVIDER_STORAGE_KEY = "lastAuthProvider";
|
5
|
-
export const PREFERRED_FIAT_PROVIDER_STORAGE_KEY = "preferredFiatProvider";
|
6
5
|
|
7
6
|
export async function setLastAuthProvider(
|
8
7
|
authProvider: AuthArgsType["strategy"],
|
@@ -227,7 +227,10 @@ export function BridgeOrchestrator({
|
|
227
227
|
<ErrorBanner
|
228
228
|
client={client}
|
229
229
|
error={state.context.currentError}
|
230
|
-
onCancel={
|
230
|
+
onCancel={() => {
|
231
|
+
send({ type: "RESET" });
|
232
|
+
onCancel?.();
|
233
|
+
}}
|
231
234
|
onRetry={handleRetry}
|
232
235
|
/>
|
233
236
|
)}
|
@@ -272,6 +275,11 @@ export function BridgeOrchestrator({
|
|
272
275
|
connectOptions={connectOptions}
|
273
276
|
destinationAmount={state.context.destinationAmount}
|
274
277
|
destinationToken={state.context.destinationToken}
|
278
|
+
feePayer={
|
279
|
+
uiOptions.mode === "direct_payment"
|
280
|
+
? uiOptions.paymentInfo.feePayer
|
281
|
+
: undefined
|
282
|
+
}
|
275
283
|
includeDestinationToken={uiOptions.mode !== "fund_wallet"}
|
276
284
|
onBack={() => {
|
277
285
|
send({ type: "BACK" });
|
@@ -77,6 +77,11 @@ export interface PaymentSelectionProps {
|
|
77
77
|
* @default ["crypto", "card"]
|
78
78
|
*/
|
79
79
|
paymentMethods?: ("crypto" | "card")[];
|
80
|
+
|
81
|
+
/**
|
82
|
+
* Fee payer
|
83
|
+
*/
|
84
|
+
feePayer?: "sender" | "receiver";
|
80
85
|
}
|
81
86
|
|
82
87
|
type Step =
|
@@ -97,6 +102,7 @@ export function PaymentSelection({
|
|
97
102
|
connectLocale,
|
98
103
|
includeDestinationToken,
|
99
104
|
paymentMethods = ["crypto", "card"],
|
105
|
+
feePayer,
|
100
106
|
}: PaymentSelectionProps) {
|
101
107
|
const connectedWallets = useConnectedWallets();
|
102
108
|
const activeWallet = useActiveWallet();
|
@@ -113,6 +119,7 @@ export function PaymentSelection({
|
|
113
119
|
toChainId: destinationToken.chainId,
|
114
120
|
toToken: destinationToken.address,
|
115
121
|
});
|
122
|
+
return true;
|
116
123
|
},
|
117
124
|
queryKey: ["payment_selection"],
|
118
125
|
});
|
@@ -267,6 +274,7 @@ export function PaymentSelection({
|
|
267
274
|
destinationToken.decimals,
|
268
275
|
)}
|
269
276
|
destinationToken={destinationToken}
|
277
|
+
feePayer={feePayer}
|
270
278
|
onBack={handleBackToWalletSelection}
|
271
279
|
onPaymentMethodSelected={handlePaymentMethodSelected}
|
272
280
|
paymentMethods={suitableTokenPaymentMethods}
|
@@ -21,6 +21,7 @@ interface TokenSelectionProps {
|
|
21
21
|
onBack: () => void;
|
22
22
|
destinationToken: Token;
|
23
23
|
destinationAmount: bigint;
|
24
|
+
feePayer?: "sender" | "receiver";
|
24
25
|
}
|
25
26
|
|
26
27
|
// Individual payment method token row component
|
@@ -30,6 +31,7 @@ interface PaymentMethodTokenRowProps {
|
|
30
31
|
destinationAmount: bigint;
|
31
32
|
client: ThirdwebClient;
|
32
33
|
onPaymentMethodSelected: (paymentMethod: PaymentMethod) => void;
|
34
|
+
feePayer?: "sender" | "receiver";
|
33
35
|
}
|
34
36
|
|
35
37
|
function PaymentMethodTokenRow({
|
@@ -38,6 +40,7 @@ function PaymentMethodTokenRow({
|
|
38
40
|
destinationAmount,
|
39
41
|
client,
|
40
42
|
onPaymentMethodSelected,
|
43
|
+
feePayer,
|
41
44
|
}: PaymentMethodTokenRowProps) {
|
42
45
|
const theme = useCustomTheme();
|
43
46
|
|
@@ -50,6 +53,7 @@ function PaymentMethodTokenRow({
|
|
50
53
|
client,
|
51
54
|
destinationAmount,
|
52
55
|
destinationToken,
|
56
|
+
feePayer,
|
53
57
|
originToken: paymentMethod.originToken,
|
54
58
|
});
|
55
59
|
|
@@ -158,6 +162,7 @@ export function TokenSelection({
|
|
158
162
|
onBack,
|
159
163
|
destinationToken,
|
160
164
|
destinationAmount,
|
165
|
+
feePayer,
|
161
166
|
}: TokenSelectionProps) {
|
162
167
|
const theme = useCustomTheme();
|
163
168
|
|
@@ -271,6 +276,7 @@ export function TokenSelection({
|
|
271
276
|
client={client}
|
272
277
|
destinationAmount={destinationAmount}
|
273
278
|
destinationToken={destinationToken}
|
279
|
+
feePayer={feePayer}
|
274
280
|
key={`${method.originToken.address}-${method.originToken.chainId}`}
|
275
281
|
onPaymentMethodSelected={onPaymentMethodSelected}
|
276
282
|
paymentMethod={method}
|
@@ -20,6 +20,7 @@ import {
|
|
20
20
|
} from "react";
|
21
21
|
import { trackPayEvent } from "../../../../analytics/track/pay.js";
|
22
22
|
import type { Chain } from "../../../../chains/types.js";
|
23
|
+
import { getCachedChain } from "../../../../chains/utils.js";
|
23
24
|
import type { ThirdwebClient } from "../../../../client/client.js";
|
24
25
|
import { getContract } from "../../../../contract/contract.js";
|
25
26
|
import type { SupportedFiatCurrency } from "../../../../pay/convert/type.js";
|
@@ -61,7 +62,10 @@ import type {
|
|
61
62
|
ConnectButtonProps,
|
62
63
|
PayUIOptions,
|
63
64
|
} from "../../../core/hooks/connection/ConnectButtonProps.js";
|
64
|
-
import {
|
65
|
+
import {
|
66
|
+
useChainFaucets,
|
67
|
+
useChainMetadata,
|
68
|
+
} from "../../../core/hooks/others/useChainQuery.js";
|
65
69
|
import { useActiveAccount } from "../../../core/hooks/wallets/useActiveAccount.js";
|
66
70
|
import { useActiveWallet } from "../../../core/hooks/wallets/useActiveWallet.js";
|
67
71
|
import { useActiveWalletChain } from "../../../core/hooks/wallets/useActiveWalletChain.js";
|
@@ -80,6 +84,7 @@ import type {
|
|
80
84
|
} from "../../../core/utils/defaultTokens.js";
|
81
85
|
import { useWalletInfo } from "../../../core/utils/wallet.js";
|
82
86
|
import { WalletUIStatesProvider } from "../../providers/wallet-ui-states-provider.js";
|
87
|
+
import { BuyWidget } from "../Bridge/BuyWidget.js";
|
83
88
|
import { Container, Line } from "../components/basic.js";
|
84
89
|
import { Button, IconButton } from "../components/buttons.js";
|
85
90
|
import { ChainActiveDot } from "../components/ChainActiveDot.js";
|
@@ -116,7 +121,6 @@ import {
|
|
116
121
|
NetworkSelectorContent,
|
117
122
|
type NetworkSelectorProps,
|
118
123
|
} from "./NetworkSelector.js";
|
119
|
-
import { LazyBuyScreen } from "./screens/Buy/LazyBuyScreen.js";
|
120
124
|
import { WalletManagerScreen } from "./screens/Details/WalletManagerScreen.js";
|
121
125
|
import { LinkedProfilesScreen } from "./screens/LinkedProfilesScreen.js";
|
122
126
|
import { LinkProfileScreen } from "./screens/LinkProfileScreen.js";
|
@@ -390,6 +394,7 @@ export function DetailsModal(props: {
|
|
390
394
|
|
391
395
|
const activeWallet = useActiveWallet();
|
392
396
|
const chainFaucetsQuery = useChainFaucets(walletChain);
|
397
|
+
const chainMetadataQuery = useChainMetadata(walletChain);
|
393
398
|
|
394
399
|
const disableSwitchChain = !activeWallet?.switchChain;
|
395
400
|
|
@@ -622,33 +627,35 @@ export function DetailsModal(props: {
|
|
622
627
|
</Button>
|
623
628
|
)}
|
624
629
|
|
625
|
-
{!hideBuyFunds &&
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
630
|
+
{!hideBuyFunds &&
|
631
|
+
chainMetadataQuery.data &&
|
632
|
+
!chainMetadataQuery.data.testnet && (
|
633
|
+
<Button
|
634
|
+
onClick={() => {
|
635
|
+
trackPayEvent({
|
636
|
+
client: client,
|
637
|
+
event: "details_modal_buy_click",
|
638
|
+
walletAddress: activeAccount?.address,
|
639
|
+
walletType: activeWallet?.id,
|
640
|
+
});
|
641
|
+
setScreen("buy");
|
642
|
+
}}
|
643
|
+
style={{
|
644
|
+
alignItems: "center",
|
645
|
+
display: "flex",
|
646
|
+
flex: 1,
|
647
|
+
fontSize: fontSize.sm,
|
648
|
+
gap: spacing.xs,
|
649
|
+
padding: spacing.sm,
|
650
|
+
}}
|
651
|
+
variant="outline"
|
652
|
+
>
|
653
|
+
<Container center="both" color="secondaryText" flex="row">
|
654
|
+
<PlusIcon height={iconSize.sm} width={iconSize.sm} />
|
655
|
+
</Container>
|
656
|
+
{locale.buy}
|
657
|
+
</Button>
|
658
|
+
)}
|
652
659
|
</Container>
|
653
660
|
</Container>
|
654
661
|
|
@@ -956,23 +963,26 @@ export function DetailsModal(props: {
|
|
956
963
|
|
957
964
|
// thirdweb pay
|
958
965
|
else if (screen === "buy") {
|
966
|
+
const requestedChainId =
|
967
|
+
props.detailsModal?.payOptions?.prefillBuy?.chain?.id ||
|
968
|
+
walletChain?.id ||
|
969
|
+
props.chains[0]?.id ||
|
970
|
+
1;
|
959
971
|
content = (
|
960
|
-
<
|
972
|
+
<BuyWidget
|
973
|
+
amount={props.detailsModal?.payOptions?.prefillBuy?.amount || "0.01"}
|
974
|
+
chain={getCachedChain(requestedChainId)}
|
961
975
|
client={client}
|
962
|
-
connectLocale={locale}
|
963
|
-
connectOptions={undefined}
|
964
976
|
hiddenWallets={props.detailsModal?.hiddenWallets}
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
payOptions={
|
969
|
-
props.detailsModal?.payOptions || {
|
970
|
-
mode: "fund_wallet",
|
971
|
-
}
|
972
|
-
}
|
977
|
+
locale={locale.id}
|
978
|
+
onCancel={() => setScreen("main")}
|
979
|
+
onSuccess={() => setScreen("main")}
|
973
980
|
supportedTokens={props.supportedTokens}
|
974
|
-
|
975
|
-
|
981
|
+
tokenAddress={
|
982
|
+
props.displayBalanceToken?.[Number(requestedChainId)] as
|
983
|
+
| `0x${string}`
|
984
|
+
| undefined
|
985
|
+
}
|
976
986
|
/>
|
977
987
|
);
|
978
988
|
}
|
@@ -690,12 +690,10 @@ export const ChainButton = /* @__PURE__ */ memo(function ChainButton(props: {
|
|
690
690
|
)}
|
691
691
|
</Container>
|
692
692
|
{confirming || switchingFailed ? (
|
693
|
-
<
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
gap: spacing.xs,
|
698
|
-
}}
|
693
|
+
<Container
|
694
|
+
flex="column"
|
695
|
+
gap="3xs"
|
696
|
+
style={{ alignItems: "flex-start", width: "100%" }}
|
699
697
|
>
|
700
698
|
<ChainName
|
701
699
|
loadingComponent={<Skeleton height="20px" width="150px" />}
|
@@ -718,7 +716,7 @@ export const ChainButton = /* @__PURE__ */ memo(function ChainButton(props: {
|
|
718
716
|
</Container>
|
719
717
|
)}
|
720
718
|
</Container>
|
721
|
-
</
|
719
|
+
</Container>
|
722
720
|
) : (
|
723
721
|
<ChainName
|
724
722
|
className="tw-chain-icon-none-confirming"
|
@@ -1,6 +1,4 @@
|
|
1
1
|
import type { ChainMetadata } from "../../../../../../../chains/types.js";
|
2
|
-
import type { BuyWithCryptoQuote } from "../../../../../../../pay/buyWithCrypto/getQuote.js";
|
3
|
-
import type { BuyWithFiatQuote } from "../../../../../../../pay/buyWithFiat/getQuote.js";
|
4
2
|
import type { GetWalletBalanceResult } from "../../../../../../../wallets/utils/getWalletBalance.js";
|
5
3
|
import type { TokenInfo } from "../../../../../../core/utils/defaultTokens.js";
|
6
4
|
|
@@ -12,40 +10,3 @@ export type TransactionCostAndData = {
|
|
12
10
|
gasCostWei: bigint;
|
13
11
|
chainMetadata: ChainMetadata;
|
14
12
|
};
|
15
|
-
|
16
|
-
export type SelectedScreen =
|
17
|
-
| {
|
18
|
-
id: "main" | "select-payment-method" | "buy-with-fiat";
|
19
|
-
}
|
20
|
-
| {
|
21
|
-
id: "buy-with-crypto";
|
22
|
-
payDisabled?: boolean;
|
23
|
-
}
|
24
|
-
| {
|
25
|
-
id: "select-from-token";
|
26
|
-
backScreen: SelectedScreen;
|
27
|
-
}
|
28
|
-
| {
|
29
|
-
id: "select-to-token";
|
30
|
-
backScreen: SelectedScreen;
|
31
|
-
}
|
32
|
-
| {
|
33
|
-
id: "select-currency";
|
34
|
-
backScreen: SelectedScreen;
|
35
|
-
}
|
36
|
-
| {
|
37
|
-
id: "swap-flow";
|
38
|
-
quote: BuyWithCryptoQuote;
|
39
|
-
approvalAmount?: bigint;
|
40
|
-
}
|
41
|
-
| {
|
42
|
-
id: "fiat-flow";
|
43
|
-
quote: BuyWithFiatQuote;
|
44
|
-
}
|
45
|
-
| {
|
46
|
-
id: "transfer-flow";
|
47
|
-
}
|
48
|
-
| {
|
49
|
-
id: "connect-payer-wallet";
|
50
|
-
backScreen: SelectedScreen;
|
51
|
-
};
|
@@ -1,11 +1,4 @@
|
|
1
|
-
import { useQuery } from "@tanstack/react-query";
|
2
|
-
import { Address as ox__Address } from "ox";
|
3
|
-
import * as Bridge from "../../../../../../../bridge/index.js";
|
4
1
|
import type { Chain } from "../../../../../../../chains/types.js";
|
5
|
-
import { getCachedChain } from "../../../../../../../chains/utils.js";
|
6
|
-
import type { ThirdwebClient } from "../../../../../../../client/client.js";
|
7
|
-
import type { Address } from "../../../../../../../utils/address.js";
|
8
|
-
import { withCache } from "../../../../../../../utils/promise/withCache.js";
|
9
2
|
|
10
3
|
export type SupportedChainAndTokens = Array<{
|
11
4
|
chain: Chain;
|
@@ -18,156 +11,3 @@ export type SupportedChainAndTokens = Array<{
|
|
18
11
|
icon?: string;
|
19
12
|
}>;
|
20
13
|
}>;
|
21
|
-
|
22
|
-
async function fetchBuySupportedDestinations({
|
23
|
-
client,
|
24
|
-
originChainId,
|
25
|
-
originTokenAddress,
|
26
|
-
}: {
|
27
|
-
client: ThirdwebClient;
|
28
|
-
originChainId?: number;
|
29
|
-
originTokenAddress?: Address;
|
30
|
-
}): Promise<SupportedChainAndTokens> {
|
31
|
-
return withCache(
|
32
|
-
async () => {
|
33
|
-
const routes = await Bridge.routes({
|
34
|
-
client,
|
35
|
-
limit: 1_000_000,
|
36
|
-
maxSteps: 1,
|
37
|
-
originChainId,
|
38
|
-
originTokenAddress,
|
39
|
-
sortBy: "popularity",
|
40
|
-
});
|
41
|
-
const tokens = new Set<string>();
|
42
|
-
const chains = new Set<number>();
|
43
|
-
const destinationTokens: Record<
|
44
|
-
number,
|
45
|
-
Array<{
|
46
|
-
address: Address;
|
47
|
-
buyWithCryptoEnabled: boolean;
|
48
|
-
buyWithFiatEnabled: boolean;
|
49
|
-
name: string;
|
50
|
-
symbol: string;
|
51
|
-
icon?: string;
|
52
|
-
}>
|
53
|
-
> = [];
|
54
|
-
for (const route of routes) {
|
55
|
-
const key = `${route.destinationToken.chainId}:${route.destinationToken.address}`;
|
56
|
-
if (!tokens.has(key)) {
|
57
|
-
tokens.add(key);
|
58
|
-
if (!chains.has(route.destinationToken.chainId)) {
|
59
|
-
chains.add(route.destinationToken.chainId);
|
60
|
-
}
|
61
|
-
const existing = destinationTokens[route.destinationToken.chainId];
|
62
|
-
if (!existing) {
|
63
|
-
destinationTokens[route.destinationToken.chainId] = [];
|
64
|
-
}
|
65
|
-
destinationTokens[route.destinationToken.chainId] = [
|
66
|
-
...(existing || []),
|
67
|
-
{
|
68
|
-
address: ox__Address.checksum(
|
69
|
-
route.destinationToken.address,
|
70
|
-
) as Address,
|
71
|
-
// We support both options for all tokens
|
72
|
-
buyWithCryptoEnabled: true,
|
73
|
-
buyWithFiatEnabled: true,
|
74
|
-
icon: route.destinationToken.iconUri,
|
75
|
-
name: route.destinationToken.name,
|
76
|
-
symbol: route.destinationToken.symbol,
|
77
|
-
},
|
78
|
-
];
|
79
|
-
}
|
80
|
-
}
|
81
|
-
|
82
|
-
return [...chains].map((chainId) => ({
|
83
|
-
chain: getCachedChain(chainId),
|
84
|
-
tokens: destinationTokens[chainId] || [],
|
85
|
-
}));
|
86
|
-
},
|
87
|
-
{
|
88
|
-
cacheKey: `buy-supported-destinations-${originChainId}:${originTokenAddress}`,
|
89
|
-
cacheTime: 5 * 60 * 1000,
|
90
|
-
},
|
91
|
-
);
|
92
|
-
}
|
93
|
-
|
94
|
-
/**
|
95
|
-
* @internal
|
96
|
-
*/
|
97
|
-
export function useBuySupportedDestinations(
|
98
|
-
client: ThirdwebClient,
|
99
|
-
_isTestMode?: boolean,
|
100
|
-
) {
|
101
|
-
return useQuery({
|
102
|
-
queryFn: async () => {
|
103
|
-
return fetchBuySupportedDestinations({ client });
|
104
|
-
},
|
105
|
-
queryKey: ["destination-tokens", client],
|
106
|
-
});
|
107
|
-
}
|
108
|
-
|
109
|
-
export function useBuySupportedSources(options: {
|
110
|
-
client: ThirdwebClient;
|
111
|
-
destinationChainId: number;
|
112
|
-
destinationTokenAddress: string;
|
113
|
-
}) {
|
114
|
-
return useQuery({
|
115
|
-
queryFn: async () => {
|
116
|
-
const routes = await Bridge.routes({
|
117
|
-
client: options.client,
|
118
|
-
destinationChainId: options.destinationChainId,
|
119
|
-
destinationTokenAddress: options.destinationTokenAddress,
|
120
|
-
limit: 50,
|
121
|
-
maxSteps: 1,
|
122
|
-
sortBy: "popularity",
|
123
|
-
});
|
124
|
-
|
125
|
-
const tokens = new Set<string>();
|
126
|
-
const chains = new Set<number>();
|
127
|
-
const originTokens: Record<
|
128
|
-
number,
|
129
|
-
Array<{
|
130
|
-
address: Address;
|
131
|
-
buyWithCryptoEnabled: boolean;
|
132
|
-
buyWithFiatEnabled: boolean;
|
133
|
-
name: string;
|
134
|
-
symbol: string;
|
135
|
-
icon?: string;
|
136
|
-
}>
|
137
|
-
> = [];
|
138
|
-
for (const route of routes) {
|
139
|
-
const key = `${route.originToken.chainId}:${route.originToken.address}`;
|
140
|
-
if (!tokens.has(key)) {
|
141
|
-
tokens.add(key);
|
142
|
-
if (!chains.has(route.originToken.chainId)) {
|
143
|
-
chains.add(route.originToken.chainId);
|
144
|
-
}
|
145
|
-
const existing = originTokens[route.originToken.chainId];
|
146
|
-
if (!existing) {
|
147
|
-
originTokens[route.originToken.chainId] = [];
|
148
|
-
}
|
149
|
-
originTokens[route.originToken.chainId] = [
|
150
|
-
...(existing || []),
|
151
|
-
{
|
152
|
-
address: ox__Address.checksum(
|
153
|
-
route.originToken.address,
|
154
|
-
) as Address,
|
155
|
-
// We support both options for all tokens
|
156
|
-
buyWithCryptoEnabled: true,
|
157
|
-
buyWithFiatEnabled: true,
|
158
|
-
icon: route.originToken.iconUri,
|
159
|
-
name: route.originToken.name,
|
160
|
-
symbol: route.originToken.symbol,
|
161
|
-
},
|
162
|
-
];
|
163
|
-
}
|
164
|
-
}
|
165
|
-
|
166
|
-
return [...chains].map((chainId) => ({
|
167
|
-
chain: getCachedChain(chainId),
|
168
|
-
tokens: originTokens[chainId] || [],
|
169
|
-
}));
|
170
|
-
},
|
171
|
-
queryKey: ["source-tokens", options],
|
172
|
-
});
|
173
|
-
}
|
@@ -1,12 +1,3 @@
|
|
1
1
|
export function getBuyTokenAmountFontSize(value: string) {
|
2
2
|
return value.length > 10 ? "26px" : value.length > 6 ? "34px" : "50px";
|
3
3
|
}
|
4
|
-
|
5
|
-
/**
|
6
|
-
*
|
7
|
-
* @param str accepts any string but expects a fully upppercased string / type FiatProvider
|
8
|
-
* @returns Fiat provider label to be rendered used within presentation logic
|
9
|
-
*/
|
10
|
-
export function getProviderLabel(str: string) {
|
11
|
-
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
12
|
-
}
|