thirdweb 5.108.6 → 5.108.7
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/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/cjs/react/core/hooks/usePaymentMethods.js +1 -2
- package/dist/cjs/react/core/hooks/usePaymentMethods.js.map +1 -1
- package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js +1 -1
- package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/BuyWidget.js +185 -99
- package/dist/cjs/react/web/ui/Bridge/BuyWidget.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/CheckoutWidget.js +210 -56
- package/dist/cjs/react/web/ui/Bridge/CheckoutWidget.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/DirectPayment.js +7 -7
- package/dist/cjs/react/web/ui/Bridge/DirectPayment.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/FundWallet.js +233 -105
- package/dist/cjs/react/web/ui/Bridge/FundWallet.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/QuoteLoader.js +1 -7
- package/dist/cjs/react/web/ui/Bridge/QuoteLoader.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/TransactionPayment.js +16 -12
- package/dist/cjs/react/web/ui/Bridge/TransactionPayment.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/TransactionWidget.js +199 -36
- package/dist/cjs/react/web/ui/Bridge/TransactionWidget.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/bridge-widget/bridge-widget.js +2 -2
- package/dist/cjs/react/web/ui/Bridge/bridge-widget/bridge-widget.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/common/WithHeader.js +4 -5
- package/dist/cjs/react/web/ui/Bridge/common/WithHeader.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/common/active-wallet-details.js +52 -0
- package/dist/cjs/react/web/ui/Bridge/common/active-wallet-details.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/common/decimal-input.js +36 -0
- package/dist/cjs/react/web/ui/Bridge/common/decimal-input.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/common/selected-token-button.js +58 -0
- package/dist/cjs/react/web/ui/Bridge/common/selected-token-button.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/common/token-balance.js +20 -0
- package/dist/cjs/react/web/ui/Bridge/common/token-balance.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/common/token-query.js +34 -0
- package/dist/cjs/react/web/ui/Bridge/common/token-query.js.map +1 -0
- package/dist/cjs/react/web/ui/Bridge/payment-details/PaymentDetails.js +3 -3
- package/dist/cjs/react/web/ui/Bridge/payment-details/PaymentDetails.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-details/PaymentOverview.js +7 -7
- package/dist/cjs/react/web/ui/Bridge/payment-details/PaymentOverview.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-selection/PaymentSelection.js +1 -4
- 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.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-success/SuccessScreen.js +3 -3
- package/dist/cjs/react/web/ui/Bridge/payment-success/SuccessScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/swap-widget/SwapWidget.js +8 -11
- package/dist/cjs/react/web/ui/Bridge/swap-widget/SwapWidget.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/swap-widget/swap-ui.js +19 -147
- package/dist/cjs/react/web/ui/Bridge/swap-widget/swap-ui.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/types.js +3 -0
- package/dist/cjs/react/web/ui/Bridge/types.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js +4 -2
- package/dist/cjs/react/web/ui/ConnectWallet/Details.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.map +1 -1
- package/dist/cjs/react/web/ui/TransactionButton/DepositScreen.js +1 -1
- package/dist/cjs/react/web/ui/TransactionButton/DepositScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/TransactionButton/TransactionModal.js +17 -10
- package/dist/cjs/react/web/ui/TransactionButton/TransactionModal.js.map +1 -1
- package/dist/cjs/react/web/ui/components/CopyIcon.js +1 -1
- package/dist/cjs/react/web/ui/components/CopyIcon.js.map +1 -1
- package/dist/cjs/stories/Bridge/CheckoutWidget.stories.js +115 -0
- package/dist/cjs/stories/Bridge/CheckoutWidget.stories.js.map +1 -0
- package/dist/cjs/stories/Bridge/ErrorBanner.stories.js +7 -111
- package/dist/cjs/stories/Bridge/ErrorBanner.stories.js.map +1 -1
- package/dist/cjs/stories/Bridge/PaymentDetails.stories.js +27 -306
- package/dist/cjs/stories/Bridge/PaymentDetails.stories.js.map +1 -1
- package/dist/cjs/stories/Bridge/PaymentSelection.stories.js +21 -128
- package/dist/cjs/stories/Bridge/PaymentSelection.stories.js.map +1 -1
- package/dist/cjs/stories/Bridge/StepRunner.stories.js +13 -39
- package/dist/cjs/stories/Bridge/StepRunner.stories.js.map +1 -1
- package/dist/cjs/stories/Bridge/SuccessScreen.stories.js +13 -101
- package/dist/cjs/stories/Bridge/SuccessScreen.stories.js.map +1 -1
- package/dist/cjs/stories/Bridge/Transaction/TransactionWidget.stories.js +49 -0
- package/dist/cjs/stories/Bridge/Transaction/TransactionWidget.stories.js.map +1 -0
- package/dist/cjs/stories/Bridge/Transaction/useSendTransactionModal.stories.js +53 -0
- package/dist/cjs/stories/Bridge/Transaction/useSendTransactionModal.stories.js.map +1 -0
- package/dist/cjs/stories/Bridge/UnsupportedTokenScreen.stories.js +11 -79
- package/dist/cjs/stories/Bridge/UnsupportedTokenScreen.stories.js.map +1 -1
- package/dist/cjs/stories/Bridge/fixtures.js +21 -62
- package/dist/cjs/stories/Bridge/fixtures.js.map +1 -1
- package/dist/cjs/stories/BuyWidget.stories.js +44 -8
- package/dist/cjs/stories/BuyWidget.stories.js.map +1 -1
- package/dist/cjs/stories/utils.js +5 -2
- package/dist/cjs/stories/utils.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/x402/common.js +3 -5
- package/dist/cjs/x402/common.js.map +1 -1
- package/dist/cjs/x402/facilitator.js +0 -1
- package/dist/cjs/x402/facilitator.js.map +1 -1
- package/dist/cjs/x402/schemas.js +4 -0
- package/dist/cjs/x402/schemas.js.map +1 -1
- package/dist/cjs/x402/settle-payment.js +6 -5
- package/dist/cjs/x402/settle-payment.js.map +1 -1
- package/dist/cjs/x402/sign.js +2 -6
- package/dist/cjs/x402/sign.js.map +1 -1
- package/dist/cjs/x402/types.js.map +1 -1
- package/dist/cjs/x402/verify-payment.js +6 -5
- package/dist/cjs/x402/verify-payment.js.map +1 -1
- package/dist/esm/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/esm/react/core/hooks/usePaymentMethods.js +1 -2
- package/dist/esm/react/core/hooks/usePaymentMethods.js.map +1 -1
- package/dist/esm/react/web/hooks/transaction/useSendTransaction.js +1 -1
- package/dist/esm/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/BuyWidget.js +185 -99
- package/dist/esm/react/web/ui/Bridge/BuyWidget.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/CheckoutWidget.js +211 -57
- package/dist/esm/react/web/ui/Bridge/CheckoutWidget.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/DirectPayment.js +7 -7
- package/dist/esm/react/web/ui/Bridge/DirectPayment.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/FundWallet.js +237 -109
- package/dist/esm/react/web/ui/Bridge/FundWallet.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/QuoteLoader.js +1 -7
- package/dist/esm/react/web/ui/Bridge/QuoteLoader.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/TransactionPayment.js +16 -12
- package/dist/esm/react/web/ui/Bridge/TransactionPayment.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/TransactionWidget.js +198 -36
- package/dist/esm/react/web/ui/Bridge/TransactionWidget.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/bridge-widget/bridge-widget.js +2 -2
- package/dist/esm/react/web/ui/Bridge/bridge-widget/bridge-widget.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/common/WithHeader.js +4 -5
- package/dist/esm/react/web/ui/Bridge/common/WithHeader.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/common/active-wallet-details.js +49 -0
- package/dist/esm/react/web/ui/Bridge/common/active-wallet-details.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/common/decimal-input.js +33 -0
- package/dist/esm/react/web/ui/Bridge/common/decimal-input.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/common/selected-token-button.js +55 -0
- package/dist/esm/react/web/ui/Bridge/common/selected-token-button.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/common/token-balance.js +17 -0
- package/dist/esm/react/web/ui/Bridge/common/token-balance.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/common/token-query.js +31 -0
- package/dist/esm/react/web/ui/Bridge/common/token-query.js.map +1 -0
- package/dist/esm/react/web/ui/Bridge/payment-details/PaymentDetails.js +3 -3
- package/dist/esm/react/web/ui/Bridge/payment-details/PaymentDetails.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-details/PaymentOverview.js +7 -7
- package/dist/esm/react/web/ui/Bridge/payment-details/PaymentOverview.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-selection/PaymentSelection.js +1 -4
- 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.map +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-success/SuccessScreen.js +3 -3
- package/dist/esm/react/web/ui/Bridge/payment-success/SuccessScreen.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/swap-widget/SwapWidget.js +8 -11
- package/dist/esm/react/web/ui/Bridge/swap-widget/SwapWidget.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/swap-widget/swap-ui.js +16 -144
- package/dist/esm/react/web/ui/Bridge/swap-widget/swap-ui.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/types.js +2 -0
- package/dist/esm/react/web/ui/Bridge/types.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/Details.js +4 -2
- package/dist/esm/react/web/ui/ConnectWallet/Details.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.map +1 -1
- package/dist/esm/react/web/ui/TransactionButton/DepositScreen.js +1 -1
- package/dist/esm/react/web/ui/TransactionButton/DepositScreen.js.map +1 -1
- package/dist/esm/react/web/ui/TransactionButton/TransactionModal.js +17 -10
- package/dist/esm/react/web/ui/TransactionButton/TransactionModal.js.map +1 -1
- package/dist/esm/react/web/ui/components/CopyIcon.js +1 -1
- package/dist/esm/react/web/ui/components/CopyIcon.js.map +1 -1
- package/dist/esm/stories/Bridge/CheckoutWidget.stories.js +112 -0
- package/dist/esm/stories/Bridge/CheckoutWidget.stories.js.map +1 -0
- package/dist/esm/stories/Bridge/ErrorBanner.stories.js +7 -111
- package/dist/esm/stories/Bridge/ErrorBanner.stories.js.map +1 -1
- package/dist/esm/stories/Bridge/PaymentDetails.stories.js +28 -307
- package/dist/esm/stories/Bridge/PaymentDetails.stories.js.map +1 -1
- package/dist/esm/stories/Bridge/PaymentSelection.stories.js +22 -129
- package/dist/esm/stories/Bridge/PaymentSelection.stories.js.map +1 -1
- package/dist/esm/stories/Bridge/StepRunner.stories.js +12 -38
- package/dist/esm/stories/Bridge/StepRunner.stories.js.map +1 -1
- package/dist/esm/stories/Bridge/SuccessScreen.stories.js +14 -102
- package/dist/esm/stories/Bridge/SuccessScreen.stories.js.map +1 -1
- package/dist/esm/stories/Bridge/Transaction/TransactionWidget.stories.js +46 -0
- package/dist/esm/stories/Bridge/Transaction/TransactionWidget.stories.js.map +1 -0
- package/dist/esm/stories/Bridge/Transaction/useSendTransactionModal.stories.js +50 -0
- package/dist/esm/stories/Bridge/Transaction/useSendTransactionModal.stories.js.map +1 -0
- package/dist/esm/stories/Bridge/UnsupportedTokenScreen.stories.js +12 -80
- package/dist/esm/stories/Bridge/UnsupportedTokenScreen.stories.js.map +1 -1
- package/dist/esm/stories/Bridge/fixtures.js +15 -56
- package/dist/esm/stories/Bridge/fixtures.js.map +1 -1
- package/dist/esm/stories/BuyWidget.stories.js +37 -9
- package/dist/esm/stories/BuyWidget.stories.js.map +1 -1
- package/dist/esm/stories/utils.js +6 -3
- package/dist/esm/stories/utils.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/x402/common.js +3 -5
- package/dist/esm/x402/common.js.map +1 -1
- package/dist/esm/x402/facilitator.js +0 -1
- package/dist/esm/x402/facilitator.js.map +1 -1
- package/dist/esm/x402/schemas.js +5 -1
- package/dist/esm/x402/schemas.js.map +1 -1
- package/dist/esm/x402/settle-payment.js +6 -5
- package/dist/esm/x402/settle-payment.js.map +1 -1
- package/dist/esm/x402/sign.js +2 -6
- package/dist/esm/x402/sign.js.map +1 -1
- package/dist/esm/x402/types.js.map +1 -1
- package/dist/esm/x402/verify-payment.js +6 -5
- package/dist/esm/x402/verify-payment.js.map +1 -1
- package/dist/scripts/bridge-widget.d.ts +3 -3
- package/dist/scripts/bridge-widget.js +113 -150
- package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts +6 -0
- package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts.map +1 -1
- package/dist/types/react/core/hooks/usePaymentMethods.d.ts +1 -2
- package/dist/types/react/core/hooks/usePaymentMethods.d.ts.map +1 -1
- package/dist/types/react/web/hooks/transaction/useSendTransaction.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/BuyWidget.d.ts +7 -12
- package/dist/types/react/web/ui/Bridge/BuyWidget.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/CheckoutWidget.d.ts +5 -8
- package/dist/types/react/web/ui/Bridge/CheckoutWidget.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/DirectPayment.d.ts +15 -12
- package/dist/types/react/web/ui/Bridge/DirectPayment.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/FundWallet.d.ts +33 -15
- package/dist/types/react/web/ui/Bridge/FundWallet.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/QuoteLoader.d.ts +9 -12
- package/dist/types/react/web/ui/Bridge/QuoteLoader.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/StepRunner.d.ts +7 -7
- package/dist/types/react/web/ui/Bridge/StepRunner.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/TransactionPayment.d.ts +14 -7
- package/dist/types/react/web/ui/Bridge/TransactionPayment.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/TransactionWidget.d.ts +3 -5
- package/dist/types/react/web/ui/Bridge/TransactionWidget.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/UnsupportedTokenScreen.d.ts +4 -3
- package/dist/types/react/web/ui/Bridge/UnsupportedTokenScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/bridge-widget/bridge-widget.d.ts +3 -3
- package/dist/types/react/web/ui/Bridge/bridge-widget/bridge-widget.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/common/WithHeader.d.ts +4 -4
- package/dist/types/react/web/ui/Bridge/common/WithHeader.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/common/active-wallet-details.d.ts +8 -0
- package/dist/types/react/web/ui/Bridge/common/active-wallet-details.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/common/decimal-input.d.ts +6 -0
- package/dist/types/react/web/ui/Bridge/common/decimal-input.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/common/selected-token-button.d.ts +13 -0
- package/dist/types/react/web/ui/Bridge/common/selected-token-button.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/common/token-balance.d.ts +8 -0
- package/dist/types/react/web/ui/Bridge/common/token-balance.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/common/token-query.d.ts +15 -0
- package/dist/types/react/web/ui/Bridge/common/token-query.d.ts.map +1 -0
- package/dist/types/react/web/ui/Bridge/payment-details/PaymentDetails.d.ts +13 -11
- package/dist/types/react/web/ui/Bridge/payment-details/PaymentDetails.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/payment-details/PaymentOverview.d.ts +8 -3
- package/dist/types/react/web/ui/Bridge/payment-details/PaymentOverview.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/payment-selection/PaymentSelection.d.ts +12 -16
- 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 +1 -1
- package/dist/types/react/web/ui/Bridge/payment-selection/TokenSelection.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/payment-success/SuccessScreen.d.ts +6 -6
- package/dist/types/react/web/ui/Bridge/payment-success/SuccessScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/swap-widget/swap-ui.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/types.d.ts +39 -0
- package/dist/types/react/web/ui/Bridge/types.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/Details.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 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/formatTokenBalance.d.ts.map +1 -1
- package/dist/types/react/web/ui/TransactionButton/DepositScreen.d.ts +0 -1
- package/dist/types/react/web/ui/TransactionButton/DepositScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts +3 -1
- package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/CopyIcon.d.ts +1 -0
- package/dist/types/react/web/ui/components/CopyIcon.d.ts.map +1 -1
- package/dist/types/script-exports/bridge-widget-script.d.ts +3 -3
- package/dist/types/script-exports/bridge-widget-script.d.ts.map +1 -1
- package/dist/types/stories/Bridge/CheckoutWidget.stories.d.ts +25 -0
- package/dist/types/stories/Bridge/CheckoutWidget.stories.d.ts.map +1 -0
- package/dist/types/stories/Bridge/ErrorBanner.stories.d.ts +3 -47
- package/dist/types/stories/Bridge/ErrorBanner.stories.d.ts.map +1 -1
- package/dist/types/stories/Bridge/PaymentDetails.stories.d.ts +3 -56
- package/dist/types/stories/Bridge/PaymentDetails.stories.d.ts.map +1 -1
- package/dist/types/stories/Bridge/PaymentSelection.stories.d.ts +5 -63
- package/dist/types/stories/Bridge/PaymentSelection.stories.d.ts.map +1 -1
- package/dist/types/stories/Bridge/StepRunner.stories.d.ts +4 -52
- package/dist/types/stories/Bridge/StepRunner.stories.d.ts.map +1 -1
- package/dist/types/stories/Bridge/SuccessScreen.stories.d.ts +4 -54
- package/dist/types/stories/Bridge/SuccessScreen.stories.d.ts.map +1 -1
- package/dist/types/stories/Bridge/Transaction/TransactionWidget.stories.d.ts +11 -0
- package/dist/types/stories/Bridge/Transaction/TransactionWidget.stories.d.ts.map +1 -0
- package/dist/types/stories/Bridge/Transaction/useSendTransactionModal.stories.d.ts +18 -0
- package/dist/types/stories/Bridge/Transaction/useSendTransactionModal.stories.d.ts.map +1 -0
- package/dist/types/stories/Bridge/UnsupportedTokenScreen.stories.d.ts +3 -34
- package/dist/types/stories/Bridge/UnsupportedTokenScreen.stories.d.ts.map +1 -1
- package/dist/types/stories/Bridge/fixtures.d.ts +19 -17
- package/dist/types/stories/Bridge/fixtures.d.ts.map +1 -1
- package/dist/types/stories/BuyWidget.stories.d.ts +9 -1
- package/dist/types/stories/BuyWidget.stories.d.ts.map +1 -1
- package/dist/types/stories/utils.d.ts +0 -2
- package/dist/types/stories/utils.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/x402/common.d.ts.map +1 -1
- package/dist/types/x402/facilitator.d.ts +2 -3
- package/dist/types/x402/facilitator.d.ts.map +1 -1
- package/dist/types/x402/schemas.d.ts +21 -0
- package/dist/types/x402/schemas.d.ts.map +1 -1
- package/dist/types/x402/settle-payment.d.ts.map +1 -1
- package/dist/types/x402/types.d.ts +5 -4
- package/dist/types/x402/types.d.ts.map +1 -1
- package/dist/types/x402/verify-payment.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/react/core/hooks/transaction/useSendTransaction.ts +6 -0
- package/src/react/core/hooks/usePaymentMethods.ts +1 -4
- package/src/react/web/hooks/transaction/useSendTransaction.tsx +1 -0
- package/src/react/web/ui/Bridge/BuyWidget.tsx +355 -160
- package/src/react/web/ui/Bridge/CheckoutWidget.tsx +384 -107
- package/src/react/web/ui/Bridge/DirectPayment.tsx +34 -26
- package/src/react/web/ui/Bridge/FundWallet.tsx +610 -266
- package/src/react/web/ui/Bridge/QuoteLoader.tsx +10 -20
- package/src/react/web/ui/Bridge/StepRunner.tsx +7 -7
- package/src/react/web/ui/Bridge/TransactionPayment.tsx +35 -25
- package/src/react/web/ui/Bridge/TransactionWidget.tsx +395 -71
- package/src/react/web/ui/Bridge/UnsupportedTokenScreen.tsx +3 -3
- package/src/react/web/ui/Bridge/bridge-widget/bridge-widget.tsx +16 -14
- package/src/react/web/ui/Bridge/common/WithHeader.tsx +13 -19
- package/src/react/web/ui/Bridge/common/active-wallet-details.tsx +103 -0
- package/src/react/web/ui/Bridge/common/decimal-input.tsx +61 -0
- package/src/react/web/ui/Bridge/common/selected-token-button.tsx +168 -0
- package/src/react/web/ui/Bridge/common/token-balance.tsx +23 -0
- package/src/react/web/ui/Bridge/common/token-query.ts +49 -0
- package/src/react/web/ui/Bridge/payment-details/PaymentDetails.tsx +23 -14
- package/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx +36 -22
- package/src/react/web/ui/Bridge/payment-selection/PaymentSelection.tsx +11 -22
- package/src/react/web/ui/Bridge/payment-selection/TokenSelection.tsx +1 -1
- package/src/react/web/ui/Bridge/payment-success/SuccessScreen.tsx +7 -8
- package/src/react/web/ui/Bridge/swap-widget/SwapWidget.tsx +14 -12
- package/src/react/web/ui/Bridge/swap-widget/swap-ui.tsx +19 -332
- package/src/react/web/ui/Bridge/types.ts +47 -0
- package/src/react/web/ui/ConnectWallet/Details.tsx +3 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx +1 -5
- package/src/react/web/ui/ConnectWallet/screens/formatTokenBalance.ts +5 -1
- package/src/react/web/ui/TransactionButton/DepositScreen.tsx +1 -2
- package/src/react/web/ui/TransactionButton/TransactionModal.tsx +44 -27
- package/src/react/web/ui/components/CopyIcon.tsx +11 -2
- package/src/script-exports/bridge-widget-script.tsx +3 -3
- package/src/script-exports/readme.md +1 -8
- package/src/stories/Bridge/CheckoutWidget.stories.tsx +147 -0
- package/src/stories/Bridge/ErrorBanner.stories.tsx +13 -138
- package/src/stories/Bridge/PaymentDetails.stories.tsx +34 -349
- package/src/stories/Bridge/PaymentSelection.stories.tsx +28 -156
- package/src/stories/Bridge/StepRunner.stories.tsx +18 -65
- package/src/stories/Bridge/SuccessScreen.stories.tsx +21 -130
- package/src/stories/Bridge/Transaction/TransactionWidget.stories.tsx +63 -0
- package/src/stories/Bridge/Transaction/useSendTransactionModal.stories.tsx +68 -0
- package/src/stories/Bridge/UnsupportedTokenScreen.stories.tsx +19 -108
- package/src/stories/Bridge/fixtures.ts +36 -63
- package/src/stories/BuyWidget.stories.tsx +103 -8
- package/src/stories/utils.tsx +16 -9
- package/src/version.ts +1 -1
- package/src/x402/common.ts +2 -5
- package/src/x402/facilitator.ts +3 -3
- package/src/x402/schemas.ts +10 -0
- package/src/x402/settle-payment.ts +7 -6
- package/src/x402/sign.ts +3 -8
- package/src/x402/types.ts +5 -4
- package/src/x402/verify-payment.ts +7 -6
- package/dist/cjs/react/core/machines/paymentMachine.js +0 -191
- package/dist/cjs/react/core/machines/paymentMachine.js.map +0 -1
- package/dist/cjs/react/web/ui/Bridge/BridgeOrchestrator.js +0 -129
- package/dist/cjs/react/web/ui/Bridge/BridgeOrchestrator.js.map +0 -1
- package/dist/cjs/stories/Bridge/BridgeOrchestrator.stories.js +0 -258
- package/dist/cjs/stories/Bridge/BridgeOrchestrator.stories.js.map +0 -1
- package/dist/cjs/stories/Bridge/DirectPayment.stories.js +0 -222
- package/dist/cjs/stories/Bridge/DirectPayment.stories.js.map +0 -1
- package/dist/cjs/stories/Bridge/FundWallet.stories.js +0 -201
- package/dist/cjs/stories/Bridge/FundWallet.stories.js.map +0 -1
- package/dist/cjs/stories/Bridge/TransactionPayment.stories.js +0 -168
- package/dist/cjs/stories/Bridge/TransactionPayment.stories.js.map +0 -1
- package/dist/esm/react/core/machines/paymentMachine.js +0 -188
- package/dist/esm/react/core/machines/paymentMachine.js.map +0 -1
- package/dist/esm/react/web/ui/Bridge/BridgeOrchestrator.js +0 -126
- package/dist/esm/react/web/ui/Bridge/BridgeOrchestrator.js.map +0 -1
- package/dist/esm/stories/Bridge/BridgeOrchestrator.stories.js +0 -255
- package/dist/esm/stories/Bridge/BridgeOrchestrator.stories.js.map +0 -1
- package/dist/esm/stories/Bridge/DirectPayment.stories.js +0 -219
- package/dist/esm/stories/Bridge/DirectPayment.stories.js.map +0 -1
- package/dist/esm/stories/Bridge/FundWallet.stories.js +0 -198
- package/dist/esm/stories/Bridge/FundWallet.stories.js.map +0 -1
- package/dist/esm/stories/Bridge/TransactionPayment.stories.js +0 -165
- package/dist/esm/stories/Bridge/TransactionPayment.stories.js.map +0 -1
- package/dist/types/react/core/machines/paymentMachine.d.ts +0 -89
- package/dist/types/react/core/machines/paymentMachine.d.ts.map +0 -1
- package/dist/types/react/web/ui/Bridge/BridgeOrchestrator.d.ts +0 -99
- package/dist/types/react/web/ui/Bridge/BridgeOrchestrator.d.ts.map +0 -1
- package/dist/types/stories/Bridge/BridgeOrchestrator.stories.d.ts +0 -97
- package/dist/types/stories/Bridge/BridgeOrchestrator.stories.d.ts.map +0 -1
- package/dist/types/stories/Bridge/DirectPayment.stories.d.ts +0 -69
- package/dist/types/stories/Bridge/DirectPayment.stories.d.ts.map +0 -1
- package/dist/types/stories/Bridge/FundWallet.stories.d.ts +0 -67
- package/dist/types/stories/Bridge/FundWallet.stories.d.ts.map +0 -1
- package/dist/types/stories/Bridge/TransactionPayment.stories.d.ts +0 -60
- package/dist/types/stories/Bridge/TransactionPayment.stories.d.ts.map +0 -1
- package/src/react/core/machines/paymentMachine.test.ts +0 -519
- package/src/react/core/machines/paymentMachine.ts +0 -295
- package/src/react/web/ui/Bridge/BridgeOrchestrator.tsx +0 -425
- package/src/stories/Bridge/BridgeOrchestrator.stories.tsx +0 -298
- package/src/stories/Bridge/DirectPayment.stories.tsx +0 -256
- package/src/stories/Bridge/FundWallet.stories.tsx +0 -227
- package/src/stories/Bridge/TransactionPayment.stories.tsx +0 -202
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import type { Theme } from "../../react/core/design-system/index.js";
|
|
3
|
-
import type { FundWalletProps } from "../../react/web/ui/Bridge/FundWallet.js";
|
|
4
|
-
import { FundWallet } from "../../react/web/ui/Bridge/FundWallet.js";
|
|
5
|
-
import { ModalThemeWrapper, storyClient } from "../utils.js";
|
|
6
|
-
import { FUND_WALLET_UI_OPTIONS, RECEIVER_ADDRESSES } from "./fixtures.js";
|
|
7
|
-
|
|
8
|
-
// Props interface for the wrapper component
|
|
9
|
-
interface FundWalletWithThemeProps extends FundWalletProps {
|
|
10
|
-
theme: "light" | "dark" | Theme;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// Wrapper component to provide theme context
|
|
14
|
-
const FundWalletWithTheme = (props: FundWalletWithThemeProps) => {
|
|
15
|
-
const { theme, ...componentProps } = props;
|
|
16
|
-
return (
|
|
17
|
-
<ModalThemeWrapper theme={theme}>
|
|
18
|
-
<FundWallet {...componentProps} />
|
|
19
|
-
</ModalThemeWrapper>
|
|
20
|
-
);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const meta = {
|
|
24
|
-
args: {
|
|
25
|
-
client: storyClient,
|
|
26
|
-
onContinue: (amount, token, receiverAddress) => {
|
|
27
|
-
alert(`Continue with ${amount} ${token.symbol} to ${receiverAddress}`);
|
|
28
|
-
},
|
|
29
|
-
receiverAddress: RECEIVER_ADDRESSES.primary,
|
|
30
|
-
theme: "dark",
|
|
31
|
-
uiOptions: FUND_WALLET_UI_OPTIONS.ethDefault,
|
|
32
|
-
},
|
|
33
|
-
argTypes: {
|
|
34
|
-
onContinue: { action: "continue clicked" },
|
|
35
|
-
receiverAddress: {
|
|
36
|
-
description: "Optional receiver address (defaults to connected wallet)",
|
|
37
|
-
},
|
|
38
|
-
theme: {
|
|
39
|
-
control: "select",
|
|
40
|
-
description: "Theme for the component",
|
|
41
|
-
options: ["light", "dark"],
|
|
42
|
-
},
|
|
43
|
-
uiOptions: {
|
|
44
|
-
description: "UI configuration for fund wallet mode",
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
component: FundWalletWithTheme,
|
|
48
|
-
parameters: {
|
|
49
|
-
docs: {
|
|
50
|
-
description: {
|
|
51
|
-
component:
|
|
52
|
-
"FundWallet component allows users to specify the amount they want to add to their wallet. This is the first screen in the fund_wallet flow before method selection.\n\n" +
|
|
53
|
-
"## Features\n" +
|
|
54
|
-
"- **Token Selection**: Choose from different tokens (ETH, USDC, UNI)\n" +
|
|
55
|
-
"- **Amount Input**: Enter custom amount or use quick options\n" +
|
|
56
|
-
"- **Receiver Address**: Optional receiver address (defaults to connected wallet)\n" +
|
|
57
|
-
"- **Quick Options**: Preset amounts for faster selection\n" +
|
|
58
|
-
"- **Theme Support**: Works with both light and dark themes\n\n" +
|
|
59
|
-
"This component now accepts uiOptions directly to configure the destination token, initial amount, and quick options.",
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
layout: "centered",
|
|
63
|
-
},
|
|
64
|
-
tags: ["autodocs"],
|
|
65
|
-
title: "Bridge/FundWallet",
|
|
66
|
-
} satisfies Meta<typeof FundWalletWithTheme>;
|
|
67
|
-
|
|
68
|
-
export default meta;
|
|
69
|
-
type Story = StoryObj<typeof meta>;
|
|
70
|
-
|
|
71
|
-
export const Light: Story = {
|
|
72
|
-
args: {
|
|
73
|
-
receiverAddress: undefined,
|
|
74
|
-
theme: "light",
|
|
75
|
-
uiOptions: FUND_WALLET_UI_OPTIONS.ethDefault,
|
|
76
|
-
},
|
|
77
|
-
parameters: {
|
|
78
|
-
backgrounds: { default: "light" },
|
|
79
|
-
docs: {
|
|
80
|
-
description: {
|
|
81
|
-
story: "Default fund wallet interface in light theme with ETH token.",
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export const Dark: Story = {
|
|
88
|
-
args: {
|
|
89
|
-
receiverAddress: undefined,
|
|
90
|
-
theme: "dark",
|
|
91
|
-
uiOptions: FUND_WALLET_UI_OPTIONS.ethDefault,
|
|
92
|
-
},
|
|
93
|
-
parameters: {
|
|
94
|
-
backgrounds: { default: "dark" },
|
|
95
|
-
docs: {
|
|
96
|
-
description: {
|
|
97
|
-
story: "Default fund wallet interface in dark theme with ETH token.",
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
export const WithInitialAmount: Story = {
|
|
104
|
-
args: {
|
|
105
|
-
receiverAddress: RECEIVER_ADDRESSES.secondary,
|
|
106
|
-
theme: "dark",
|
|
107
|
-
uiOptions: FUND_WALLET_UI_OPTIONS.ethWithAmount,
|
|
108
|
-
},
|
|
109
|
-
parameters: {
|
|
110
|
-
backgrounds: { default: "dark" },
|
|
111
|
-
docs: {
|
|
112
|
-
description: {
|
|
113
|
-
story:
|
|
114
|
-
"Fund wallet with pre-filled amount and specified receiver address.",
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
export const WithInitialAmountLight: Story = {
|
|
121
|
-
args: {
|
|
122
|
-
receiverAddress: RECEIVER_ADDRESSES.secondary,
|
|
123
|
-
theme: "light",
|
|
124
|
-
uiOptions: FUND_WALLET_UI_OPTIONS.ethWithAmount,
|
|
125
|
-
},
|
|
126
|
-
parameters: {
|
|
127
|
-
backgrounds: { default: "light" },
|
|
128
|
-
docs: {
|
|
129
|
-
description: {
|
|
130
|
-
story:
|
|
131
|
-
"Light theme version with pre-filled amount and receiver address.",
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
export const USDCToken: Story = {
|
|
138
|
-
args: {
|
|
139
|
-
theme: "dark",
|
|
140
|
-
uiOptions: FUND_WALLET_UI_OPTIONS.usdcDefault,
|
|
141
|
-
},
|
|
142
|
-
parameters: {
|
|
143
|
-
backgrounds: { default: "dark" },
|
|
144
|
-
docs: {
|
|
145
|
-
description: {
|
|
146
|
-
story: "Fund wallet configured for USDC token with initial amount.",
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
export const USDCTokenLight: Story = {
|
|
153
|
-
args: {
|
|
154
|
-
theme: "light",
|
|
155
|
-
uiOptions: FUND_WALLET_UI_OPTIONS.usdcDefault,
|
|
156
|
-
},
|
|
157
|
-
parameters: {
|
|
158
|
-
backgrounds: { default: "light" },
|
|
159
|
-
docs: {
|
|
160
|
-
description: {
|
|
161
|
-
story: "Light theme version for USDC token funding.",
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
export const LargeAmount: Story = {
|
|
168
|
-
args: {
|
|
169
|
-
theme: "dark",
|
|
170
|
-
uiOptions: FUND_WALLET_UI_OPTIONS.uniLarge,
|
|
171
|
-
},
|
|
172
|
-
parameters: {
|
|
173
|
-
backgrounds: { default: "dark" },
|
|
174
|
-
docs: {
|
|
175
|
-
description: {
|
|
176
|
-
story:
|
|
177
|
-
"Fund wallet with UNI token and large pre-filled amount to test formatting.",
|
|
178
|
-
},
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
export const LargeAmountLight: Story = {
|
|
184
|
-
args: {
|
|
185
|
-
theme: "light",
|
|
186
|
-
uiOptions: FUND_WALLET_UI_OPTIONS.uniLarge,
|
|
187
|
-
},
|
|
188
|
-
parameters: {
|
|
189
|
-
backgrounds: { default: "light" },
|
|
190
|
-
docs: {
|
|
191
|
-
description: {
|
|
192
|
-
story: "Light theme version with UNI token and large amount.",
|
|
193
|
-
},
|
|
194
|
-
},
|
|
195
|
-
},
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
export const CustomButtonLabel: Story = {
|
|
199
|
-
args: {
|
|
200
|
-
theme: "dark",
|
|
201
|
-
uiOptions: FUND_WALLET_UI_OPTIONS.customButton,
|
|
202
|
-
},
|
|
203
|
-
parameters: {
|
|
204
|
-
backgrounds: { default: "dark" },
|
|
205
|
-
docs: {
|
|
206
|
-
description: {
|
|
207
|
-
story:
|
|
208
|
-
"Example showcasing custom button label functionality. The button shows 'Add Funds Now' instead of the default 'Buy [amount] [symbol]' text.",
|
|
209
|
-
},
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
export const CustomButtonLabelLight: Story = {
|
|
215
|
-
args: {
|
|
216
|
-
theme: "light",
|
|
217
|
-
uiOptions: FUND_WALLET_UI_OPTIONS.customButton,
|
|
218
|
-
},
|
|
219
|
-
parameters: {
|
|
220
|
-
backgrounds: { default: "light" },
|
|
221
|
-
docs: {
|
|
222
|
-
description: {
|
|
223
|
-
story: "Light theme version with custom button label 'Add Funds Now'.",
|
|
224
|
-
},
|
|
225
|
-
},
|
|
226
|
-
},
|
|
227
|
-
};
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import {
|
|
3
|
-
TransactionPayment,
|
|
4
|
-
type TransactionPaymentProps,
|
|
5
|
-
} from "../../react/web/ui/Bridge/TransactionPayment.js";
|
|
6
|
-
import { ModalThemeWrapper, storyClient } from "../utils.js";
|
|
7
|
-
import { TRANSACTION_UI_OPTIONS } from "./fixtures.js";
|
|
8
|
-
|
|
9
|
-
// Props interface for the wrapper component
|
|
10
|
-
interface TransactionPaymentWithThemeProps extends TransactionPaymentProps {
|
|
11
|
-
theme: "light" | "dark";
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// Wrapper component to provide theme context
|
|
15
|
-
const TransactionPaymentWithTheme = (
|
|
16
|
-
props: TransactionPaymentWithThemeProps,
|
|
17
|
-
) => {
|
|
18
|
-
const { theme, ...componentProps } = props;
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<ModalThemeWrapper theme={theme}>
|
|
22
|
-
<div style={{ width: "400px" }}>
|
|
23
|
-
<TransactionPayment {...componentProps} />
|
|
24
|
-
</div>
|
|
25
|
-
</ModalThemeWrapper>
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const meta = {
|
|
30
|
-
args: {
|
|
31
|
-
client: storyClient,
|
|
32
|
-
onExecuteTransaction: () => {},
|
|
33
|
-
onContinue: (_amount, _token, _receiverAddress) => {},
|
|
34
|
-
theme: "dark",
|
|
35
|
-
uiOptions: TRANSACTION_UI_OPTIONS.ethTransfer,
|
|
36
|
-
},
|
|
37
|
-
argTypes: {
|
|
38
|
-
onContinue: {
|
|
39
|
-
action: "continue clicked",
|
|
40
|
-
description: "Called when user continues with the transaction",
|
|
41
|
-
},
|
|
42
|
-
theme: {
|
|
43
|
-
control: "select",
|
|
44
|
-
description: "Theme for the component",
|
|
45
|
-
options: ["light", "dark"],
|
|
46
|
-
},
|
|
47
|
-
uiOptions: {
|
|
48
|
-
description:
|
|
49
|
-
"UI configuration for transaction mode including prepared transaction",
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
component: TransactionPaymentWithTheme,
|
|
53
|
-
parameters: {
|
|
54
|
-
docs: {
|
|
55
|
-
description: {
|
|
56
|
-
component:
|
|
57
|
-
"Transaction payment component that displays detailed transaction information including contract details, function names, transaction costs, and network fees.\n\n" +
|
|
58
|
-
"## Features\n" +
|
|
59
|
-
"- **Contract Information**: Shows contract name and clickable address\n" +
|
|
60
|
-
"- **Function Detection**: Extracts function names from transaction data using ABI\n" +
|
|
61
|
-
"- **Cost Calculation**: Displays transaction value and USD equivalent\n" +
|
|
62
|
-
"- **Network Fees**: Shows estimated gas costs with token amounts\n" +
|
|
63
|
-
"- **Chain Details**: Network name and logo with proper formatting\n" +
|
|
64
|
-
"- **Skeleton Loading**: Comprehensive loading states matching final layout\n\n" +
|
|
65
|
-
"This component now accepts uiOptions directly to configure the transaction and metadata. Supports both native token and ERC20 token transactions with proper function name extraction.",
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
layout: "centered",
|
|
69
|
-
},
|
|
70
|
-
tags: ["autodocs"],
|
|
71
|
-
title: "Bridge/TransactionPayment",
|
|
72
|
-
} satisfies Meta<typeof TransactionPaymentWithTheme>;
|
|
73
|
-
|
|
74
|
-
export default meta;
|
|
75
|
-
type Story = StoryObj<typeof meta>;
|
|
76
|
-
|
|
77
|
-
export const EthereumTransfer: Story = {
|
|
78
|
-
args: {
|
|
79
|
-
theme: "dark",
|
|
80
|
-
uiOptions: TRANSACTION_UI_OPTIONS.ethTransfer,
|
|
81
|
-
},
|
|
82
|
-
parameters: {
|
|
83
|
-
backgrounds: { default: "dark" },
|
|
84
|
-
docs: {
|
|
85
|
-
description: {
|
|
86
|
-
story:
|
|
87
|
-
"Simple ETH transfer transaction showing native token value and network fees with USD conversion. Demonstrates function name extraction from contract ABI.",
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export const EthereumTransferLight: Story = {
|
|
94
|
-
args: {
|
|
95
|
-
theme: "light",
|
|
96
|
-
uiOptions: TRANSACTION_UI_OPTIONS.ethTransfer,
|
|
97
|
-
},
|
|
98
|
-
parameters: {
|
|
99
|
-
backgrounds: { default: "light" },
|
|
100
|
-
docs: {
|
|
101
|
-
description: {
|
|
102
|
-
story:
|
|
103
|
-
"Simple ETH transfer transaction in light theme with skeleton loading support.",
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
export const ERC20TokenTransfer: Story = {
|
|
110
|
-
args: {
|
|
111
|
-
theme: "dark",
|
|
112
|
-
uiOptions: TRANSACTION_UI_OPTIONS.erc20Transfer,
|
|
113
|
-
},
|
|
114
|
-
parameters: {
|
|
115
|
-
backgrounds: { default: "dark" },
|
|
116
|
-
docs: {
|
|
117
|
-
description: {
|
|
118
|
-
story:
|
|
119
|
-
"ERC20 token transaction showing token amount, USD value, and proper formatting using real token data. Displays transfer function details.",
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
export const ERC20TokenTransferLight: Story = {
|
|
126
|
-
args: {
|
|
127
|
-
theme: "light",
|
|
128
|
-
uiOptions: TRANSACTION_UI_OPTIONS.erc20Transfer,
|
|
129
|
-
},
|
|
130
|
-
parameters: {
|
|
131
|
-
backgrounds: { default: "light" },
|
|
132
|
-
docs: {
|
|
133
|
-
description: {
|
|
134
|
-
story:
|
|
135
|
-
"ERC20 token transaction in light theme with enhanced formatting.",
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
export const ContractInteraction: Story = {
|
|
142
|
-
args: {
|
|
143
|
-
theme: "dark",
|
|
144
|
-
uiOptions: TRANSACTION_UI_OPTIONS.contractInteraction,
|
|
145
|
-
},
|
|
146
|
-
parameters: {
|
|
147
|
-
backgrounds: { default: "dark" },
|
|
148
|
-
docs: {
|
|
149
|
-
description: {
|
|
150
|
-
story:
|
|
151
|
-
"Complex contract interaction showing function name extraction from ABI (claimTo), cost calculation, and network details with proper currency formatting.",
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
export const ContractInteractionLight: Story = {
|
|
158
|
-
args: {
|
|
159
|
-
theme: "light",
|
|
160
|
-
uiOptions: TRANSACTION_UI_OPTIONS.contractInteraction,
|
|
161
|
-
},
|
|
162
|
-
parameters: {
|
|
163
|
-
backgrounds: { default: "light" },
|
|
164
|
-
docs: {
|
|
165
|
-
description: {
|
|
166
|
-
story:
|
|
167
|
-
"Contract interaction transaction in light theme with enhanced UX and skeleton loading.",
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
export const CustomButtonLabel: Story = {
|
|
174
|
-
args: {
|
|
175
|
-
theme: "dark",
|
|
176
|
-
uiOptions: TRANSACTION_UI_OPTIONS.customButton,
|
|
177
|
-
},
|
|
178
|
-
parameters: {
|
|
179
|
-
backgrounds: { default: "dark" },
|
|
180
|
-
docs: {
|
|
181
|
-
description: {
|
|
182
|
-
story:
|
|
183
|
-
"Example showcasing custom button label functionality. The button shows 'Execute Now' instead of the default 'Execute [functionName]' text.",
|
|
184
|
-
},
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
export const CustomButtonLabelLight: Story = {
|
|
190
|
-
args: {
|
|
191
|
-
theme: "light",
|
|
192
|
-
uiOptions: TRANSACTION_UI_OPTIONS.customButton,
|
|
193
|
-
},
|
|
194
|
-
parameters: {
|
|
195
|
-
backgrounds: { default: "light" },
|
|
196
|
-
docs: {
|
|
197
|
-
description: {
|
|
198
|
-
story: "Light theme version with custom button label 'Execute Now'.",
|
|
199
|
-
},
|
|
200
|
-
},
|
|
201
|
-
},
|
|
202
|
-
};
|