@b3dotfun/sdk 0.0.88-alpha.0 → 0.0.88-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/anyspend/constants/index.d.ts +2 -0
- package/dist/cjs/anyspend/constants/index.js +3 -1
- package/dist/cjs/anyspend/index.d.ts +2 -0
- package/dist/cjs/anyspend/index.js +3 -0
- package/dist/cjs/anyspend/react/components/AnySpend.d.ts +6 -0
- package/dist/cjs/anyspend/react/components/AnySpend.js +9 -6
- 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 +1 -0
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +3 -3
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.d.ts +6 -0
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +24 -20
- package/dist/cjs/anyspend/react/components/AnySpendDeposit.d.ts +7 -1
- package/dist/cjs/anyspend/react/components/AnySpendDeposit.js +3 -3
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +4 -0
- package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.js +14 -1
- package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.js +3 -2
- package/dist/cjs/anyspend/react/components/common/GasIndicator.d.ts +6 -0
- package/dist/cjs/anyspend/react/components/common/GasIndicator.js +34 -0
- package/dist/cjs/anyspend/react/components/common/OrderDetails.d.ts +4 -0
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +34 -6
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +3 -2
- package/dist/cjs/anyspend/react/components/common/PaymentStripeWeb2.js +3 -4
- package/dist/cjs/anyspend/react/hooks/index.d.ts +1 -0
- package/dist/cjs/anyspend/react/hooks/index.js +1 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +1 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.js +1 -1
- package/dist/cjs/anyspend/react/hooks/useCreateDepositFirstOrder.js +1 -1
- package/dist/cjs/anyspend/react/hooks/useGasPrice.d.ts +37 -0
- package/dist/cjs/anyspend/react/hooks/useGasPrice.js +43 -0
- package/dist/cjs/anyspend/react/hooks/useValidatedClientReferenceId.js +1 -1
- package/dist/cjs/anyspend/services/gas.d.ts +21 -0
- package/dist/cjs/anyspend/services/gas.js +65 -0
- package/dist/cjs/anyspend/types/gas.d.ts +61 -0
- package/dist/cjs/anyspend/types/gas.js +2 -0
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +2 -3
- package/dist/cjs/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +5 -0
- package/dist/cjs/global-account/react/components/B3Provider/AuthenticationProvider.js +12 -0
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +2 -18
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +35 -52
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.d.ts +5 -5
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +38 -35
- package/dist/cjs/global-account/react/components/B3Provider/RelayKitProviderWrapper.js +3 -1
- package/dist/cjs/global-account/react/components/B3Provider/useB3.d.ts +14 -4
- package/dist/cjs/global-account/react/components/B3Provider/useB3.js +4 -11
- package/dist/cjs/global-account/react/components/B3Provider/useB3Account.js +5 -2
- package/dist/cjs/global-account/react/components/B3Provider/useB3Config.d.ts +10 -2
- package/dist/cjs/global-account/react/components/B3Provider/useB3Config.js +18 -17
- package/dist/cjs/global-account/react/components/ManageAccount/ProfileSection.js +1 -2
- package/dist/cjs/global-account/react/components/ManageAccount/channels/DiscordChannel.js +6 -6
- package/dist/cjs/global-account/react/components/ManageAccount/channels/EmailChannel.js +7 -7
- package/dist/cjs/global-account/react/components/ManageAccount/channels/PhoneChannel.js +7 -7
- package/dist/cjs/global-account/react/components/ManageAccount/channels/TelegramChannel.js +5 -5
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.js +8 -9
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +76 -20
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +1 -1
- package/dist/cjs/global-account/react/components/StyleRoot.js +3 -3
- package/dist/cjs/global-account/react/components/TurnkeyAuthModal.js +3 -1
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.js +1 -2
- package/dist/cjs/global-account/react/components/index.d.ts +1 -2
- package/dist/cjs/global-account/react/components/index.js +3 -6
- package/dist/cjs/global-account/react/hooks/index.d.ts +2 -0
- package/dist/cjs/global-account/react/hooks/index.js +5 -1
- package/dist/cjs/global-account/react/hooks/useAuth.d.ts +76 -0
- package/dist/cjs/global-account/react/hooks/useAuth.js +337 -0
- package/dist/cjs/global-account/react/hooks/useClient.js +1 -1
- package/dist/cjs/global-account/react/hooks/useHandleConnectWithPrivy.js +1 -1
- package/dist/cjs/global-account/react/hooks/useNotifications.js +14 -14
- package/dist/cjs/global-account/react/hooks/useTWAuth.d.ts +3 -0
- package/dist/cjs/global-account/react/hooks/useTWAuth.js +8 -0
- package/dist/cjs/global-account/react/hooks/useTokenBalance.js +5 -5
- package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.js +4 -2
- package/dist/cjs/global-account/react/hooks/useTurnkeyAuth.js +50 -22
- package/dist/cjs/global-account/react/hooks/useUser.d.ts +60 -0
- package/dist/cjs/global-account/react/hooks/useUser.js +20 -0
- package/dist/cjs/global-account/react/hooks/useUserQuery.js +9 -35
- package/dist/cjs/global-account/react/index.native.d.ts +0 -2
- package/dist/cjs/global-account/react/index.native.js +1 -5
- package/dist/cjs/global-account/react/stores/configStore.d.ts +24 -0
- package/dist/cjs/global-account/react/stores/configStore.js +30 -0
- package/dist/cjs/global-account/react/stores/index.d.ts +1 -0
- package/dist/cjs/global-account/react/stores/index.js +3 -1
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +10 -0
- package/dist/cjs/global-account/react/stores/userStore.d.ts +22 -0
- package/dist/cjs/global-account/react/stores/userStore.js +30 -0
- package/dist/esm/anyspend/constants/index.d.ts +2 -0
- package/dist/esm/anyspend/constants/index.js +2 -0
- package/dist/esm/anyspend/index.d.ts +2 -0
- package/dist/esm/anyspend/index.js +3 -0
- package/dist/esm/anyspend/react/components/AnySpend.d.ts +6 -0
- package/dist/esm/anyspend/react/components/AnySpend.js +11 -8
- 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 +1 -0
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +3 -3
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +6 -0
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +8 -4
- package/dist/esm/anyspend/react/components/AnySpendDeposit.d.ts +7 -1
- package/dist/esm/anyspend/react/components/AnySpendDeposit.js +3 -3
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +4 -0
- package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.js +14 -1
- package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.d.ts +3 -1
- package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.js +3 -2
- package/dist/esm/anyspend/react/components/common/GasIndicator.d.ts +6 -0
- package/dist/esm/anyspend/react/components/common/GasIndicator.js +31 -0
- package/dist/esm/anyspend/react/components/common/OrderDetails.d.ts +4 -0
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +36 -8
- package/dist/esm/anyspend/react/components/common/PanelOnramp.d.ts +3 -1
- package/dist/esm/anyspend/react/components/common/PanelOnramp.js +3 -2
- package/dist/esm/anyspend/react/components/common/PaymentStripeWeb2.js +3 -4
- package/dist/esm/anyspend/react/hooks/index.d.ts +1 -0
- package/dist/esm/anyspend/react/hooks/index.js +1 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +2 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.js +2 -2
- package/dist/esm/anyspend/react/hooks/useCreateDepositFirstOrder.js +2 -2
- package/dist/esm/anyspend/react/hooks/useGasPrice.d.ts +37 -0
- package/dist/esm/anyspend/react/hooks/useGasPrice.js +40 -0
- package/dist/esm/anyspend/react/hooks/useValidatedClientReferenceId.js +2 -2
- package/dist/esm/anyspend/services/gas.d.ts +21 -0
- package/dist/esm/anyspend/services/gas.js +59 -0
- package/dist/esm/anyspend/types/gas.d.ts +61 -0
- package/dist/esm/anyspend/types/gas.js +1 -0
- package/dist/esm/global-account/react/components/B3DynamicModal.js +3 -4
- package/dist/esm/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +5 -0
- package/dist/esm/global-account/react/components/B3Provider/AuthenticationProvider.js +10 -0
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +2 -18
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +34 -53
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.d.ts +5 -5
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +36 -36
- package/dist/esm/global-account/react/components/B3Provider/RelayKitProviderWrapper.js +3 -1
- package/dist/esm/global-account/react/components/B3Provider/useB3.d.ts +14 -4
- package/dist/esm/global-account/react/components/B3Provider/useB3.js +4 -11
- package/dist/esm/global-account/react/components/B3Provider/useB3Account.js +5 -2
- package/dist/esm/global-account/react/components/B3Provider/useB3Config.d.ts +10 -2
- package/dist/esm/global-account/react/components/B3Provider/useB3Config.js +18 -17
- package/dist/esm/global-account/react/components/ManageAccount/ProfileSection.js +2 -3
- package/dist/esm/global-account/react/components/ManageAccount/channels/DiscordChannel.js +2 -2
- package/dist/esm/global-account/react/components/ManageAccount/channels/EmailChannel.js +2 -2
- package/dist/esm/global-account/react/components/ManageAccount/channels/PhoneChannel.js +2 -2
- package/dist/esm/global-account/react/components/ManageAccount/channels/TelegramChannel.js +2 -2
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissions.js +2 -3
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +76 -20
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +2 -2
- package/dist/esm/global-account/react/components/StyleRoot.js +3 -3
- package/dist/esm/global-account/react/components/TurnkeyAuthModal.js +5 -3
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.js +2 -3
- package/dist/esm/global-account/react/components/index.d.ts +1 -2
- package/dist/esm/global-account/react/components/index.js +1 -2
- package/dist/esm/global-account/react/hooks/index.d.ts +2 -0
- package/dist/esm/global-account/react/hooks/index.js +2 -0
- package/dist/esm/global-account/react/hooks/useAuth.d.ts +76 -0
- package/dist/esm/global-account/react/hooks/useAuth.js +331 -0
- package/dist/esm/global-account/react/hooks/useClient.js +2 -2
- package/dist/esm/global-account/react/hooks/useHandleConnectWithPrivy.js +2 -2
- package/dist/esm/global-account/react/hooks/useNotifications.js +2 -2
- package/dist/esm/global-account/react/hooks/useTWAuth.d.ts +3 -0
- package/dist/esm/global-account/react/hooks/useTWAuth.js +8 -0
- package/dist/esm/global-account/react/hooks/useTokenBalance.js +6 -6
- package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.js +4 -2
- package/dist/esm/global-account/react/hooks/useTurnkeyAuth.js +50 -22
- package/dist/esm/global-account/react/hooks/useUser.d.ts +60 -0
- package/dist/esm/global-account/react/hooks/useUser.js +17 -0
- package/dist/esm/global-account/react/hooks/useUserQuery.js +1 -27
- package/dist/esm/global-account/react/index.native.d.ts +0 -2
- package/dist/esm/global-account/react/index.native.js +0 -2
- package/dist/esm/global-account/react/stores/configStore.d.ts +24 -0
- package/dist/esm/global-account/react/stores/configStore.js +27 -0
- package/dist/esm/global-account/react/stores/index.d.ts +1 -0
- package/dist/esm/global-account/react/stores/index.js +1 -0
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +10 -0
- package/dist/esm/global-account/react/stores/userStore.d.ts +22 -0
- package/dist/esm/global-account/react/stores/userStore.js +27 -0
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/constants/index.d.ts +2 -0
- package/dist/types/anyspend/index.d.ts +2 -0
- package/dist/types/anyspend/react/components/AnySpend.d.ts +6 -0
- package/dist/types/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
- package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +1 -0
- package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +6 -0
- package/dist/types/anyspend/react/components/AnySpendDeposit.d.ts +7 -1
- package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +4 -0
- package/dist/types/anyspend/react/components/common/CryptoReceiveSection.d.ts +3 -1
- package/dist/types/anyspend/react/components/common/GasIndicator.d.ts +6 -0
- package/dist/types/anyspend/react/components/common/OrderDetails.d.ts +4 -0
- package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +3 -1
- package/dist/types/anyspend/react/hooks/index.d.ts +1 -0
- package/dist/types/anyspend/react/hooks/useGasPrice.d.ts +37 -0
- package/dist/types/anyspend/services/gas.d.ts +21 -0
- package/dist/types/anyspend/types/gas.d.ts +61 -0
- package/dist/types/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +5 -0
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +2 -18
- package/dist/types/global-account/react/components/B3Provider/B3Provider.native.d.ts +5 -5
- package/dist/types/global-account/react/components/B3Provider/useB3.d.ts +14 -4
- package/dist/types/global-account/react/components/B3Provider/useB3Config.d.ts +10 -2
- package/dist/types/global-account/react/components/index.d.ts +1 -2
- package/dist/types/global-account/react/hooks/index.d.ts +2 -0
- package/dist/types/global-account/react/hooks/useAuth.d.ts +76 -0
- package/dist/types/global-account/react/hooks/useTWAuth.d.ts +3 -0
- package/dist/types/global-account/react/hooks/useUser.d.ts +60 -0
- package/dist/types/global-account/react/index.native.d.ts +0 -2
- package/dist/types/global-account/react/stores/configStore.d.ts +24 -0
- package/dist/types/global-account/react/stores/index.d.ts +1 -0
- package/dist/types/global-account/react/stores/useModalStore.d.ts +10 -0
- package/dist/types/global-account/react/stores/userStore.d.ts +22 -0
- package/package.json +1 -1
- package/src/anyspend/constants/index.ts +3 -0
- package/src/anyspend/index.ts +4 -0
- package/src/anyspend/react/components/AnySpend.tsx +28 -2
- package/src/anyspend/react/components/AnySpendCollectorClubPurchase.tsx +6 -0
- package/src/anyspend/react/components/AnySpendCustom.tsx +52 -47
- package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +23 -0
- package/src/anyspend/react/components/AnySpendDeposit.tsx +27 -18
- package/src/anyspend/react/components/AnyspendDepositHype.tsx +4 -0
- package/src/anyspend/react/components/common/CryptoPaymentMethod.tsx +15 -1
- package/src/anyspend/react/components/common/CryptoReceiveSection.tsx +5 -1
- package/src/anyspend/react/components/common/GasIndicator.tsx +59 -0
- package/src/anyspend/react/components/common/OrderDetails.tsx +60 -42
- package/src/anyspend/react/components/common/PanelOnramp.tsx +5 -1
- package/src/anyspend/react/components/common/PaymentStripeWeb2.tsx +3 -4
- package/src/anyspend/react/hooks/index.ts +1 -0
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +2 -2
- package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +2 -2
- package/src/anyspend/react/hooks/useCreateDepositFirstOrder.ts +2 -2
- package/src/anyspend/react/hooks/useGasPrice.ts +70 -0
- package/src/anyspend/react/hooks/useValidatedClientReferenceId.ts +2 -2
- package/src/anyspend/services/gas.test.ts +31 -0
- package/src/anyspend/services/gas.ts +73 -0
- package/src/anyspend/types/gas.ts +66 -0
- package/src/global-account/react/components/B3DynamicModal.tsx +3 -4
- package/src/global-account/react/components/B3Provider/AuthenticationProvider.tsx +19 -0
- package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +43 -54
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +44 -106
- package/src/global-account/react/components/B3Provider/RelayKitProviderWrapper.tsx +4 -1
- package/src/global-account/react/components/B3Provider/useB3.ts +4 -13
- package/src/global-account/react/components/B3Provider/useB3Account.ts +6 -2
- package/src/global-account/react/components/B3Provider/useB3Config.ts +18 -31
- package/src/global-account/react/components/ManageAccount/ProfileSection.tsx +2 -4
- package/src/global-account/react/components/ManageAccount/channels/DiscordChannel.tsx +2 -2
- package/src/global-account/react/components/ManageAccount/channels/EmailChannel.tsx +2 -2
- package/src/global-account/react/components/ManageAccount/channels/PhoneChannel.tsx +2 -2
- package/src/global-account/react/components/ManageAccount/channels/TelegramChannel.tsx +2 -2
- package/src/global-account/react/components/RequestPermissions/RequestPermissions.tsx +4 -4
- package/src/global-account/react/components/SignInWithB3/SignIn.tsx +2 -2
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +168 -100
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Privy.tsx +2 -2
- package/src/global-account/react/components/SignInWithB3/steps/LoginStep.tsx +2 -2
- package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +2 -2
- package/src/global-account/react/components/StyleRoot.tsx +3 -3
- package/src/global-account/react/components/TurnkeyAuthModal.tsx +7 -4
- package/src/global-account/react/components/custom/ManageAccountButton.tsx +2 -3
- package/src/global-account/react/components/index.ts +1 -2
- package/src/global-account/react/hooks/index.ts +2 -0
- package/src/global-account/react/hooks/useAuth.ts +379 -0
- package/src/global-account/react/hooks/useClient.ts +2 -2
- package/src/global-account/react/hooks/useHandleConnectWithPrivy.tsx +2 -2
- package/src/global-account/react/hooks/useNotifications.ts +2 -2
- package/src/global-account/react/hooks/useTWAuth.tsx +10 -0
- package/src/global-account/react/hooks/useTokenBalance.tsx +8 -7
- package/src/global-account/react/hooks/useTokenBalancesByChain.tsx +4 -2
- package/src/global-account/react/hooks/useTurnkeyAuth.ts +54 -23
- package/src/global-account/react/hooks/useUser.ts +20 -0
- package/src/global-account/react/hooks/useUserQuery.ts +1 -40
- package/src/global-account/react/index.native.ts +0 -2
- package/src/global-account/react/stores/configStore.ts +51 -0
- package/src/global-account/react/stores/index.ts +1 -0
- package/src/global-account/react/stores/useModalStore.ts +10 -0
- package/src/global-account/react/stores/userStore.ts +41 -0
- package/dist/cjs/global-account/react/components/B3Provider/types.d.ts +0 -27
- package/dist/cjs/global-account/react/components/B3Provider/types.js +0 -24
- package/dist/esm/global-account/react/components/B3Provider/types.d.ts +0 -27
- package/dist/esm/global-account/react/components/B3Provider/types.js +0 -21
- package/dist/types/global-account/react/components/B3Provider/types.d.ts +0 -27
- package/src/global-account/react/components/B3Provider/types.ts +0 -50
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preferred Hook to get the user data
|
|
3
|
+
*/
|
|
4
|
+
export declare function useUser(): {
|
|
5
|
+
user: {
|
|
6
|
+
email?: string | undefined;
|
|
7
|
+
username?: string | undefined;
|
|
8
|
+
telNumber?: string | undefined;
|
|
9
|
+
ens?: string | undefined;
|
|
10
|
+
avatar?: string | undefined;
|
|
11
|
+
preferences?: {} | undefined;
|
|
12
|
+
referredBy?: string | {} | undefined;
|
|
13
|
+
sourceApp?: string | undefined;
|
|
14
|
+
referralCode?: string | undefined;
|
|
15
|
+
userGroups?: number[] | undefined;
|
|
16
|
+
isMigratedFromBSMNT?: boolean | undefined;
|
|
17
|
+
privyLinkedAccounts?: {
|
|
18
|
+
name?: string | undefined;
|
|
19
|
+
address?: string | undefined;
|
|
20
|
+
email?: string | undefined;
|
|
21
|
+
chain_type?: string | undefined;
|
|
22
|
+
lv?: number | undefined;
|
|
23
|
+
wallet_client_type?: string | undefined;
|
|
24
|
+
smart_wallet_type?: string | undefined;
|
|
25
|
+
subject?: string | undefined;
|
|
26
|
+
type: string;
|
|
27
|
+
}[] | undefined;
|
|
28
|
+
twProfiles?: {
|
|
29
|
+
type: string;
|
|
30
|
+
details: {
|
|
31
|
+
id?: string | undefined;
|
|
32
|
+
name?: string | undefined;
|
|
33
|
+
address?: string | undefined;
|
|
34
|
+
email?: string | undefined;
|
|
35
|
+
username?: string | undefined;
|
|
36
|
+
phone?: string | undefined;
|
|
37
|
+
fid?: string | undefined;
|
|
38
|
+
};
|
|
39
|
+
}[] | undefined;
|
|
40
|
+
turnkeySubOrgs?: {
|
|
41
|
+
hasDelegatedUser?: boolean | undefined;
|
|
42
|
+
subOrgId: string;
|
|
43
|
+
accounts: Record<string, any>[];
|
|
44
|
+
}[] | undefined;
|
|
45
|
+
_id: string | {};
|
|
46
|
+
userId: string;
|
|
47
|
+
smartAccountAddress: string;
|
|
48
|
+
createdAt: number;
|
|
49
|
+
updatedAt: number;
|
|
50
|
+
partnerIds: {
|
|
51
|
+
privyId?: string | undefined;
|
|
52
|
+
thirdwebId?: string | undefined;
|
|
53
|
+
turnkeyId?: string | undefined;
|
|
54
|
+
turnkeyOtpId?: string | undefined;
|
|
55
|
+
};
|
|
56
|
+
} | null;
|
|
57
|
+
isConnecting: boolean;
|
|
58
|
+
isConnected: boolean;
|
|
59
|
+
isAuthenticating: boolean;
|
|
60
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useUser = useUser;
|
|
4
|
+
const react_1 = require("../../../global-account/react");
|
|
5
|
+
const userStore_1 = require("../stores/userStore");
|
|
6
|
+
/**
|
|
7
|
+
* Preferred Hook to get the user data
|
|
8
|
+
*/
|
|
9
|
+
function useUser() {
|
|
10
|
+
const user = (0, userStore_1.useUserStore)(state => state.user);
|
|
11
|
+
const isConnecting = (0, react_1.useAuthStore)(state => state.isConnecting);
|
|
12
|
+
const isConnected = (0, react_1.useAuthStore)(state => state.isConnected);
|
|
13
|
+
const isAuthenticating = (0, react_1.useAuthStore)(state => state.isAuthenticating);
|
|
14
|
+
return {
|
|
15
|
+
user,
|
|
16
|
+
isConnecting,
|
|
17
|
+
isConnected,
|
|
18
|
+
isAuthenticating,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -1,35 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useUserQuery = useUserQuery;
|
|
4
|
-
const debug_1 = require("../../../shared/utils/debug");
|
|
5
4
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
7
|
-
const middleware_1 = require("zustand/middleware");
|
|
8
|
-
const debug = (0, debug_1.debugB3React)("useUserQuery");
|
|
5
|
+
const userStore_1 = require("../stores/userStore");
|
|
9
6
|
const USER_QUERY_KEY = ["b3-user"];
|
|
10
|
-
/**
|
|
11
|
-
* Zustand store for managing user state
|
|
12
|
-
* Persists user data to localStorage
|
|
13
|
-
*/
|
|
14
|
-
const useUserStore = (0, zustand_1.create)()((0, middleware_1.persist)(set => ({
|
|
15
|
-
user: null,
|
|
16
|
-
setUser: (newUser) => {
|
|
17
|
-
const userToSave = newUser ?? null;
|
|
18
|
-
set({ user: userToSave });
|
|
19
|
-
debug("User updated", userToSave);
|
|
20
|
-
},
|
|
21
|
-
clearUser: () => {
|
|
22
|
-
set({ user: null });
|
|
23
|
-
debug("User cleared");
|
|
24
|
-
},
|
|
25
|
-
}), {
|
|
26
|
-
name: "b3-user",
|
|
27
|
-
onRehydrateStorage: () => (_, error) => {
|
|
28
|
-
if (error) {
|
|
29
|
-
console.warn("Failed to rehydrate user store:", error);
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
}));
|
|
33
7
|
/**
|
|
34
8
|
* NOTE: THIS IS ONLY MEANT FOR INTERNAL USE, from useOnConnect
|
|
35
9
|
*
|
|
@@ -37,9 +11,9 @@ const useUserStore = (0, zustand_1.create)()((0, middleware_1.persist)(set => ({
|
|
|
37
11
|
* This allows for invalidation and refetching of user data
|
|
38
12
|
*/
|
|
39
13
|
function useUserQuery() {
|
|
40
|
-
const user = useUserStore(state => state.user);
|
|
41
|
-
const setUserStore = useUserStore(state => state.setUser);
|
|
42
|
-
const clearUserStore = useUserStore(state => state.clearUser);
|
|
14
|
+
const user = (0, userStore_1.useUserStore)(state => state.user);
|
|
15
|
+
const setUserStore = (0, userStore_1.useUserStore)(state => state.setUser);
|
|
16
|
+
const clearUserStore = (0, userStore_1.useUserStore)(state => state.clearUser);
|
|
43
17
|
// Listen for storage events from other tabs/windows
|
|
44
18
|
(0, react_1.useEffect)(() => {
|
|
45
19
|
const handleStorageChange = (e) => {
|
|
@@ -51,14 +25,14 @@ function useUserQuery() {
|
|
|
51
25
|
const parsed = JSON.parse(stored);
|
|
52
26
|
// Zustand persist format: { state: { user: ... }, version: ... }
|
|
53
27
|
const userData = parsed?.state?.user ?? parsed?.user ?? null;
|
|
54
|
-
useUserStore.setState({ user: userData });
|
|
28
|
+
userStore_1.useUserStore.setState({ user: userData });
|
|
55
29
|
}
|
|
56
30
|
catch (error) {
|
|
57
31
|
console.warn("Failed to parse user from storage event:", error);
|
|
58
32
|
}
|
|
59
33
|
}
|
|
60
34
|
else {
|
|
61
|
-
useUserStore.setState({ user: null });
|
|
35
|
+
userStore_1.useUserStore.setState({ user: null });
|
|
62
36
|
}
|
|
63
37
|
}
|
|
64
38
|
};
|
|
@@ -81,16 +55,16 @@ function useUserQuery() {
|
|
|
81
55
|
const parsed = JSON.parse(stored);
|
|
82
56
|
// Zustand persist format: { state: { user: ... }, version: ... }
|
|
83
57
|
const userData = parsed?.state?.user ?? parsed?.user ?? null;
|
|
84
|
-
useUserStore.setState({ user: userData });
|
|
58
|
+
userStore_1.useUserStore.setState({ user: userData });
|
|
85
59
|
return userData ?? undefined;
|
|
86
60
|
}
|
|
87
61
|
catch (error) {
|
|
88
62
|
console.warn("Failed to refetch user from localStorage:", error);
|
|
89
63
|
// Fallback to current store state
|
|
90
|
-
return useUserStore.getState().user ?? undefined;
|
|
64
|
+
return userStore_1.useUserStore.getState().user ?? undefined;
|
|
91
65
|
}
|
|
92
66
|
}
|
|
93
|
-
useUserStore.setState({ user: null });
|
|
67
|
+
userStore_1.useUserStore.setState({ user: null });
|
|
94
68
|
return undefined;
|
|
95
69
|
};
|
|
96
70
|
// Helper function to clear user
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export { B3Provider } from "./components/B3Provider/B3Provider.native";
|
|
2
|
-
export { B3Context, type B3ContextType } from "./components/B3Provider/types";
|
|
3
|
-
export { useB3 } from "./components/B3Provider/useB3";
|
|
4
2
|
export { useAccountWallet } from "./hooks/useAccountWallet";
|
|
5
3
|
export { useAuthentication } from "./hooks/useAuthentication";
|
|
6
4
|
export { useProfile } from "./hooks/useProfile";
|
|
@@ -3,14 +3,10 @@
|
|
|
3
3
|
// export * from "./hooks";
|
|
4
4
|
// export * from "./stores";
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useAuthStore = exports.useSiwe = exports.useProfile = exports.useAuthentication = exports.useAccountWallet = exports.
|
|
6
|
+
exports.useAuthStore = exports.useSiwe = exports.useProfile = exports.useAuthentication = exports.useAccountWallet = exports.B3Provider = void 0;
|
|
7
7
|
// We only export the components and hooks that are needed for the native app
|
|
8
8
|
var B3Provider_native_1 = require("./components/B3Provider/B3Provider.native");
|
|
9
9
|
Object.defineProperty(exports, "B3Provider", { enumerable: true, get: function () { return B3Provider_native_1.B3Provider; } });
|
|
10
|
-
var types_1 = require("./components/B3Provider/types");
|
|
11
|
-
Object.defineProperty(exports, "B3Context", { enumerable: true, get: function () { return types_1.B3Context; } });
|
|
12
|
-
var useB3_1 = require("./components/B3Provider/useB3");
|
|
13
|
-
Object.defineProperty(exports, "useB3", { enumerable: true, get: function () { return useB3_1.useB3; } });
|
|
14
10
|
var useAccountWallet_1 = require("./hooks/useAccountWallet");
|
|
15
11
|
Object.defineProperty(exports, "useAccountWallet", { enumerable: true, get: function () { return useAccountWallet_1.useAccountWallet; } });
|
|
16
12
|
var useAuthentication_1 = require("./hooks/useAuthentication");
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CreateOnrampOrderParams } from "../../../anyspend/react/hooks/useAnyspendCreateOnrampOrder";
|
|
2
|
+
import { CreateOrderParams } from "../../../anyspend/react/hooks/useAnyspendCreateOrder";
|
|
3
|
+
import { PermissionsConfig } from "../../../global-account/types/permissions";
|
|
4
|
+
import { Account } from "thirdweb/wallets";
|
|
5
|
+
import { ClientType } from "../../client-manager";
|
|
6
|
+
interface ConfigStore {
|
|
7
|
+
accountOverride?: Account;
|
|
8
|
+
automaticallySetFirstEoa: boolean;
|
|
9
|
+
environment: "development" | "production";
|
|
10
|
+
defaultPermissions: PermissionsConfig;
|
|
11
|
+
theme: "light" | "dark";
|
|
12
|
+
clientType: ClientType;
|
|
13
|
+
partnerId: string;
|
|
14
|
+
stripePublishableKey?: string;
|
|
15
|
+
createClientReferenceId?: (params: CreateOrderParams | CreateOnrampOrderParams) => Promise<string>;
|
|
16
|
+
enableTurnkey: boolean;
|
|
17
|
+
setConfig: (config: Partial<Omit<ConfigStore, "setConfig">>) => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Zustand store for B3 configuration
|
|
21
|
+
* NOT persisted - these are developer-set configuration values
|
|
22
|
+
*/
|
|
23
|
+
export declare const useB3ConfigStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ConfigStore>>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useB3ConfigStore = void 0;
|
|
4
|
+
const zustand_1 = require("zustand");
|
|
5
|
+
/**
|
|
6
|
+
* Default permissions configuration for B3 provider
|
|
7
|
+
*/
|
|
8
|
+
const DEFAULT_PERMISSIONS = {
|
|
9
|
+
approvedTargets: ["0xa8e42121e318e3D3BeD7f5969AF6D360045317DD"],
|
|
10
|
+
nativeTokenLimitPerTransaction: 0.1,
|
|
11
|
+
startDate: new Date(),
|
|
12
|
+
endDate: new Date(Date.now() + 1000 * 60 * 60 * 24 * 365), // 1 year from now
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Zustand store for B3 configuration
|
|
16
|
+
* NOT persisted - these are developer-set configuration values
|
|
17
|
+
*/
|
|
18
|
+
exports.useB3ConfigStore = (0, zustand_1.create)(set => ({
|
|
19
|
+
accountOverride: undefined,
|
|
20
|
+
automaticallySetFirstEoa: false,
|
|
21
|
+
environment: "development",
|
|
22
|
+
defaultPermissions: DEFAULT_PERMISSIONS,
|
|
23
|
+
theme: "light",
|
|
24
|
+
clientType: "rest",
|
|
25
|
+
partnerId: "",
|
|
26
|
+
stripePublishableKey: undefined,
|
|
27
|
+
createClientReferenceId: undefined,
|
|
28
|
+
enableTurnkey: false,
|
|
29
|
+
setConfig: config => set(state => ({ ...state, ...config })),
|
|
30
|
+
}));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { useAuthStore } from "./useAuthStore";
|
|
2
|
+
export { useB3ConfigStore } from "./configStore";
|
|
2
3
|
export { useModalStore } from "./useModalStore";
|
|
3
4
|
export { useRecentAddressesStore } from "./useRecentAddressesStore";
|
|
4
5
|
export type { AnySpendBuySpinProps, AnySpendFundTournamentProps, AnySpendJoinTournamentProps, AnySpendModalProps, AnySpendNftProps, AnySpendOrderHistoryProps, AnySpendStakeB3Props, AnyspendOrderDetailsProps, ManageAccountModalProps, ModalContentType, RequestPermissionsModalProps, SignInWithB3ModalProps, } from "./useModalStore";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useRecentAddressesStore = exports.useModalStore = exports.useAuthStore = void 0;
|
|
3
|
+
exports.useRecentAddressesStore = exports.useModalStore = exports.useB3ConfigStore = exports.useAuthStore = void 0;
|
|
4
4
|
var useAuthStore_1 = require("./useAuthStore");
|
|
5
5
|
Object.defineProperty(exports, "useAuthStore", { enumerable: true, get: function () { return useAuthStore_1.useAuthStore; } });
|
|
6
|
+
var configStore_1 = require("./configStore");
|
|
7
|
+
Object.defineProperty(exports, "useB3ConfigStore", { enumerable: true, get: function () { return configStore_1.useB3ConfigStore; } });
|
|
6
8
|
var useModalStore_1 = require("./useModalStore");
|
|
7
9
|
Object.defineProperty(exports, "useModalStore", { enumerable: true, get: function () { return useModalStore_1.useModalStore; } });
|
|
8
10
|
var useRecentAddressesStore_1 = require("./useRecentAddressesStore");
|
|
@@ -403,6 +403,12 @@ export interface AnySpendDepositHypeProps extends BaseModalProps {
|
|
|
403
403
|
customUsdInputValues?: string[];
|
|
404
404
|
/** prefer eoa wallet */
|
|
405
405
|
preferEoa?: boolean;
|
|
406
|
+
/** Custom URL to redirect to when clicking "Return to Home" on complete order screen */
|
|
407
|
+
returnToHomeUrl?: string;
|
|
408
|
+
/** Custom label for recipient display (e.g., "OBSN Telegram Bot") */
|
|
409
|
+
customRecipientLabel?: string;
|
|
410
|
+
/** Custom label for the return home button (overrides "Return to Home" / "Close") */
|
|
411
|
+
returnHomeLabel?: string;
|
|
406
412
|
}
|
|
407
413
|
export interface AvatarEditorModalProps extends BaseModalProps {
|
|
408
414
|
/** Modal type identifier */
|
|
@@ -471,6 +477,10 @@ export interface AnySpendCollectorClubPurchaseProps extends BaseModalProps {
|
|
|
471
477
|
vendingMachineId: string;
|
|
472
478
|
/** The pack type */
|
|
473
479
|
packType: string;
|
|
480
|
+
/** Active tab */
|
|
481
|
+
activeTab?: "crypto" | "fiat";
|
|
482
|
+
/** Force fiat payment */
|
|
483
|
+
forceFiatPayment?: boolean;
|
|
474
484
|
}
|
|
475
485
|
/**
|
|
476
486
|
* Union type of all possible modal content types
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Users } from "@b3dotfun/b3-api";
|
|
2
|
+
interface UserStore {
|
|
3
|
+
user: Users | null;
|
|
4
|
+
setUser: (user: Users | undefined) => void;
|
|
5
|
+
clearUser: () => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Zustand store for managing user state
|
|
9
|
+
* Persists user data to localStorage
|
|
10
|
+
*/
|
|
11
|
+
export declare const useUserStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<UserStore>, "persist"> & {
|
|
12
|
+
persist: {
|
|
13
|
+
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<UserStore, UserStore>>) => void;
|
|
14
|
+
clearStorage: () => void;
|
|
15
|
+
rehydrate: () => Promise<void> | void;
|
|
16
|
+
hasHydrated: () => boolean;
|
|
17
|
+
onHydrate: (fn: (state: UserStore) => void) => () => void;
|
|
18
|
+
onFinishHydration: (fn: (state: UserStore) => void) => () => void;
|
|
19
|
+
getOptions: () => Partial<import("zustand/middleware").PersistOptions<UserStore, UserStore>>;
|
|
20
|
+
};
|
|
21
|
+
}>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useUserStore = void 0;
|
|
4
|
+
const debug_1 = require("../../../shared/utils/debug");
|
|
5
|
+
const zustand_1 = require("zustand");
|
|
6
|
+
const middleware_1 = require("zustand/middleware");
|
|
7
|
+
const debug = (0, debug_1.debugB3React)("useUserQuery");
|
|
8
|
+
/**
|
|
9
|
+
* Zustand store for managing user state
|
|
10
|
+
* Persists user data to localStorage
|
|
11
|
+
*/
|
|
12
|
+
exports.useUserStore = (0, zustand_1.create)()((0, middleware_1.persist)(set => ({
|
|
13
|
+
user: null,
|
|
14
|
+
setUser: (newUser) => {
|
|
15
|
+
const userToSave = newUser ?? null;
|
|
16
|
+
set({ user: userToSave });
|
|
17
|
+
debug("User updated", userToSave);
|
|
18
|
+
},
|
|
19
|
+
clearUser: () => {
|
|
20
|
+
set({ user: null });
|
|
21
|
+
debug("User cleared");
|
|
22
|
+
},
|
|
23
|
+
}), {
|
|
24
|
+
name: "b3-user",
|
|
25
|
+
onRehydrateStorage: () => (_, error) => {
|
|
26
|
+
if (error) {
|
|
27
|
+
console.warn("Failed to rehydrate user store:", error);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
}));
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { components } from "../types/api";
|
|
2
2
|
export declare const ANYSPEND_MAINNET_BASE_URL: string;
|
|
3
3
|
export declare const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
4
|
+
export declare const GAS_ORACLE_BASE_URL: string;
|
|
5
|
+
export declare const RELAY_ETH_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
4
6
|
export declare const RELAY_SOL_ADDRESS = "11111111111111111111111111111111";
|
|
5
7
|
export declare const RELAY_SOLANA_MAINNET_CHAIN_ID = 792703809;
|
|
6
8
|
export declare const SOLANA_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { base } from "viem/chains";
|
|
2
2
|
export const ANYSPEND_MAINNET_BASE_URL = process.env.NEXT_PUBLIC_ANYSPEND_BASE_URL || "https://mainnet.anyspend.com";
|
|
3
3
|
export const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
4
|
+
export const GAS_ORACLE_BASE_URL = process.env.NEXT_PUBLIC_GAS_ORACLE_URL || "https://gas-oracle.sean-430.workers.dev";
|
|
5
|
+
export const RELAY_ETH_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
4
6
|
export const RELAY_SOL_ADDRESS = "11111111111111111111111111111111";
|
|
5
7
|
export const RELAY_SOLANA_MAINNET_CHAIN_ID = 792703809;
|
|
6
8
|
export const SOLANA_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./types/api";
|
|
2
|
+
export * from "./types/gas";
|
|
2
3
|
export * from "./utils/address";
|
|
3
4
|
export * from "./utils/chain";
|
|
4
5
|
export * from "./utils/format";
|
|
@@ -8,5 +9,6 @@ export * from "./utils/string";
|
|
|
8
9
|
export * from "./utils/token";
|
|
9
10
|
export * from "./utils/validation";
|
|
10
11
|
export * from "./constants";
|
|
12
|
+
export * from "./services/gas";
|
|
11
13
|
export * from "./abis/abiUsdcBase";
|
|
12
14
|
export * from "./abis/erc20Staking";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Types
|
|
2
2
|
export * from "./types/api.js";
|
|
3
|
+
export * from "./types/gas.js";
|
|
3
4
|
// Utils
|
|
4
5
|
export * from "./utils/address.js";
|
|
5
6
|
export * from "./utils/chain.js";
|
|
@@ -11,6 +12,8 @@ export * from "./utils/token.js";
|
|
|
11
12
|
export * from "./utils/validation.js";
|
|
12
13
|
// Constants
|
|
13
14
|
export * from "./constants/index.js";
|
|
15
|
+
// Services
|
|
16
|
+
export * from "./services/gas.js";
|
|
14
17
|
// Abis
|
|
15
18
|
export * from "./abis/abiUsdcBase.js";
|
|
16
19
|
export * from "./abis/erc20Staking.js";
|
|
@@ -39,4 +39,10 @@ export declare function AnySpend(props: {
|
|
|
39
39
|
hideBottomNavigation?: boolean;
|
|
40
40
|
/** When true, disables URL parameter management for swap configuration */
|
|
41
41
|
disableUrlParamManagement?: boolean;
|
|
42
|
+
/** Custom URL to redirect to when clicking "Return to Home" on complete order screen */
|
|
43
|
+
returnToHomeUrl?: string;
|
|
44
|
+
/** Custom label for recipient display (e.g., "OBSN Telegram Bot") */
|
|
45
|
+
customRecipientLabel?: string;
|
|
46
|
+
/** Custom label for the return home button (overrides "Return to Home" / "Close") */
|
|
47
|
+
returnHomeLabel?: string;
|
|
42
48
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { eqci, getDefaultToken, getHyperliquidUSDCToken, HYPERLIQUID_CHAIN_ID, HYPERLIQUID_USDC_ADDRESS, USDC_BASE, ZERO_ADDRESS, } from "../../../anyspend/index.js";
|
|
4
|
-
import { useAnyspendCreateOnrampOrder, useAnyspendCreateOrder, useAnyspendOrderAndTransactions, useAnyspendQuote, useGeoOnrampOptions, } from "../../../anyspend/react/index.js";
|
|
5
|
-
import { Button, ShinyButton, StyleRoot, TabsPrimitive, toast, TransitionPanel, useAccountWallet,
|
|
4
|
+
import { useAnyspendCreateOnrampOrder, useAnyspendCreateOrder, useAnyspendOrderAndTransactions, useAnyspendQuote, useGasPrice, useGeoOnrampOptions, } from "../../../anyspend/react/index.js";
|
|
5
|
+
import { Button, ShinyButton, StyleRoot, TabsPrimitive, toast, TransitionPanel, useAccountWallet, useB3Config, useModalStore, useProfile, useRouter, useSearchParamsSSR, useTokenBalanceDirect, useTokenData, useTokenFromUrl, } from "../../../global-account/react/index.js";
|
|
6
6
|
import BottomNavigation from "../../../global-account/react/components/ManageAccount/BottomNavigation.js";
|
|
7
7
|
import { useAccountWalletImage } from "../../../global-account/react/hooks/useAccountWallet.js";
|
|
8
8
|
import { getThirdwebChain } from "../../../shared/constants/chains/supported.js";
|
|
@@ -24,6 +24,7 @@ import { CryptoPaySection } from "./common/CryptoPaySection.js";
|
|
|
24
24
|
import { CryptoReceiveSection } from "./common/CryptoReceiveSection.js";
|
|
25
25
|
import { FeeDetailPanel } from "./common/FeeDetailPanel.js";
|
|
26
26
|
import { FiatPaymentMethod, FiatPaymentMethodComponent } from "./common/FiatPaymentMethod.js";
|
|
27
|
+
import { GasIndicator } from "./common/GasIndicator.js";
|
|
27
28
|
import { OrderDetails, OrderDetailsLoadingView } from "./common/OrderDetails.js";
|
|
28
29
|
import { OrderHistory } from "./common/OrderHistory.js";
|
|
29
30
|
import { PanelOnramp } from "./common/PanelOnramp.js";
|
|
@@ -50,10 +51,10 @@ export function AnySpend(props) {
|
|
|
50
51
|
const fingerprintConfig = getFingerprintConfig();
|
|
51
52
|
return (_jsx(AnySpendFingerprintWrapper, { fingerprint: fingerprintConfig, children: _jsx(AnySpendInner, { ...props }) }));
|
|
52
53
|
}
|
|
53
|
-
function AnySpendInner({ sourceChainId, destinationTokenAddress, destinationTokenChainId, mode = "modal", defaultActiveTab = "crypto", loadOrder, hideTransactionHistoryButton, recipientAddress: recipientAddressFromProps, onTokenSelect, onSuccess, customUsdInputValues, hideHeader, hideBottomNavigation = false, disableUrlParamManagement = false, }) {
|
|
54
|
+
function AnySpendInner({ sourceChainId, destinationTokenAddress, destinationTokenChainId, mode = "modal", defaultActiveTab = "crypto", loadOrder, hideTransactionHistoryButton, recipientAddress: recipientAddressFromProps, onTokenSelect, onSuccess, customUsdInputValues, hideHeader, hideBottomNavigation = false, disableUrlParamManagement = false, returnToHomeUrl, customRecipientLabel, returnHomeLabel, }) {
|
|
54
55
|
const searchParams = useSearchParamsSSR();
|
|
55
56
|
const router = useRouter();
|
|
56
|
-
const { partnerId } =
|
|
57
|
+
const { partnerId } = useB3Config();
|
|
57
58
|
const setB3ModalContentType = useModalStore(state => state.setB3ModalContentType);
|
|
58
59
|
// Determine if we're in "buy mode" based on whether destination token props are provided
|
|
59
60
|
const isBuyMode = !!(destinationTokenAddress && destinationTokenChainId);
|
|
@@ -365,6 +366,8 @@ function AnySpendInner({ sourceChainId, destinationTokenAddress, destinationToke
|
|
|
365
366
|
});
|
|
366
367
|
// Get geo-based onramp options for fiat payments
|
|
367
368
|
const { geoData, coinbaseAvailablePaymentMethods, stripeOnrampSupport, stripeWeb2Support } = useGeoOnrampOptions(srcAmountOnRamp);
|
|
369
|
+
// Get gas price for source chain (where the user pays from)
|
|
370
|
+
const { gasPrice: gasPriceData, isLoading: isLoadingGas } = useGasPrice(selectedSrcChainId);
|
|
368
371
|
// Helper function to map payment method to onramp vendor
|
|
369
372
|
const getOnrampVendor = (paymentMethod) => {
|
|
370
373
|
switch (paymentMethod) {
|
|
@@ -818,7 +821,7 @@ function AnySpendInner({ sourceChainId, destinationTokenAddress, destinationToke
|
|
|
818
821
|
navigateBack();
|
|
819
822
|
// Reset payment methods when going back
|
|
820
823
|
resetPaymentMethods();
|
|
821
|
-
} })) }) }));
|
|
824
|
+
}, returnToHomeUrl: returnToHomeUrl, returnHomeLabel: returnHomeLabel })) }) }));
|
|
822
825
|
const mainView = (_jsxs("div", { className: "mx-auto flex w-[460px] max-w-full flex-col items-center gap-2 pt-5", children: [_jsxs("div", { className: "flex w-full max-w-full flex-col items-center gap-2 px-5", children: [isBuyMode && !hideHeader && (_jsxs("div", { className: "mb-4 flex flex-col items-center gap-3 text-center", children: [selectedDstToken.metadata?.logoURI && (_jsx("div", { className: "relative", children: _jsx("img", { src: selectedDstToken.metadata.logoURI, alt: selectedDstToken.symbol, className: "border-as-stroke h-12 w-12 rounded-full border-2 shadow-md" }) })), _jsx("div", { children: _jsxs("h1", { className: "text-as-primary text-xl font-bold", children: ["Buy ", selectedDstToken.symbol] }) })] })), _jsx(TabSection, { activeTab: activeTab, setActiveTab: tab => {
|
|
823
826
|
setActiveTab(tab);
|
|
824
827
|
// Reset payment methods when switching tabs
|
|
@@ -833,7 +836,7 @@ function AnySpendInner({ sourceChainId, destinationTokenAddress, destinationToke
|
|
|
833
836
|
else {
|
|
834
837
|
setActivePanel(panelIndex);
|
|
835
838
|
}
|
|
836
|
-
}, _recipientAddress: effectiveRecipientAddress, destinationToken: selectedDstToken, destinationChainId: selectedDstChainId, destinationAmount: dstAmount, onDestinationTokenChange: setSelectedDstToken, onDestinationChainChange: setSelectedDstChainId, fiatPaymentMethodIndex: PanelView.FIAT_PAYMENT_METHOD, recipientSelectionPanelIndex: PanelView.RECIPIENT_SELECTION, hideDstToken: isBuyMode, anyspendQuote: anyspendQuote, onShowPointsDetail: () => navigateToPanel(PanelView.POINTS_DETAIL, "forward"), onShowFeeDetail: () => navigateToPanel(PanelView.FEE_DETAIL, "forward"), customUsdInputValues: customUsdInputValues }) })), activeTab === "crypto" && (_jsx("div", { className: "z-10 -my-6 flex justify-center", children: _jsx(Button, { variant: "ghost", className: cn("border-as-stroke bg-as-surface-primary h-10 w-10 rounded-xl border-2 sm:h-8 sm:w-8 sm:rounded-xl", isBuyMode && "cursor-default", selectedDstChainId === HYPERLIQUID_CHAIN_ID && "cursor-not-allowed opacity-50"), onClick: () => {
|
|
839
|
+
}, _recipientAddress: effectiveRecipientAddress, destinationToken: selectedDstToken, destinationChainId: selectedDstChainId, destinationAmount: dstAmount, onDestinationTokenChange: setSelectedDstToken, onDestinationChainChange: setSelectedDstChainId, fiatPaymentMethodIndex: PanelView.FIAT_PAYMENT_METHOD, recipientSelectionPanelIndex: PanelView.RECIPIENT_SELECTION, hideDstToken: isBuyMode, anyspendQuote: anyspendQuote, onShowPointsDetail: () => navigateToPanel(PanelView.POINTS_DETAIL, "forward"), onShowFeeDetail: () => navigateToPanel(PanelView.FEE_DETAIL, "forward"), customUsdInputValues: customUsdInputValues, customRecipientLabel: customRecipientLabel }) })), activeTab === "crypto" && (_jsx("div", { className: "z-10 -my-6 flex justify-center", children: _jsx(Button, { variant: "ghost", className: cn("border-as-stroke bg-as-surface-primary h-10 w-10 rounded-xl border-2 sm:h-8 sm:w-8 sm:rounded-xl", isBuyMode && "cursor-default", selectedDstChainId === HYPERLIQUID_CHAIN_ID && "cursor-not-allowed opacity-50"), onClick: () => {
|
|
837
840
|
if (isBuyMode) {
|
|
838
841
|
return;
|
|
839
842
|
}
|
|
@@ -850,10 +853,10 @@ function AnySpendInner({ sourceChainId, destinationTokenAddress, destinationToke
|
|
|
850
853
|
// Swap amounts
|
|
851
854
|
setSrcAmount(dstAmount);
|
|
852
855
|
setDstAmount(srcAmount);
|
|
853
|
-
}, children: _jsx("div", { className: "relative flex items-center justify-center transition-opacity", children: _jsx(ArrowDown, { className: "text-as-primary/50 h-5 w-5" }) }) }) })), activeTab === "crypto" && (_jsx(CryptoReceiveSection, { isDepositMode: false, isBuyMode: isBuyMode, effectiveRecipientAddress: effectiveRecipientAddress, recipientName: recipientName || undefined, onSelectRecipient: () => navigateToPanel(PanelView.RECIPIENT_SELECTION, "forward"), dstAmount: dstAmount, dstToken: selectedDstToken, selectedDstChainId: selectedDstChainId, setSelectedDstChainId: setSelectedDstChainId, setSelectedDstToken: setSelectedDstToken, isSrcInputDirty: isSrcInputDirty, onChangeDstAmount: value => {
|
|
856
|
+
}, children: _jsx("div", { className: "relative flex items-center justify-center transition-opacity", children: _jsx(ArrowDown, { className: "text-as-primary/50 h-5 w-5" }) }) }) })), activeTab === "crypto" && (_jsx(CryptoReceiveSection, { isDepositMode: false, isBuyMode: isBuyMode, effectiveRecipientAddress: effectiveRecipientAddress, recipientName: recipientName || undefined, customRecipientLabel: customRecipientLabel, onSelectRecipient: () => navigateToPanel(PanelView.RECIPIENT_SELECTION, "forward"), dstAmount: dstAmount, dstToken: selectedDstToken, selectedDstChainId: selectedDstChainId, setSelectedDstChainId: setSelectedDstChainId, setSelectedDstToken: setSelectedDstToken, isSrcInputDirty: isSrcInputDirty, onChangeDstAmount: value => {
|
|
854
857
|
setIsSrcInputDirty(false);
|
|
855
858
|
setDstAmount(value);
|
|
856
|
-
}, anyspendQuote: anyspendQuote, onShowPointsDetail: () => navigateToPanel(PanelView.POINTS_DETAIL, "forward"), onShowFeeDetail: () => navigateToPanel(PanelView.FEE_DETAIL, "forward") }))] }), _jsxs(motion.div, { initial: { opacity: 0, y: 20, filter: "blur(10px)" }, animate: { opacity: 1, y: 0, filter: "blur(0px)" }, transition: { duration: 0.3, delay: 0.2, ease: "easeInOut" }, className: cn("mt-4 flex w-full max-w-[460px] flex-col gap-2"), children: [_jsx(ShinyButton, { accentColor: "hsl(var(--as-brand))", disabled: btnInfo.disable, onClick: onMainButtonClick, className: cn("as-main-button relative w-full", btnInfo.error ? "!bg-as-red" : btnInfo.disable ? "!bg-as-on-surface-2" : "!bg-as-brand"), textClassName: cn(btnInfo.error ? "text-white" : btnInfo.disable ? "text-as-secondary" : "text-white"), children: _jsxs("div", { className: "flex items-center justify-center gap-2", children: [btnInfo.loading && _jsx(Loader2, { className: "h-4 w-4 animate-spin" }), btnInfo.text] }) }), !hideTransactionHistoryButton && (globalAddress || effectiveRecipientAddress) ? (_jsxs(Button, { variant: "link", onClick: onClickHistory, className: "text-as-primary/50 hover:text-as-primary flex items-center gap-1 transition-colors", children: [_jsx(HistoryIcon, { className: "h-4 w-4" }), " ", _jsx("span", { className: "pr-4", children: "Transaction History" })] })) : null] })] }), _jsx("div", { className: "w-full", children: _jsx(TabsPrimitive, { defaultValue: "swap", onValueChange: value => {
|
|
859
|
+
}, anyspendQuote: anyspendQuote, onShowPointsDetail: () => navigateToPanel(PanelView.POINTS_DETAIL, "forward"), onShowFeeDetail: () => navigateToPanel(PanelView.FEE_DETAIL, "forward") }))] }), gasPriceData && !isLoadingGas && activeTab === "crypto" && (_jsx(GasIndicator, { gasPrice: gasPriceData, className: "mt-2 w-full" })), _jsxs(motion.div, { initial: { opacity: 0, y: 20, filter: "blur(10px)" }, animate: { opacity: 1, y: 0, filter: "blur(0px)" }, transition: { duration: 0.3, delay: 0.2, ease: "easeInOut" }, className: cn("mt-4 flex w-full max-w-[460px] flex-col gap-2"), children: [_jsx(ShinyButton, { accentColor: "hsl(var(--as-brand))", disabled: btnInfo.disable, onClick: onMainButtonClick, className: cn("as-main-button relative w-full", btnInfo.error ? "!bg-as-red" : btnInfo.disable ? "!bg-as-on-surface-2" : "!bg-as-brand"), textClassName: cn(btnInfo.error ? "text-white" : btnInfo.disable ? "text-as-secondary" : "text-white"), children: _jsxs("div", { className: "flex items-center justify-center gap-2", children: [btnInfo.loading && _jsx(Loader2, { className: "h-4 w-4 animate-spin" }), btnInfo.text] }) }), !hideTransactionHistoryButton && (globalAddress || effectiveRecipientAddress) ? (_jsxs(Button, { variant: "link", onClick: onClickHistory, className: "text-as-primary/50 hover:text-as-primary flex items-center gap-1 transition-colors", children: [_jsx(HistoryIcon, { className: "h-4 w-4" }), " ", _jsx("span", { className: "pr-4", children: "Transaction History" })] })) : null] })] }), _jsx("div", { className: "w-full", children: _jsx(TabsPrimitive, { defaultValue: "swap", onValueChange: value => {
|
|
857
860
|
if (value === "settings" || value === "home") {
|
|
858
861
|
setB3ModalContentType({
|
|
859
862
|
type: "manageAccount",
|
|
@@ -61,5 +61,9 @@ export interface AnySpendCollectorClubPurchaseProps {
|
|
|
61
61
|
* The partner ID
|
|
62
62
|
*/
|
|
63
63
|
packType: string;
|
|
64
|
+
/**
|
|
65
|
+
* Force fiat payment
|
|
66
|
+
*/
|
|
67
|
+
forceFiatPayment?: boolean;
|
|
64
68
|
}
|
|
65
|
-
export declare function AnySpendCollectorClubPurchase({ loadOrder, mode, activeTab, packId, packAmount, pricePerPack, paymentToken, recipientAddress, spenderAddress, onSuccess, header, showRecipient, vendingMachineId, packType, }: AnySpendCollectorClubPurchaseProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
export declare function AnySpendCollectorClubPurchase({ loadOrder, mode, activeTab, packId, packAmount, pricePerPack, paymentToken, recipientAddress, spenderAddress, onSuccess, header, showRecipient, vendingMachineId, packType, forceFiatPayment, }: AnySpendCollectorClubPurchaseProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -45,7 +45,7 @@ const BUY_PACKS_FOR_ABI = {
|
|
|
45
45
|
stateMutability: "nonpayable",
|
|
46
46
|
type: "function",
|
|
47
47
|
};
|
|
48
|
-
export function AnySpendCollectorClubPurchase({ loadOrder, mode = "modal", activeTab = "crypto", packId, packAmount, pricePerPack, paymentToken = USDC_BASE, recipientAddress, spenderAddress = CC_SHOP_ADDRESS, onSuccess, header, showRecipient = true, vendingMachineId, packType, }) {
|
|
48
|
+
export function AnySpendCollectorClubPurchase({ loadOrder, mode = "modal", activeTab = "crypto", packId, packAmount, pricePerPack, paymentToken = USDC_BASE, recipientAddress, spenderAddress = CC_SHOP_ADDRESS, onSuccess, header, showRecipient = true, vendingMachineId, packType, forceFiatPayment, }) {
|
|
49
49
|
// Calculate total amount needed (pricePerPack * packAmount)
|
|
50
50
|
const totalAmount = useMemo(() => {
|
|
51
51
|
try {
|
|
@@ -84,5 +84,5 @@ export function AnySpendCollectorClubPurchase({ loadOrder, mode = "modal", activ
|
|
|
84
84
|
pricePerPack,
|
|
85
85
|
vendingMachineId,
|
|
86
86
|
packType,
|
|
87
|
-
}, header: header || defaultHeader, onSuccess: onSuccess, showRecipient: showRecipient, srcFiatAmount: srcFiatAmount }));
|
|
87
|
+
}, header: header || defaultHeader, onSuccess: onSuccess, showRecipient: showRecipient, srcFiatAmount: srcFiatAmount, forceFiatPayment: forceFiatPayment }));
|
|
88
88
|
}
|
|
@@ -107,7 +107,7 @@ export function AnySpendCustom(props) {
|
|
|
107
107
|
const fingerprintConfig = getFingerprintConfig();
|
|
108
108
|
return (_jsx(AnySpendFingerprintWrapper, { fingerprint: fingerprintConfig, children: _jsx(AnySpendCustomInner, { ...props }) }));
|
|
109
109
|
}
|
|
110
|
-
function AnySpendCustomInner({ loadOrder, mode = "modal", activeTab: activeTabProps = "crypto", recipientAddress: recipientAddressProps, spenderAddress, orderType, dstChainId, dstToken, dstAmount, contractAddress, encodedData, metadata, header, onSuccess, showRecipient = true, onShowPointsDetail, srcFiatAmount: srcFiatAmountProps, }) {
|
|
110
|
+
function AnySpendCustomInner({ loadOrder, mode = "modal", activeTab: activeTabProps = "crypto", recipientAddress: recipientAddressProps, spenderAddress, orderType, dstChainId, dstToken, dstAmount, contractAddress, encodedData, metadata, header, onSuccess, showRecipient = true, onShowPointsDetail, srcFiatAmount: srcFiatAmountProps, forceFiatPayment, }) {
|
|
111
111
|
const hasMounted = useHasMounted();
|
|
112
112
|
const searchParams = useSearchParamsSSR();
|
|
113
113
|
const router = useRouter();
|
|
@@ -506,7 +506,7 @@ function AnySpendCustomInner({ loadOrder, mode = "modal", activeTab: activeTabPr
|
|
|
506
506
|
return null;
|
|
507
507
|
};
|
|
508
508
|
// Confirm order view.
|
|
509
|
-
const confirmOrderView = (_jsxs("div", { className: "relative mx-auto flex w-full flex-col items-center", children: [header({ anyspendPrice: anyspendQuote, isLoadingAnyspendPrice: isLoadingAnyspendQuote }), _jsxs(Tabs, { value: activeTab, onValueChange: value => setActiveTab(value), className: "bg-b3-react-background max-h-[60dvh] w-full overflow-y-auto p-5", children: [_jsx("div", { className: "w-full", children: _jsxs("div", { className: "bg-as-surface-secondary relative mb-4 grid h-10 grid-cols-2 rounded-xl", children: [_jsx("div", { className: cn("bg-as-brand absolute bottom-0 left-0 top-0 z-0 rounded-xl transition-transform duration-100", "h-full w-1/2", activeTab === "fiat" ? "translate-x-full" : "translate-x-0"), style: { willChange: "transform" } }), _jsx("button", { className: cn("relative z-10 h-full w-full rounded-xl px-3 text-sm font-medium transition-colors duration-100", activeTab === "crypto" ? "text-white" : "text-as-primary/70 hover:bg-as-on-surface-2 bg-transparent"), onClick: () => {
|
|
509
|
+
const confirmOrderView = (_jsxs("div", { className: "relative mx-auto flex w-full flex-col items-center", children: [header({ anyspendPrice: anyspendQuote, isLoadingAnyspendPrice: isLoadingAnyspendQuote }), _jsxs(Tabs, { value: activeTab, onValueChange: value => setActiveTab(value), className: "bg-b3-react-background max-h-[60dvh] w-full overflow-y-auto p-5", children: [!forceFiatPayment && (_jsx("div", { className: "w-full", children: _jsxs("div", { className: "bg-as-surface-secondary relative mb-4 grid h-10 grid-cols-2 rounded-xl", children: [_jsx("div", { className: cn("bg-as-brand absolute bottom-0 left-0 top-0 z-0 rounded-xl transition-transform duration-100", "h-full w-1/2", activeTab === "fiat" ? "translate-x-full" : "translate-x-0"), style: { willChange: "transform" } }), _jsx("button", { className: cn("relative z-10 h-full w-full rounded-xl px-3 text-sm font-medium transition-colors duration-100", activeTab === "crypto" ? "text-white" : "text-as-primary/70 hover:bg-as-on-surface-2 bg-transparent"), onClick: () => {
|
|
510
510
|
setActiveTab("crypto");
|
|
511
511
|
// Reset payment methods when switching tabs
|
|
512
512
|
resetPaymentMethods();
|
|
@@ -516,7 +516,7 @@ function AnySpendCustomInner({ loadOrder, mode = "modal", activeTab: activeTabPr
|
|
|
516
516
|
// Reset payment methods when switching tabs
|
|
517
517
|
resetPaymentMethods();
|
|
518
518
|
setSelectedFiatPaymentMethod(FiatPaymentMethod.NONE);
|
|
519
|
-
}, children: "Pay with fiat" })) : (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { className: cn("relative z-10 h-full w-full rounded-xl px-3 text-sm font-medium transition-colors duration-100", "text-as-primary/50 cursor-not-allowed bg-transparent"), disabled: true, children: "Pay with fiat" }) }), _jsx(TooltipContent, { children: _jsx("span", { className: "text-as-primary w-[140px]", children: "Fiat payments are not supported for this amount" }) })] }))] }) }), _jsx(TabsContent, { value: "crypto", children: _jsxs("div", { className: "mt-2 flex flex-col gap-6", children: [_jsxs("div", { className: "border-as-border-secondary bg-as-surface-secondary flex w-full flex-col gap-4 rounded-xl border p-4", children: [_jsxs(motion.div, { initial: false, animate: {
|
|
519
|
+
}, children: "Pay with fiat" })) : (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { className: cn("relative z-10 h-full w-full rounded-xl px-3 text-sm font-medium transition-colors duration-100", "text-as-primary/50 cursor-not-allowed bg-transparent"), disabled: true, children: "Pay with fiat" }) }), _jsx(TooltipContent, { children: _jsx("span", { className: "text-as-primary w-[140px]", children: "Fiat payments are not supported for this amount" }) })] }))] }) })), _jsx(TabsContent, { value: "crypto", children: _jsxs("div", { className: "mt-2 flex flex-col gap-6", children: [_jsxs("div", { className: "border-as-border-secondary bg-as-surface-secondary flex w-full flex-col gap-4 rounded-xl border p-4", children: [_jsxs(motion.div, { initial: false, animate: {
|
|
520
520
|
opacity: hasMounted ? 1 : 0,
|
|
521
521
|
y: hasMounted ? 0 : 20,
|
|
522
522
|
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
@@ -32,6 +32,12 @@ export interface AnySpendCustomExactInProps {
|
|
|
32
32
|
anyspendPrice: GetQuoteResponse | undefined;
|
|
33
33
|
isLoadingAnyspendPrice: boolean;
|
|
34
34
|
}) => React.JSX.Element;
|
|
35
|
+
/** Custom URL to redirect to when clicking "Return to Home" on complete order screen */
|
|
36
|
+
returnToHomeUrl?: string;
|
|
37
|
+
/** Custom label for recipient display (e.g., "OBSN Telegram Bot") */
|
|
38
|
+
customRecipientLabel?: string;
|
|
39
|
+
/** Custom label for the return home button (overrides "Return to Home" / "Close") */
|
|
40
|
+
returnHomeLabel?: string;
|
|
35
41
|
}
|
|
36
42
|
export declare function AnySpendCustomExactIn(props: AnySpendCustomExactInProps): import("react/jsx-runtime").JSX.Element;
|
|
37
43
|
export {};
|