@b3dotfun/sdk 0.0.88-alpha.10 → 0.0.88-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/index.d.ts +0 -2
- package/dist/cjs/anyspend/constants/index.js +1 -3
- package/dist/cjs/anyspend/index.d.ts +0 -2
- package/dist/cjs/anyspend/index.js +0 -3
- package/dist/cjs/anyspend/react/components/AnySpend.d.ts +0 -6
- package/dist/cjs/anyspend/react/components/AnySpend.js +6 -9
- package/dist/cjs/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +1 -5
- package/dist/cjs/anyspend/react/components/AnySpendCollectorClubPurchase.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +0 -1
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +3 -3
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.d.ts +0 -6
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +20 -24
- package/dist/cjs/anyspend/react/components/AnySpendDeposit.d.ts +1 -7
- package/dist/cjs/anyspend/react/components/AnySpendDeposit.js +3 -3
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +0 -4
- package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.js +1 -14
- package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.d.ts +1 -3
- package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.js +2 -3
- package/dist/cjs/anyspend/react/components/common/OrderDetails.d.ts +0 -4
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +6 -34
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.d.ts +1 -3
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +2 -3
- package/dist/cjs/anyspend/react/components/common/PaymentStripeWeb2.js +4 -3
- package/dist/cjs/anyspend/react/hooks/index.d.ts +0 -1
- package/dist/cjs/anyspend/react/hooks/index.js +0 -1
- 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/useValidatedClientReferenceId.js +1 -1
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +3 -2
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +18 -2
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +57 -35
- 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 +35 -38
- package/dist/cjs/global-account/react/components/B3Provider/RelayKitProviderWrapper.js +1 -3
- package/dist/cjs/global-account/react/components/B3Provider/types.d.ts +27 -0
- package/dist/cjs/global-account/react/components/B3Provider/types.js +24 -0
- package/dist/cjs/global-account/react/components/B3Provider/useB3.d.ts +4 -14
- package/dist/cjs/global-account/react/components/B3Provider/useB3.js +11 -4
- package/dist/cjs/global-account/react/components/B3Provider/useB3Account.js +2 -5
- package/dist/cjs/global-account/react/components/B3Provider/useB3Config.d.ts +2 -10
- package/dist/cjs/global-account/react/components/B3Provider/useB3Config.js +17 -18
- package/dist/cjs/global-account/react/components/ManageAccount/ProfileSection.js +2 -1
- 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 +9 -8
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +20 -76
- 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 +1 -3
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.js +2 -1
- package/dist/cjs/global-account/react/components/index.d.ts +2 -1
- package/dist/cjs/global-account/react/components/index.js +6 -3
- package/dist/cjs/global-account/react/hooks/index.d.ts +0 -2
- package/dist/cjs/global-account/react/hooks/index.js +1 -5
- 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 +0 -3
- package/dist/cjs/global-account/react/hooks/useTWAuth.js +0 -8
- package/dist/cjs/global-account/react/hooks/useTokenBalance.js +5 -5
- package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.js +2 -4
- package/dist/cjs/global-account/react/hooks/useTurnkeyAuth.js +22 -50
- package/dist/cjs/global-account/react/hooks/useUserQuery.js +35 -9
- package/dist/cjs/global-account/react/index.native.d.ts +2 -0
- package/dist/cjs/global-account/react/index.native.js +5 -1
- package/dist/cjs/global-account/react/stores/index.d.ts +0 -1
- package/dist/cjs/global-account/react/stores/index.js +1 -3
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +0 -10
- package/dist/esm/anyspend/constants/index.d.ts +0 -2
- package/dist/esm/anyspend/constants/index.js +0 -2
- package/dist/esm/anyspend/index.d.ts +0 -2
- package/dist/esm/anyspend/index.js +0 -3
- package/dist/esm/anyspend/react/components/AnySpend.d.ts +0 -6
- package/dist/esm/anyspend/react/components/AnySpend.js +8 -11
- package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +1 -5
- package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +0 -1
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +3 -3
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +0 -6
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +4 -8
- package/dist/esm/anyspend/react/components/AnySpendDeposit.d.ts +1 -7
- package/dist/esm/anyspend/react/components/AnySpendDeposit.js +3 -3
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +0 -4
- package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.js +1 -14
- package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.d.ts +1 -3
- package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.js +2 -3
- package/dist/esm/anyspend/react/components/common/OrderDetails.d.ts +0 -4
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +8 -36
- package/dist/esm/anyspend/react/components/common/PanelOnramp.d.ts +1 -3
- package/dist/esm/anyspend/react/components/common/PanelOnramp.js +2 -3
- package/dist/esm/anyspend/react/components/common/PaymentStripeWeb2.js +4 -3
- package/dist/esm/anyspend/react/hooks/index.d.ts +0 -1
- package/dist/esm/anyspend/react/hooks/index.js +0 -1
- 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/useValidatedClientReferenceId.js +2 -2
- package/dist/esm/global-account/react/components/B3DynamicModal.js +4 -3
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +18 -2
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +58 -34
- 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 +1 -3
- package/dist/esm/global-account/react/components/B3Provider/types.d.ts +27 -0
- package/dist/esm/global-account/react/components/B3Provider/types.js +21 -0
- package/dist/esm/global-account/react/components/B3Provider/useB3.d.ts +4 -14
- package/dist/esm/global-account/react/components/B3Provider/useB3.js +11 -4
- package/dist/esm/global-account/react/components/B3Provider/useB3Account.js +2 -5
- package/dist/esm/global-account/react/components/B3Provider/useB3Config.d.ts +2 -10
- package/dist/esm/global-account/react/components/B3Provider/useB3Config.js +17 -18
- package/dist/esm/global-account/react/components/ManageAccount/ProfileSection.js +3 -2
- 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 +3 -2
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +20 -76
- 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 +3 -5
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.js +3 -2
- package/dist/esm/global-account/react/components/index.d.ts +2 -1
- package/dist/esm/global-account/react/components/index.js +2 -1
- package/dist/esm/global-account/react/hooks/index.d.ts +0 -2
- package/dist/esm/global-account/react/hooks/index.js +0 -2
- 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 +0 -3
- package/dist/esm/global-account/react/hooks/useTWAuth.js +0 -8
- package/dist/esm/global-account/react/hooks/useTokenBalance.js +6 -6
- package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.js +2 -4
- package/dist/esm/global-account/react/hooks/useTurnkeyAuth.js +22 -50
- package/dist/esm/global-account/react/hooks/useUserQuery.js +27 -1
- package/dist/esm/global-account/react/index.native.d.ts +2 -0
- package/dist/esm/global-account/react/index.native.js +2 -0
- package/dist/esm/global-account/react/stores/index.d.ts +0 -1
- package/dist/esm/global-account/react/stores/index.js +0 -1
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +0 -10
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/constants/index.d.ts +0 -2
- package/dist/types/anyspend/index.d.ts +0 -2
- package/dist/types/anyspend/react/components/AnySpend.d.ts +0 -6
- package/dist/types/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +1 -5
- package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +0 -1
- package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +0 -6
- package/dist/types/anyspend/react/components/AnySpendDeposit.d.ts +1 -7
- package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +0 -4
- package/dist/types/anyspend/react/components/common/CryptoReceiveSection.d.ts +1 -3
- package/dist/types/anyspend/react/components/common/OrderDetails.d.ts +0 -4
- package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +1 -3
- package/dist/types/anyspend/react/hooks/index.d.ts +0 -1
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +18 -2
- package/dist/types/global-account/react/components/B3Provider/B3Provider.native.d.ts +5 -5
- package/dist/types/global-account/react/components/B3Provider/types.d.ts +27 -0
- package/dist/types/global-account/react/components/B3Provider/useB3.d.ts +4 -14
- package/dist/types/global-account/react/components/B3Provider/useB3Config.d.ts +2 -10
- package/dist/types/global-account/react/components/index.d.ts +2 -1
- package/dist/types/global-account/react/hooks/index.d.ts +0 -2
- package/dist/types/global-account/react/hooks/useTWAuth.d.ts +0 -3
- package/dist/types/global-account/react/index.native.d.ts +2 -0
- package/dist/types/global-account/react/stores/index.d.ts +0 -1
- package/dist/types/global-account/react/stores/useModalStore.d.ts +0 -10
- package/package.json +1 -1
- package/src/anyspend/constants/index.ts +0 -3
- package/src/anyspend/index.ts +0 -4
- package/src/anyspend/react/components/AnySpend.tsx +2 -28
- package/src/anyspend/react/components/AnySpendCollectorClubPurchase.tsx +0 -6
- package/src/anyspend/react/components/AnySpendCustom.tsx +47 -52
- package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +0 -23
- package/src/anyspend/react/components/AnySpendDeposit.tsx +1 -18
- package/src/anyspend/react/components/AnyspendDepositHype.tsx +0 -4
- package/src/anyspend/react/components/common/CryptoPaymentMethod.tsx +1 -15
- package/src/anyspend/react/components/common/CryptoReceiveSection.tsx +1 -5
- package/src/anyspend/react/components/common/OrderDetails.tsx +42 -60
- package/src/anyspend/react/components/common/PanelOnramp.tsx +1 -5
- package/src/anyspend/react/components/common/PaymentStripeWeb2.tsx +4 -3
- package/src/anyspend/react/hooks/index.ts +0 -1
- 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/useValidatedClientReferenceId.ts +2 -2
- package/src/global-account/react/components/B3DynamicModal.tsx +4 -3
- package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +54 -43
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +117 -44
- package/src/global-account/react/components/B3Provider/RelayKitProviderWrapper.tsx +1 -4
- package/src/global-account/react/components/B3Provider/types.ts +50 -0
- package/src/global-account/react/components/B3Provider/useB3.ts +13 -4
- package/src/global-account/react/components/B3Provider/useB3Account.ts +2 -6
- package/src/global-account/react/components/B3Provider/useB3Config.ts +31 -18
- package/src/global-account/react/components/ManageAccount/ProfileSection.tsx +4 -2
- 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 +100 -168
- 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 +4 -7
- package/src/global-account/react/components/custom/ManageAccountButton.tsx +3 -2
- package/src/global-account/react/components/index.ts +2 -1
- package/src/global-account/react/hooks/index.ts +0 -2
- 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 +0 -10
- package/src/global-account/react/hooks/useTokenBalance.tsx +7 -8
- package/src/global-account/react/hooks/useTokenBalancesByChain.tsx +2 -4
- package/src/global-account/react/hooks/useTurnkeyAuth.ts +23 -54
- package/src/global-account/react/hooks/useUserQuery.ts +40 -1
- package/src/global-account/react/index.native.ts +2 -0
- package/src/global-account/react/stores/index.ts +0 -1
- package/src/global-account/react/stores/useModalStore.ts +0 -10
- package/dist/cjs/anyspend/react/components/common/GasIndicator.d.ts +0 -6
- package/dist/cjs/anyspend/react/components/common/GasIndicator.js +0 -34
- package/dist/cjs/anyspend/react/hooks/useGasPrice.d.ts +0 -37
- package/dist/cjs/anyspend/react/hooks/useGasPrice.js +0 -43
- package/dist/cjs/anyspend/services/gas.d.ts +0 -21
- package/dist/cjs/anyspend/services/gas.js +0 -65
- package/dist/cjs/anyspend/types/gas.d.ts +0 -61
- package/dist/cjs/anyspend/types/gas.js +0 -2
- package/dist/cjs/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +0 -5
- package/dist/cjs/global-account/react/components/B3Provider/AuthenticationProvider.js +0 -12
- package/dist/cjs/global-account/react/hooks/useAuth.d.ts +0 -76
- package/dist/cjs/global-account/react/hooks/useAuth.js +0 -337
- package/dist/cjs/global-account/react/hooks/useUser.d.ts +0 -60
- package/dist/cjs/global-account/react/hooks/useUser.js +0 -20
- package/dist/cjs/global-account/react/stores/configStore.d.ts +0 -24
- package/dist/cjs/global-account/react/stores/configStore.js +0 -30
- package/dist/cjs/global-account/react/stores/userStore.d.ts +0 -22
- package/dist/cjs/global-account/react/stores/userStore.js +0 -30
- package/dist/esm/anyspend/react/components/common/GasIndicator.d.ts +0 -6
- package/dist/esm/anyspend/react/components/common/GasIndicator.js +0 -31
- package/dist/esm/anyspend/react/hooks/useGasPrice.d.ts +0 -37
- package/dist/esm/anyspend/react/hooks/useGasPrice.js +0 -40
- package/dist/esm/anyspend/services/gas.d.ts +0 -21
- package/dist/esm/anyspend/services/gas.js +0 -59
- package/dist/esm/anyspend/types/gas.d.ts +0 -61
- package/dist/esm/anyspend/types/gas.js +0 -1
- package/dist/esm/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +0 -5
- package/dist/esm/global-account/react/components/B3Provider/AuthenticationProvider.js +0 -10
- package/dist/esm/global-account/react/hooks/useAuth.d.ts +0 -76
- package/dist/esm/global-account/react/hooks/useAuth.js +0 -331
- package/dist/esm/global-account/react/hooks/useUser.d.ts +0 -60
- package/dist/esm/global-account/react/hooks/useUser.js +0 -17
- package/dist/esm/global-account/react/stores/configStore.d.ts +0 -24
- package/dist/esm/global-account/react/stores/configStore.js +0 -27
- package/dist/esm/global-account/react/stores/userStore.d.ts +0 -22
- package/dist/esm/global-account/react/stores/userStore.js +0 -27
- package/dist/types/anyspend/react/components/common/GasIndicator.d.ts +0 -6
- package/dist/types/anyspend/react/hooks/useGasPrice.d.ts +0 -37
- package/dist/types/anyspend/services/gas.d.ts +0 -21
- package/dist/types/anyspend/types/gas.d.ts +0 -61
- package/dist/types/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +0 -5
- package/dist/types/global-account/react/hooks/useAuth.d.ts +0 -76
- package/dist/types/global-account/react/hooks/useUser.d.ts +0 -60
- package/dist/types/global-account/react/stores/configStore.d.ts +0 -24
- package/dist/types/global-account/react/stores/userStore.d.ts +0 -22
- package/src/anyspend/react/components/common/GasIndicator.tsx +0 -59
- package/src/anyspend/react/hooks/useGasPrice.ts +0 -70
- package/src/anyspend/services/gas.test.ts +0 -31
- package/src/anyspend/services/gas.ts +0 -73
- package/src/anyspend/types/gas.ts +0 -66
- package/src/global-account/react/components/B3Provider/AuthenticationProvider.tsx +0 -19
- package/src/global-account/react/hooks/useAuth.ts +0 -379
- package/src/global-account/react/hooks/useUser.ts +0 -20
- package/src/global-account/react/stores/configStore.ts +0 -51
- package/src/global-account/react/stores/userStore.ts +0 -41
|
@@ -13,10 +13,6 @@ interface OrderDetailsProps {
|
|
|
13
13
|
onBack?: () => void;
|
|
14
14
|
disableUrlParamManagement?: boolean;
|
|
15
15
|
points?: number | undefined;
|
|
16
|
-
/** Custom URL to redirect to when clicking "Return to Home" on complete order screen */
|
|
17
|
-
returnToHomeUrl?: string;
|
|
18
|
-
/** Custom label for the return home button (overrides "Return to Home" / "Close") */
|
|
19
|
-
returnHomeLabel?: string;
|
|
20
16
|
}
|
|
21
17
|
export declare const OrderDetails: import("react").NamedExoticComponent<OrderDetailsProps>;
|
|
22
18
|
export declare const OrderDetailsLoadingView: import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { components } from "@b3dotfun/sdk/anyspend/types/api";
|
|
2
2
|
import { GetQuoteResponse } from "@b3dotfun/sdk/anyspend/types/api_req_res";
|
|
3
3
|
import { FiatPaymentMethod } from "./FiatPaymentMethod";
|
|
4
|
-
export declare function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, selectedPaymentMethod, setActivePanel, _recipientAddress, destinationToken, destinationChainId, destinationAmount, onDestinationTokenChange, onDestinationChainChange, fiatPaymentMethodIndex, recipientSelectionPanelIndex, dstTokenSymbol, hideDstToken, anyspendQuote, onShowPointsDetail, onShowFeeDetail, customUsdInputValues,
|
|
4
|
+
export declare function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, selectedPaymentMethod, setActivePanel, _recipientAddress, destinationToken, destinationChainId, destinationAmount, onDestinationTokenChange, onDestinationChainChange, fiatPaymentMethodIndex, recipientSelectionPanelIndex, dstTokenSymbol, hideDstToken, anyspendQuote, onShowPointsDetail, onShowFeeDetail, customUsdInputValues, }: {
|
|
5
5
|
srcAmountOnRamp: string;
|
|
6
6
|
setSrcAmountOnRamp: (amount: string) => void;
|
|
7
7
|
selectedPaymentMethod?: FiatPaymentMethod;
|
|
@@ -20,6 +20,4 @@ export declare function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, selec
|
|
|
20
20
|
onShowPointsDetail?: () => void;
|
|
21
21
|
onShowFeeDetail?: () => void;
|
|
22
22
|
customUsdInputValues?: string[];
|
|
23
|
-
/** Custom label for recipient display (overrides recipientName) */
|
|
24
|
-
customRecipientLabel?: string;
|
|
25
23
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,7 +7,6 @@ export * from "./useAnyspendQuote";
|
|
|
7
7
|
export * from "./useAnyspendTokens";
|
|
8
8
|
export * from "./useCoinbaseOnrampOptions";
|
|
9
9
|
export * from "./useConnectedUserProfile";
|
|
10
|
-
export * from "./useGasPrice";
|
|
11
10
|
export * from "./useGeoOnrampOptions";
|
|
12
11
|
export * from "./useGetGeo";
|
|
13
12
|
export * from "./useHyperliquidTransfer";
|
|
@@ -5,14 +5,15 @@ import "@relayprotocol/relay-kit-ui/styles.css";
|
|
|
5
5
|
import { Account, Wallet } from "thirdweb/wallets";
|
|
6
6
|
import { CreateConnectorFn } from "wagmi";
|
|
7
7
|
import { ClientType } from "../../../client-manager";
|
|
8
|
+
import { B3ContextType } from "./types";
|
|
8
9
|
/**
|
|
9
10
|
* Main B3Provider component
|
|
10
11
|
*/
|
|
11
|
-
export declare function B3Provider({ theme, children, accountOverride, environment, automaticallySetFirstEoa, simDuneApiKey, toaster: _toaster, clientType, rpcUrls, partnerId, stripePublishableKey, onConnect, connectors, overrideDefaultConnectors, createClientReferenceId, enableTurnkey,
|
|
12
|
+
export declare function B3Provider({ theme, children, accountOverride, environment, automaticallySetFirstEoa, simDuneApiKey, toaster: _toaster, clientType, rpcUrls, partnerId, stripePublishableKey, onConnect, connectors, overrideDefaultConnectors, createClientReferenceId, enableTurnkey, }: {
|
|
12
13
|
theme: "light" | "dark";
|
|
13
14
|
children: React.ReactNode;
|
|
14
15
|
accountOverride?: Account;
|
|
15
|
-
environment
|
|
16
|
+
environment: B3ContextType["environment"];
|
|
16
17
|
automaticallySetFirstEoa?: boolean;
|
|
17
18
|
simDuneApiKey?: string;
|
|
18
19
|
toaster?: {
|
|
@@ -29,5 +30,20 @@ export declare function B3Provider({ theme, children, accountOverride, environme
|
|
|
29
30
|
overrideDefaultConnectors?: boolean;
|
|
30
31
|
createClientReferenceId?: (params: CreateOrderParams | CreateOnrampOrderParams) => Promise<string>;
|
|
31
32
|
enableTurnkey?: boolean;
|
|
33
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
/**
|
|
35
|
+
* Inner provider component that provides the actual B3Context
|
|
36
|
+
*/
|
|
37
|
+
export declare function InnerProvider({ children, accountOverride, environment, defaultPermissions, automaticallySetFirstEoa, theme, clientType, partnerId, stripePublishableKey, createClientReferenceId, enableTurnkey, }: {
|
|
38
|
+
children: React.ReactNode;
|
|
39
|
+
accountOverride?: Account;
|
|
40
|
+
environment: B3ContextType["environment"];
|
|
32
41
|
defaultPermissions?: PermissionsConfig;
|
|
42
|
+
automaticallySetFirstEoa: boolean;
|
|
43
|
+
theme: "light" | "dark";
|
|
44
|
+
clientType?: ClientType;
|
|
45
|
+
partnerId: string;
|
|
46
|
+
stripePublishableKey?: string;
|
|
47
|
+
createClientReferenceId?: (params: CreateOrderParams | CreateOnrampOrderParams) => Promise<string>;
|
|
48
|
+
enableTurnkey?: boolean;
|
|
33
49
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { PermissionsConfig } from "@b3dotfun/sdk/global-account/types/permissions";
|
|
2
2
|
import { Account, Wallet } from "thirdweb/wallets";
|
|
3
3
|
import { ClientType } from "../../../client-manager";
|
|
4
|
+
import { B3ContextType } from "./types";
|
|
4
5
|
/**
|
|
5
6
|
* Main B3Provider component
|
|
6
7
|
*/
|
|
7
|
-
export declare function B3Provider({ theme, children, accountOverride, environment, clientType, partnerId, rpcUrls, onConnect,
|
|
8
|
+
export declare function B3Provider({ theme, children, accountOverride, environment, clientType, partnerId, rpcUrls, onConnect, }: {
|
|
8
9
|
theme: "light" | "dark";
|
|
9
10
|
children: React.ReactNode;
|
|
10
11
|
accountOverride?: Account;
|
|
11
|
-
environment
|
|
12
|
+
environment: B3ContextType["environment"];
|
|
12
13
|
clientType?: ClientType;
|
|
13
14
|
partnerId: string;
|
|
14
15
|
rpcUrls?: Record<number, string>;
|
|
15
16
|
onConnect?: (wallet: Wallet, b3Jwt: string) => void | Promise<void>;
|
|
16
|
-
defaultPermissions?: PermissionsConfig;
|
|
17
17
|
}): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
/**
|
|
19
|
-
* Inner provider component
|
|
19
|
+
* Inner provider component that provides the actual B3Context
|
|
20
20
|
*/
|
|
21
21
|
export declare function InnerProvider({ children, accountOverride, environment, defaultPermissions, theme, clientType, partnerId, rpcUrls, }: {
|
|
22
22
|
children: React.ReactNode;
|
|
23
23
|
accountOverride?: Account;
|
|
24
|
-
environment
|
|
24
|
+
environment: B3ContextType["environment"];
|
|
25
25
|
defaultPermissions?: PermissionsConfig;
|
|
26
26
|
theme: "light" | "dark";
|
|
27
27
|
clientType?: ClientType;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CreateOnrampOrderParams } from "@b3dotfun/sdk/anyspend/react/hooks/useAnyspendCreateOnrampOrder";
|
|
2
|
+
import { CreateOrderParams } from "@b3dotfun/sdk/anyspend/react/hooks/useAnyspendCreateOrder";
|
|
3
|
+
import { PermissionsConfig } from "@b3dotfun/sdk/global-account/types/permissions";
|
|
4
|
+
import { Account, Wallet } from "thirdweb/wallets";
|
|
5
|
+
import { ClientType } from "../../../client-manager";
|
|
6
|
+
/**
|
|
7
|
+
* Context type for B3Provider
|
|
8
|
+
*/
|
|
9
|
+
export interface B3ContextType {
|
|
10
|
+
account?: Account;
|
|
11
|
+
automaticallySetFirstEoa: boolean;
|
|
12
|
+
wallet?: Wallet;
|
|
13
|
+
initialized: boolean;
|
|
14
|
+
ready: boolean;
|
|
15
|
+
environment?: "development" | "production";
|
|
16
|
+
defaultPermissions?: PermissionsConfig;
|
|
17
|
+
theme: "light" | "dark";
|
|
18
|
+
clientType: ClientType;
|
|
19
|
+
partnerId: string;
|
|
20
|
+
stripePublishableKey?: string;
|
|
21
|
+
createClientReferenceId?: (params: CreateOrderParams | CreateOnrampOrderParams) => Promise<string>;
|
|
22
|
+
enableTurnkey?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Context for B3 provider
|
|
26
|
+
*/
|
|
27
|
+
export declare const B3Context: import("react").Context<B3ContextType>;
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Hook to access the B3
|
|
3
|
-
* @
|
|
2
|
+
* Hook to access the B3 context
|
|
3
|
+
* @throws Error if used outside a B3Provider
|
|
4
|
+
* @deprecated Use useB3Config or useB3Account instead
|
|
4
5
|
*/
|
|
5
|
-
export declare function useB3():
|
|
6
|
-
automaticallySetFirstEoa: boolean;
|
|
7
|
-
environment: "development" | "production";
|
|
8
|
-
theme: "light" | "dark";
|
|
9
|
-
clientType: import("../../../client-manager").ClientType;
|
|
10
|
-
partnerId: string;
|
|
11
|
-
createClientReferenceId: ((params: import("../../../../anyspend/react").CreateOrderParams | import("../../../../anyspend/react").CreateOnrampOrderParams) => Promise<string>) | undefined;
|
|
12
|
-
enableTurnkey: boolean;
|
|
13
|
-
stripePublishableKey: string | undefined;
|
|
14
|
-
defaultPermissions: import("../../../types/permissions").PermissionsConfig;
|
|
15
|
-
accountOverride: import("thirdweb/wallets").Account | undefined;
|
|
16
|
-
};
|
|
6
|
+
export declare function useB3(): import("./types").B3ContextType;
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hook to access B3 configuration
|
|
3
|
-
* Returns all config values from the Zustand store
|
|
4
|
-
* Since config is static (set once at initialization), destructuring is fine here
|
|
5
|
-
*/
|
|
6
1
|
export declare const useB3Config: () => {
|
|
7
2
|
automaticallySetFirstEoa: boolean;
|
|
8
|
-
environment: "development" | "production";
|
|
3
|
+
environment: "development" | "production" | undefined;
|
|
9
4
|
theme: "light" | "dark";
|
|
10
5
|
clientType: import("../../../client-manager").ClientType;
|
|
11
6
|
partnerId: string;
|
|
12
7
|
createClientReferenceId: ((params: import("../../../../anyspend/react").CreateOrderParams | import("../../../../anyspend/react").CreateOnrampOrderParams) => Promise<string>) | undefined;
|
|
13
|
-
enableTurnkey: boolean;
|
|
14
|
-
stripePublishableKey: string | undefined;
|
|
15
|
-
defaultPermissions: import("../../../types/permissions").PermissionsConfig;
|
|
16
|
-
accountOverride: import("thirdweb/wallets").Account | undefined;
|
|
8
|
+
enableTurnkey: boolean | undefined;
|
|
17
9
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { B3DynamicModal } from "./B3DynamicModal";
|
|
2
|
-
export { B3Provider } from "./B3Provider/B3Provider";
|
|
2
|
+
export { B3Provider, InnerProvider } from "./B3Provider/B3Provider";
|
|
3
3
|
export { RelayKitProviderWrapper } from "./B3Provider/RelayKitProviderWrapper";
|
|
4
|
+
export { B3Context, type B3ContextType } from "./B3Provider/types";
|
|
4
5
|
export { useB3 } from "./B3Provider/useB3";
|
|
5
6
|
export { useB3Account } from "./B3Provider/useB3Account";
|
|
6
7
|
export { useB3Config } from "./B3Provider/useB3Config";
|
|
@@ -3,7 +3,6 @@ export { useAccountAssets } from "./useAccountAssets";
|
|
|
3
3
|
export { useAccountWallet } from "./useAccountWallet";
|
|
4
4
|
export { useAddTWSessionKey } from "./useAddTWSessionKey";
|
|
5
5
|
export { useAnalytics } from "./useAnalytics";
|
|
6
|
-
export { useAuth } from "./useAuth";
|
|
7
6
|
export { useAuthentication } from "./useAuthentication";
|
|
8
7
|
export { useB3BalanceFromAddresses } from "./useB3BalanceFromAddresses";
|
|
9
8
|
export { useB3EnsName } from "./useB3EnsName";
|
|
@@ -43,4 +42,3 @@ export { useTokensFromAddress } from "./useTokensFromAddress";
|
|
|
43
42
|
export { useTurnkeyAuth } from "./useTurnkeyAuth";
|
|
44
43
|
export { useUnifiedChainSwitchAndExecute } from "./useUnifiedChainSwitchAndExecute";
|
|
45
44
|
export { useURLParams } from "./useURLParams";
|
|
46
|
-
export { useUser } from "./useUser";
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { Wallet } from "thirdweb/wallets";
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated Use useAuth() with Turnkey authentication instead
|
|
4
|
-
*/
|
|
5
2
|
export declare function useTWAuth(): {
|
|
6
3
|
authenticate: (wallet: Wallet, partnerId: string) => Promise<import("@feathersjs/authentication").AuthenticationResult>;
|
|
7
4
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
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";
|
|
2
4
|
export { useAccountWallet } from "./hooks/useAccountWallet";
|
|
3
5
|
export { useAuthentication } from "./hooks/useAuthentication";
|
|
4
6
|
export { useProfile } from "./hooks/useProfile";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { useAuthStore } from "./useAuthStore";
|
|
2
|
-
export { useB3ConfigStore } from "./configStore";
|
|
3
2
|
export { useModalStore } from "./useModalStore";
|
|
4
3
|
export { useRecentAddressesStore } from "./useRecentAddressesStore";
|
|
5
4
|
export type { AnySpendBuySpinProps, AnySpendFundTournamentProps, AnySpendJoinTournamentProps, AnySpendModalProps, AnySpendNftProps, AnySpendOrderHistoryProps, AnySpendStakeB3Props, AnyspendOrderDetailsProps, ManageAccountModalProps, ModalContentType, RequestPermissionsModalProps, SignInWithB3ModalProps, } from "./useModalStore";
|
|
@@ -403,12 +403,6 @@ 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;
|
|
412
406
|
}
|
|
413
407
|
export interface AvatarEditorModalProps extends BaseModalProps {
|
|
414
408
|
/** Modal type identifier */
|
|
@@ -477,10 +471,6 @@ export interface AnySpendCollectorClubPurchaseProps extends BaseModalProps {
|
|
|
477
471
|
vendingMachineId: string;
|
|
478
472
|
/** The pack type */
|
|
479
473
|
packType: string;
|
|
480
|
-
/** Active tab */
|
|
481
|
-
activeTab?: "crypto" | "fiat";
|
|
482
|
-
/** Force fiat payment */
|
|
483
|
-
forceFiatPayment?: boolean;
|
|
484
474
|
}
|
|
485
475
|
/**
|
|
486
476
|
* Union type of all possible modal content types
|
package/package.json
CHANGED
|
@@ -4,9 +4,6 @@ import { components } from "../types/api";
|
|
|
4
4
|
export const ANYSPEND_MAINNET_BASE_URL = process.env.NEXT_PUBLIC_ANYSPEND_BASE_URL || "https://mainnet.anyspend.com";
|
|
5
5
|
|
|
6
6
|
export const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
7
|
-
export const GAS_ORACLE_BASE_URL = process.env.NEXT_PUBLIC_GAS_ORACLE_URL || "https://gas-oracle.sean-430.workers.dev";
|
|
8
|
-
|
|
9
|
-
export const RELAY_ETH_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
10
7
|
export const RELAY_SOL_ADDRESS = "11111111111111111111111111111111";
|
|
11
8
|
|
|
12
9
|
export const RELAY_SOLANA_MAINNET_CHAIN_ID = 792703809;
|
package/src/anyspend/index.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// Types
|
|
2
2
|
export * from "./types/api";
|
|
3
|
-
export * from "./types/gas";
|
|
4
3
|
|
|
5
4
|
// Utils
|
|
6
5
|
export * from "./utils/address";
|
|
@@ -15,9 +14,6 @@ export * from "./utils/validation";
|
|
|
15
14
|
// Constants
|
|
16
15
|
export * from "./constants";
|
|
17
16
|
|
|
18
|
-
// Services
|
|
19
|
-
export * from "./services/gas";
|
|
20
|
-
|
|
21
17
|
// Abis
|
|
22
18
|
export * from "./abis/abiUsdcBase";
|
|
23
19
|
export * from "./abis/erc20Staking";
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
useAnyspendCreateOrder,
|
|
15
15
|
useAnyspendOrderAndTransactions,
|
|
16
16
|
useAnyspendQuote,
|
|
17
|
-
useGasPrice,
|
|
18
17
|
useGeoOnrampOptions,
|
|
19
18
|
} from "@b3dotfun/sdk/anyspend/react";
|
|
20
19
|
import {
|
|
@@ -25,7 +24,7 @@ import {
|
|
|
25
24
|
toast,
|
|
26
25
|
TransitionPanel,
|
|
27
26
|
useAccountWallet,
|
|
28
|
-
|
|
27
|
+
useB3,
|
|
29
28
|
useModalStore,
|
|
30
29
|
useProfile,
|
|
31
30
|
useRouter,
|
|
@@ -56,7 +55,6 @@ import { CryptoPaySection } from "./common/CryptoPaySection";
|
|
|
56
55
|
import { CryptoReceiveSection } from "./common/CryptoReceiveSection";
|
|
57
56
|
import { FeeDetailPanel } from "./common/FeeDetailPanel";
|
|
58
57
|
import { FiatPaymentMethod, FiatPaymentMethodComponent } from "./common/FiatPaymentMethod";
|
|
59
|
-
import { GasIndicator } from "./common/GasIndicator";
|
|
60
58
|
import { OrderDetails, OrderDetailsLoadingView } from "./common/OrderDetails";
|
|
61
59
|
import { OrderHistory } from "./common/OrderHistory";
|
|
62
60
|
import { PanelOnramp } from "./common/PanelOnramp";
|
|
@@ -109,12 +107,6 @@ export function AnySpend(props: {
|
|
|
109
107
|
hideBottomNavigation?: boolean;
|
|
110
108
|
/** When true, disables URL parameter management for swap configuration */
|
|
111
109
|
disableUrlParamManagement?: boolean;
|
|
112
|
-
/** Custom URL to redirect to when clicking "Return to Home" on complete order screen */
|
|
113
|
-
returnToHomeUrl?: string;
|
|
114
|
-
/** Custom label for recipient display (e.g., "OBSN Telegram Bot") */
|
|
115
|
-
customRecipientLabel?: string;
|
|
116
|
-
/** Custom label for the return home button (overrides "Return to Home" / "Close") */
|
|
117
|
-
returnHomeLabel?: string;
|
|
118
110
|
}) {
|
|
119
111
|
const fingerprintConfig = getFingerprintConfig();
|
|
120
112
|
|
|
@@ -140,9 +132,6 @@ function AnySpendInner({
|
|
|
140
132
|
hideHeader,
|
|
141
133
|
hideBottomNavigation = false,
|
|
142
134
|
disableUrlParamManagement = false,
|
|
143
|
-
returnToHomeUrl,
|
|
144
|
-
customRecipientLabel,
|
|
145
|
-
returnHomeLabel,
|
|
146
135
|
}: {
|
|
147
136
|
sourceChainId?: number;
|
|
148
137
|
destinationTokenAddress?: string;
|
|
@@ -158,14 +147,11 @@ function AnySpendInner({
|
|
|
158
147
|
hideHeader?: boolean;
|
|
159
148
|
hideBottomNavigation?: boolean;
|
|
160
149
|
disableUrlParamManagement?: boolean;
|
|
161
|
-
returnToHomeUrl?: string;
|
|
162
|
-
customRecipientLabel?: string;
|
|
163
|
-
returnHomeLabel?: string;
|
|
164
150
|
}) {
|
|
165
151
|
const searchParams = useSearchParamsSSR();
|
|
166
152
|
const router = useRouter();
|
|
167
153
|
|
|
168
|
-
const { partnerId } =
|
|
154
|
+
const { partnerId } = useB3();
|
|
169
155
|
const setB3ModalContentType = useModalStore(state => state.setB3ModalContentType);
|
|
170
156
|
|
|
171
157
|
// Determine if we're in "buy mode" based on whether destination token props are provided
|
|
@@ -559,9 +545,6 @@ function AnySpendInner({
|
|
|
559
545
|
const { geoData, coinbaseAvailablePaymentMethods, stripeOnrampSupport, stripeWeb2Support } =
|
|
560
546
|
useGeoOnrampOptions(srcAmountOnRamp);
|
|
561
547
|
|
|
562
|
-
// Get gas price for source chain (where the user pays from)
|
|
563
|
-
const { gasPrice: gasPriceData, isLoading: isLoadingGas } = useGasPrice(selectedSrcChainId);
|
|
564
|
-
|
|
565
548
|
// Helper function to map payment method to onramp vendor
|
|
566
549
|
const getOnrampVendor = (paymentMethod: FiatPaymentMethod): "coinbase" | "stripe" | "stripe-web2" | undefined => {
|
|
567
550
|
switch (paymentMethod) {
|
|
@@ -1083,8 +1066,6 @@ function AnySpendInner({
|
|
|
1083
1066
|
// Reset payment methods when going back
|
|
1084
1067
|
resetPaymentMethods();
|
|
1085
1068
|
}}
|
|
1086
|
-
returnToHomeUrl={returnToHomeUrl}
|
|
1087
|
-
returnHomeLabel={returnHomeLabel}
|
|
1088
1069
|
/>
|
|
1089
1070
|
)}
|
|
1090
1071
|
{/* {mode === "page" && <div className="h-12" />} */}
|
|
@@ -1176,7 +1157,6 @@ function AnySpendInner({
|
|
|
1176
1157
|
onShowPointsDetail={() => navigateToPanel(PanelView.POINTS_DETAIL, "forward")}
|
|
1177
1158
|
onShowFeeDetail={() => navigateToPanel(PanelView.FEE_DETAIL, "forward")}
|
|
1178
1159
|
customUsdInputValues={customUsdInputValues}
|
|
1179
|
-
customRecipientLabel={customRecipientLabel}
|
|
1180
1160
|
/>
|
|
1181
1161
|
</motion.div>
|
|
1182
1162
|
)}
|
|
@@ -1229,7 +1209,6 @@ function AnySpendInner({
|
|
|
1229
1209
|
isBuyMode={isBuyMode}
|
|
1230
1210
|
effectiveRecipientAddress={effectiveRecipientAddress}
|
|
1231
1211
|
recipientName={recipientName || undefined}
|
|
1232
|
-
customRecipientLabel={customRecipientLabel}
|
|
1233
1212
|
onSelectRecipient={() => navigateToPanel(PanelView.RECIPIENT_SELECTION, "forward")}
|
|
1234
1213
|
dstAmount={dstAmount}
|
|
1235
1214
|
dstToken={selectedDstToken}
|
|
@@ -1248,11 +1227,6 @@ function AnySpendInner({
|
|
|
1248
1227
|
)}
|
|
1249
1228
|
</div>
|
|
1250
1229
|
|
|
1251
|
-
{/* Gas indicator - show when source chain has gas data */}
|
|
1252
|
-
{gasPriceData && !isLoadingGas && activeTab === "crypto" && (
|
|
1253
|
-
<GasIndicator gasPrice={gasPriceData} className="mt-2 w-full" />
|
|
1254
|
-
)}
|
|
1255
|
-
|
|
1256
1230
|
{/* Main button section */}
|
|
1257
1231
|
<motion.div
|
|
1258
1232
|
initial={{ opacity: 0, y: 20, filter: "blur(10px)" }}
|
|
@@ -109,10 +109,6 @@ export interface AnySpendCollectorClubPurchaseProps {
|
|
|
109
109
|
* The partner ID
|
|
110
110
|
*/
|
|
111
111
|
packType: string;
|
|
112
|
-
/**
|
|
113
|
-
* Force fiat payment
|
|
114
|
-
*/
|
|
115
|
-
forceFiatPayment?: boolean;
|
|
116
112
|
}
|
|
117
113
|
|
|
118
114
|
export function AnySpendCollectorClubPurchase({
|
|
@@ -130,7 +126,6 @@ export function AnySpendCollectorClubPurchase({
|
|
|
130
126
|
showRecipient = true,
|
|
131
127
|
vendingMachineId,
|
|
132
128
|
packType,
|
|
133
|
-
forceFiatPayment,
|
|
134
129
|
}: AnySpendCollectorClubPurchaseProps) {
|
|
135
130
|
// Calculate total amount needed (pricePerPack * packAmount)
|
|
136
131
|
const totalAmount = useMemo(() => {
|
|
@@ -198,7 +193,6 @@ export function AnySpendCollectorClubPurchase({
|
|
|
198
193
|
onSuccess={onSuccess}
|
|
199
194
|
showRecipient={showRecipient}
|
|
200
195
|
srcFiatAmount={srcFiatAmount}
|
|
201
|
-
forceFiatPayment={forceFiatPayment}
|
|
202
196
|
/>
|
|
203
197
|
);
|
|
204
198
|
}
|
|
@@ -174,7 +174,6 @@ export function AnySpendCustom(props: {
|
|
|
174
174
|
dstChainId: number;
|
|
175
175
|
dstToken: components["schemas"]["Token"];
|
|
176
176
|
dstAmount: string;
|
|
177
|
-
forceFiatPayment?: boolean;
|
|
178
177
|
contractAddress: string;
|
|
179
178
|
encodedData: string;
|
|
180
179
|
metadata: any;
|
|
@@ -218,7 +217,6 @@ function AnySpendCustomInner({
|
|
|
218
217
|
showRecipient = true,
|
|
219
218
|
onShowPointsDetail,
|
|
220
219
|
srcFiatAmount: srcFiatAmountProps,
|
|
221
|
-
forceFiatPayment,
|
|
222
220
|
}: {
|
|
223
221
|
loadOrder?: string;
|
|
224
222
|
mode?: "modal" | "page";
|
|
@@ -243,7 +241,6 @@ function AnySpendCustomInner({
|
|
|
243
241
|
showRecipient?: boolean;
|
|
244
242
|
onShowPointsDetail?: () => void;
|
|
245
243
|
srcFiatAmount?: string;
|
|
246
|
-
forceFiatPayment?: boolean;
|
|
247
244
|
}) {
|
|
248
245
|
const hasMounted = useHasMounted();
|
|
249
246
|
|
|
@@ -864,67 +861,65 @@ function AnySpendCustomInner({
|
|
|
864
861
|
onValueChange={value => setActiveTab(value as "crypto" | "fiat")}
|
|
865
862
|
className="bg-b3-react-background max-h-[60dvh] w-full overflow-y-auto p-5"
|
|
866
863
|
>
|
|
867
|
-
|
|
868
|
-
<div className="
|
|
869
|
-
<div
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
864
|
+
<div className="w-full">
|
|
865
|
+
<div className="bg-as-surface-secondary relative mb-4 grid h-10 grid-cols-2 rounded-xl">
|
|
866
|
+
<div
|
|
867
|
+
className={cn(
|
|
868
|
+
"bg-as-brand absolute bottom-0 left-0 top-0 z-0 rounded-xl transition-transform duration-100",
|
|
869
|
+
"h-full w-1/2",
|
|
870
|
+
activeTab === "fiat" ? "translate-x-full" : "translate-x-0",
|
|
871
|
+
)}
|
|
872
|
+
style={{ willChange: "transform" }}
|
|
873
|
+
/>
|
|
874
|
+
<button
|
|
875
|
+
className={cn(
|
|
876
|
+
"relative z-10 h-full w-full rounded-xl px-3 text-sm font-medium transition-colors duration-100",
|
|
877
|
+
activeTab === "crypto" ? "text-white" : "text-as-primary/70 hover:bg-as-on-surface-2 bg-transparent",
|
|
878
|
+
)}
|
|
879
|
+
onClick={() => {
|
|
880
|
+
setActiveTab("crypto");
|
|
881
|
+
// Reset payment methods when switching tabs
|
|
882
|
+
resetPaymentMethods();
|
|
883
|
+
setSelectedFiatPaymentMethod(FiatPaymentMethod.NONE);
|
|
884
|
+
}}
|
|
885
|
+
>
|
|
886
|
+
Pay with crypto
|
|
887
|
+
</button>
|
|
888
|
+
{isOnrampSupported ? (
|
|
878
889
|
<button
|
|
879
890
|
className={cn(
|
|
880
891
|
"relative z-10 h-full w-full rounded-xl px-3 text-sm font-medium transition-colors duration-100",
|
|
881
|
-
activeTab === "
|
|
892
|
+
activeTab === "fiat" ? "text-white" : "text-as-primary/70 hover:bg-as-on-surface-2 bg-transparent",
|
|
882
893
|
)}
|
|
883
894
|
onClick={() => {
|
|
884
|
-
setActiveTab("
|
|
895
|
+
setActiveTab("fiat");
|
|
885
896
|
// Reset payment methods when switching tabs
|
|
886
897
|
resetPaymentMethods();
|
|
887
898
|
setSelectedFiatPaymentMethod(FiatPaymentMethod.NONE);
|
|
888
899
|
}}
|
|
889
900
|
>
|
|
890
|
-
Pay with
|
|
901
|
+
Pay with fiat
|
|
891
902
|
</button>
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
>
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
<button
|
|
911
|
-
className={cn(
|
|
912
|
-
"relative z-10 h-full w-full rounded-xl px-3 text-sm font-medium transition-colors duration-100",
|
|
913
|
-
"text-as-primary/50 cursor-not-allowed bg-transparent",
|
|
914
|
-
)}
|
|
915
|
-
disabled
|
|
916
|
-
>
|
|
917
|
-
Pay with fiat
|
|
918
|
-
</button>
|
|
919
|
-
</TooltipTrigger>
|
|
920
|
-
<TooltipContent>
|
|
921
|
-
<span className="text-as-primary w-[140px]">Fiat payments are not supported for this amount</span>
|
|
922
|
-
</TooltipContent>
|
|
923
|
-
</Tooltip>
|
|
924
|
-
)}
|
|
925
|
-
</div>
|
|
903
|
+
) : (
|
|
904
|
+
<Tooltip>
|
|
905
|
+
<TooltipTrigger asChild>
|
|
906
|
+
<button
|
|
907
|
+
className={cn(
|
|
908
|
+
"relative z-10 h-full w-full rounded-xl px-3 text-sm font-medium transition-colors duration-100",
|
|
909
|
+
"text-as-primary/50 cursor-not-allowed bg-transparent",
|
|
910
|
+
)}
|
|
911
|
+
disabled
|
|
912
|
+
>
|
|
913
|
+
Pay with fiat
|
|
914
|
+
</button>
|
|
915
|
+
</TooltipTrigger>
|
|
916
|
+
<TooltipContent>
|
|
917
|
+
<span className="text-as-primary w-[140px]">Fiat payments are not supported for this amount</span>
|
|
918
|
+
</TooltipContent>
|
|
919
|
+
</Tooltip>
|
|
920
|
+
)}
|
|
926
921
|
</div>
|
|
927
|
-
|
|
922
|
+
</div>
|
|
928
923
|
|
|
929
924
|
{/* Warning */}
|
|
930
925
|
{/* {srcChainId === base.id || dstChainId === base.id || activeTab === "fiat" ? (
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { useGasPrice } from "@b3dotfun/sdk/anyspend/react";
|
|
2
1
|
import { components } from "@b3dotfun/sdk/anyspend/types/api";
|
|
3
2
|
import { GetQuoteResponse } from "@b3dotfun/sdk/anyspend/types/api_req_res";
|
|
4
3
|
import { normalizeAddress } from "@b3dotfun/sdk/anyspend/utils";
|
|
@@ -26,7 +25,6 @@ import { CryptoPaymentMethod, CryptoPaymentMethodType } from "./common/CryptoPay
|
|
|
26
25
|
import { CryptoReceiveSection } from "./common/CryptoReceiveSection";
|
|
27
26
|
import { FeeDetailPanel } from "./common/FeeDetailPanel";
|
|
28
27
|
import { FiatPaymentMethod, FiatPaymentMethodComponent } from "./common/FiatPaymentMethod";
|
|
29
|
-
import { GasIndicator } from "./common/GasIndicator";
|
|
30
28
|
import { OrderDetails } from "./common/OrderDetails";
|
|
31
29
|
import { PanelOnramp } from "./common/PanelOnramp";
|
|
32
30
|
import { PointsDetailPanel } from "./common/PointsDetailPanel";
|
|
@@ -68,12 +66,6 @@ export interface AnySpendCustomExactInProps {
|
|
|
68
66
|
anyspendPrice: GetQuoteResponse | undefined;
|
|
69
67
|
isLoadingAnyspendPrice: boolean;
|
|
70
68
|
}) => React.JSX.Element;
|
|
71
|
-
/** Custom URL to redirect to when clicking "Return to Home" on complete order screen */
|
|
72
|
-
returnToHomeUrl?: string;
|
|
73
|
-
/** Custom label for recipient display (e.g., "OBSN Telegram Bot") */
|
|
74
|
-
customRecipientLabel?: string;
|
|
75
|
-
/** Custom label for the return home button (overrides "Return to Home" / "Close") */
|
|
76
|
-
returnHomeLabel?: string;
|
|
77
69
|
}
|
|
78
70
|
|
|
79
71
|
export function AnySpendCustomExactIn(props: AnySpendCustomExactInProps) {
|
|
@@ -105,9 +97,6 @@ function AnySpendCustomExactInInner({
|
|
|
105
97
|
orderType = "custom_exact_in",
|
|
106
98
|
minDestinationAmount,
|
|
107
99
|
header,
|
|
108
|
-
returnToHomeUrl,
|
|
109
|
-
customRecipientLabel,
|
|
110
|
-
returnHomeLabel,
|
|
111
100
|
}: AnySpendCustomExactInProps) {
|
|
112
101
|
const actionLabel = customExactInConfig?.action ?? "Custom Execution";
|
|
113
102
|
|
|
@@ -170,9 +159,6 @@ function AnySpendCustomExactInInner({
|
|
|
170
159
|
|
|
171
160
|
const { connectedEOAWallet } = useAccountWallet();
|
|
172
161
|
const setActiveWallet = useSetActiveWallet();
|
|
173
|
-
|
|
174
|
-
// Get gas price for source chain (where the user pays from)
|
|
175
|
-
const { gasPrice: gasPriceData, isLoading: isLoadingGas } = useGasPrice(selectedSrcChainId);
|
|
176
162
|
const appliedPreferEoa = useRef(false);
|
|
177
163
|
|
|
178
164
|
useEffect(() => {
|
|
@@ -372,7 +358,6 @@ function AnySpendCustomExactInInner({
|
|
|
372
358
|
onShowPointsDetail={() => setActivePanel(PanelView.POINTS_DETAIL)}
|
|
373
359
|
onShowFeeDetail={() => setActivePanel(PanelView.FEE_DETAIL)}
|
|
374
360
|
customUsdInputValues={customUsdInputValues}
|
|
375
|
-
customRecipientLabel={customRecipientLabel}
|
|
376
361
|
/>
|
|
377
362
|
</motion.div>
|
|
378
363
|
)}
|
|
@@ -398,7 +383,6 @@ function AnySpendCustomExactInInner({
|
|
|
398
383
|
isBuyMode={true}
|
|
399
384
|
effectiveRecipientAddress={selectedRecipientOrDefault}
|
|
400
385
|
recipientName={recipientName || undefined}
|
|
401
|
-
customRecipientLabel={customRecipientLabel}
|
|
402
386
|
onSelectRecipient={() => setActivePanel(PanelView.RECIPIENT_SELECTION)}
|
|
403
387
|
dstAmount={dstAmount}
|
|
404
388
|
dstToken={selectedDstToken}
|
|
@@ -443,11 +427,6 @@ function AnySpendCustomExactInInner({
|
|
|
443
427
|
</ShinyButton>
|
|
444
428
|
</motion.div>
|
|
445
429
|
|
|
446
|
-
{/* Gas indicator - show when source chain has gas data */}
|
|
447
|
-
{gasPriceData && !isLoadingGas && paymentType === "crypto" && (
|
|
448
|
-
<GasIndicator gasPrice={gasPriceData} className="mt-2 w-full" />
|
|
449
|
-
)}
|
|
450
|
-
|
|
451
430
|
{mainFooter ? mainFooter : null}
|
|
452
431
|
</div>
|
|
453
432
|
);
|
|
@@ -553,8 +532,6 @@ function AnySpendCustomExactInInner({
|
|
|
553
532
|
}}
|
|
554
533
|
disableUrlParamManagement
|
|
555
534
|
points={oat.data.points || undefined}
|
|
556
|
-
returnToHomeUrl={returnToHomeUrl}
|
|
557
|
-
returnHomeLabel={returnHomeLabel}
|
|
558
535
|
/>
|
|
559
536
|
)}
|
|
560
537
|
</div>
|