thirdweb 5.102.7-nightly-9f6c1a4820e37428dec6427cf77a12ab463f119d-20250616000412 → 5.103.0
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/bridge/Routes.js +4 -1
- package/dist/cjs/bridge/Routes.js.map +1 -1
- package/dist/cjs/bridge/Token.js +57 -0
- package/dist/cjs/bridge/Token.js.map +1 -1
- package/dist/cjs/bridge/types/Errors.js +9 -0
- package/dist/cjs/bridge/types/Errors.js.map +1 -1
- package/dist/cjs/exports/react.js +9 -1
- package/dist/cjs/exports/react.js.map +1 -1
- package/dist/cjs/pay/buyWithFiat/getQuote.js +2 -2
- package/dist/cjs/pay/convert/cryptoToFiat.js +3 -3
- package/dist/cjs/pay/convert/cryptoToFiat.js.map +1 -1
- package/dist/cjs/pay/convert/fiatToCrypto.js +3 -3
- package/dist/cjs/pay/convert/fiatToCrypto.js.map +1 -1
- package/dist/cjs/pay/convert/get-token.js +15 -3
- package/dist/cjs/pay/convert/get-token.js.map +1 -1
- package/dist/cjs/pay/utils/commonTypes.js +1 -1
- package/dist/cjs/react/core/adapters/WindowAdapter.js +3 -0
- package/dist/cjs/react/core/adapters/WindowAdapter.js.map +1 -0
- package/dist/cjs/react/core/errors/mapBridgeError.js +27 -0
- package/dist/cjs/react/core/errors/mapBridgeError.js.map +1 -0
- package/dist/cjs/react/core/hooks/others/useChainQuery.js +1 -1
- package/dist/cjs/react/core/hooks/others/useChainQuery.js.map +1 -1
- package/dist/cjs/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.js +40 -0
- package/dist/cjs/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.js.map +1 -0
- package/dist/cjs/react/core/hooks/useBridgeError.js +94 -0
- package/dist/cjs/react/core/hooks/useBridgeError.js.map +1 -0
- package/dist/cjs/react/core/hooks/useBridgePrepare.js +90 -0
- package/dist/cjs/react/core/hooks/useBridgePrepare.js.map +1 -0
- package/dist/cjs/react/core/hooks/useBridgeQuote.js +50 -0
- package/dist/cjs/react/core/hooks/useBridgeQuote.js.map +1 -0
- package/dist/cjs/react/core/hooks/useBridgeRoutes.js +61 -0
- package/dist/cjs/react/core/hooks/useBridgeRoutes.js.map +1 -0
- package/dist/cjs/react/core/hooks/usePaymentMethods.js +154 -0
- package/dist/cjs/react/core/hooks/usePaymentMethods.js.map +1 -0
- package/dist/cjs/react/core/hooks/useStepExecutor.js +408 -0
- package/dist/cjs/react/core/hooks/useStepExecutor.js.map +1 -0
- package/dist/cjs/react/core/hooks/useTransactionDetails.js +126 -0
- package/dist/cjs/react/core/hooks/useTransactionDetails.js.map +1 -0
- package/dist/cjs/react/core/machines/paymentMachine.js +189 -0
- package/dist/cjs/react/core/machines/paymentMachine.js.map +1 -0
- package/dist/cjs/react/web/adapters/WindowAdapter.js +25 -0
- package/dist/cjs/react/web/adapters/WindowAdapter.js.map +1 -0
- package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js +5 -0
- package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/BridgeOrchestrator.js +107 -0
- package/dist/cjs/react/web/ui/Bridge/BridgeOrchestrator.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/BuyWidget.js +177 -0
- package/dist/cjs/react/web/ui/Bridge/BuyWidget.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/CheckoutWidget.js +154 -0
- package/dist/cjs/react/web/ui/Bridge/CheckoutWidget.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/DirectPayment.js +62 -0
- package/dist/cjs/react/web/ui/Bridge/DirectPayment.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/ErrorBanner.js +26 -0
- package/dist/cjs/react/web/ui/Bridge/ErrorBanner.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/FundWallet.js +122 -0
- package/dist/cjs/react/web/ui/Bridge/FundWallet.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/QuoteLoader.js +99 -0
- package/dist/cjs/react/web/ui/Bridge/QuoteLoader.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/StepRunner.js +179 -0
- package/dist/cjs/react/web/ui/Bridge/StepRunner.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/TransactionPayment.js +117 -0
- package/dist/cjs/react/web/ui/Bridge/TransactionPayment.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/TransactionWidget.js +179 -0
- package/dist/cjs/react/web/ui/Bridge/TransactionWidget.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/UnsupportedTokenScreen.js +23 -0
- package/dist/cjs/react/web/ui/Bridge/UnsupportedTokenScreen.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/common/TokenAndChain.js +101 -0
- package/dist/cjs/react/web/ui/Bridge/common/TokenAndChain.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/common/TokenBalanceRow.js +57 -0
- package/dist/cjs/react/web/ui/Bridge/common/TokenBalanceRow.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/common/WithHeader.js +27 -0
- package/dist/cjs/react/web/ui/Bridge/common/WithHeader.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/payment-details/PaymentDetails.js +121 -0
- package/dist/cjs/react/web/ui/Bridge/payment-details/PaymentDetails.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/payment-details/PaymentOverview.js +80 -0
- package/dist/cjs/react/web/ui/Bridge/payment-details/PaymentOverview.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js +83 -0
- package/dist/cjs/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/payment-selection/PaymentSelection.js +111 -0
- package/dist/cjs/react/web/ui/Bridge/payment-selection/PaymentSelection.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/payment-selection/TokenSelection.js +71 -0
- package/dist/cjs/react/web/ui/Bridge/payment-selection/TokenSelection.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/payment-selection/WalletFiatSelection.js +54 -0
- package/dist/cjs/react/web/ui/Bridge/payment-selection/WalletFiatSelection.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/payment-success/PaymentReceipt.js +140 -0
- package/dist/cjs/react/web/ui/Bridge/payment-success/PaymentReceipt.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/payment-success/SuccessScreen.js +61 -0
- package/dist/cjs/react/web/ui/Bridge/payment-success/SuccessScreen.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/WalletSelector.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/constants.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/icons/CreditCardIcon.js +12 -0
- package/dist/cjs/react/web/ui/ConnectWallet/icons/CreditCardIcon.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js +3 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.js +4 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/FiatValue.js +4 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/FiatValue.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/formatTokenBalance.js +11 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/formatTokenBalance.js.map +1 -1
- package/dist/cjs/react/web/ui/PayEmbed.js +2 -1
- package/dist/cjs/react/web/ui/PayEmbed.js.map +1 -1
- package/dist/cjs/react/web/ui/TransactionButton/DepositScreen.js +6 -5
- package/dist/cjs/react/web/ui/TransactionButton/DepositScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/TransactionButton/ExecutingScreen.js +43 -4
- package/dist/cjs/react/web/ui/TransactionButton/ExecutingScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/TransactionButton/TransactionModal.js +8 -4
- package/dist/cjs/react/web/ui/TransactionButton/TransactionModal.js.map +1 -1
- package/dist/cjs/react/web/ui/components/ChainName.js +2 -1
- package/dist/cjs/react/web/ui/components/ChainName.js.map +1 -1
- package/dist/cjs/react/web/ui/components/TokenIcon.js +6 -3
- package/dist/cjs/react/web/ui/components/TokenIcon.js.map +1 -1
- package/dist/cjs/react/web/ui/components/buttons.js +1 -5
- package/dist/cjs/react/web/ui/components/buttons.js.map +1 -1
- package/dist/cjs/stories/Bridge/BridgeOrchestrator.stories.js +228 -0
- package/dist/cjs/stories/Bridge/BridgeOrchestrator.stories.js.map +1 -0
- package/dist/cjs/stories/Bridge/DirectPayment.stories.js +194 -0
- package/dist/cjs/stories/Bridge/DirectPayment.stories.js.map +1 -0
- package/dist/cjs/stories/Bridge/ErrorBanner.stories.js +153 -0
- package/dist/cjs/stories/Bridge/ErrorBanner.stories.js.map +1 -0
- package/dist/cjs/stories/Bridge/FundWallet.stories.js +173 -0
- package/dist/cjs/stories/Bridge/FundWallet.stories.js.map +1 -0
- package/dist/cjs/stories/Bridge/PaymentDetails.stories.js +430 -0
- package/dist/cjs/stories/Bridge/PaymentDetails.stories.js.map +1 -0
- package/dist/cjs/stories/Bridge/PaymentSelection.stories.js +151 -0
- package/dist/cjs/stories/Bridge/PaymentSelection.stories.js.map +1 -0
- package/dist/cjs/stories/Bridge/StepRunner.stories.js +82 -0
- package/dist/cjs/stories/Bridge/StepRunner.stories.js.map +1 -0
- package/dist/cjs/stories/Bridge/SuccessScreen.stories.js +180 -0
- package/dist/cjs/stories/Bridge/SuccessScreen.stories.js.map +1 -0
- package/dist/cjs/stories/Bridge/TransactionPayment.stories.js +139 -0
- package/dist/cjs/stories/Bridge/TransactionPayment.stories.js.map +1 -0
- package/dist/cjs/stories/Bridge/UnsupportedTokenScreen.stories.js +94 -0
- package/dist/cjs/stories/Bridge/UnsupportedTokenScreen.stories.js.map +1 -0
- package/dist/cjs/stories/Bridge/fixtures.js +731 -0
- package/dist/cjs/stories/Bridge/fixtures.js.map +1 -0
- package/dist/cjs/stories/TokenBalanceRow.stories.js +81 -0
- package/dist/cjs/stories/TokenBalanceRow.stories.js.map +1 -0
- package/dist/cjs/stories/WalletRow.stories.js +120 -0
- package/dist/cjs/stories/WalletRow.stories.js.map +1 -0
- package/dist/cjs/stories/utils.js +19 -1
- package/dist/cjs/stories/utils.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/bridge/Routes.js +4 -1
- package/dist/esm/bridge/Routes.js.map +1 -1
- package/dist/esm/bridge/Token.js +56 -0
- package/dist/esm/bridge/Token.js.map +1 -1
- package/dist/esm/bridge/types/Errors.js +9 -0
- package/dist/esm/bridge/types/Errors.js.map +1 -1
- package/dist/esm/exports/react.js +4 -0
- package/dist/esm/exports/react.js.map +1 -1
- package/dist/esm/pay/buyWithFiat/getQuote.js +2 -2
- package/dist/esm/pay/convert/cryptoToFiat.js +4 -4
- package/dist/esm/pay/convert/cryptoToFiat.js.map +1 -1
- package/dist/esm/pay/convert/fiatToCrypto.js +4 -4
- package/dist/esm/pay/convert/fiatToCrypto.js.map +1 -1
- package/dist/esm/pay/convert/get-token.js +15 -3
- package/dist/esm/pay/convert/get-token.js.map +1 -1
- package/dist/esm/pay/utils/commonTypes.js +1 -1
- package/dist/esm/react/core/adapters/WindowAdapter.js +2 -0
- package/dist/esm/react/core/adapters/WindowAdapter.js.map +1 -0
- package/dist/esm/react/core/errors/mapBridgeError.js +23 -0
- package/dist/esm/react/core/errors/mapBridgeError.js.map +1 -0
- package/dist/esm/react/core/hooks/others/useChainQuery.js +1 -1
- package/dist/esm/react/core/hooks/others/useChainQuery.js.map +1 -1
- package/dist/esm/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.js +37 -0
- package/dist/esm/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.js.map +1 -0
- package/dist/esm/react/core/hooks/useBridgeError.js +91 -0
- package/dist/esm/react/core/hooks/useBridgeError.js.map +1 -0
- package/dist/esm/react/core/hooks/useBridgePrepare.js +87 -0
- package/dist/esm/react/core/hooks/useBridgePrepare.js.map +1 -0
- package/dist/esm/react/core/hooks/useBridgeQuote.js +47 -0
- package/dist/esm/react/core/hooks/useBridgeQuote.js.map +1 -0
- package/dist/esm/react/core/hooks/useBridgeRoutes.js +58 -0
- package/dist/esm/react/core/hooks/useBridgeRoutes.js.map +1 -0
- package/dist/esm/react/core/hooks/usePaymentMethods.js +151 -0
- package/dist/esm/react/core/hooks/usePaymentMethods.js.map +1 -0
- package/dist/esm/react/core/hooks/useStepExecutor.js +405 -0
- package/dist/esm/react/core/hooks/useStepExecutor.js.map +1 -0
- package/dist/esm/react/core/hooks/useTransactionDetails.js +123 -0
- package/dist/esm/react/core/hooks/useTransactionDetails.js.map +1 -0
- package/dist/esm/react/core/machines/paymentMachine.js +186 -0
- package/dist/esm/react/core/machines/paymentMachine.js.map +1 -0
- package/dist/esm/react/web/adapters/WindowAdapter.js +21 -0
- package/dist/esm/react/web/adapters/WindowAdapter.js.map +1 -0
- package/dist/esm/react/web/hooks/transaction/useSendTransaction.js +5 -0
- package/dist/esm/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/BridgeOrchestrator.js +104 -0
- package/dist/esm/react/web/ui/Bridge/BridgeOrchestrator.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/BuyWidget.js +174 -0
- package/dist/esm/react/web/ui/Bridge/BuyWidget.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/CheckoutWidget.js +151 -0
- package/dist/esm/react/web/ui/Bridge/CheckoutWidget.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/DirectPayment.js +59 -0
- package/dist/esm/react/web/ui/Bridge/DirectPayment.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/ErrorBanner.js +23 -0
- package/dist/esm/react/web/ui/Bridge/ErrorBanner.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/FundWallet.js +119 -0
- package/dist/esm/react/web/ui/Bridge/FundWallet.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/QuoteLoader.js +96 -0
- package/dist/esm/react/web/ui/Bridge/QuoteLoader.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/StepRunner.js +176 -0
- package/dist/esm/react/web/ui/Bridge/StepRunner.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/TransactionPayment.js +114 -0
- package/dist/esm/react/web/ui/Bridge/TransactionPayment.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/TransactionWidget.js +176 -0
- package/dist/esm/react/web/ui/Bridge/TransactionWidget.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/UnsupportedTokenScreen.js +20 -0
- package/dist/esm/react/web/ui/Bridge/UnsupportedTokenScreen.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/common/TokenAndChain.js +96 -0
- package/dist/esm/react/web/ui/Bridge/common/TokenAndChain.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/common/TokenBalanceRow.js +54 -0
- package/dist/esm/react/web/ui/Bridge/common/TokenBalanceRow.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/common/WithHeader.js +24 -0
- package/dist/esm/react/web/ui/Bridge/common/WithHeader.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/payment-details/PaymentDetails.js +119 -0
- package/dist/esm/react/web/ui/Bridge/payment-details/PaymentDetails.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/payment-details/PaymentOverview.js +77 -0
- package/dist/esm/react/web/ui/Bridge/payment-details/PaymentOverview.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js +80 -0
- package/dist/esm/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/payment-selection/PaymentSelection.js +108 -0
- package/dist/esm/react/web/ui/Bridge/payment-selection/PaymentSelection.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/payment-selection/TokenSelection.js +68 -0
- package/dist/esm/react/web/ui/Bridge/payment-selection/TokenSelection.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/payment-selection/WalletFiatSelection.js +51 -0
- package/dist/esm/react/web/ui/Bridge/payment-selection/WalletFiatSelection.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/payment-success/PaymentReceipt.js +137 -0
- package/dist/esm/react/web/ui/Bridge/payment-success/PaymentReceipt.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/payment-success/SuccessScreen.js +58 -0
- package/dist/esm/react/web/ui/Bridge/payment-success/SuccessScreen.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/WalletSelector.js +2 -2
- package/dist/esm/react/web/ui/ConnectWallet/constants.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/icons/CreditCardIcon.js +8 -0
- package/dist/esm/react/web/ui/ConnectWallet/icons/CreditCardIcon.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js +3 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.js +3 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/FiatValue.js +4 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/FiatValue.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/formatTokenBalance.js +9 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/formatTokenBalance.js.map +1 -1
- package/dist/esm/react/web/ui/PayEmbed.js +2 -1
- package/dist/esm/react/web/ui/PayEmbed.js.map +1 -1
- package/dist/esm/react/web/ui/TransactionButton/DepositScreen.js +6 -5
- package/dist/esm/react/web/ui/TransactionButton/DepositScreen.js.map +1 -1
- package/dist/esm/react/web/ui/TransactionButton/ExecutingScreen.js +45 -6
- package/dist/esm/react/web/ui/TransactionButton/ExecutingScreen.js.map +1 -1
- package/dist/esm/react/web/ui/TransactionButton/TransactionModal.js +8 -4
- package/dist/esm/react/web/ui/TransactionButton/TransactionModal.js.map +1 -1
- package/dist/esm/react/web/ui/components/ChainName.js +2 -2
- package/dist/esm/react/web/ui/components/ChainName.js.map +1 -1
- package/dist/esm/react/web/ui/components/TokenIcon.js +7 -4
- package/dist/esm/react/web/ui/components/TokenIcon.js.map +1 -1
- package/dist/esm/react/web/ui/components/buttons.js +1 -5
- package/dist/esm/react/web/ui/components/buttons.js.map +1 -1
- package/dist/esm/stories/Bridge/BridgeOrchestrator.stories.js +226 -0
- package/dist/esm/stories/Bridge/BridgeOrchestrator.stories.js.map +1 -0
- package/dist/esm/stories/Bridge/DirectPayment.stories.js +191 -0
- package/dist/esm/stories/Bridge/DirectPayment.stories.js.map +1 -0
- package/dist/esm/stories/Bridge/ErrorBanner.stories.js +150 -0
- package/dist/esm/stories/Bridge/ErrorBanner.stories.js.map +1 -0
- package/dist/esm/stories/Bridge/FundWallet.stories.js +170 -0
- package/dist/esm/stories/Bridge/FundWallet.stories.js.map +1 -0
- package/dist/esm/stories/Bridge/PaymentDetails.stories.js +427 -0
- package/dist/esm/stories/Bridge/PaymentDetails.stories.js.map +1 -0
- package/dist/esm/stories/Bridge/PaymentSelection.stories.js +148 -0
- package/dist/esm/stories/Bridge/PaymentSelection.stories.js.map +1 -0
- package/dist/esm/stories/Bridge/StepRunner.stories.js +79 -0
- package/dist/esm/stories/Bridge/StepRunner.stories.js.map +1 -0
- package/dist/esm/stories/Bridge/SuccessScreen.stories.js +177 -0
- package/dist/esm/stories/Bridge/SuccessScreen.stories.js.map +1 -0
- package/dist/esm/stories/Bridge/TransactionPayment.stories.js +136 -0
- package/dist/esm/stories/Bridge/TransactionPayment.stories.js.map +1 -0
- package/dist/esm/stories/Bridge/UnsupportedTokenScreen.stories.js +91 -0
- package/dist/esm/stories/Bridge/UnsupportedTokenScreen.stories.js.map +1 -0
- package/dist/esm/stories/Bridge/fixtures.js +728 -0
- package/dist/esm/stories/Bridge/fixtures.js.map +1 -0
- package/dist/esm/stories/TokenBalanceRow.stories.js +78 -0
- package/dist/esm/stories/TokenBalanceRow.stories.js.map +1 -0
- package/dist/esm/stories/WalletRow.stories.js +117 -0
- package/dist/esm/stories/WalletRow.stories.js.map +1 -0
- package/dist/esm/stories/utils.js +17 -0
- package/dist/esm/stories/utils.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/types/bridge/Routes.d.ts +1 -0
- package/dist/types/bridge/Routes.d.ts.map +1 -1
- package/dist/types/bridge/Token.d.ts +48 -1
- package/dist/types/bridge/Token.d.ts.map +1 -1
- package/dist/types/bridge/types/BridgeAction.d.ts +1 -1
- package/dist/types/bridge/types/BridgeAction.d.ts.map +1 -1
- package/dist/types/bridge/types/Errors.d.ts +1 -0
- package/dist/types/bridge/types/Errors.d.ts.map +1 -1
- package/dist/types/exports/react.d.ts +4 -0
- package/dist/types/exports/react.d.ts.map +1 -1
- package/dist/types/pay/convert/get-token.d.ts +2 -1
- package/dist/types/pay/convert/get-token.d.ts.map +1 -1
- package/dist/types/pay/utils/commonTypes.d.ts +1 -1
- package/dist/types/react/core/adapters/WindowAdapter.d.ts +14 -0
- package/dist/types/react/core/adapters/WindowAdapter.d.ts.map +1 -0
- package/dist/types/react/core/errors/mapBridgeError.d.ts +17 -0
- package/dist/types/react/core/errors/mapBridgeError.d.ts.map +1 -0
- package/dist/types/react/core/hooks/connection/ConnectButtonProps.d.ts +14 -6
- package/dist/types/react/core/hooks/connection/ConnectButtonProps.d.ts.map +1 -1
- package/dist/types/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.d.ts +54 -0
- package/dist/types/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.d.ts.map +1 -0
- package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts +1 -1
- package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts.map +1 -1
- package/dist/types/react/core/hooks/useBridgeError.d.ts +72 -0
- package/dist/types/react/core/hooks/useBridgeError.d.ts.map +1 -0
- package/dist/types/react/core/hooks/useBridgePrepare.d.ts +75 -0
- package/dist/types/react/core/hooks/useBridgePrepare.d.ts.map +1 -0
- package/dist/types/react/core/hooks/useBridgeQuote.d.ts +14 -0
- package/dist/types/react/core/hooks/useBridgeQuote.d.ts.map +1 -0
- package/dist/types/react/core/hooks/useBridgeRoutes.d.ts +30 -0
- package/dist/types/react/core/hooks/useBridgeRoutes.d.ts.map +1 -0
- package/dist/types/react/core/hooks/usePaymentMethods.d.ts +36 -0
- package/dist/types/react/core/hooks/usePaymentMethods.d.ts.map +1 -0
- package/dist/types/react/core/hooks/useStepExecutor.d.ts +67 -0
- package/dist/types/react/core/hooks/useStepExecutor.d.ts.map +1 -0
- package/dist/types/react/core/hooks/useTransactionDetails.d.ts +31 -0
- package/dist/types/react/core/hooks/useTransactionDetails.d.ts.map +1 -0
- package/dist/types/react/core/machines/paymentMachine.d.ts +86 -0
- package/dist/types/react/core/machines/paymentMachine.d.ts.map +1 -0
- package/dist/types/react/web/adapters/WindowAdapter.d.ts +19 -0
- package/dist/types/react/web/adapters/WindowAdapter.d.ts.map +1 -0
- package/dist/types/react/web/hooks/transaction/useSendTransaction.d.ts +5 -0
- package/dist/types/react/web/hooks/transaction/useSendTransaction.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/BridgeOrchestrator.d.ts +78 -0
- package/dist/types/react/web/ui/Bridge/BridgeOrchestrator.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/BuyWidget.d.ts +325 -0
- package/dist/types/react/web/ui/Bridge/BuyWidget.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/CheckoutWidget.d.ts +328 -0
- package/dist/types/react/web/ui/Bridge/CheckoutWidget.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/DirectPayment.d.ts +27 -0
- package/dist/types/react/web/ui/Bridge/DirectPayment.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/ErrorBanner.d.ts +17 -0
- package/dist/types/react/web/ui/Bridge/ErrorBanner.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/FundWallet.d.ts +35 -0
- package/dist/types/react/web/ui/Bridge/FundWallet.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/QuoteLoader.d.ts +57 -0
- package/dist/types/react/web/ui/Bridge/QuoteLoader.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/StepRunner.d.ts +39 -0
- package/dist/types/react/web/ui/Bridge/StepRunner.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/TransactionPayment.d.ts +27 -0
- package/dist/types/react/web/ui/Bridge/TransactionPayment.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/TransactionWidget.d.ts +355 -0
- package/dist/types/react/web/ui/Bridge/TransactionWidget.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/UnsupportedTokenScreen.d.ts +13 -0
- package/dist/types/react/web/ui/Bridge/UnsupportedTokenScreen.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/common/TokenAndChain.d.ts +16 -0
- package/dist/types/react/web/ui/Bridge/common/TokenAndChain.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/common/TokenBalanceRow.d.ts +10 -0
- package/dist/types/react/web/ui/Bridge/common/TokenBalanceRow.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/common/WithHeader.d.ts +9 -0
- package/dist/types/react/web/ui/Bridge/common/WithHeader.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/payment-details/PaymentDetails.d.ts +36 -0
- package/dist/types/react/web/ui/Bridge/payment-details/PaymentDetails.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/payment-details/PaymentOverview.d.ts +15 -0
- package/dist/types/react/web/ui/Bridge/payment-details/PaymentOverview.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/payment-selection/FiatProviderSelection.d.ts +12 -0
- package/dist/types/react/web/ui/Bridge/payment-selection/FiatProviderSelection.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/payment-selection/PaymentSelection.d.ts +50 -0
- package/dist/types/react/web/ui/Bridge/payment-selection/PaymentSelection.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/payment-selection/TokenSelection.d.ts +15 -0
- package/dist/types/react/web/ui/Bridge/payment-selection/TokenSelection.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/payment-selection/WalletFiatSelection.d.ts +12 -0
- package/dist/types/react/web/ui/Bridge/payment-selection/WalletFiatSelection.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/payment-success/PaymentReceipt.d.ts +24 -0
- package/dist/types/react/web/ui/Bridge/payment-success/PaymentReceipt.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/payment-success/SuccessScreen.d.ts +28 -0
- package/dist/types/react/web/ui/Bridge/payment-success/SuccessScreen.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/constants.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/icons/CreditCardIcon.d.ts +6 -0
- package/dist/types/react/web/ui/ConnectWallet/icons/CreditCardIcon.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.d.ts +4 -0
- 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/useUISelectionStates.d.ts +4 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/FiatValue.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/formatTokenBalance.d.ts +2 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/formatTokenBalance.d.ts.map +1 -1
- package/dist/types/react/web/ui/PayEmbed.d.ts.map +1 -1
- package/dist/types/react/web/ui/TransactionButton/DepositScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/TransactionButton/ExecutingScreen.d.ts +2 -0
- package/dist/types/react/web/ui/TransactionButton/ExecutingScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/ChainName.d.ts +3 -0
- package/dist/types/react/web/ui/components/ChainName.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/TokenIcon.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/buttons.d.ts.map +1 -1
- package/dist/types/stories/Bridge/BridgeOrchestrator.stories.d.ts +90 -0
- package/dist/types/stories/Bridge/BridgeOrchestrator.stories.d.ts.map +1 -0
- package/dist/types/stories/Bridge/DirectPayment.stories.d.ts +65 -0
- package/dist/types/stories/Bridge/DirectPayment.stories.d.ts.map +1 -0
- package/dist/types/stories/Bridge/ErrorBanner.stories.d.ts +55 -0
- package/dist/types/stories/Bridge/ErrorBanner.stories.d.ts.map +1 -0
- package/dist/types/stories/Bridge/FundWallet.stories.d.ts +63 -0
- package/dist/types/stories/Bridge/FundWallet.stories.d.ts.map +1 -0
- package/dist/types/stories/Bridge/PaymentDetails.stories.d.ts +70 -0
- package/dist/types/stories/Bridge/PaymentDetails.stories.d.ts.map +1 -0
- package/dist/types/stories/Bridge/PaymentSelection.stories.d.ts +65 -0
- package/dist/types/stories/Bridge/PaymentSelection.stories.d.ts.map +1 -0
- package/dist/types/stories/Bridge/StepRunner.stories.d.ts +61 -0
- package/dist/types/stories/Bridge/StepRunner.stories.d.ts.map +1 -0
- package/dist/types/stories/Bridge/SuccessScreen.stories.d.ts +58 -0
- package/dist/types/stories/Bridge/SuccessScreen.stories.d.ts.map +1 -0
- package/dist/types/stories/Bridge/TransactionPayment.stories.d.ts +55 -0
- package/dist/types/stories/Bridge/TransactionPayment.stories.d.ts.map +1 -0
- package/dist/types/stories/Bridge/UnsupportedTokenScreen.stories.d.ts +39 -0
- package/dist/types/stories/Bridge/UnsupportedTokenScreen.stories.d.ts.map +1 -0
- package/dist/types/stories/Bridge/fixtures.d.ts +37 -0
- package/dist/types/stories/Bridge/fixtures.d.ts.map +1 -0
- package/dist/types/stories/TokenBalanceRow.stories.d.ts +53 -0
- package/dist/types/stories/TokenBalanceRow.stories.d.ts.map +1 -0
- package/dist/types/stories/WalletRow.stories.d.ts +63 -0
- package/dist/types/stories/WalletRow.stories.d.ts.map +1 -0
- package/dist/types/stories/utils.d.ts +5 -0
- package/dist/types/stories/utils.d.ts.map +1 -1
- package/dist/types/utils/nft/parseNft.d.ts +2 -2
- package/dist/types/utils/nft/parseNft.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 -1
- package/src/bridge/Routes.ts +5 -0
- package/src/bridge/Token.ts +82 -1
- package/src/bridge/types/BridgeAction.ts +1 -1
- package/src/bridge/types/Errors.ts +11 -0
- package/src/exports/react.ts +16 -0
- package/src/pay/buyWithFiat/getQuote.ts +2 -2
- package/src/pay/convert/cryptoToFiat.ts +4 -4
- package/src/pay/convert/fiatToCrypto.ts +4 -4
- package/src/pay/convert/get-token.ts +17 -4
- package/src/pay/utils/commonTypes.ts +1 -1
- package/src/react/components.md +134 -0
- package/src/react/core/adapters/.keep +2 -0
- package/src/react/core/adapters/WindowAdapter.ts +13 -0
- package/src/react/core/errors/.keep +2 -0
- package/src/react/core/errors/mapBridgeError.test.ts +98 -0
- package/src/react/core/errors/mapBridgeError.ts +25 -0
- package/src/react/core/hooks/connection/ConnectButtonProps.ts +42 -37
- package/src/react/core/hooks/others/useChainQuery.ts +1 -1
- package/src/react/core/hooks/pay/useBuyWithFiatQuotesForProviders.ts +100 -0
- package/src/react/core/hooks/transaction/useSendTransaction.ts +1 -1
- package/src/react/core/hooks/useBridgeError.test.ts +172 -0
- package/src/react/core/hooks/useBridgeError.ts +149 -0
- package/src/react/core/hooks/useBridgePrepare.test.ts +161 -0
- package/src/react/core/hooks/useBridgePrepare.ts +133 -0
- package/src/react/core/hooks/useBridgeQuote.ts +67 -0
- package/src/react/core/hooks/useBridgeRoutes.test.ts +137 -0
- package/src/react/core/hooks/useBridgeRoutes.ts +75 -0
- package/src/react/core/hooks/usePaymentMethods.test.ts +336 -0
- package/src/react/core/hooks/usePaymentMethods.ts +203 -0
- package/src/react/core/hooks/useStepExecutor.ts +606 -0
- package/src/react/core/hooks/useTransactionDetails.ts +177 -0
- package/src/react/core/hooks/wallets/useAutoConnectCore.test.tsx +1 -57
- package/src/react/core/machines/.keep +2 -0
- package/src/react/core/machines/paymentMachine.test.ts +691 -0
- package/src/react/core/machines/paymentMachine.ts +290 -0
- package/src/react/core/types/.keep +2 -0
- package/src/react/core/utils/wallet.test.ts +77 -0
- package/src/react/native/flows/.keep +2 -0
- package/src/react/web/adapters/WindowAdapter.ts +23 -0
- package/src/react/web/adapters/adapters.test.ts +38 -0
- package/src/react/web/flows/.keep +2 -0
- package/src/react/web/hooks/transaction/useSendTransaction.tsx +5 -0
- package/src/react/web/ui/Bridge/BridgeOrchestrator.tsx +357 -0
- package/src/react/web/ui/Bridge/BuyWidget.tsx +494 -0
- package/src/react/web/ui/Bridge/CheckoutWidget.tsx +484 -0
- package/src/react/web/ui/Bridge/DirectPayment.tsx +234 -0
- package/src/react/web/ui/Bridge/ErrorBanner.tsx +86 -0
- package/src/react/web/ui/Bridge/FundWallet.tsx +341 -0
- package/src/react/web/ui/Bridge/QuoteLoader.tsx +219 -0
- package/src/react/web/ui/Bridge/StepRunner.tsx +417 -0
- package/src/react/web/ui/Bridge/TransactionPayment.tsx +403 -0
- package/src/react/web/ui/Bridge/TransactionWidget.tsx +502 -0
- package/src/react/web/ui/Bridge/UnsupportedTokenScreen.tsx +84 -0
- package/src/react/web/ui/Bridge/common/TokenAndChain.tsx +203 -0
- package/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx +112 -0
- package/src/react/web/ui/Bridge/common/WithHeader.tsx +65 -0
- package/src/react/web/ui/Bridge/payment-details/PaymentDetails.tsx +318 -0
- package/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx +301 -0
- package/src/react/web/ui/Bridge/payment-selection/FiatProviderSelection.tsx +186 -0
- package/src/react/web/ui/Bridge/payment-selection/PaymentSelection.tsx +268 -0
- package/src/react/web/ui/Bridge/payment-selection/TokenSelection.tsx +282 -0
- package/src/react/web/ui/Bridge/payment-selection/WalletFiatSelection.tsx +172 -0
- package/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx +392 -0
- package/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx +155 -0
- package/src/react/web/ui/ConnectWallet/Details.test.tsx +2 -2
- package/src/react/web/ui/ConnectWallet/WalletSelector.tsx +2 -2
- package/src/react/web/ui/ConnectWallet/constants.ts +1 -1
- package/src/react/web/ui/ConnectWallet/icons/CreditCardIcon.tsx +24 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx +5 -2
- package/src/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.tsx +3 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.tsx +8 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.ts +3 -2
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/FiatValue.tsx +7 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.tsx +1 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx +7 -3
- package/src/react/web/ui/ConnectWallet/screens/formatTokenBalance.ts +22 -0
- package/src/react/web/ui/PayEmbed.tsx +2 -0
- package/src/react/web/ui/TransactionButton/DepositScreen.tsx +10 -5
- package/src/react/web/ui/TransactionButton/ExecutingScreen.tsx +78 -25
- package/src/react/web/ui/TransactionButton/TransactionModal.tsx +15 -9
- package/src/react/web/ui/components/ChainName.tsx +4 -2
- package/src/react/web/ui/components/TokenIcon.tsx +7 -4
- package/src/react/web/ui/components/buttons.tsx +1 -5
- package/src/stories/Bridge/BridgeOrchestrator.stories.tsx +267 -0
- package/src/stories/Bridge/DirectPayment.stories.tsx +225 -0
- package/src/stories/Bridge/ErrorBanner.stories.tsx +184 -0
- package/src/stories/Bridge/FundWallet.stories.tsx +196 -0
- package/src/stories/Bridge/PaymentDetails.stories.tsx +501 -0
- package/src/stories/Bridge/PaymentSelection.stories.tsx +177 -0
- package/src/stories/Bridge/StepRunner.stories.tsx +109 -0
- package/src/stories/Bridge/SuccessScreen.stories.tsx +217 -0
- package/src/stories/Bridge/TransactionPayment.stories.tsx +170 -0
- package/src/stories/Bridge/UnsupportedTokenScreen.stories.tsx +119 -0
- package/src/stories/Bridge/fixtures.ts +802 -0
- package/src/stories/TokenBalanceRow.stories.tsx +169 -0
- package/src/stories/WalletRow.stories.tsx +166 -0
- package/src/stories/utils.tsx +35 -0
- package/src/utils/nft/parseNft.ts +2 -2
- package/src/version.ts +1 -1
- package/src/wallets/connection/autoConnectCore.test.ts +0 -53
@@ -0,0 +1,111 @@
|
|
1
|
+
"use strict";
|
2
|
+
"use client";
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
exports.PaymentSelection = PaymentSelection;
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
6
|
+
const react_1 = require("react");
|
7
|
+
const utils_js_1 = require("../../../../../chains/utils.js");
|
8
|
+
const units_js_1 = require("../../../../../utils/units.js");
|
9
|
+
const usePaymentMethods_js_1 = require("../../../../core/hooks/usePaymentMethods.js");
|
10
|
+
const useActiveWallet_js_1 = require("../../../../core/hooks/wallets/useActiveWallet.js");
|
11
|
+
const useConnectedWallets_js_1 = require("../../../../core/hooks/wallets/useConnectedWallets.js");
|
12
|
+
const WalletSwitcherConnectionScreen_js_1 = require("../../ConnectWallet/screens/WalletSwitcherConnectionScreen.js");
|
13
|
+
const Spacer_js_1 = require("../../components/Spacer.js");
|
14
|
+
const basic_js_1 = require("../../components/basic.js");
|
15
|
+
const FiatProviderSelection_js_1 = require("./FiatProviderSelection.js");
|
16
|
+
const TokenSelection_js_1 = require("./TokenSelection.js");
|
17
|
+
const WalletFiatSelection_js_1 = require("./WalletFiatSelection.js");
|
18
|
+
function PaymentSelection({ destinationToken, client, destinationAmount, receiverAddress, onPaymentMethodSelected, onError, onBack, connectOptions, connectLocale, includeDestinationToken, }) {
|
19
|
+
const connectedWallets = (0, useConnectedWallets_js_1.useConnectedWallets)();
|
20
|
+
const activeWallet = (0, useActiveWallet_js_1.useActiveWallet)();
|
21
|
+
const [currentStep, setCurrentStep] = (0, react_1.useState)({
|
22
|
+
type: "walletSelection",
|
23
|
+
});
|
24
|
+
const payerWallet = currentStep.type === "tokenSelection"
|
25
|
+
? currentStep.selectedWallet
|
26
|
+
: activeWallet;
|
27
|
+
const { data: paymentMethods, isLoading: paymentMethodsLoading, error: paymentMethodsError, } = (0, usePaymentMethods_js_1.usePaymentMethods)({
|
28
|
+
destinationToken,
|
29
|
+
destinationAmount,
|
30
|
+
client,
|
31
|
+
includeDestinationToken: includeDestinationToken ||
|
32
|
+
receiverAddress?.toLowerCase() !==
|
33
|
+
payerWallet?.getAccount()?.address?.toLowerCase(),
|
34
|
+
payerWallet,
|
35
|
+
});
|
36
|
+
// Handle error from usePaymentMethods
|
37
|
+
(0, react_1.useEffect)(() => {
|
38
|
+
if (paymentMethodsError) {
|
39
|
+
onError(paymentMethodsError);
|
40
|
+
}
|
41
|
+
}, [paymentMethodsError, onError]);
|
42
|
+
const handlePaymentMethodSelected = (paymentMethod) => {
|
43
|
+
try {
|
44
|
+
onPaymentMethodSelected(paymentMethod);
|
45
|
+
}
|
46
|
+
catch (error) {
|
47
|
+
onError(error);
|
48
|
+
}
|
49
|
+
};
|
50
|
+
const handleWalletSelected = (wallet) => {
|
51
|
+
setCurrentStep({ type: "tokenSelection", selectedWallet: wallet });
|
52
|
+
};
|
53
|
+
const handleConnectWallet = async () => {
|
54
|
+
setCurrentStep({ type: "walletConnection" });
|
55
|
+
};
|
56
|
+
const handleFiatSelected = () => {
|
57
|
+
setCurrentStep({ type: "fiatProviderSelection" });
|
58
|
+
};
|
59
|
+
const handleBackToWalletSelection = () => {
|
60
|
+
setCurrentStep({ type: "walletSelection" });
|
61
|
+
};
|
62
|
+
const handleOnrampProviderSelected = (provider) => {
|
63
|
+
if (!payerWallet) {
|
64
|
+
onError(new Error("No wallet available for fiat payment"));
|
65
|
+
return;
|
66
|
+
}
|
67
|
+
const fiatPaymentMethod = {
|
68
|
+
type: "fiat",
|
69
|
+
payerWallet,
|
70
|
+
currency: "USD", // Default to USD for now
|
71
|
+
onramp: provider,
|
72
|
+
};
|
73
|
+
handlePaymentMethodSelected(fiatPaymentMethod);
|
74
|
+
};
|
75
|
+
const getStepTitle = () => {
|
76
|
+
switch (currentStep.type) {
|
77
|
+
case "walletSelection":
|
78
|
+
return "Choose Payment Method";
|
79
|
+
case "tokenSelection":
|
80
|
+
return "Select Token";
|
81
|
+
case "fiatProviderSelection":
|
82
|
+
return "Select Payment Provider";
|
83
|
+
case "walletConnection":
|
84
|
+
return "Connect Wallet";
|
85
|
+
}
|
86
|
+
};
|
87
|
+
const getBackHandler = () => {
|
88
|
+
switch (currentStep.type) {
|
89
|
+
case "walletSelection":
|
90
|
+
return onBack;
|
91
|
+
case "tokenSelection":
|
92
|
+
case "fiatProviderSelection":
|
93
|
+
case "walletConnection":
|
94
|
+
return handleBackToWalletSelection;
|
95
|
+
}
|
96
|
+
};
|
97
|
+
// Handle rendering WalletSwitcherConnectionScreen
|
98
|
+
if (currentStep.type === "walletConnection") {
|
99
|
+
const destinationChain = destinationToken
|
100
|
+
? (0, utils_js_1.defineChain)(destinationToken.chainId)
|
101
|
+
: undefined;
|
102
|
+
const chains = destinationChain
|
103
|
+
? [destinationChain, ...(connectOptions?.chains || [])]
|
104
|
+
: connectOptions?.chains;
|
105
|
+
return ((0, jsx_runtime_1.jsx)(WalletSwitcherConnectionScreen_js_1.WalletSwitcherConnectionScreen, { accountAbstraction: connectOptions?.accountAbstraction, appMetadata: connectOptions?.appMetadata, chain: destinationChain || connectOptions?.chain, chains: chains, client: client, connectLocale: connectLocale, isEmbed: false, onBack: handleBackToWalletSelection, onSelect: handleWalletSelected, hiddenWallets: [], recommendedWallets: connectOptions?.recommendedWallets, showAllWallets: connectOptions?.showAllWallets === undefined
|
106
|
+
? true
|
107
|
+
: connectOptions?.showAllWallets, walletConnect: connectOptions?.walletConnect, wallets: connectOptions?.wallets?.filter((w) => w.id !== "inApp") }));
|
108
|
+
}
|
109
|
+
return ((0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", p: "lg", children: [(0, jsx_runtime_1.jsx)(basic_js_1.ModalHeader, { title: getStepTitle(), onBack: getBackHandler() }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "xl" }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", children: [currentStep.type === "walletSelection" && ((0, jsx_runtime_1.jsx)(WalletFiatSelection_js_1.WalletFiatSelection, { connectedWallets: connectedWallets, client: client, onWalletSelected: handleWalletSelected, onFiatSelected: handleFiatSelected, onConnectWallet: handleConnectWallet })), currentStep.type === "tokenSelection" && ((0, jsx_runtime_1.jsx)(TokenSelection_js_1.TokenSelection, { paymentMethods: paymentMethods, paymentMethodsLoading: paymentMethodsLoading, client: client, onPaymentMethodSelected: handlePaymentMethodSelected, onBack: handleBackToWalletSelection, destinationToken: destinationToken, destinationAmount: (0, units_js_1.toUnits)(destinationAmount, destinationToken.decimals) })), currentStep.type === "fiatProviderSelection" && ((0, jsx_runtime_1.jsx)(FiatProviderSelection_js_1.FiatProviderSelection, { client: client, onProviderSelected: handleOnrampProviderSelected, toChainId: destinationToken.chainId, toTokenAddress: destinationToken.address, toAddress: receiverAddress || "", toAmount: destinationAmount }))] })] }));
|
110
|
+
}
|
111
|
+
//# sourceMappingURL=PaymentSelection.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PaymentSelection.js","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/Bridge/payment-selection/PaymentSelection.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AA+Eb,4CA4LC;;AA1QD,iCAA4C;AAE5C,6DAA6D;AAG7D,4DAAwD;AAExD,sFAAgF;AAChF,0FAAoF;AACpF,kGAA4F;AAG5F,qHAA+G;AA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use strict";
|
2
|
+
"use client";
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
exports.TokenSelection = TokenSelection;
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
6
|
+
const CustomThemeProvider_js_1 = require("../../../../core/design-system/CustomThemeProvider.js");
|
7
|
+
const index_js_1 = require("../../../../core/design-system/index.js");
|
8
|
+
const useBridgeQuote_js_1 = require("../../../../core/hooks/useBridgeQuote.js");
|
9
|
+
const formatTokenBalance_js_1 = require("../../ConnectWallet/screens/formatTokenBalance.js");
|
10
|
+
const Skeleton_js_1 = require("../../components/Skeleton.js");
|
11
|
+
const Spacer_js_1 = require("../../components/Spacer.js");
|
12
|
+
const basic_js_1 = require("../../components/basic.js");
|
13
|
+
const buttons_js_1 = require("../../components/buttons.js");
|
14
|
+
const text_js_1 = require("../../components/text.js");
|
15
|
+
const TokenAndChain_js_1 = require("../common/TokenAndChain.js");
|
16
|
+
function PaymentMethodTokenRow({ paymentMethod, destinationToken, destinationAmount, client, onPaymentMethodSelected, }) {
|
17
|
+
const theme = (0, CustomThemeProvider_js_1.useCustomTheme)();
|
18
|
+
// Fetch individual quote for this specific token pair
|
19
|
+
const { data: quote, isLoading: quoteLoading, error: quoteError, } = (0, useBridgeQuote_js_1.useBridgeQuote)({
|
20
|
+
originToken: paymentMethod.originToken,
|
21
|
+
destinationToken,
|
22
|
+
destinationAmount,
|
23
|
+
client,
|
24
|
+
});
|
25
|
+
// Use the fetched originAmount if available, otherwise fall back to the one from paymentMethod
|
26
|
+
const displayOriginAmount = quote?.originAmount;
|
27
|
+
const hasEnoughBalance = displayOriginAmount
|
28
|
+
? paymentMethod.balance >= displayOriginAmount
|
29
|
+
: false;
|
30
|
+
return ((0, jsx_runtime_1.jsx)(buttons_js_1.Button, { variant: "secondary", fullWidth: true, onClick: () => onPaymentMethodSelected(paymentMethod), disabled: !hasEnoughBalance, style: {
|
31
|
+
border: `1px solid ${theme.colors.borderColor}`,
|
32
|
+
borderRadius: index_js_1.radius.md,
|
33
|
+
padding: `${index_js_1.spacing.sm} ${index_js_1.spacing.md}`,
|
34
|
+
backgroundColor: theme.colors.tertiaryBg,
|
35
|
+
opacity: hasEnoughBalance ? 1 : 0.5,
|
36
|
+
textAlign: "left",
|
37
|
+
}, children: (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", gap: "md", style: { width: "100%", alignItems: "center" }, children: [(0, jsx_runtime_1.jsx)(TokenAndChain_js_1.TokenAndChain, { token: paymentMethod.originToken, client: client, size: "lg", style: {
|
38
|
+
maxWidth: "50%",
|
39
|
+
} }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "3xs", style: { flex: 1, alignItems: "flex-end" }, children: [quoteLoading ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Skeleton_js_1.Skeleton, { width: "80px", height: "16px" }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", gap: "3xs", children: [(0, jsx_runtime_1.jsx)(Skeleton_js_1.Skeleton, { width: "50px", height: "12px" }), (0, jsx_runtime_1.jsx)(Skeleton_js_1.Skeleton, { width: "40px", height: "12px" })] })] })) : quoteError ? ((0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", color: "danger", style: { fontWeight: 600 }, children: "Quote failed" })) : displayOriginAmount ? ((0, jsx_runtime_1.jsxs)(text_js_1.Text, { size: "sm", color: "primaryText", style: { fontWeight: 600, textWrap: "nowrap" }, children: [(0, formatTokenBalance_js_1.formatTokenAmount)(displayOriginAmount, paymentMethod.originToken.decimals), " ", paymentMethod.originToken.symbol] })) : ("--.--"), !quoteLoading && ((0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", gap: "3xs", children: [(0, jsx_runtime_1.jsxs)(text_js_1.Text, { size: "xs", color: "secondaryText", children: ["Balance:", " "] }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "xs", color: !quoteLoading
|
40
|
+
? hasEnoughBalance
|
41
|
+
? "success"
|
42
|
+
: "danger"
|
43
|
+
: "secondaryText", children: (0, formatTokenBalance_js_1.formatTokenAmount)(paymentMethod.balance, paymentMethod.originToken.decimals) })] }))] })] }) }, `${paymentMethod.originToken.address}-${paymentMethod.originToken.chainId}`));
|
44
|
+
}
|
45
|
+
function TokenSelection({ paymentMethods, paymentMethodsLoading, client, onPaymentMethodSelected, onBack, destinationToken, destinationAmount, }) {
|
46
|
+
const theme = (0, CustomThemeProvider_js_1.useCustomTheme)();
|
47
|
+
if (paymentMethodsLoading) {
|
48
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "md", color: "primaryText", children: "Loading your tokens" }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "sm" }), (0, jsx_runtime_1.jsx)(basic_js_1.Container, { flex: "column", gap: "sm", children: [1, 2, 3].map((i) => ((0, jsx_runtime_1.jsx)(basic_js_1.Container, { style: {
|
49
|
+
border: `1px solid ${theme.colors.borderColor}`,
|
50
|
+
borderRadius: index_js_1.radius.md,
|
51
|
+
padding: `${index_js_1.spacing.sm} ${index_js_1.spacing.md}`,
|
52
|
+
backgroundColor: theme.colors.tertiaryBg,
|
53
|
+
}, children: (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", gap: "md", style: { width: "100%", alignItems: "center" }, children: [(0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", gap: "sm", center: "y", style: { maxWidth: "50%" }, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
54
|
+
width: "32px",
|
55
|
+
height: "32px",
|
56
|
+
backgroundColor: theme.colors.skeletonBg,
|
57
|
+
borderRadius: "50%",
|
58
|
+
} }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "3xs", children: [(0, jsx_runtime_1.jsx)(Skeleton_js_1.Skeleton, { width: "60px", height: "14px" }), (0, jsx_runtime_1.jsx)(Skeleton_js_1.Skeleton, { width: "40px", height: "12px" })] })] }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "3xs", style: { flex: 1, alignItems: "flex-end" }, children: [(0, jsx_runtime_1.jsx)(Skeleton_js_1.Skeleton, { width: "80px", height: "16px" }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", gap: "3xs", children: [(0, jsx_runtime_1.jsx)(Skeleton_js_1.Skeleton, { width: "50px", height: "12px" }), (0, jsx_runtime_1.jsx)(Skeleton_js_1.Skeleton, { width: "40px", height: "12px" })] })] })] }) }, i))) })] }));
|
59
|
+
}
|
60
|
+
if (paymentMethods.length === 0) {
|
61
|
+
return ((0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", center: "both", style: { minHeight: "250px" }, children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "md", color: "primaryText", center: true, children: "No available tokens found for this wallet" }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "sm" }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", color: "secondaryText", center: true, children: "Try connecting a different wallet or pay with card" }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "lg" }), (0, jsx_runtime_1.jsx)(buttons_js_1.Button, { variant: "primary", onClick: onBack, children: "Select another payment method" })] }));
|
62
|
+
}
|
63
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "md", color: "primaryText", children: "Select payment token" }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "sm" }), (0, jsx_runtime_1.jsx)(basic_js_1.Container, { flex: "column", gap: "sm", style: {
|
64
|
+
maxHeight: "400px",
|
65
|
+
overflowY: "auto",
|
66
|
+
scrollbarWidth: "none",
|
67
|
+
}, children: paymentMethods
|
68
|
+
.filter((method) => method.type === "wallet")
|
69
|
+
.map((method) => ((0, jsx_runtime_1.jsx)(PaymentMethodTokenRow, { paymentMethod: method, destinationToken: destinationToken, destinationAmount: destinationAmount, client: client, onPaymentMethodSelected: onPaymentMethodSelected }, `${method.originToken.address}-${method.originToken.chainId}`))) })] }));
|
70
|
+
}
|
71
|
+
//# sourceMappingURL=TokenSelection.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TokenSelection.js","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/Bridge/payment-selection/TokenSelection.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAwJb,wCAiIC;;AAtRD,kGAAuF;AACvF,sEAA0E;AAC1E,gFAA0E;AAE1E,6FAAsF;AACtF,8DAAwD;AACxD,0DAAoD;AACpD,wDAAsD;AACtD,4DAAqD;AACrD,sDAAgD;AAChD,iEAA2D;AAqB3D,SAAS,qBAAqB,CAAC,EAC7B,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,MAAM,EACN,uBAAuB,GACI;IAC3B,MAAM,KAAK,GAAG,IAAA,uCAAc,GAAE,CAAC;IAE/B,sDAAsD;IACtD,MAAM,EACJ,IAAI,EAAE,KAAK,EACX,SAAS,EAAE,YAAY,EACvB,KAAK,EAAE,UAAU,GAClB,GAAG,IAAA,kCAAc,EAAC;QACjB,WAAW,EAAE,aAAa,CAAC,WAAW;QACtC,gBAAgB;QAChB,iBAAiB;QACjB,MAAM;KACP,CAAC,CAAC;IAEH,+FAA+F;IAC/F,MAAM,mBAAmB,GAAG,KAAK,EAAE,YAAY,CAAC;IAChD,MAAM,gBAAgB,GAAG,mBAAmB;QAC1C,CAAC,CAAC,aAAa,CAAC,OAAO,IAAI,mBAAmB;QAC9C,CAAC,CAAC,KAAK,CAAC;IAEV,OAAO,CACL,uBAAC,mBAAM,IAEL,OAAO,EAAC,WAAW,EACnB,SAAS,QACT,OAAO,EAAE,GAAG,EAAE,CAAC,uBAAuB,CAAC,aAAa,CAAC,EACrD,QAAQ,EAAE,CAAC,gBAAgB,EAC3B,KAAK,EAA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C,QAAQ,EACb,GAAG,EAAC,IAAI,EACR,KAAK,EAAE;oBACL,SAAS,EAAE,OAAO;oBAClB,SAAS,EAAE,MAAM;oBACjB,cAAc,EAAE,MAAM;iBACvB,YAEA,cAAc;qBACZ,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC;qBAC5C,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACf,uBAAC,qBAAqB,IAEpB,aAAa,EAAE,MAAM,EACrB,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,iBAAiB,EACpC,MAAM,EAAE,MAAM,EACd,uBAAuB,EAAE,uBAAuB,IAL3C,GAAG,MAAM,CAAC,WAAW,CAAC,OAAO,IAAI,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,CAMlE,CACH,CAAC,GACM,IACX,CACJ,CAAC;AACJ,CAAC"}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
"use strict";
|
2
|
+
"use client";
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
exports.WalletFiatSelection = WalletFiatSelection;
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
6
|
+
const react_icons_1 = require("@radix-ui/react-icons");
|
7
|
+
const CustomThemeProvider_js_1 = require("../../../../core/design-system/CustomThemeProvider.js");
|
8
|
+
const index_js_1 = require("../../../../core/design-system/index.js");
|
9
|
+
const CreditCardIcon_js_1 = require("../../ConnectWallet/icons/CreditCardIcon.js");
|
10
|
+
const WalletRow_js_1 = require("../../ConnectWallet/screens/Buy/swap/WalletRow.js");
|
11
|
+
const Spacer_js_1 = require("../../components/Spacer.js");
|
12
|
+
const basic_js_1 = require("../../components/basic.js");
|
13
|
+
const buttons_js_1 = require("../../components/buttons.js");
|
14
|
+
const text_js_1 = require("../../components/text.js");
|
15
|
+
function WalletFiatSelection({ connectedWallets, client, onWalletSelected, onFiatSelected, onConnectWallet, }) {
|
16
|
+
const theme = (0, CustomThemeProvider_js_1.useCustomTheme)();
|
17
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "md", color: "primaryText", children: "Pay with Crypto" }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "md" }), connectedWallets.length > 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(basic_js_1.Container, { flex: "column", gap: "sm", children: connectedWallets.map((wallet) => {
|
18
|
+
const account = wallet.getAccount();
|
19
|
+
if (!account?.address) {
|
20
|
+
return null;
|
21
|
+
}
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(buttons_js_1.Button, { variant: "secondary", fullWidth: true, onClick: () => onWalletSelected(wallet), style: {
|
23
|
+
border: `1px solid ${theme.colors.borderColor}`,
|
24
|
+
borderRadius: index_js_1.radius.md,
|
25
|
+
padding: `${index_js_1.spacing.sm} ${index_js_1.spacing.md}`,
|
26
|
+
backgroundColor: theme.colors.tertiaryBg,
|
27
|
+
justifyContent: "space-between",
|
28
|
+
}, children: [(0, jsx_runtime_1.jsx)(WalletRow_js_1.WalletRow, { client: client, address: account?.address, iconSize: "lg", textSize: "sm" }), (0, jsx_runtime_1.jsx)(react_icons_1.ChevronRightIcon, { style: { width: index_js_1.iconSize.md, height: index_js_1.iconSize.md } })] }, wallet.id));
|
29
|
+
}) }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "sm" })] })), (0, jsx_runtime_1.jsx)(buttons_js_1.Button, { variant: "secondary", fullWidth: true, onClick: onConnectWallet, style: {
|
30
|
+
border: `1px solid ${theme.colors.borderColor}`,
|
31
|
+
borderRadius: index_js_1.radius.md,
|
32
|
+
padding: `${index_js_1.spacing.sm} ${index_js_1.spacing.md}`,
|
33
|
+
backgroundColor: theme.colors.tertiaryBg,
|
34
|
+
textAlign: "left",
|
35
|
+
height: "auto",
|
36
|
+
}, children: (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", gap: "md", style: { width: "100%", alignItems: "center" }, children: [(0, jsx_runtime_1.jsx)(basic_js_1.Container, { style: {
|
37
|
+
borderRadius: index_js_1.radius.sm,
|
38
|
+
border: `1px dashed ${theme.colors.secondaryIconColor}`,
|
39
|
+
display: "flex",
|
40
|
+
alignItems: "center",
|
41
|
+
justifyContent: "center",
|
42
|
+
padding: index_js_1.spacing["4xs"],
|
43
|
+
width: index_js_1.iconSize.lg,
|
44
|
+
height: index_js_1.iconSize.lg,
|
45
|
+
}, children: (0, jsx_runtime_1.jsx)(react_icons_1.PlusIcon, { width: index_js_1.iconSize.md, height: index_js_1.iconSize.md, color: theme.colors.secondaryText }) }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "3xs", style: { flex: 1 }, children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", color: "primaryText", style: { fontWeight: 600 }, children: "Connect Another Wallet" }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "xs", color: "secondaryText", children: "Use a different wallet to pay" })] })] }) }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "md" }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "md", color: "primaryText", children: "Pay with Fiat" }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "md" }), (0, jsx_runtime_1.jsx)(buttons_js_1.Button, { variant: "secondary", fullWidth: true, onClick: onFiatSelected, style: {
|
46
|
+
border: `1px solid ${theme.colors.borderColor}`,
|
47
|
+
borderRadius: index_js_1.radius.md,
|
48
|
+
padding: `${index_js_1.spacing.sm} ${index_js_1.spacing.md}`,
|
49
|
+
backgroundColor: theme.colors.tertiaryBg,
|
50
|
+
textAlign: "left",
|
51
|
+
height: "auto",
|
52
|
+
}, children: (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", gap: "md", style: { width: "100%", alignItems: "center" }, children: [(0, jsx_runtime_1.jsx)(CreditCardIcon_js_1.CreditCardIcon, { size: index_js_1.iconSize.lg, color: theme.colors.secondaryIconColor }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "3xs", style: { flex: 1 }, children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", color: "primaryText", style: { fontWeight: 600 }, children: "Pay with Card" }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "xs", color: "secondaryText", children: "Buy crypto and bridge in one step" })] })] }) })] }));
|
53
|
+
}
|
54
|
+
//# sourceMappingURL=WalletFiatSelection.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"WalletFiatSelection.js","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/Bridge/payment-selection/WalletFiatSelection.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAyBb,kDAkJC;;AA1KD,uDAAmE;AAGnE,kGAAuF;AACvF,sEAIiD;AACjD,mFAA6E;AAC7E,oFAA8E;AAC9E,0DAAoD;AACpD,wDAAsD;AACtD,4DAAqD;AACrD,sDAAgD;AAUhD,SAAgB,mBAAmB,CAAC,EAClC,gBAAgB,EAChB,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,eAAe,GACU;IACzB,MAAM,KAAK,GAAG,IAAA,uCAAc,GAAE,CAAC;IAE/B,OAAO,CACL,6DACE,uBAAC,cAAI,IAAC,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,aAAa,gCAE5B,EACP,uBAAC,kBAAM,IAAC,CAAC,EAAC,IAAI,GAAG,EAEhB,gBAAgB,CAAC,MAAM,GAAG,CAAC,IAAI,CAC9B,6DACE,uBAAC,oBAAS,IAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAC,IAAI,YAC9B,gBAAgB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;4BAC/B,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;4BACpC,IAAI,CAAC,OAAO,EAAE,OAAO,EA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BACL,MAAM,EAAE,aAAa,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE;oBAC/C,YAAY,EAAE,iBAAM,CAAC,EAAE;oBACvB,OAAO,EAAE,GAAG,kBAAO,CAAC,EAAE,IAAI,kBAAO,CAAC,EAAE,EAAE;oBACtC,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU;oBACxC,SAAS,EAAE,MAAM;oBACjB,MAAM,EAAE,MAAM;iBACf,YAED,wBAAC,oBAAS,IACR,IAAI,EAAC,KAAK,EACV,GAAG,EAAC,IAAI,EACR,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,aAE9C,uBAAC,kCAAc,IACb,IAAI,EAAE,mBAAQ,CAAC,EAAE,EACjB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,kBAAkB,GACtC,EACF,wBAAC,oBAAS,IAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAC,KAAK,EAAC,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,aACnD,uBAAC,cAAI,IAAC,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,aAAa,EAAC,KAAK,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,8BAEvD,EACP,uBAAC,cAAI,IAAC,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,eAAe,kDAE9B,IACG,IACF,GACL,IACR,CACJ,CAAC;AACJ,CAAC"}
|
@@ -0,0 +1,140 @@
|
|
1
|
+
"use strict";
|
2
|
+
"use client";
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
exports.PaymentReceipt = PaymentReceipt;
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
6
|
+
const react_icons_1 = require("@radix-ui/react-icons");
|
7
|
+
const react_query_1 = require("@tanstack/react-query");
|
8
|
+
const react_1 = require("react");
|
9
|
+
const utils_js_1 = require("../../../../../chains/utils.js");
|
10
|
+
const address_js_1 = require("../../../../../utils/address.js");
|
11
|
+
const url_js_1 = require("../../../../../utils/url.js");
|
12
|
+
const CustomThemeProvider_js_1 = require("../../../../core/design-system/CustomThemeProvider.js");
|
13
|
+
const index_js_1 = require("../../../../core/design-system/index.js");
|
14
|
+
const formatTokenBalance_js_1 = require("../../ConnectWallet/screens/formatTokenBalance.js");
|
15
|
+
const ChainName_js_1 = require("../../components/ChainName.js");
|
16
|
+
const Skeleton_js_1 = require("../../components/Skeleton.js");
|
17
|
+
const Spacer_js_1 = require("../../components/Spacer.js");
|
18
|
+
const basic_js_1 = require("../../components/basic.js");
|
19
|
+
const text_js_1 = require("../../components/text.js");
|
20
|
+
function getPaymentId(preparedQuote, status) {
|
21
|
+
if (preparedQuote.type === "onramp") {
|
22
|
+
return preparedQuote.id;
|
23
|
+
}
|
24
|
+
return status.transactions[status.transactions.length - 1]?.transactionHash;
|
25
|
+
}
|
26
|
+
/**
|
27
|
+
* Hook to fetch transaction info for a completed status
|
28
|
+
*/
|
29
|
+
function useTransactionInfo(status, preparedQuote) {
|
30
|
+
return (0, react_query_1.useQuery)({
|
31
|
+
queryKey: [
|
32
|
+
"transaction-info",
|
33
|
+
status.type,
|
34
|
+
getPaymentId(preparedQuote, status),
|
35
|
+
],
|
36
|
+
queryFn: async () => {
|
37
|
+
const isOnramp = status.type === "onramp";
|
38
|
+
if (isOnramp && preparedQuote.type === "onramp") {
|
39
|
+
// For onramp, create a display ID since OnrampStatus doesn't have paymentId
|
40
|
+
return {
|
41
|
+
type: "paymentId",
|
42
|
+
id: preparedQuote.id,
|
43
|
+
label: "Onramp Payment",
|
44
|
+
destinationToken: preparedQuote.destinationToken,
|
45
|
+
chain: await (0, utils_js_1.getChainMetadata)((0, utils_js_1.defineChain)(preparedQuote.destinationToken.chainId)),
|
46
|
+
amountPaid: `${preparedQuote.currencyAmount} ${preparedQuote.currency}`,
|
47
|
+
amountReceived: `${(0, formatTokenBalance_js_1.formatTokenAmount)(preparedQuote.destinationAmount, preparedQuote.destinationToken.decimals)} ${preparedQuote.destinationToken.symbol}`,
|
48
|
+
};
|
49
|
+
}
|
50
|
+
else if (status.type === "buy" ||
|
51
|
+
status.type === "sell" ||
|
52
|
+
status.type === "transfer") {
|
53
|
+
if (status.transactions.length > 0) {
|
54
|
+
// get the last transaction hash
|
55
|
+
const tx = status.transactions[status.transactions.length - 1];
|
56
|
+
if (tx) {
|
57
|
+
const [destinationChain, originChain] = await Promise.all([
|
58
|
+
(0, utils_js_1.getChainMetadata)((0, utils_js_1.getCachedChain)(status.destinationToken.chainId)),
|
59
|
+
(0, utils_js_1.getChainMetadata)((0, utils_js_1.getCachedChain)(status.originToken.chainId)),
|
60
|
+
]);
|
61
|
+
return {
|
62
|
+
type: "transactionHash",
|
63
|
+
id: tx.transactionHash,
|
64
|
+
label: "Transaction",
|
65
|
+
chain: destinationChain,
|
66
|
+
originToken: status.originToken,
|
67
|
+
originChain,
|
68
|
+
destinationToken: status.destinationToken,
|
69
|
+
amountReceived: `${(0, formatTokenBalance_js_1.formatTokenAmount)(status.destinationAmount, status.destinationToken.decimals)} ${status.destinationToken.symbol}`,
|
70
|
+
amountPaid: `${(0, formatTokenBalance_js_1.formatTokenAmount)(status.originAmount, status.originToken.decimals)} ${status.originToken.symbol}`,
|
71
|
+
};
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
return null;
|
76
|
+
},
|
77
|
+
enabled: true,
|
78
|
+
staleTime: 5 * 60 * 1000, // 5 minutes
|
79
|
+
});
|
80
|
+
}
|
81
|
+
/**
|
82
|
+
* Component to display details for a completed transaction step
|
83
|
+
*/
|
84
|
+
function CompletedStepDetailCard({ status, preparedQuote, windowAdapter, onCopyToClipboard, }) {
|
85
|
+
const theme = (0, CustomThemeProvider_js_1.useCustomTheme)();
|
86
|
+
const { data: txInfo, isLoading } = useTransactionInfo(status, preparedQuote);
|
87
|
+
if (isLoading) {
|
88
|
+
return ((0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "sm", style: {
|
89
|
+
padding: index_js_1.spacing.md,
|
90
|
+
borderRadius: index_js_1.radius.sm,
|
91
|
+
backgroundColor: theme.colors.tertiaryBg,
|
92
|
+
border: `1px solid ${theme.colors.borderColor}`,
|
93
|
+
}, children: [(0, jsx_runtime_1.jsx)(Skeleton_js_1.Skeleton, { height: "30px" }), (0, jsx_runtime_1.jsx)(Skeleton_js_1.Skeleton, { height: "30px" }), (0, jsx_runtime_1.jsx)(Skeleton_js_1.Skeleton, { height: "30px" })] }));
|
94
|
+
}
|
95
|
+
if (!txInfo) {
|
96
|
+
return null;
|
97
|
+
}
|
98
|
+
return ((0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "sm", style: {
|
99
|
+
padding: index_js_1.spacing.md,
|
100
|
+
borderRadius: index_js_1.radius.sm,
|
101
|
+
backgroundColor: theme.colors.tertiaryBg,
|
102
|
+
border: `1px solid ${theme.colors.borderColor}`,
|
103
|
+
}, children: [(0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", gap: "sm", style: {
|
104
|
+
alignItems: "center",
|
105
|
+
justifyContent: "space-between",
|
106
|
+
}, children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", color: "primaryText", children: txInfo.label }), (0, jsx_runtime_1.jsx)(basic_js_1.Container, { style: {
|
107
|
+
padding: `${index_js_1.spacing["3xs"]} ${index_js_1.spacing.xs}`,
|
108
|
+
borderRadius: index_js_1.radius.sm,
|
109
|
+
backgroundColor: theme.colors.success,
|
110
|
+
}, children: (0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "xs", style: { color: theme.colors.primaryButtonText }, children: "COMPLETED" }) })] }), txInfo.amountPaid && ((0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", center: "y", style: { justifyContent: "space-between" }, children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", color: "secondaryText", children: "Amount Paid" }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", color: "primaryText", children: txInfo.amountPaid })] })), txInfo.originChain && ((0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", center: "y", style: { justifyContent: "space-between" }, children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", color: "secondaryText", children: "Origin Chain" }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", color: "primaryText", children: (0, ChainName_js_1.shorterChainName)(txInfo.chain.name) })] })), txInfo.amountReceived && ((0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", center: "y", style: { justifyContent: "space-between" }, children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", color: "secondaryText", children: "Amount Received" }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", color: "primaryText", children: txInfo.amountReceived })] })), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", center: "y", style: { justifyContent: "space-between" }, children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", color: "secondaryText", children: "Chain" }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", color: "primaryText", children: (0, ChainName_js_1.shorterChainName)(txInfo.chain.name) })] }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", center: "y", style: { justifyContent: "space-between" }, children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", color: "secondaryText", children: txInfo.type === "paymentId" ? "Payment ID" : "Transaction Hash" }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "row", gap: "sm", style: { alignItems: "center" }, children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", color: "accentText", style: {
|
111
|
+
fontFamily: "monospace",
|
112
|
+
cursor: "pointer",
|
113
|
+
}, onClick: txInfo.type === "paymentId"
|
114
|
+
? () => onCopyToClipboard(txInfo.id)
|
115
|
+
: () => {
|
116
|
+
const explorer = txInfo.chain.explorers?.[0];
|
117
|
+
if (explorer) {
|
118
|
+
windowAdapter.open((0, url_js_1.formatExplorerTxUrl)(explorer.url, txInfo.id));
|
119
|
+
}
|
120
|
+
}, children: (0, address_js_1.shortenHex)(txInfo.id) }), txInfo.type === "paymentId" ? ((0, jsx_runtime_1.jsx)("button", { type: "button", style: {
|
121
|
+
cursor: "pointer",
|
122
|
+
background: "none",
|
123
|
+
border: "none",
|
124
|
+
padding: 0,
|
125
|
+
}, onClick: () => onCopyToClipboard(txInfo.id), children: (0, jsx_runtime_1.jsx)(react_icons_1.CopyIcon, { width: index_js_1.iconSize.sm, height: index_js_1.iconSize.sm, color: theme.colors.primaryText }) })) : null] })] })] }, txInfo.id));
|
126
|
+
}
|
127
|
+
function PaymentReceipt({ preparedQuote, completedStatuses, onBack, windowAdapter, }) {
|
128
|
+
// Copy to clipboard
|
129
|
+
const copyToClipboard = (0, react_1.useCallback)(async (text) => {
|
130
|
+
try {
|
131
|
+
await navigator.clipboard.writeText(text);
|
132
|
+
// Could add a toast notification here
|
133
|
+
}
|
134
|
+
catch (error) {
|
135
|
+
console.warn("Failed to copy to clipboard:", error);
|
136
|
+
}
|
137
|
+
}, []);
|
138
|
+
return ((0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", fullHeight: true, p: "lg", style: { maxHeight: "500px", minHeight: "250px", overflowY: "auto" }, children: [(0, jsx_runtime_1.jsx)(basic_js_1.ModalHeader, { title: "Payment Receipt", onBack: onBack }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "lg" }), (0, jsx_runtime_1.jsx)(basic_js_1.Container, { flex: "column", gap: "lg", children: (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "md", children: [(0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "md", color: "primaryText", children: "Transactions" }), completedStatuses.map((status, index) => ((0, jsx_runtime_1.jsx)(CompletedStepDetailCard, { status: status, preparedQuote: preparedQuote, windowAdapter: windowAdapter, onCopyToClipboard: copyToClipboard }, `${status.type}-${index}`)))] }) })] }));
|
139
|
+
}
|
140
|
+
//# sourceMappingURL=PaymentReceipt.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PaymentReceipt.js","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAwVb,wCA+CC;;AAtYD,uDAAiD;AACjD,uDAAiD;AACjD,iCAAoC;AAGpC,6DAIwC;AACxC,gEAA6D;AAC7D,wDAAkE;AAElE,kGAAuF;AACvF,sEAIiD;AAGjD,6FAAsF;AACtF,gEAAiE;AACjE,8DAAwD;AACxD,0DAAoD;AACpD,wDAAmE;AACnE,sDAAgD;AAchD,SAAS,YAAY,CACnB,aAAkC,EAClC,MAA6B;IAE7B,IAAI,aAAa,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QACpC,OAAO,aAAa,CAAC,EAAE,CAAC;IAC1B,CAAC;IACD,OAAO,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,eAAe,CAAC;AAC9E,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB,CACzB,MAA6B,EAC7B,aAAkC;IAElC,OAAO,IAAA,sBAAQ,EAAC;QACd,QAAQ,EAAE;YACR,kBAAkB;YAClB,MAAM,CAAC,IAAI;YACX,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC;SACpC;QACD,OAAO,EAAE,KAAK,IAAqC,EAAE;YACnD,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC;YAE1C,IAAI,QAAQ,IAAI,aAAa,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAChD,4EAA4E;gBAC5E,OAAO;oBACL,IAAI,EAAE,WAAoB;oBAC1B,EAAE,EAAE,aAAa,CAAC,EAAE;oBACpB,KAAK,EAAE,gBAAgB;oBACvB,gBAAgB,EAAE,aAAa,CAAC,gBAAgB;oBAChD,KAAK,EAAE,MAAM,IAAA,2BAAgB,EAC3B,IAAA,sB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,MAAM,CAAC,IAAI,IAAI,KAAK,EAAE,CAK9B,CACH,CAAC,IACQ,GACF,IACF,CACb,CAAC;AACJ,CAAC"}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
"use strict";
|
2
|
+
"use client";
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
exports.SuccessScreen = SuccessScreen;
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
6
|
+
const react_icons_1 = require("@radix-ui/react-icons");
|
7
|
+
const react_1 = require("react");
|
8
|
+
const CustomThemeProvider_js_1 = require("../../../../core/design-system/CustomThemeProvider.js");
|
9
|
+
const index_js_1 = require("../../../../core/design-system/index.js");
|
10
|
+
const Spacer_js_1 = require("../../components/Spacer.js");
|
11
|
+
const basic_js_1 = require("../../components/basic.js");
|
12
|
+
const buttons_js_1 = require("../../components/buttons.js");
|
13
|
+
const text_js_1 = require("../../components/text.js");
|
14
|
+
const PaymentReceipt_js_1 = require("./PaymentReceipt.js");
|
15
|
+
function SuccessScreen({ uiOptions, preparedQuote, completedStatuses, onDone, windowAdapter, }) {
|
16
|
+
const theme = (0, CustomThemeProvider_js_1.useCustomTheme)();
|
17
|
+
const [viewState, setViewState] = (0, react_1.useState)("success");
|
18
|
+
if (viewState === "detail") {
|
19
|
+
return ((0, jsx_runtime_1.jsx)(PaymentReceipt_js_1.PaymentReceipt, { preparedQuote: preparedQuote, completedStatuses: completedStatuses, windowAdapter: windowAdapter, onBack: () => setViewState("success") }));
|
20
|
+
}
|
21
|
+
return ((0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", fullHeight: true, p: "lg", children: [(0, jsx_runtime_1.jsx)(basic_js_1.ModalHeader, { title: "Payment Complete" }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "xl" }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "md", center: "x", children: [(0, jsx_runtime_1.jsx)(basic_js_1.Container, { center: "both", flex: "row", style: {
|
22
|
+
width: "64px",
|
23
|
+
height: "64px",
|
24
|
+
borderRadius: "50%",
|
25
|
+
backgroundColor: theme.colors.tertiaryBg,
|
26
|
+
marginBottom: "16px",
|
27
|
+
border: `2px solid ${theme.colors.success}`,
|
28
|
+
animation: "successBounce 0.6s ease-out",
|
29
|
+
}, children: (0, jsx_runtime_1.jsx)(react_icons_1.CheckIcon, { width: index_js_1.iconSize.xl, height: index_js_1.iconSize.xl, color: theme.colors.success, style: {
|
30
|
+
animation: "checkAppear 0.3s ease-out 0.3s both",
|
31
|
+
} }) }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "xl", color: "primaryText", center: true, children: "Payment Successful!" }), (0, jsx_runtime_1.jsx)(text_js_1.Text, { size: "sm", color: "secondaryText", center: true, children: "Your cross-chain payment has been completed successfully." })] }), (0, jsx_runtime_1.jsx)(Spacer_js_1.Spacer, { y: "lg" }), (0, jsx_runtime_1.jsxs)(basic_js_1.Container, { flex: "column", gap: "sm", style: { width: "100%" }, children: [(0, jsx_runtime_1.jsx)(buttons_js_1.Button, { variant: "secondary", fullWidth: true, onClick: () => setViewState("detail"), children: "View Payment Receipt" }), (0, jsx_runtime_1.jsx)(buttons_js_1.Button, { variant: "accent", fullWidth: true, onClick: onDone, children: uiOptions.mode === "transaction" ? "Continue" : "Done" })] }), (0, jsx_runtime_1.jsx)("style", { children: `
|
32
|
+
@keyframes successBounce {
|
33
|
+
0% {
|
34
|
+
transform: scale(0.3);
|
35
|
+
opacity: 0;
|
36
|
+
}
|
37
|
+
50% {
|
38
|
+
transform: scale(1.05);
|
39
|
+
}
|
40
|
+
70% {
|
41
|
+
transform: scale(0.9);
|
42
|
+
}
|
43
|
+
100% {
|
44
|
+
transform: scale(1);
|
45
|
+
opacity: 1;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
@keyframes checkAppear {
|
50
|
+
0% {
|
51
|
+
transform: scale(0);
|
52
|
+
opacity: 0;
|
53
|
+
}
|
54
|
+
100% {
|
55
|
+
transform: scale(1);
|
56
|
+
opacity: 1;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
` })] }));
|
60
|
+
}
|
61
|
+
//# sourceMappingURL=SuccessScreen.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SuccessScreen.js","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AA2Cb,sCA+GC;;AAzJD,uDAAkD;AAClD,iCAAiC;AAEjC,kGAAuF;AACvF,sEAAmE;AAGnE,0DAAoD;AACpD,wDAAmE;AACnE,4DAAqD;AACrD,sDAAgD;AAEhD,2DAAqD;AA8BrD,SAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,MAAM,EACN,aAAa,GACM;IACnB,MAAM,KAAK,GAAG,IAAA,uCAAc,GAAE,CAAC;IAC/B,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAY,SAAS,CAAC,CAAC;IAEjE,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;QAC3B,OAAO,CACL,uBAAC,kCAAc,IACb,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,GACrC,CACH,CAAC;IACJ,CAAC;IAED,OAAO,CACL,wBAAC,oBAAS,IAAC,IAAI,EAAC,QAAQ,EAAC,UAAU,QAAC,CAAC,EAAC,IAAI,aACxC,uBAAC,sBAAW,IAAC,KAAK,EAAC,kBAAkB,GAAG,EAExC,uBAAC,kBAAM,IAAC,CAAC,EAAC,IAAI,GAAG,EAEjB,wBAAC,oBAAS,IAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAC,IAAI,EAAC,MAAM,EAAC,GAAG,aAE1C,uBAAC,oBAAS,IACR,MAAM,EAAC,MAAM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
@@ -224,8 +224,8 @@ const ButtonContainer = /* @__PURE__ */ (0, elements_js_1.StyledDiv)(() => {
|
|
224
224
|
const ShowAllWalletsIcon = /* @__PURE__ */ (0, elements_js_1.StyledDiv)(() => {
|
225
225
|
const theme = (0, CustomThemeProvider_js_1.useCustomTheme)();
|
226
226
|
return {
|
227
|
-
width: `${index_js_1.iconSize.
|
228
|
-
height: `${index_js_1.iconSize.
|
227
|
+
width: `${index_js_1.iconSize.lg}px`,
|
228
|
+
height: `${index_js_1.iconSize.lg}px`,
|
229
229
|
backgroundColor: theme.colors.tertiaryBg,
|
230
230
|
border: `2px solid ${theme.colors.borderColor}`,
|
231
231
|
borderRadius: index_js_1.radius.md,
|
@@ -8,7 +8,7 @@ exports.reservedScreens = {
|
|
8
8
|
signIn: "signIn",
|
9
9
|
showAll: "showAll",
|
10
10
|
};
|
11
|
-
exports.modalMaxWidthCompact = "
|
11
|
+
exports.modalMaxWidthCompact = "400px";
|
12
12
|
const wideModalWidth = 730;
|
13
13
|
exports.modalMaxWidthWide = `${wideModalWidth}px`;
|
14
14
|
exports.wideModalScreenThreshold = wideModalWidth + 40;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CreditCardIcon = void 0;
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
5
|
+
/**
|
6
|
+
* @internal
|
7
|
+
*/
|
8
|
+
const CreditCardIcon = (props) => {
|
9
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: props.size, height: props.size, viewBox: "0 0 24 24", fill: "none", stroke: props.color ?? "currentColor", strokeWidth: "1", strokeLinecap: "round", strokeLinejoin: "round", role: "presentation", children: [(0, jsx_runtime_1.jsx)("rect", { width: "20", height: "14", x: "2", y: "5", rx: "2" }), (0, jsx_runtime_1.jsx)("line", { x1: "2", x2: "22", y1: "10", y2: "10" })] }));
|
10
|
+
};
|
11
|
+
exports.CreditCardIcon = CreditCardIcon;
|
12
|
+
//# sourceMappingURL=CreditCardIcon.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CreditCardIcon.js","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/ConnectWallet/icons/CreditCardIcon.tsx"],"names":[],"mappings":";;;;AAEA;;GAEG;AACI,MAAM,cAAc,GAAW,CAAC,KAAK,EAAE,EAAE;IAC9C,OAAO,CACL,iCACE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAE,KAAK,CAAC,IAAI,EACjB,MAAM,EAAE,KAAK,CAAC,IAAI,EAClB,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI,cAAc,EACrC,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,IAAI,EAAC,cAAc,aAEnB,iCAAM,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,GAAG,EAClD,iCAAM,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,GAAG,IACnC,CACP,CAAC;AACJ,CAAC,CAAC;AAlBW,QAAA,cAAc,kBAkBzB"}
|