@b3dotfun/sdk 0.1.69 → 0.1.70-alpha.2
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/anyspend/constants/rpc.d.ts +1 -1
- package/dist/cjs/anyspend/constants/rpc.js +1 -1
- package/dist/cjs/anyspend/react/components/AnySpend.d.ts +2 -0
- package/dist/cjs/anyspend/react/components/AnySpend.js +12 -4
- package/dist/cjs/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendBondKit.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
- package/dist/cjs/anyspend/react/components/AnySpendCollectorClubPurchase.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +2 -0
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +7 -3
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.d.ts +2 -0
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +21 -14
- package/dist/cjs/anyspend/react/components/AnySpendDeposit.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/AnySpendDeposit.js +12 -6
- package/dist/cjs/anyspend/react/components/AnySpendDepositUpside.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpendDepositUpside.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +4 -4
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +3 -3
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.js +3 -3
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendWorkflowTrigger.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/AnySpendWorkflowTrigger.js +2 -2
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +2 -2
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.js +2 -2
- package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckout.d.ts +5 -1
- package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckout.js +15 -6
- package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckoutTrigger.js +2 -2
- package/dist/cjs/anyspend/react/components/checkout/CartItemRow.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/checkout/CartSummary.d.ts +6 -4
- package/dist/cjs/anyspend/react/components/checkout/CartSummary.js +13 -11
- package/dist/cjs/anyspend/react/components/checkout/CheckoutCartPanel.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/checkout/CheckoutCartPanel.js +5 -4
- package/dist/cjs/anyspend/react/components/checkout/CheckoutFormPanel.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/checkout/CheckoutFormPanel.js +2 -2
- package/dist/cjs/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/checkout/CheckoutPaymentPanel.js +15 -7
- package/dist/cjs/anyspend/react/components/checkout/CheckoutSuccess.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/checkout/CheckoutSuccess.js +5 -3
- package/dist/cjs/anyspend/react/components/checkout/CryptoPayPanel.js +43 -23
- package/dist/cjs/anyspend/react/components/checkout/DiscountCodeInput.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/checkout/DiscountCodeInput.js +3 -6
- package/dist/cjs/anyspend/react/components/checkout/FiatCheckoutPanel.js +1 -2
- package/dist/cjs/anyspend/react/components/checkout/KycGate.js +1 -2
- package/dist/cjs/anyspend/react/components/checkout/PriceSkeleton.d.ts +5 -0
- package/dist/cjs/anyspend/react/components/checkout/PriceSkeleton.js +9 -0
- package/dist/cjs/anyspend/react/components/checkout/ShippingSelector.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/checkout/ShippingSelector.js +3 -2
- package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.d.ts +8 -0
- package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.js +10 -9
- package/dist/cjs/anyspend/react/components/common/InsufficientDepositPayment.js +2 -2
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +7 -2
- package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +2 -2
- package/dist/cjs/anyspend/react/components/common/OrderStatus.js +37 -6
- package/dist/cjs/anyspend/react/components/common/StepProgress.d.ts +2 -0
- package/dist/cjs/anyspend/react/components/common/StepProgress.js +7 -2
- package/dist/cjs/anyspend/react/components/common/TransferCryptoDetails.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +4 -6
- package/dist/cjs/anyspend/react/hooks/useKycStatus.d.ts +3 -1
- package/dist/cjs/anyspend/react/hooks/useKycStatus.js +11 -7
- package/dist/cjs/anyspend/utils/chain.js +8 -7
- package/dist/cjs/app.shared.js +9 -7
- package/dist/cjs/global-account/better-auth-client.d.ts +1883 -0
- package/dist/cjs/global-account/better-auth-client.js +17 -0
- package/dist/cjs/global-account/bsmnt.d.ts +0 -1
- package/dist/cjs/global-account/bsmnt.js +0 -6
- package/dist/cjs/global-account/react/components/AvatarEditor/AvatarEditor.js +3 -1
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +5 -2
- package/dist/cjs/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +3 -1
- package/dist/cjs/global-account/react/components/B3Provider/AuthenticationProvider.js +2 -1
- package/dist/cjs/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +4 -1
- package/dist/cjs/global-account/react/components/B3Provider/B3ConfigProvider.js +2 -1
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +11 -2
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +10 -13
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +6 -8
- package/dist/cjs/global-account/react/components/B3Provider/BetterAuthProvider.d.ts +16 -0
- package/dist/cjs/global-account/react/components/B3Provider/BetterAuthProvider.js +120 -0
- package/dist/cjs/global-account/react/components/B3Provider/LocalSDKProvider.d.ts +3 -1
- package/dist/cjs/global-account/react/components/B3Provider/LocalSDKProvider.js +3 -1
- package/dist/cjs/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.d.ts +3 -1
- package/dist/cjs/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.js +4 -2
- package/dist/cjs/global-account/react/components/LinkAccount/LinkedAccountItem.js +2 -1
- package/dist/cjs/global-account/react/components/ManageAccount/BottomNavigation.js +4 -2
- package/dist/cjs/global-account/react/components/ManageAccount/Header.js +36 -4
- package/dist/cjs/global-account/react/components/ManageAccount/HomeContent.js +4 -1
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.js +6 -0
- package/dist/cjs/global-account/react/components/ManageAccount/ProfileSection.js +17 -6
- package/dist/cjs/global-account/react/components/ManageAccount/SessionDurationContent.d.ts +5 -0
- package/dist/cjs/global-account/react/components/ManageAccount/SessionDurationContent.js +57 -0
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsContent.js +14 -29
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsProfileCard.js +27 -16
- package/dist/cjs/global-account/react/components/Send/Send.js +5 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthResetPassword.d.ts +21 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthResetPassword.js +68 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthSignIn.d.ts +39 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthSignIn.js +173 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthVerifyEmail.d.ts +37 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthVerifyEmail.js +85 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +14 -4
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +14 -5
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.js +10 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/PasswordInput.d.ts +10 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/components/PasswordInput.js +10 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.d.ts +8 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.js +141 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +96 -15
- package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +5 -3
- package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.js +20 -3
- package/dist/cjs/global-account/react/components/SingleUserSearchSelector/SingleUserSearchSelector.js +2 -1
- package/dist/cjs/global-account/react/components/Toast/ToastContext.d.ts +3 -0
- package/dist/cjs/global-account/react/components/Toast/ToastContext.js +30 -7
- package/dist/cjs/global-account/react/components/UserAvatar/UserAvatar.d.ts +18 -0
- package/dist/cjs/global-account/react/components/UserAvatar/UserAvatar.js +27 -0
- package/dist/cjs/global-account/react/components/custom/Button.d.ts +1 -1
- package/dist/cjs/global-account/react/components/index.d.ts +5 -0
- package/dist/cjs/global-account/react/components/index.js +12 -3
- package/dist/cjs/global-account/react/components/ui/button.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/index.d.ts +1 -0
- package/dist/cjs/global-account/react/hooks/index.js +5 -2
- package/dist/cjs/global-account/react/hooks/useAuth.js +26 -15
- package/dist/cjs/global-account/react/hooks/useAuthentication.js +23 -12
- package/dist/cjs/global-account/react/hooks/useAutoSelectWallet.d.ts +6 -3
- package/dist/cjs/global-account/react/hooks/useAutoSelectWallet.js +31 -3
- package/dist/cjs/global-account/react/hooks/useBetterAuth.d.ts +973 -0
- package/dist/cjs/global-account/react/hooks/useBetterAuth.js +158 -0
- package/dist/cjs/global-account/react/hooks/useConnect.d.ts +2 -2
- package/dist/cjs/global-account/react/hooks/useFirstEOA.d.ts +8 -8
- package/dist/cjs/global-account/react/hooks/useTWAuth.js +0 -1
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +42 -1
- package/dist/cjs/global-account/react/utils/createWagmiConfig.d.ts +4 -31
- package/dist/cjs/global-account/react/utils/createWagmiConfig.js +5 -24
- package/dist/cjs/global-account/react/utils/index.d.ts +0 -1
- package/dist/cjs/global-account/react/utils/index.js +0 -1
- package/dist/cjs/global-account/react/utils/profileDisplay.js +17 -18
- package/dist/cjs/shared/constants/chains/b3Chain.d.ts +7 -7
- package/dist/cjs/shared/constants/chains/b3Chain.js +4 -4
- package/dist/cjs/shared/constants/chains/b3Viem.d.ts +6 -0
- package/dist/cjs/shared/constants/chains/b3Viem.js +19 -0
- package/dist/cjs/shared/constants/chains/supported.d.ts +1 -1
- package/dist/cjs/shared/constants/index.d.ts +1 -0
- package/dist/cjs/shared/constants/index.js +2 -1
- package/dist/cjs/shared/generated/chain-networks.json +2 -2
- package/dist/cjs/shared/utils/chains.d.ts +1 -1
- package/dist/cjs/shared/utils/chains.js +2 -2
- package/dist/cjs/shared/utils/session-duration.d.ts +15 -0
- package/dist/cjs/shared/utils/session-duration.js +69 -0
- package/dist/cjs/wallet/react/components/ConnectWallet.d.ts +11 -0
- package/dist/cjs/wallet/react/components/ConnectWallet.js +467 -0
- package/dist/cjs/wallet/react/components/WalletProvider.d.ts +35 -0
- package/dist/cjs/wallet/react/components/WalletProvider.js +20 -0
- package/dist/cjs/wallet/react/hooks/useWalletDisconnect.d.ts +13 -0
- package/dist/cjs/wallet/react/hooks/useWalletDisconnect.js +22 -0
- package/dist/cjs/wallet/react/hooks/useWalletState.d.ts +31 -0
- package/dist/cjs/wallet/react/hooks/useWalletState.js +63 -0
- package/dist/cjs/wallet/react/index.d.ts +5 -0
- package/dist/cjs/wallet/react/index.js +16 -0
- package/dist/cjs/wallet/utils/createWalletConfig.d.ts +21 -0
- package/dist/cjs/wallet/utils/createWalletConfig.js +24 -0
- package/dist/esm/anyspend/constants/rpc.d.ts +1 -1
- package/dist/esm/anyspend/constants/rpc.js +1 -1
- package/dist/esm/anyspend/react/components/AnySpend.d.ts +2 -0
- package/dist/esm/anyspend/react/components/AnySpend.js +12 -4
- package/dist/esm/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendBondKit.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
- package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +2 -0
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +7 -3
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +2 -0
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +21 -14
- package/dist/esm/anyspend/react/components/AnySpendDeposit.d.ts +3 -1
- package/dist/esm/anyspend/react/components/AnySpendDeposit.js +13 -7
- package/dist/esm/anyspend/react/components/AnySpendDepositUpside.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpendDepositUpside.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +3 -1
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +4 -4
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +4 -4
- package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.js +4 -4
- package/dist/esm/anyspend/react/components/AnySpendStakeUpside.d.ts +3 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeUpside.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendWorkflowTrigger.d.ts +3 -1
- package/dist/esm/anyspend/react/components/AnySpendWorkflowTrigger.js +2 -2
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +2 -2
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.js +2 -2
- package/dist/esm/anyspend/react/components/checkout/AnySpendCheckout.d.ts +5 -1
- package/dist/esm/anyspend/react/components/checkout/AnySpendCheckout.js +15 -6
- package/dist/esm/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +3 -1
- package/dist/esm/anyspend/react/components/checkout/AnySpendCheckoutTrigger.js +2 -2
- package/dist/esm/anyspend/react/components/checkout/CartItemRow.d.ts +2 -1
- package/dist/esm/anyspend/react/components/checkout/CartSummary.d.ts +6 -4
- package/dist/esm/anyspend/react/components/checkout/CartSummary.js +13 -11
- package/dist/esm/anyspend/react/components/checkout/CheckoutCartPanel.d.ts +3 -1
- package/dist/esm/anyspend/react/components/checkout/CheckoutCartPanel.js +5 -4
- package/dist/esm/anyspend/react/components/checkout/CheckoutFormPanel.d.ts +3 -1
- package/dist/esm/anyspend/react/components/checkout/CheckoutFormPanel.js +2 -2
- package/dist/esm/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +3 -1
- package/dist/esm/anyspend/react/components/checkout/CheckoutPaymentPanel.js +16 -8
- package/dist/esm/anyspend/react/components/checkout/CheckoutSuccess.d.ts +2 -1
- package/dist/esm/anyspend/react/components/checkout/CheckoutSuccess.js +5 -3
- package/dist/esm/anyspend/react/components/checkout/CryptoPayPanel.js +44 -24
- package/dist/esm/anyspend/react/components/checkout/DiscountCodeInput.d.ts +3 -1
- package/dist/esm/anyspend/react/components/checkout/DiscountCodeInput.js +3 -6
- package/dist/esm/anyspend/react/components/checkout/FiatCheckoutPanel.js +2 -3
- package/dist/esm/anyspend/react/components/checkout/KycGate.js +2 -3
- package/dist/esm/anyspend/react/components/checkout/PriceSkeleton.d.ts +5 -0
- package/dist/esm/anyspend/react/components/checkout/PriceSkeleton.js +6 -0
- package/dist/esm/anyspend/react/components/checkout/ShippingSelector.d.ts +3 -1
- package/dist/esm/anyspend/react/components/checkout/ShippingSelector.js +3 -2
- package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.d.ts +8 -0
- package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.js +9 -8
- package/dist/esm/anyspend/react/components/common/InsufficientDepositPayment.js +2 -2
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +8 -3
- package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +2 -2
- package/dist/esm/anyspend/react/components/common/OrderStatus.js +34 -3
- package/dist/esm/anyspend/react/components/common/StepProgress.d.ts +2 -0
- package/dist/esm/anyspend/react/components/common/StepProgress.js +4 -2
- package/dist/esm/anyspend/react/components/common/TransferCryptoDetails.js +2 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +5 -7
- package/dist/esm/anyspend/react/hooks/useKycStatus.d.ts +3 -1
- package/dist/esm/anyspend/react/hooks/useKycStatus.js +9 -5
- package/dist/esm/anyspend/utils/chain.js +10 -9
- package/dist/esm/app.shared.js +9 -7
- package/dist/esm/global-account/better-auth-client.d.ts +1883 -0
- package/dist/esm/global-account/better-auth-client.js +13 -0
- package/dist/esm/global-account/bsmnt.d.ts +0 -1
- package/dist/esm/global-account/bsmnt.js +0 -5
- package/dist/esm/global-account/react/components/AvatarEditor/AvatarEditor.js +3 -1
- package/dist/esm/global-account/react/components/B3DynamicModal.js +5 -2
- package/dist/esm/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +3 -1
- package/dist/esm/global-account/react/components/B3Provider/AuthenticationProvider.js +2 -1
- package/dist/esm/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +4 -1
- package/dist/esm/global-account/react/components/B3Provider/B3ConfigProvider.js +2 -1
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +11 -2
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +5 -8
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +4 -6
- package/dist/esm/global-account/react/components/B3Provider/BetterAuthProvider.d.ts +16 -0
- package/dist/esm/global-account/react/components/B3Provider/BetterAuthProvider.js +115 -0
- package/dist/esm/global-account/react/components/B3Provider/LocalSDKProvider.d.ts +3 -1
- package/dist/esm/global-account/react/components/B3Provider/LocalSDKProvider.js +3 -1
- package/dist/esm/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.d.ts +3 -1
- package/dist/esm/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.js +4 -2
- package/dist/esm/global-account/react/components/LinkAccount/LinkedAccountItem.js +2 -1
- package/dist/esm/global-account/react/components/ManageAccount/BottomNavigation.js +5 -3
- package/dist/esm/global-account/react/components/ManageAccount/Header.js +37 -5
- package/dist/esm/global-account/react/components/ManageAccount/HomeContent.js +4 -1
- package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.js +7 -1
- package/dist/esm/global-account/react/components/ManageAccount/ProfileSection.js +16 -8
- package/dist/esm/global-account/react/components/ManageAccount/SessionDurationContent.d.ts +5 -0
- package/dist/esm/global-account/react/components/ManageAccount/SessionDurationContent.js +52 -0
- package/dist/esm/global-account/react/components/ManageAccount/SettingsContent.js +16 -31
- package/dist/esm/global-account/react/components/ManageAccount/SettingsProfileCard.js +27 -16
- package/dist/esm/global-account/react/components/Send/Send.js +5 -2
- package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthResetPassword.d.ts +21 -0
- package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthResetPassword.js +65 -0
- package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthSignIn.d.ts +39 -0
- package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthSignIn.js +170 -0
- package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthVerifyEmail.d.ts +37 -0
- package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthVerifyEmail.js +82 -0
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +15 -5
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +14 -5
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.js +11 -2
- package/dist/esm/global-account/react/components/SignInWithB3/components/PasswordInput.d.ts +10 -0
- package/dist/esm/global-account/react/components/SignInWithB3/components/PasswordInput.js +7 -0
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.d.ts +8 -0
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.js +138 -0
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +100 -19
- package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +5 -3
- package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.js +19 -2
- package/dist/esm/global-account/react/components/SingleUserSearchSelector/SingleUserSearchSelector.js +2 -1
- package/dist/esm/global-account/react/components/Toast/ToastContext.d.ts +3 -0
- package/dist/esm/global-account/react/components/Toast/ToastContext.js +30 -7
- package/dist/esm/global-account/react/components/UserAvatar/UserAvatar.d.ts +18 -0
- package/dist/esm/global-account/react/components/UserAvatar/UserAvatar.js +21 -0
- package/dist/esm/global-account/react/components/custom/Button.d.ts +1 -1
- package/dist/esm/global-account/react/components/index.d.ts +5 -0
- package/dist/esm/global-account/react/components/index.js +5 -0
- package/dist/esm/global-account/react/components/ui/button.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/index.d.ts +1 -0
- package/dist/esm/global-account/react/hooks/index.js +1 -0
- package/dist/esm/global-account/react/hooks/useAuth.js +28 -17
- package/dist/esm/global-account/react/hooks/useAuthentication.js +24 -13
- package/dist/esm/global-account/react/hooks/useAutoSelectWallet.d.ts +6 -3
- package/dist/esm/global-account/react/hooks/useAutoSelectWallet.js +33 -5
- package/dist/esm/global-account/react/hooks/useBetterAuth.d.ts +973 -0
- package/dist/esm/global-account/react/hooks/useBetterAuth.js +150 -0
- package/dist/esm/global-account/react/hooks/useConnect.d.ts +2 -2
- package/dist/esm/global-account/react/hooks/useFirstEOA.d.ts +8 -8
- package/dist/esm/global-account/react/hooks/useTWAuth.js +0 -1
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +42 -1
- package/dist/esm/global-account/react/utils/createWagmiConfig.d.ts +4 -31
- package/dist/esm/global-account/react/utils/createWagmiConfig.js +5 -23
- package/dist/esm/global-account/react/utils/index.d.ts +0 -1
- package/dist/esm/global-account/react/utils/index.js +0 -1
- package/dist/esm/global-account/react/utils/profileDisplay.js +17 -18
- package/dist/esm/shared/constants/chains/b3Chain.d.ts +7 -7
- package/dist/esm/shared/constants/chains/b3Chain.js +4 -4
- package/dist/esm/shared/constants/chains/b3Viem.d.ts +6 -0
- package/dist/esm/shared/constants/chains/b3Viem.js +16 -0
- package/dist/esm/shared/constants/chains/supported.d.ts +1 -1
- package/dist/esm/shared/constants/index.d.ts +1 -0
- package/dist/esm/shared/constants/index.js +1 -0
- package/dist/esm/shared/generated/chain-networks.json +2 -2
- package/dist/esm/shared/utils/chains.d.ts +1 -1
- package/dist/esm/shared/utils/chains.js +2 -2
- package/dist/esm/shared/utils/session-duration.d.ts +15 -0
- package/dist/esm/shared/utils/session-duration.js +64 -0
- package/dist/esm/wallet/react/components/ConnectWallet.d.ts +11 -0
- package/dist/esm/wallet/react/components/ConnectWallet.js +431 -0
- package/dist/esm/wallet/react/components/WalletProvider.d.ts +35 -0
- package/dist/esm/wallet/react/components/WalletProvider.js +17 -0
- package/dist/esm/wallet/react/hooks/useWalletDisconnect.d.ts +13 -0
- package/dist/esm/wallet/react/hooks/useWalletDisconnect.js +19 -0
- package/dist/esm/wallet/react/hooks/useWalletState.d.ts +31 -0
- package/dist/esm/wallet/react/hooks/useWalletState.js +60 -0
- package/dist/esm/wallet/react/index.d.ts +5 -0
- package/dist/esm/wallet/react/index.js +8 -0
- package/dist/esm/wallet/utils/createWalletConfig.d.ts +21 -0
- package/dist/esm/wallet/utils/createWalletConfig.js +21 -0
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/constants/rpc.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpend.d.ts +2 -0
- package/dist/types/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpendBuySpin.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
- package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +2 -0
- package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +2 -0
- package/dist/types/anyspend/react/components/AnySpendDeposit.d.ts +3 -1
- package/dist/types/anyspend/react/components/AnySpendDepositUpside.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +3 -1
- package/dist/types/anyspend/react/components/AnySpendStakeB3.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnySpendStakeUpside.d.ts +3 -1
- package/dist/types/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnySpendWorkflowTrigger.d.ts +3 -1
- package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnyspendSignatureMint.d.ts +2 -1
- package/dist/types/anyspend/react/components/checkout/AnySpendCheckout.d.ts +5 -1
- package/dist/types/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +3 -1
- package/dist/types/anyspend/react/components/checkout/CartItemRow.d.ts +2 -1
- package/dist/types/anyspend/react/components/checkout/CartSummary.d.ts +6 -4
- package/dist/types/anyspend/react/components/checkout/CheckoutCartPanel.d.ts +3 -1
- package/dist/types/anyspend/react/components/checkout/CheckoutFormPanel.d.ts +3 -1
- package/dist/types/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +3 -1
- package/dist/types/anyspend/react/components/checkout/CheckoutSuccess.d.ts +2 -1
- package/dist/types/anyspend/react/components/checkout/DiscountCodeInput.d.ts +3 -1
- package/dist/types/anyspend/react/components/checkout/PriceSkeleton.d.ts +5 -0
- package/dist/types/anyspend/react/components/checkout/ShippingSelector.d.ts +3 -1
- package/dist/types/anyspend/react/components/common/CryptoPaymentMethod.d.ts +8 -0
- package/dist/types/anyspend/react/components/common/StepProgress.d.ts +2 -0
- package/dist/types/anyspend/react/hooks/useKycStatus.d.ts +3 -1
- package/dist/types/global-account/better-auth-client.d.ts +1883 -0
- package/dist/types/global-account/bsmnt.d.ts +0 -1
- package/dist/types/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +3 -1
- package/dist/types/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +4 -1
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +11 -2
- package/dist/types/global-account/react/components/B3Provider/BetterAuthProvider.d.ts +16 -0
- package/dist/types/global-account/react/components/B3Provider/LocalSDKProvider.d.ts +3 -1
- package/dist/types/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.d.ts +3 -1
- package/dist/types/global-account/react/components/ManageAccount/SessionDurationContent.d.ts +5 -0
- package/dist/types/global-account/react/components/SignInWithB3/BetterAuthResetPassword.d.ts +21 -0
- package/dist/types/global-account/react/components/SignInWithB3/BetterAuthSignIn.d.ts +39 -0
- package/dist/types/global-account/react/components/SignInWithB3/BetterAuthVerifyEmail.d.ts +37 -0
- package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/components/PasswordInput.d.ts +10 -0
- package/dist/types/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.d.ts +8 -0
- package/dist/types/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +5 -3
- package/dist/types/global-account/react/components/Toast/ToastContext.d.ts +3 -0
- package/dist/types/global-account/react/components/UserAvatar/UserAvatar.d.ts +18 -0
- package/dist/types/global-account/react/components/custom/Button.d.ts +1 -1
- package/dist/types/global-account/react/components/index.d.ts +5 -0
- package/dist/types/global-account/react/components/ui/button.d.ts +1 -1
- package/dist/types/global-account/react/hooks/index.d.ts +1 -0
- package/dist/types/global-account/react/hooks/useAutoSelectWallet.d.ts +6 -3
- package/dist/types/global-account/react/hooks/useBetterAuth.d.ts +973 -0
- package/dist/types/global-account/react/hooks/useConnect.d.ts +2 -2
- package/dist/types/global-account/react/hooks/useFirstEOA.d.ts +8 -8
- package/dist/types/global-account/react/stores/useModalStore.d.ts +42 -1
- package/dist/types/global-account/react/utils/createWagmiConfig.d.ts +4 -31
- package/dist/types/global-account/react/utils/index.d.ts +0 -1
- package/dist/types/shared/constants/chains/b3Chain.d.ts +7 -7
- package/dist/types/shared/constants/chains/b3Viem.d.ts +6 -0
- package/dist/types/shared/constants/chains/supported.d.ts +1 -1
- package/dist/types/shared/constants/index.d.ts +1 -0
- package/dist/types/shared/utils/chains.d.ts +1 -1
- package/dist/types/shared/utils/session-duration.d.ts +15 -0
- package/dist/types/wallet/react/components/ConnectWallet.d.ts +11 -0
- package/dist/types/wallet/react/components/WalletProvider.d.ts +35 -0
- package/dist/types/wallet/react/hooks/useWalletDisconnect.d.ts +13 -0
- package/dist/types/wallet/react/hooks/useWalletState.d.ts +31 -0
- package/dist/types/wallet/react/index.d.ts +5 -0
- package/dist/types/wallet/utils/createWalletConfig.d.ts +21 -0
- package/package.json +15 -6
- package/src/anyspend/constants/rpc.ts +2 -1
- package/src/anyspend/react/components/AnySpend.tsx +24 -12
- package/src/anyspend/react/components/AnySpendBondKit.tsx +2 -0
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +3 -0
- package/src/anyspend/react/components/AnySpendCollectorClubPurchase.tsx +6 -0
- package/src/anyspend/react/components/AnySpendCustom.tsx +12 -2
- package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +29 -14
- package/src/anyspend/react/components/AnySpendDeposit.tsx +51 -34
- package/src/anyspend/react/components/AnySpendDepositUpside.tsx +3 -0
- package/src/anyspend/react/components/AnySpendNFT.tsx +6 -2
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +5 -2
- package/src/anyspend/react/components/AnySpendStakeB3ExactIn.tsx +5 -2
- package/src/anyspend/react/components/AnySpendStakeUpside.tsx +4 -0
- package/src/anyspend/react/components/AnySpendStakeUpsideExactIn.tsx +3 -0
- package/src/anyspend/react/components/AnySpendWorkflowTrigger.tsx +4 -0
- package/src/anyspend/react/components/AnyspendDepositHype.tsx +3 -0
- package/src/anyspend/react/components/AnyspendSignatureMint.tsx +3 -0
- package/src/anyspend/react/components/checkout/AnySpendCheckout.tsx +29 -5
- package/src/anyspend/react/components/checkout/AnySpendCheckoutTrigger.tsx +4 -0
- package/src/anyspend/react/components/checkout/CartItemRow.tsx +2 -1
- package/src/anyspend/react/components/checkout/CartSummary.tsx +24 -20
- package/src/anyspend/react/components/checkout/CheckoutCartPanel.tsx +12 -3
- package/src/anyspend/react/components/checkout/CheckoutFormPanel.tsx +5 -0
- package/src/anyspend/react/components/checkout/CheckoutPaymentPanel.tsx +99 -83
- package/src/anyspend/react/components/checkout/CheckoutSuccess.tsx +13 -3
- package/src/anyspend/react/components/checkout/CryptoPayPanel.tsx +45 -27
- package/src/anyspend/react/components/checkout/DiscountCodeInput.tsx +15 -5
- package/src/anyspend/react/components/checkout/FiatCheckoutPanel.tsx +9 -3
- package/src/anyspend/react/components/checkout/KycGate.tsx +8 -3
- package/src/anyspend/react/components/checkout/PriceSkeleton.tsx +19 -0
- package/src/anyspend/react/components/checkout/ShippingSelector.tsx +5 -1
- package/src/anyspend/react/components/common/CryptoPaymentMethod.tsx +10 -8
- package/src/anyspend/react/components/common/InsufficientDepositPayment.tsx +2 -2
- package/src/anyspend/react/components/common/OrderDetails.tsx +10 -2
- package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +4 -4
- package/src/anyspend/react/components/common/OrderStatus.tsx +38 -3
- package/src/anyspend/react/components/common/StepProgress.tsx +15 -5
- package/src/anyspend/react/components/common/TransferCryptoDetails.tsx +2 -2
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +5 -7
- package/src/anyspend/react/hooks/useKycStatus.ts +8 -5
- package/src/anyspend/utils/chain.ts +9 -9
- package/src/app.shared.ts +9 -8
- package/src/global-account/better-auth-client.ts +17 -0
- package/src/global-account/bsmnt.ts +0 -6
- package/src/global-account/react/components/AvatarEditor/AvatarEditor.tsx +3 -1
- package/src/global-account/react/components/B3DynamicModal.tsx +5 -2
- package/src/global-account/react/components/B3Provider/AuthenticationProvider.tsx +4 -0
- package/src/global-account/react/components/B3Provider/B3ConfigProvider.tsx +6 -0
- package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +16 -21
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +56 -37
- package/src/global-account/react/components/B3Provider/BetterAuthProvider.tsx +127 -0
- package/src/global-account/react/components/B3Provider/LocalSDKProvider.tsx +5 -0
- package/src/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.tsx +17 -10
- package/src/global-account/react/components/LinkAccount/LinkedAccountItem.tsx +2 -1
- package/src/global-account/react/components/ManageAccount/BottomNavigation.tsx +18 -14
- package/src/global-account/react/components/ManageAccount/Header.tsx +71 -4
- package/src/global-account/react/components/ManageAccount/HomeContent.tsx +25 -19
- package/src/global-account/react/components/ManageAccount/ManageAccount.tsx +13 -0
- package/src/global-account/react/components/ManageAccount/ProfileSection.tsx +40 -15
- package/src/global-account/react/components/ManageAccount/SessionDurationContent.tsx +107 -0
- package/src/global-account/react/components/ManageAccount/SettingsContent.tsx +35 -54
- package/src/global-account/react/components/ManageAccount/SettingsProfileCard.tsx +31 -22
- package/src/global-account/react/components/Send/Send.tsx +8 -5
- package/src/global-account/react/components/SignInWithB3/BetterAuthResetPassword.tsx +145 -0
- package/src/global-account/react/components/SignInWithB3/BetterAuthSignIn.tsx +446 -0
- package/src/global-account/react/components/SignInWithB3/BetterAuthVerifyEmail.tsx +155 -0
- package/src/global-account/react/components/SignInWithB3/SignIn.tsx +42 -13
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +20 -4
- package/src/global-account/react/components/SignInWithB3/components/AuthButton.tsx +21 -2
- package/src/global-account/react/components/SignInWithB3/components/PasswordInput.tsx +62 -0
- package/src/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.tsx +315 -0
- package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +207 -54
- package/src/global-account/react/components/SignInWithB3/utils/signInUtils.ts +24 -4
- package/src/global-account/react/components/SingleUserSearchSelector/SingleUserSearchSelector.tsx +2 -1
- package/src/global-account/react/components/Toast/ToastContext.tsx +39 -7
- package/src/global-account/react/components/UserAvatar/UserAvatar.tsx +45 -0
- package/src/global-account/react/components/index.ts +11 -0
- package/src/global-account/react/hooks/index.ts +1 -0
- package/src/global-account/react/hooks/useAuth.ts +28 -17
- package/src/global-account/react/hooks/useAuthentication.ts +24 -13
- package/src/global-account/react/hooks/useAutoSelectWallet.ts +40 -6
- package/src/global-account/react/hooks/useBetterAuth.ts +192 -0
- package/src/global-account/react/hooks/useConnect.tsx +2 -2
- package/src/global-account/react/hooks/useTWAuth.tsx +0 -1
- package/src/global-account/react/stores/useModalStore.ts +43 -0
- package/src/global-account/react/utils/createWagmiConfig.tsx +6 -25
- package/src/global-account/react/utils/index.ts +0 -1
- package/src/global-account/react/utils/profileDisplay.ts +21 -19
- package/src/shared/constants/chains/b3Chain.ts +5 -5
- package/src/shared/constants/chains/b3Viem.ts +18 -0
- package/src/shared/constants/index.ts +2 -0
- package/src/shared/generated/chain-networks.json +2 -2
- package/src/shared/utils/chains.ts +3 -2
- package/src/shared/utils/session-duration.ts +64 -0
- package/src/types/torph.d.ts +4 -0
- package/src/wallet/__tests__/createWalletConfig.test.ts +39 -0
- package/src/wallet/react/components/ConnectWallet.tsx +665 -0
- package/src/wallet/react/components/WalletProvider.tsx +64 -0
- package/src/wallet/react/hooks/useWalletDisconnect.ts +22 -0
- package/src/wallet/react/hooks/useWalletState.ts +93 -0
- package/src/wallet/react/index.ts +10 -0
- package/src/wallet/utils/createWalletConfig.ts +39 -0
- package/dist/cjs/global-account/react/components/AvatarCreator/AvatarCreator.d.ts +0 -6
- package/dist/cjs/global-account/react/components/AvatarCreator/AvatarCreator.js +0 -54
- package/dist/cjs/global-account/react/components/ProfileAvatar.d.ts +0 -0
- package/dist/cjs/global-account/react/components/ProfileAvatar.js +0 -127
- package/dist/cjs/global-account/react/hooks/useRPMToken.d.ts +0 -7
- package/dist/cjs/global-account/react/hooks/useRPMToken.js +0 -11
- package/dist/cjs/global-account/react/utils/updateAvatar.d.ts +0 -4
- package/dist/cjs/global-account/react/utils/updateAvatar.js +0 -54
- package/dist/esm/global-account/react/components/AvatarCreator/AvatarCreator.d.ts +0 -6
- package/dist/esm/global-account/react/components/AvatarCreator/AvatarCreator.js +0 -51
- package/dist/esm/global-account/react/components/ProfileAvatar.d.ts +0 -0
- package/dist/esm/global-account/react/components/ProfileAvatar.js +0 -127
- package/dist/esm/global-account/react/hooks/useRPMToken.d.ts +0 -7
- package/dist/esm/global-account/react/hooks/useRPMToken.js +0 -8
- package/dist/esm/global-account/react/utils/updateAvatar.d.ts +0 -4
- package/dist/esm/global-account/react/utils/updateAvatar.js +0 -18
- package/dist/types/global-account/react/components/AvatarCreator/AvatarCreator.d.ts +0 -6
- package/dist/types/global-account/react/components/ProfileAvatar.d.ts +0 -0
- package/dist/types/global-account/react/hooks/useRPMToken.d.ts +0 -7
- package/dist/types/global-account/react/utils/updateAvatar.d.ts +0 -4
- package/src/global-account/react/components/AvatarCreator/AvatarCreator.tsx +0 -90
- package/src/global-account/react/components/ProfileAvatar.tsx +0 -138
- package/src/global-account/react/hooks/useRPMToken.ts +0 -17
- package/src/global-account/react/utils/updateAvatar.ts +0 -21
|
@@ -148,6 +148,8 @@ export function AnySpend(props: {
|
|
|
148
148
|
theme?: AnySpendTheme;
|
|
149
149
|
/** When true, shows a KYC gate before Stripe Web2 (credit card) payments. Default false. */
|
|
150
150
|
kycEnabled?: boolean;
|
|
151
|
+
/** Whether to show the "Pay with Fiat" tab. Defaults to true. When false, the fiat tab is hidden and activeTab is forced to "crypto". */
|
|
152
|
+
showFiatOption?: boolean;
|
|
151
153
|
}) {
|
|
152
154
|
const fingerprintConfig = getFingerprintConfig();
|
|
153
155
|
|
|
@@ -184,6 +186,7 @@ function AnySpendInner({
|
|
|
184
186
|
callbackMetadata,
|
|
185
187
|
senderAddress,
|
|
186
188
|
kycEnabled = false,
|
|
189
|
+
showFiatOption = true,
|
|
187
190
|
}: {
|
|
188
191
|
sourceChainId?: number;
|
|
189
192
|
destinationTokenAddress?: string;
|
|
@@ -211,6 +214,7 @@ function AnySpendInner({
|
|
|
211
214
|
content?: AnySpendContent;
|
|
212
215
|
theme?: AnySpendTheme;
|
|
213
216
|
kycEnabled?: boolean;
|
|
217
|
+
showFiatOption?: boolean;
|
|
214
218
|
}) {
|
|
215
219
|
const { slots, content } = useAnySpendCustomization();
|
|
216
220
|
const searchParams = useSearchParamsSSR();
|
|
@@ -253,6 +257,7 @@ function AnySpendInner({
|
|
|
253
257
|
const previousPanel = useRef<PanelView>(PanelView.MAIN);
|
|
254
258
|
|
|
255
259
|
const [activeTab, setActiveTab] = useState<"crypto" | "fiat">(() => {
|
|
260
|
+
if (!showFiatOption) return "crypto";
|
|
256
261
|
if (typeof window !== "undefined") {
|
|
257
262
|
const stored = sessionStorage.getItem("anyspend_active_tab") as "crypto" | "fiat" | null;
|
|
258
263
|
if (stored === "crypto" || stored === "fiat") return stored;
|
|
@@ -261,8 +266,13 @@ function AnySpendInner({
|
|
|
261
266
|
});
|
|
262
267
|
|
|
263
268
|
useEffect(() => {
|
|
269
|
+
if (!showFiatOption && activeTab === "fiat") setActiveTab("crypto");
|
|
270
|
+
}, [showFiatOption, activeTab]);
|
|
271
|
+
|
|
272
|
+
useEffect(() => {
|
|
273
|
+
if (!showFiatOption) return;
|
|
264
274
|
sessionStorage.setItem("anyspend_active_tab", activeTab);
|
|
265
|
-
}, [activeTab]);
|
|
275
|
+
}, [activeTab, showFiatOption]);
|
|
266
276
|
|
|
267
277
|
const [orderId, setOrderId] = useState<string | undefined>(loadOrder);
|
|
268
278
|
const [directTransferTxHash, setDirectTransferTxHash] = useState<string | undefined>();
|
|
@@ -1312,17 +1322,19 @@ function AnySpendInner({
|
|
|
1312
1322
|
)}
|
|
1313
1323
|
|
|
1314
1324
|
{/* Tab section */}
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
setActiveTab
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1325
|
+
{showFiatOption && (
|
|
1326
|
+
<TabSection
|
|
1327
|
+
activeTab={activeTab}
|
|
1328
|
+
setActiveTab={tab => {
|
|
1329
|
+
setActiveTab(tab);
|
|
1330
|
+
// Reset payment methods when switching tabs
|
|
1331
|
+
resetPaymentMethods();
|
|
1332
|
+
setSelectedFiatPaymentMethod(FiatPaymentMethod.NONE);
|
|
1333
|
+
}}
|
|
1334
|
+
setSelectedCryptoPaymentMethod={setSelectedCryptoPaymentMethod}
|
|
1335
|
+
setSelectedFiatPaymentMethod={setSelectedFiatPaymentMethod}
|
|
1336
|
+
/>
|
|
1337
|
+
)}
|
|
1326
1338
|
|
|
1327
1339
|
<div className="relative flex w-full max-w-[calc(100vw-32px)] flex-col gap-2">
|
|
1328
1340
|
{/* Send section */}
|
|
@@ -42,6 +42,7 @@ export function AnySpendBondKit({
|
|
|
42
42
|
slots,
|
|
43
43
|
content,
|
|
44
44
|
theme,
|
|
45
|
+
showFiatOption,
|
|
45
46
|
}: AnySpendBondKitProps & {
|
|
46
47
|
slots?: AnySpendSlots;
|
|
47
48
|
content?: AnySpendContent;
|
|
@@ -382,6 +383,7 @@ export function AnySpendBondKit({
|
|
|
382
383
|
slots={slots}
|
|
383
384
|
content={content}
|
|
384
385
|
theme={theme}
|
|
386
|
+
showFiatOption={showFiatOption}
|
|
385
387
|
/>
|
|
386
388
|
);
|
|
387
389
|
}
|
|
@@ -135,6 +135,7 @@ export function AnySpendBuySpin({
|
|
|
135
135
|
slots,
|
|
136
136
|
content,
|
|
137
137
|
theme,
|
|
138
|
+
showFiatOption,
|
|
138
139
|
}: {
|
|
139
140
|
loadOrder?: string;
|
|
140
141
|
mode?: "modal" | "page";
|
|
@@ -148,6 +149,7 @@ export function AnySpendBuySpin({
|
|
|
148
149
|
slots?: AnySpendSlots;
|
|
149
150
|
content?: AnySpendContent;
|
|
150
151
|
theme?: AnySpendTheme;
|
|
152
|
+
showFiatOption?: boolean;
|
|
151
153
|
}) {
|
|
152
154
|
const hasMounted = useHasMounted();
|
|
153
155
|
const { setB3ModalOpen } = useModalStore();
|
|
@@ -695,6 +697,7 @@ export function AnySpendBuySpin({
|
|
|
695
697
|
slots={slots}
|
|
696
698
|
content={content}
|
|
697
699
|
theme={theme}
|
|
700
|
+
showFiatOption={showFiatOption}
|
|
698
701
|
/>
|
|
699
702
|
);
|
|
700
703
|
}
|
|
@@ -119,6 +119,10 @@ export interface AnySpendCollectorClubPurchaseProps {
|
|
|
119
119
|
* Force fiat payment
|
|
120
120
|
*/
|
|
121
121
|
forceFiatPayment?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Whether to show the "Pay with fiat" tab. Defaults to true.
|
|
124
|
+
*/
|
|
125
|
+
showFiatOption?: boolean;
|
|
122
126
|
/**
|
|
123
127
|
* Optional discount code to apply to the purchase.
|
|
124
128
|
* When provided, validates on-chain and adjusts the price accordingly.
|
|
@@ -146,6 +150,7 @@ export function AnySpendCollectorClubPurchase({
|
|
|
146
150
|
vendingMachineId,
|
|
147
151
|
packType,
|
|
148
152
|
forceFiatPayment,
|
|
153
|
+
showFiatOption = true,
|
|
149
154
|
discountCode,
|
|
150
155
|
slots,
|
|
151
156
|
content,
|
|
@@ -398,6 +403,7 @@ export function AnySpendCollectorClubPurchase({
|
|
|
398
403
|
showRecipient={showRecipient}
|
|
399
404
|
srcFiatAmount={srcFiatAmount}
|
|
400
405
|
forceFiatPayment={forceFiatPayment}
|
|
406
|
+
showFiatOption={showFiatOption}
|
|
401
407
|
slots={slots}
|
|
402
408
|
content={content}
|
|
403
409
|
theme={theme}
|
|
@@ -178,6 +178,8 @@ export function AnySpendCustom(props: {
|
|
|
178
178
|
dstToken: components["schemas"]["Token"];
|
|
179
179
|
dstAmount: string;
|
|
180
180
|
forceFiatPayment?: boolean;
|
|
181
|
+
/** Whether to show the "Pay with fiat" tab. Defaults to true. When false, the fiat tab is hidden and activeTab is forced to "crypto". */
|
|
182
|
+
showFiatOption?: boolean;
|
|
181
183
|
contractAddress: string;
|
|
182
184
|
encodedData: string;
|
|
183
185
|
metadata: any;
|
|
@@ -232,6 +234,7 @@ function AnySpendCustomInner({
|
|
|
232
234
|
onShowPointsDetail,
|
|
233
235
|
srcFiatAmount: srcFiatAmountProps,
|
|
234
236
|
forceFiatPayment,
|
|
237
|
+
showFiatOption = true,
|
|
235
238
|
senderAddress,
|
|
236
239
|
}: {
|
|
237
240
|
loadOrder?: string;
|
|
@@ -258,6 +261,7 @@ function AnySpendCustomInner({
|
|
|
258
261
|
onShowPointsDetail?: () => void;
|
|
259
262
|
srcFiatAmount?: string;
|
|
260
263
|
forceFiatPayment?: boolean;
|
|
264
|
+
showFiatOption?: boolean;
|
|
261
265
|
senderAddress?: string;
|
|
262
266
|
slots?: AnySpendSlots;
|
|
263
267
|
content?: AnySpendContent;
|
|
@@ -271,7 +275,13 @@ function AnySpendCustomInner({
|
|
|
271
275
|
const [activePanel, setActivePanel] = useState<PanelView>(
|
|
272
276
|
loadOrder ? PanelView.ORDER_DETAILS : PanelView.CONFIRM_ORDER,
|
|
273
277
|
);
|
|
274
|
-
const [activeTab, setActiveTab] = useState<"crypto" | "fiat">(
|
|
278
|
+
const [activeTab, setActiveTab] = useState<"crypto" | "fiat">(
|
|
279
|
+
!showFiatOption ? "crypto" : forceFiatPayment ? "fiat" : activeTabProps,
|
|
280
|
+
);
|
|
281
|
+
|
|
282
|
+
useEffect(() => {
|
|
283
|
+
if (!showFiatOption && activeTab === "fiat") setActiveTab("crypto");
|
|
284
|
+
}, [showFiatOption, activeTab]);
|
|
275
285
|
|
|
276
286
|
// Payment method state with dual-state system (auto + explicit user selection)
|
|
277
287
|
// Note: AnySpendCustom doesn't use auto-selection, only explicit user selection
|
|
@@ -867,7 +877,7 @@ function AnySpendCustomInner({
|
|
|
867
877
|
onValueChange={value => setActiveTab(value as "crypto" | "fiat")}
|
|
868
878
|
className="bg-b3-react-background max-h-[60dvh] w-full overflow-y-auto p-5"
|
|
869
879
|
>
|
|
870
|
-
{!forceFiatPayment && (
|
|
880
|
+
{!forceFiatPayment && showFiatOption && (
|
|
871
881
|
<div className="w-full">
|
|
872
882
|
<div className="bg-as-surface-secondary relative mb-4 grid h-10 grid-cols-2 rounded-xl">
|
|
873
883
|
<div
|
|
@@ -96,6 +96,8 @@ export interface AnySpendCustomExactInProps {
|
|
|
96
96
|
content?: AnySpendContent;
|
|
97
97
|
/** Structured color/theme configuration */
|
|
98
98
|
theme?: AnySpendTheme;
|
|
99
|
+
/** Whether to show fiat payment option. Defaults to true. When false, paymentType is forced to "crypto". */
|
|
100
|
+
showFiatOption?: boolean;
|
|
99
101
|
}
|
|
100
102
|
|
|
101
103
|
export function AnySpendCustomExactIn(props: AnySpendCustomExactInProps) {
|
|
@@ -137,8 +139,10 @@ function AnySpendCustomExactInInner({
|
|
|
137
139
|
allowDirectTransfer = false,
|
|
138
140
|
callbackMetadata,
|
|
139
141
|
senderAddress,
|
|
142
|
+
showFiatOption = true,
|
|
140
143
|
}: AnySpendCustomExactInProps) {
|
|
141
144
|
const { slots, content } = useAnySpendCustomization();
|
|
145
|
+
const effectivePaymentType = showFiatOption ? paymentType : "crypto";
|
|
142
146
|
const actionLabel = customExactInConfig?.action ?? "Custom Execution";
|
|
143
147
|
const setB3ModalOpen = useModalStore(state => state.setB3ModalOpen);
|
|
144
148
|
|
|
@@ -191,7 +195,7 @@ function AnySpendCustomExactInInner({
|
|
|
191
195
|
createOnrampOrder,
|
|
192
196
|
isCreatingOnrampOrder,
|
|
193
197
|
} = useAnyspendFlow({
|
|
194
|
-
paymentType,
|
|
198
|
+
paymentType: effectivePaymentType,
|
|
195
199
|
recipientAddress,
|
|
196
200
|
loadOrder,
|
|
197
201
|
onTransactionSuccess: onSuccess,
|
|
@@ -213,11 +217,17 @@ function AnySpendCustomExactInInner({
|
|
|
213
217
|
// Check if source and destination are the same token on the same chain
|
|
214
218
|
const isSameChainSameToken = useMemo(() => {
|
|
215
219
|
return (
|
|
216
|
-
|
|
220
|
+
effectivePaymentType === "crypto" &&
|
|
217
221
|
selectedSrcChainId === selectedDstChainId &&
|
|
218
222
|
selectedSrcToken?.address?.toLowerCase() === selectedDstToken?.address?.toLowerCase()
|
|
219
223
|
);
|
|
220
|
-
}, [
|
|
224
|
+
}, [
|
|
225
|
+
effectivePaymentType,
|
|
226
|
+
selectedSrcChainId,
|
|
227
|
+
selectedDstChainId,
|
|
228
|
+
selectedSrcToken?.address,
|
|
229
|
+
selectedDstToken?.address,
|
|
230
|
+
]);
|
|
221
231
|
|
|
222
232
|
// Check if this is a direct transfer
|
|
223
233
|
const isDirectTransfer = isSameChainSameToken && allowDirectTransfer;
|
|
@@ -322,7 +332,7 @@ function AnySpendCustomExactInInner({
|
|
|
322
332
|
}
|
|
323
333
|
}
|
|
324
334
|
|
|
325
|
-
if (
|
|
335
|
+
if (effectivePaymentType === "crypto") {
|
|
326
336
|
if (effectiveCryptoPaymentMethod === CryptoPaymentMethodType.NONE) {
|
|
327
337
|
return { text: "Choose payment method", disable: false, error: false, loading: false };
|
|
328
338
|
}
|
|
@@ -342,7 +352,7 @@ function AnySpendCustomExactInInner({
|
|
|
342
352
|
return { text: buttonText, disable: false, error: false, loading: false };
|
|
343
353
|
}
|
|
344
354
|
|
|
345
|
-
if (
|
|
355
|
+
if (effectivePaymentType === "fiat") {
|
|
346
356
|
if (selectedFiatPaymentMethod === FiatPaymentMethod.NONE) {
|
|
347
357
|
return { text: "Select payment method", disable: false, error: false, loading: false };
|
|
348
358
|
}
|
|
@@ -358,7 +368,7 @@ function AnySpendCustomExactInInner({
|
|
|
358
368
|
isSwitchingOrExecuting,
|
|
359
369
|
selectedRecipientOrDefault,
|
|
360
370
|
anyspendQuote,
|
|
361
|
-
|
|
371
|
+
effectivePaymentType,
|
|
362
372
|
effectiveCryptoPaymentMethod,
|
|
363
373
|
selectedFiatPaymentMethod,
|
|
364
374
|
hasEnoughBalance,
|
|
@@ -386,13 +396,13 @@ function AnySpendCustomExactInInner({
|
|
|
386
396
|
return;
|
|
387
397
|
}
|
|
388
398
|
|
|
389
|
-
if (
|
|
399
|
+
if (effectivePaymentType === "crypto") {
|
|
390
400
|
if (effectiveCryptoPaymentMethod === CryptoPaymentMethodType.NONE) {
|
|
391
401
|
setActivePanel(PanelView.CRYPTO_PAYMENT_METHOD);
|
|
392
402
|
return;
|
|
393
403
|
}
|
|
394
404
|
await handleCryptoOrder();
|
|
395
|
-
} else if (
|
|
405
|
+
} else if (effectivePaymentType === "fiat") {
|
|
396
406
|
if (selectedFiatPaymentMethod === FiatPaymentMethod.NONE) {
|
|
397
407
|
setActivePanel(PanelView.FIAT_PAYMENT_METHOD);
|
|
398
408
|
return;
|
|
@@ -423,7 +433,7 @@ function AnySpendCustomExactInInner({
|
|
|
423
433
|
|
|
424
434
|
<div className="relative flex w-full max-w-[calc(100vw-32px)] flex-col gap-2">
|
|
425
435
|
<div className="relative flex w-full max-w-[calc(100vw-32px)] flex-col gap-2">
|
|
426
|
-
{
|
|
436
|
+
{effectivePaymentType === "crypto" ? (
|
|
427
437
|
<CryptoPaySection
|
|
428
438
|
selectedSrcChainId={selectedSrcChainId}
|
|
429
439
|
setSelectedSrcChainId={setSelectedSrcChainId}
|
|
@@ -469,7 +479,10 @@ function AnySpendCustomExactInInner({
|
|
|
469
479
|
)}
|
|
470
480
|
|
|
471
481
|
<div
|
|
472
|
-
className={cn(
|
|
482
|
+
className={cn(
|
|
483
|
+
"relative -my-1 flex h-0 items-center justify-center",
|
|
484
|
+
effectivePaymentType === "fiat" && "hidden",
|
|
485
|
+
)}
|
|
473
486
|
>
|
|
474
487
|
<Button
|
|
475
488
|
variant="ghost"
|
|
@@ -484,7 +497,7 @@ function AnySpendCustomExactInInner({
|
|
|
484
497
|
</Button>
|
|
485
498
|
</div>
|
|
486
499
|
|
|
487
|
-
{
|
|
500
|
+
{effectivePaymentType === "crypto" && (
|
|
488
501
|
<CryptoReceiveSection
|
|
489
502
|
isDepositMode={false}
|
|
490
503
|
isBuyMode={false}
|
|
@@ -551,7 +564,7 @@ function AnySpendCustomExactInInner({
|
|
|
551
564
|
</motion.div>
|
|
552
565
|
|
|
553
566
|
{/* Gas indicator - show when source chain has gas data, hide for direct transfers */}
|
|
554
|
-
{gasPriceData && !isLoadingGas &&
|
|
567
|
+
{gasPriceData && !isLoadingGas && effectivePaymentType === "crypto" && !isDirectTransfer && (
|
|
555
568
|
<GasIndicator gasPrice={gasPriceData} className={classes?.gasIndicator || "mt-2 w-full"} />
|
|
556
569
|
)}
|
|
557
570
|
|
|
@@ -735,7 +748,9 @@ function AnySpendCustomExactInInner({
|
|
|
735
748
|
relayTxs={oat.data.relayTxs}
|
|
736
749
|
executeTx={oat.data.executeTx}
|
|
737
750
|
refundTxs={oat.data.refundTxs}
|
|
738
|
-
cryptoPaymentMethod={
|
|
751
|
+
cryptoPaymentMethod={
|
|
752
|
+
effectivePaymentType === "fiat" ? CryptoPaymentMethodType.NONE : effectiveCryptoPaymentMethod
|
|
753
|
+
}
|
|
739
754
|
selectedCryptoPaymentMethod={effectiveCryptoPaymentMethod}
|
|
740
755
|
onPaymentMethodChange={setSelectedCryptoPaymentMethod}
|
|
741
756
|
onBack={() => {
|
|
@@ -806,7 +821,7 @@ function AnySpendCustomExactInInner({
|
|
|
806
821
|
<FeeDetailPanel
|
|
807
822
|
fee={anyspendQuote.data.fee}
|
|
808
823
|
transactionAmountUsd={
|
|
809
|
-
|
|
824
|
+
effectivePaymentType === "fiat"
|
|
810
825
|
? parseFloat(srcAmount)
|
|
811
826
|
: anyspendQuote.data.currencyIn?.amountUsd
|
|
812
827
|
? Number(anyspendQuote.data.currencyIn.amountUsd)
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
NetworkPolygonPos,
|
|
12
12
|
} from "@web3icons/react";
|
|
13
13
|
import { ChevronRight } from "lucide-react";
|
|
14
|
-
import { useMemo, useState } from "react";
|
|
14
|
+
import { useEffect, useMemo, useState } from "react";
|
|
15
15
|
import { AnySpend } from "./AnySpend";
|
|
16
16
|
import { AnySpendCustomExactIn } from "./AnySpendCustomExactIn";
|
|
17
17
|
import { ChainWarningText } from "./common/WarningText";
|
|
@@ -95,6 +95,8 @@ export interface AnySpendDepositProps {
|
|
|
95
95
|
depositContractConfig?: DepositContractConfig;
|
|
96
96
|
/** Whether to show chain selection step. Defaults to true if sourceTokenChainId is not provided */
|
|
97
97
|
showChainSelection?: boolean;
|
|
98
|
+
/** Whether to show the "Fund with Fiat" option in the deposit options list. Defaults to true */
|
|
99
|
+
showFiatOption?: boolean;
|
|
98
100
|
/** Custom list of supported chains. If not provided, uses default chains */
|
|
99
101
|
supportedChains?: ChainConfig[];
|
|
100
102
|
/** Minimum pool size for filtering tokens (default: 1,000,000) */
|
|
@@ -248,6 +250,7 @@ export function AnySpendDeposit({
|
|
|
248
250
|
orderType,
|
|
249
251
|
depositContractConfig,
|
|
250
252
|
showChainSelection,
|
|
253
|
+
showFiatOption = true,
|
|
251
254
|
supportedChains = DEFAULT_SUPPORTED_CHAINS,
|
|
252
255
|
minPoolSize = DEFAULT_MIN_POOL_SIZE,
|
|
253
256
|
topChainsCount = 3,
|
|
@@ -270,12 +273,20 @@ export function AnySpendDeposit({
|
|
|
270
273
|
const { connectedEOAWallet } = useAccountWallet();
|
|
271
274
|
const eoaAddress = connectedEOAWallet?.getAccount()?.address;
|
|
272
275
|
|
|
276
|
+
const effectiveInitialPaymentType = !showFiatOption && initialPaymentType === "fiat" ? "crypto" : initialPaymentType;
|
|
277
|
+
|
|
273
278
|
// Determine if we should show chain selection
|
|
274
|
-
const shouldShowChainSelection = showChainSelection ?? (!initialSourceChainId && !
|
|
279
|
+
const shouldShowChainSelection = showChainSelection ?? (!initialSourceChainId && !effectiveInitialPaymentType);
|
|
275
280
|
|
|
276
281
|
const [step, setStep] = useState<DepositStep>(shouldShowChainSelection ? "select-chain" : "deposit");
|
|
277
282
|
const [selectedChainId, setSelectedChainId] = useState<number | undefined>(initialSourceChainId);
|
|
278
|
-
const [paymentType, setPaymentType] = useState<"crypto" | "fiat">(
|
|
283
|
+
const [paymentType, setPaymentType] = useState<"crypto" | "fiat">(effectiveInitialPaymentType ?? "crypto");
|
|
284
|
+
|
|
285
|
+
useEffect(() => {
|
|
286
|
+
if (!showFiatOption && paymentType === "fiat") {
|
|
287
|
+
setPaymentType("crypto");
|
|
288
|
+
}
|
|
289
|
+
}, [showFiatOption, paymentType]);
|
|
279
290
|
|
|
280
291
|
// Fetch destination token data
|
|
281
292
|
const { data: destinationTokenData } = useTokenData(destinationTokenChainId, destinationTokenAddress);
|
|
@@ -585,39 +596,43 @@ export function AnySpendDeposit({
|
|
|
585
596
|
</button>
|
|
586
597
|
|
|
587
598
|
{/* Fund with Fiat */}
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
<div
|
|
596
|
-
className={depositClasses?.optionContent || "anyspend-deposit-option-content flex items-center gap-3"}
|
|
599
|
+
{showFiatOption && (
|
|
600
|
+
<button
|
|
601
|
+
onClick={handleSelectFiat}
|
|
602
|
+
className={
|
|
603
|
+
depositClasses?.fiatButton ||
|
|
604
|
+
"anyspend-deposit-option-button anyspend-deposit-fiat-button border-border-primary hover:border-as-brand hover:bg-as-surface-secondary flex w-full items-center justify-between rounded-xl border p-4 text-left transition-all"
|
|
605
|
+
}
|
|
597
606
|
>
|
|
598
|
-
<
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
607
|
+
<div
|
|
608
|
+
className={depositClasses?.optionContent || "anyspend-deposit-option-content flex items-center gap-3"}
|
|
609
|
+
>
|
|
610
|
+
<CreditCardIcon className={depositClasses?.optionIcon || "anyspend-deposit-option-icon h-10 w-10"} />
|
|
611
|
+
<div className={depositClasses?.optionInfo || "anyspend-deposit-option-info"}>
|
|
612
|
+
<span
|
|
613
|
+
className={
|
|
614
|
+
depositClasses?.optionTitle || "anyspend-deposit-option-title text-as-primary font-medium"
|
|
615
|
+
}
|
|
616
|
+
>
|
|
617
|
+
Fund with Fiat
|
|
618
|
+
</span>
|
|
619
|
+
<p
|
|
620
|
+
className={
|
|
621
|
+
depositClasses?.optionDescription ||
|
|
622
|
+
"anyspend-deposit-option-description text-as-secondary text-xs"
|
|
623
|
+
}
|
|
624
|
+
>
|
|
625
|
+
Pay with card or bank transfer
|
|
626
|
+
</p>
|
|
627
|
+
</div>
|
|
615
628
|
</div>
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
629
|
+
<ChevronRight
|
|
630
|
+
className={
|
|
631
|
+
depositClasses?.optionChevron || "anyspend-deposit-option-chevron text-as-secondary h-5 w-5"
|
|
632
|
+
}
|
|
633
|
+
/>
|
|
634
|
+
</button>
|
|
635
|
+
)}
|
|
621
636
|
</div>
|
|
622
637
|
|
|
623
638
|
{/* Chain-specific warning */}
|
|
@@ -716,6 +731,7 @@ export function AnySpendDeposit({
|
|
|
716
731
|
destinationTokenAmount={destinationTokenAmount}
|
|
717
732
|
callbackMetadata={callbackMetadata}
|
|
718
733
|
senderAddress={senderAddress}
|
|
734
|
+
showFiatOption={showFiatOption}
|
|
719
735
|
slots={slots}
|
|
720
736
|
content={content}
|
|
721
737
|
theme={theme}
|
|
@@ -744,6 +760,7 @@ export function AnySpendDeposit({
|
|
|
744
760
|
destinationTokenAmount={destinationTokenAmount}
|
|
745
761
|
callbackMetadata={callbackMetadata}
|
|
746
762
|
senderAddress={senderAddress}
|
|
763
|
+
showFiatOption={showFiatOption}
|
|
747
764
|
slots={slots}
|
|
748
765
|
content={content}
|
|
749
766
|
theme={theme}
|
|
@@ -35,6 +35,7 @@ export function AnySpendDepositUpside({
|
|
|
35
35
|
token,
|
|
36
36
|
onSuccess,
|
|
37
37
|
senderAddress,
|
|
38
|
+
showFiatOption,
|
|
38
39
|
slots,
|
|
39
40
|
content,
|
|
40
41
|
theme,
|
|
@@ -49,6 +50,7 @@ export function AnySpendDepositUpside({
|
|
|
49
50
|
onSuccess?: (amount: string) => void;
|
|
50
51
|
/** Optional sender (payer) address — pre-fills token balances when the user address is known ahead of time */
|
|
51
52
|
senderAddress?: string;
|
|
53
|
+
showFiatOption?: boolean;
|
|
52
54
|
slots?: AnySpendSlots;
|
|
53
55
|
content?: AnySpendContent;
|
|
54
56
|
theme?: AnySpendTheme;
|
|
@@ -87,6 +89,7 @@ export function AnySpendDepositUpside({
|
|
|
87
89
|
header={header}
|
|
88
90
|
onSuccess={onSuccess}
|
|
89
91
|
senderAddress={senderAddress}
|
|
92
|
+
showFiatOption={showFiatOption}
|
|
90
93
|
slots={slots}
|
|
91
94
|
content={content}
|
|
92
95
|
theme={theme}
|
|
@@ -8,7 +8,7 @@ import { formatDisplayNumber, formatTokenAmount } from "@b3dotfun/sdk/shared/uti
|
|
|
8
8
|
import { MoreVertical } from "lucide-react";
|
|
9
9
|
import { AnimatePresence } from "motion/react";
|
|
10
10
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
11
|
-
import {
|
|
11
|
+
import { b3Viem } from "@b3dotfun/sdk/shared/constants/chains/b3Viem";
|
|
12
12
|
import { GetQuoteResponse } from "../../types/api_req_res";
|
|
13
13
|
import { AnySpendCustom } from "./AnySpendCustom";
|
|
14
14
|
import type { AnySpendContent, AnySpendSlots, AnySpendTheme } from "./types/customization";
|
|
@@ -42,6 +42,7 @@ export function AnySpendNFT({
|
|
|
42
42
|
slots,
|
|
43
43
|
content,
|
|
44
44
|
theme,
|
|
45
|
+
showFiatOption = true,
|
|
45
46
|
}: {
|
|
46
47
|
loadOrder?: string;
|
|
47
48
|
mode?: "modal" | "page";
|
|
@@ -54,6 +55,8 @@ export function AnySpendNFT({
|
|
|
54
55
|
slots?: AnySpendSlots;
|
|
55
56
|
content?: AnySpendContent;
|
|
56
57
|
theme?: AnySpendTheme;
|
|
58
|
+
/** Whether to show the "Pay with fiat" tab. Defaults to true. */
|
|
59
|
+
showFiatOption?: boolean;
|
|
57
60
|
}) {
|
|
58
61
|
const [imageUrlWithFallback, setFallbackImageUrl] = useState<string | null>(nftContract.imageUrl);
|
|
59
62
|
const hasFetchedRef = useRef(false);
|
|
@@ -164,6 +167,7 @@ export function AnySpendNFT({
|
|
|
164
167
|
loadOrder={loadOrder}
|
|
165
168
|
mode={mode}
|
|
166
169
|
activeTab="fiat"
|
|
170
|
+
showFiatOption={showFiatOption}
|
|
167
171
|
recipientAddress={recipientAddress}
|
|
168
172
|
orderType={"mint_nft"}
|
|
169
173
|
dstChainId={nftContract.chainId}
|
|
@@ -215,7 +219,7 @@ function DropdownMenu({ nftContract }: { nftContract: components["schemas"]["Nft
|
|
|
215
219
|
</div>
|
|
216
220
|
|
|
217
221
|
<div className="hover:bg-as-on-surface-3 flex cursor-default items-center gap-2 rounded px-2">
|
|
218
|
-
<img src={chain?.logoUrl} className={cn("h-5 w-5", nftContract.chainId !==
|
|
222
|
+
<img src={chain?.logoUrl} className={cn("h-5 w-5", nftContract.chainId !== b3Viem.id && "rounded-full")} />
|
|
219
223
|
<span className="text-sm">
|
|
220
224
|
Minted on <span className="font-semibold">{chain ? getChainName(nftContract.chainId) : "Unknown"}</span>
|
|
221
225
|
</span>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ABI_ERC20_STAKING, B3_TOKEN, eqci } from "@b3dotfun/sdk/anyspend";
|
|
1
|
+
import { ABI_ERC20_STAKING, B3_TOKEN, eqci, getExplorerTxUrl } from "@b3dotfun/sdk/anyspend";
|
|
2
2
|
import {
|
|
3
3
|
Button,
|
|
4
4
|
GlareCardRounded,
|
|
@@ -54,6 +54,7 @@ export function AnySpendStakeB3({
|
|
|
54
54
|
slots,
|
|
55
55
|
content,
|
|
56
56
|
theme,
|
|
57
|
+
showFiatOption,
|
|
57
58
|
}: {
|
|
58
59
|
loadOrder?: string;
|
|
59
60
|
mode?: "modal" | "page";
|
|
@@ -65,6 +66,7 @@ export function AnySpendStakeB3({
|
|
|
65
66
|
slots?: AnySpendSlots;
|
|
66
67
|
content?: AnySpendContent;
|
|
67
68
|
theme?: AnySpendTheme;
|
|
69
|
+
showFiatOption?: boolean;
|
|
68
70
|
}) {
|
|
69
71
|
const hasMounted = useHasMounted();
|
|
70
72
|
const { setB3ModalOpen } = useModalStore();
|
|
@@ -474,7 +476,7 @@ export function AnySpendStakeB3({
|
|
|
474
476
|
>
|
|
475
477
|
<div className="mb-6">
|
|
476
478
|
<a
|
|
477
|
-
href={
|
|
479
|
+
href={getExplorerTxUrl(base.id, stakingTxHash)}
|
|
478
480
|
target="_blank"
|
|
479
481
|
rel="noopener noreferrer"
|
|
480
482
|
className="text-as-primary/70 hover:text-as-primary block break-all text-center font-mono text-sm underline transition-colors"
|
|
@@ -521,6 +523,7 @@ export function AnySpendStakeB3({
|
|
|
521
523
|
slots={slots}
|
|
522
524
|
content={content}
|
|
523
525
|
theme={theme}
|
|
526
|
+
showFiatOption={showFiatOption}
|
|
524
527
|
/>
|
|
525
528
|
);
|
|
526
529
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ABI_ERC20_STAKING, B3_TOKEN, eqci } from "@b3dotfun/sdk/anyspend";
|
|
1
|
+
import { ABI_ERC20_STAKING, B3_TOKEN, eqci, getExplorerTxUrl } from "@b3dotfun/sdk/anyspend";
|
|
2
2
|
import { normalizeAddress } from "@b3dotfun/sdk/anyspend/utils";
|
|
3
3
|
import {
|
|
4
4
|
Button,
|
|
@@ -56,6 +56,7 @@ export function AnySpendStakeB3ExactIn({
|
|
|
56
56
|
stakeAmount,
|
|
57
57
|
onSuccess,
|
|
58
58
|
senderAddress,
|
|
59
|
+
showFiatOption,
|
|
59
60
|
slots,
|
|
60
61
|
content,
|
|
61
62
|
theme,
|
|
@@ -69,6 +70,7 @@ export function AnySpendStakeB3ExactIn({
|
|
|
69
70
|
onSuccess?: (amount: string) => void;
|
|
70
71
|
/** Optional sender (payer) address — pre-fills token balances when the user address is known ahead of time */
|
|
71
72
|
senderAddress?: string;
|
|
73
|
+
showFiatOption?: boolean;
|
|
72
74
|
slots?: AnySpendSlots;
|
|
73
75
|
content?: AnySpendContent;
|
|
74
76
|
theme?: AnySpendTheme;
|
|
@@ -492,7 +494,7 @@ export function AnySpendStakeB3ExactIn({
|
|
|
492
494
|
>
|
|
493
495
|
<div className="mb-6">
|
|
494
496
|
<a
|
|
495
|
-
href={
|
|
497
|
+
href={getExplorerTxUrl(base.id, stakingTxHash)}
|
|
496
498
|
target="_blank"
|
|
497
499
|
rel="noopener noreferrer"
|
|
498
500
|
className="text-as-primary/70 hover:text-as-primary block break-all text-center font-mono text-sm underline transition-colors"
|
|
@@ -529,6 +531,7 @@ export function AnySpendStakeB3ExactIn({
|
|
|
529
531
|
header={header}
|
|
530
532
|
onSuccess={onSuccess}
|
|
531
533
|
senderAddress={senderAddress}
|
|
534
|
+
showFiatOption={showFiatOption}
|
|
532
535
|
slots={slots}
|
|
533
536
|
content={content}
|
|
534
537
|
theme={theme}
|
|
@@ -30,6 +30,7 @@ export function AnySpendStakeUpside({
|
|
|
30
30
|
slots,
|
|
31
31
|
content,
|
|
32
32
|
theme,
|
|
33
|
+
showFiatOption = true,
|
|
33
34
|
}: {
|
|
34
35
|
loadOrder?: string;
|
|
35
36
|
mode?: "modal" | "page";
|
|
@@ -44,6 +45,8 @@ export function AnySpendStakeUpside({
|
|
|
44
45
|
slots?: AnySpendSlots;
|
|
45
46
|
content?: AnySpendContent;
|
|
46
47
|
theme?: AnySpendTheme;
|
|
48
|
+
/** Whether to show the "Pay with fiat" tab. Defaults to true. */
|
|
49
|
+
showFiatOption?: boolean;
|
|
47
50
|
}) {
|
|
48
51
|
const header = () => (
|
|
49
52
|
<>
|
|
@@ -90,6 +93,7 @@ export function AnySpendStakeUpside({
|
|
|
90
93
|
onSuccess={onSuccess}
|
|
91
94
|
showRecipient={true}
|
|
92
95
|
activeTab={activeTab}
|
|
96
|
+
showFiatOption={showFiatOption}
|
|
93
97
|
senderAddress={senderAddress}
|
|
94
98
|
slots={slots}
|
|
95
99
|
content={content}
|
|
@@ -28,6 +28,7 @@ export function AnySpendStakeUpsideExactIn({
|
|
|
28
28
|
token,
|
|
29
29
|
onSuccess,
|
|
30
30
|
senderAddress,
|
|
31
|
+
showFiatOption,
|
|
31
32
|
slots,
|
|
32
33
|
content,
|
|
33
34
|
theme,
|
|
@@ -43,6 +44,7 @@ export function AnySpendStakeUpsideExactIn({
|
|
|
43
44
|
onSuccess?: (amount: string) => void;
|
|
44
45
|
/** Optional sender (payer) address — pre-fills token balances when the user address is known ahead of time */
|
|
45
46
|
senderAddress?: string;
|
|
47
|
+
showFiatOption?: boolean;
|
|
46
48
|
slots?: AnySpendSlots;
|
|
47
49
|
content?: AnySpendContent;
|
|
48
50
|
theme?: AnySpendTheme;
|
|
@@ -82,6 +84,7 @@ export function AnySpendStakeUpsideExactIn({
|
|
|
82
84
|
header={header}
|
|
83
85
|
onSuccess={onSuccess}
|
|
84
86
|
senderAddress={senderAddress}
|
|
87
|
+
showFiatOption={showFiatOption}
|
|
85
88
|
slots={slots}
|
|
86
89
|
content={content}
|
|
87
90
|
theme={theme}
|