@b3dotfun/sdk 0.0.7 → 0.0.8
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/abis/abi-usdc-base.js +97 -97
- package/dist/cjs/anyspend/abis/erc20-staking.js +51 -51
- package/dist/cjs/anyspend/abis/signature-minting.d.ts +79 -0
- package/dist/cjs/anyspend/abis/signature-minting.js +45 -0
- package/dist/cjs/anyspend/constants/index.js +13 -10
- package/dist/cjs/anyspend/index.d.ts +4 -2
- package/dist/cjs/anyspend/index.js +4 -4
- package/dist/cjs/anyspend/react/components/AnySpend.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpend.js +69 -68
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +68 -66
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +4 -4
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +158 -101
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +3 -2
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +7 -5
- package/dist/cjs/anyspend/react/components/AnySpendNFTButton.js +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +21 -20
- package/dist/cjs/anyspend/react/components/AnySpendTournament.js +7 -4
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.d.ts +8 -0
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.js +77 -0
- package/dist/cjs/anyspend/react/components/common/ChainTokenIcon.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/ChainTokenIcon.js +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +52 -63
- package/dist/cjs/anyspend/react/components/common/OrderHistory.js +6 -6
- package/dist/cjs/anyspend/react/components/common/OrderToken.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderToken.js +4 -4
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmount.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmount.js +2 -2
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +9 -9
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +15 -14
- package/dist/cjs/anyspend/react/components/common/PaymentMethodIcons.js +1 -1
- package/dist/cjs/anyspend/react/components/common/PaymentOneClick.js +3 -3
- package/dist/cjs/anyspend/react/components/common/PaymentStripeWeb2.js +26 -25
- package/dist/cjs/anyspend/react/components/common/TokenBalance.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/TokenBalance.js +2 -2
- package/dist/cjs/anyspend/react/components/common/Warning.d.ts +3 -0
- package/dist/cjs/anyspend/react/components/common/Warning.js +7 -0
- package/dist/cjs/anyspend/react/components/index.d.ts +2 -0
- package/dist/cjs/anyspend/react/components/index.js +5 -1
- package/dist/cjs/anyspend/react/components/modals/EnterRecipientModal.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/modals/EnterRecipientModal.js +6 -6
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampOrderStatus.js +0 -1
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.js +26 -25
- package/dist/cjs/anyspend/react/hooks/index.d.ts +1 -2
- package/dist/cjs/anyspend/react/hooks/index.js +1 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +3 -18
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +1 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.js +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +14 -70
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +14 -70
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.js +3 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendQuote.js +3 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendTokens.js +3 -3
- package/dist/cjs/anyspend/react/hooks/useCoinbaseOnrampOptions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useGeoOnrampOptions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useGetGeo.js +1 -1
- package/dist/cjs/anyspend/react/hooks/useSigMint.d.ts +140 -0
- package/dist/cjs/anyspend/react/hooks/useSigMint.js +39 -0
- package/dist/cjs/anyspend/react/hooks/useStripeClientSecret.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useStripeSupport.js +2 -2
- package/dist/cjs/anyspend/react/providers/AnyspendProvider.js +7 -6
- package/dist/cjs/anyspend/services/anyspend.d.ts +9 -40
- package/dist/cjs/anyspend/services/anyspend.js +11 -24
- package/dist/cjs/anyspend/types/custom.js +2 -2
- package/dist/cjs/anyspend/types/globalWallet.js +1 -1
- package/dist/cjs/anyspend/types/index.d.ts +1 -1
- package/dist/cjs/anyspend/types/index.js +1 -1
- package/dist/cjs/anyspend/types/metadata.d.ts +26 -0
- package/dist/cjs/anyspend/types/metadata.js +16 -0
- package/dist/cjs/anyspend/types/nft.d.ts +7 -0
- package/dist/cjs/anyspend/types/nft.js +8 -6
- package/dist/cjs/anyspend/types/onramp.d.ts +3 -0
- package/dist/cjs/anyspend/types/onramp.js +2 -1
- package/dist/cjs/anyspend/types/order.d.ts +40 -200
- package/dist/cjs/anyspend/types/order.js +7 -12
- package/dist/cjs/anyspend/types/req-res/createOrder.d.ts +98 -235
- package/dist/cjs/anyspend/types/req-res/createOrder.js +9 -9
- package/dist/cjs/anyspend/types/req-res/getCoinbaseOnrampOptions.js +5 -5
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.d.ts +63 -305
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.js +4 -4
- package/dist/cjs/anyspend/types/req-res/getOrderByCreator.js +2 -2
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.d.ts +49 -235
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.js +1 -1
- package/dist/cjs/anyspend/types/req-res/getQuote.d.ts +37 -0
- package/dist/cjs/anyspend/types/req-res/getQuote.js +14 -9
- package/dist/cjs/anyspend/types/req-res/getTokenList.js +3 -3
- package/dist/cjs/anyspend/types/req-res/index.d.ts +0 -1
- package/dist/cjs/anyspend/types/req-res/index.js +0 -1
- package/dist/cjs/anyspend/types/signature-mint.d.ts +69 -0
- package/dist/cjs/anyspend/types/signature-mint.js +2 -0
- package/dist/cjs/anyspend/types/swap.js +2 -2
- package/dist/cjs/anyspend/types/token.js +2 -2
- package/dist/cjs/anyspend/types/tournament.js +4 -4
- package/dist/cjs/anyspend/types/transaction.js +4 -4
- package/dist/cjs/anyspend/utils/chain.js +16 -16
- package/dist/cjs/anyspend/utils/format.js +2 -6
- package/dist/cjs/anyspend/utils/orderPayload.d.ts +3 -3
- package/dist/cjs/anyspend/utils/orderPayload.js +22 -8
- package/dist/cjs/anyspend/utils/token.js +10 -10
- package/dist/cjs/global-account/app.js +4 -4
- package/dist/cjs/global-account/app.native.js +4 -4
- package/dist/cjs/global-account/bsmnt.js +4 -4
- package/dist/cjs/global-account/bsmnt.native.js +4 -4
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +13 -3
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +3 -3
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +17 -16
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.d.ts +2 -2
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +4 -4
- package/dist/cjs/global-account/react/components/B3Provider/types.js +1 -1
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.js +5 -5
- package/dist/cjs/global-account/react/components/MintButton/MintButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/MintButton/MintButton.js +5 -5
- package/dist/cjs/global-account/react/components/RelayKitProviderWrapper.js +2 -2
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +1 -1
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.js +5 -5
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissionsButton.js +2 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.d.ts +14 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +50 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +1 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.js +12 -17
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +12 -12
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/WalletRow.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.js +9 -9
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +2 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.js +2 -2
- package/dist/cjs/global-account/react/components/StyleRoot.js +0 -1
- package/dist/cjs/global-account/react/components/Transak/TransakModal.js +4 -4
- package/dist/cjs/global-account/react/components/custom/Button.js +5 -5
- package/dist/cjs/global-account/react/components/custom/Icon.d.ts +7 -0
- package/dist/cjs/global-account/react/components/custom/Icon.js +52 -0
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.d.ts +4 -0
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.js +20 -0
- package/dist/cjs/global-account/react/components/custom/StaggeredFadeLoader.js +3 -3
- package/dist/cjs/global-account/react/components/index.d.ts +4 -4
- package/dist/cjs/global-account/react/components/magicui/AnimatedLottie.js +1 -1
- package/dist/cjs/global-account/react/components/ui/Loading.js +2 -2
- package/dist/cjs/global-account/react/components/ui/ShinyButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/ShinyButton.js +3 -3
- package/dist/cjs/global-account/react/components/ui/TabSystem.js +1 -1
- package/dist/cjs/global-account/react/components/ui/Tabs.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/Tabs.js +1 -1
- package/dist/cjs/global-account/react/components/ui/badge.js +4 -4
- package/dist/cjs/global-account/react/components/ui/button.js +5 -5
- package/dist/cjs/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/dialog.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/glare-card-rounded.js +12 -12
- package/dist/cjs/global-account/react/components/ui/glare-card.js +11 -11
- package/dist/cjs/global-account/react/components/ui/input.js +1 -1
- package/dist/cjs/global-account/react/components/ui/text-loop.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/text-loop.js +2 -2
- package/dist/cjs/global-account/react/components/ui/text-shimmer.js +2 -2
- package/dist/cjs/global-account/react/components/ui/tooltip.js +1 -1
- package/dist/cjs/global-account/react/hooks/useAccountAssets.js +4 -4
- package/dist/cjs/global-account/react/hooks/useAccountWallet.js +8 -8
- package/dist/cjs/global-account/react/hooks/useAddTWSessionKey.d.ts +2 -2
- package/dist/cjs/global-account/react/hooks/useAddTWSessionKey.js +6 -6
- package/dist/cjs/global-account/react/hooks/useAuthentication.js +3 -3
- package/dist/cjs/global-account/react/hooks/useB3BalanceFromAddresses.js +7 -7
- package/dist/cjs/global-account/react/hooks/useB3EnsName.d.ts +8 -4
- package/dist/cjs/global-account/react/hooks/useB3EnsName.js +32 -23
- package/dist/cjs/global-account/react/hooks/useBestTransactionPath.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useBestTransactionPath.js +10 -10
- package/dist/cjs/global-account/react/hooks/useBsmntProfile.js +1 -1
- package/dist/cjs/global-account/react/hooks/useChainSwitchWithAction.js +3 -3
- package/dist/cjs/global-account/react/hooks/useClaim.js +4 -4
- package/dist/cjs/global-account/react/hooks/useConnect.js +3 -3
- package/dist/cjs/global-account/react/hooks/useExchangeRate.js +3 -3
- package/dist/cjs/global-account/react/hooks/useGetAllTWSigners.js +7 -7
- package/dist/cjs/global-account/react/hooks/useGetGeo.js +1 -1
- package/dist/cjs/global-account/react/hooks/useHandleConnectWithPrivy.js +2 -2
- package/dist/cjs/global-account/react/hooks/useNativeBalance.js +6 -6
- package/dist/cjs/global-account/react/hooks/useOnchainName.js +10 -10
- package/dist/cjs/global-account/react/hooks/useOneBalance.js +2 -2
- package/dist/cjs/global-account/react/hooks/useRemoveSessionKey.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useRemoveSessionKey.js +3 -3
- package/dist/cjs/global-account/react/hooks/useRouter.js +6 -6
- package/dist/cjs/global-account/react/hooks/useSiwe.js +4 -4
- package/dist/cjs/global-account/react/hooks/useTokenBalance.js +6 -6
- package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.js +9 -9
- package/dist/cjs/global-account/react/hooks/useTokenData.js +3 -3
- package/dist/cjs/global-account/react/hooks/useTokenFromUrl.js +14 -14
- package/dist/cjs/global-account/react/hooks/useTokenPrice.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokenPrice.js +6 -6
- package/dist/cjs/global-account/react/hooks/useTokenPriceWithFallback.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokenPriceWithFallback.js +7 -7
- package/dist/cjs/global-account/react/hooks/useTokensFromAddress.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokensFromAddress.js +2 -2
- package/dist/cjs/global-account/react/hooks/useURLParams.js +1 -1
- package/dist/cjs/global-account/react/stores/index.d.ts +1 -1
- package/dist/cjs/global-account/react/stores/useAuthStore.js +3 -3
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +18 -1
- package/dist/cjs/global-account/react/stores/useModalStore.js +3 -3
- package/dist/cjs/global-account/server.js +3 -3
- package/dist/cjs/global-account/types/chain-networks.js +8 -8
- package/dist/cjs/global-account/types/feature-flags.js +1 -1
- package/dist/cjs/index.d.ts +0 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/shared/constants/chains/b3Chain.js +35 -35
- package/dist/cjs/shared/constants/chains/chainPlatformMap.js +1 -1
- package/dist/cjs/shared/constants/chains/supported.js +4 -1
- package/dist/cjs/shared/constants/index.d.ts +1 -0
- package/dist/cjs/shared/constants/index.js +3 -2
- package/dist/cjs/shared/react/hooks/index.d.ts +1 -0
- package/dist/cjs/shared/react/hooks/index.js +17 -0
- package/dist/cjs/shared/react/hooks/useNavigation.d.ts +17 -0
- package/dist/cjs/shared/react/hooks/useNavigation.js +57 -0
- package/dist/cjs/shared/react/index.d.ts +1 -0
- package/dist/cjs/shared/react/index.js +17 -0
- package/dist/cjs/shared/thirdweb/generated/sdk.gen.d.ts +2 -2
- package/dist/cjs/shared/thirdweb/generated/sdk.gen.js +1 -1
- package/dist/cjs/shared/thirdweb/initiateClient.js +2 -2
- package/dist/cjs/shared/thirdweb/openapi-ts.config.js +1 -1
- package/dist/cjs/shared/utils/b3Ens.js +4 -4
- package/dist/cjs/shared/utils/chain-transformers.js +9 -9
- package/dist/cjs/shared/utils/fetchBalances.js +4 -4
- package/dist/cjs/shared/utils/formatUsername.d.ts +1 -0
- package/dist/cjs/shared/utils/formatUsername.js +8 -0
- package/dist/cjs/shared/utils/index.d.ts +3 -1
- package/dist/cjs/shared/utils/index.js +4 -6
- package/dist/cjs/shared/utils/insights.js +28 -28
- package/dist/cjs/shared/utils/ipfs.js +1 -1
- package/dist/cjs/shared/utils/number.js +3 -3
- package/dist/cjs/shared/utils/simplehash.js +22 -22
- package/dist/cjs/shared/utils/thirdweb-insights.js +15 -15
- package/dist/cjs/shared/utils/truncateAddress.d.ts +6 -0
- package/dist/cjs/shared/utils/truncateAddress.js +16 -0
- package/dist/esm/anyspend/abis/abi-usdc-base.js +97 -97
- package/dist/esm/anyspend/abis/erc20-staking.js +51 -51
- package/dist/esm/anyspend/abis/signature-minting.d.ts +79 -0
- package/dist/esm/anyspend/abis/signature-minting.js +42 -0
- package/dist/esm/anyspend/constants/index.js +13 -10
- package/dist/esm/anyspend/index.d.ts +4 -2
- package/dist/esm/anyspend/index.js +4 -4
- package/dist/esm/anyspend/react/components/AnySpend.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpend.js +23 -22
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +41 -39
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +4 -4
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +138 -81
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +3 -2
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +7 -5
- package/dist/esm/anyspend/react/components/AnySpendNFTButton.js +1 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +22 -21
- package/dist/esm/anyspend/react/components/AnySpendTournament.js +7 -4
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.d.ts +8 -0
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.js +71 -0
- package/dist/esm/anyspend/react/components/common/ChainTokenIcon.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/ChainTokenIcon.js +1 -1
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +53 -64
- package/dist/esm/anyspend/react/components/common/OrderHistory.js +1 -1
- package/dist/esm/anyspend/react/components/common/OrderToken.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/OrderToken.js +4 -4
- package/dist/esm/anyspend/react/components/common/OrderTokenAmount.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/OrderTokenAmount.js +2 -2
- package/dist/esm/anyspend/react/components/common/PanelOnramp.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/PanelOnramp.js +3 -3
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +9 -8
- package/dist/esm/anyspend/react/components/common/PaymentMethodIcons.js +1 -1
- package/dist/esm/anyspend/react/components/common/PaymentOneClick.js +3 -3
- package/dist/esm/anyspend/react/components/common/PaymentStripeWeb2.js +14 -13
- package/dist/esm/anyspend/react/components/common/TokenBalance.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/TokenBalance.js +2 -2
- package/dist/esm/anyspend/react/components/common/Warning.d.ts +3 -0
- package/dist/esm/anyspend/react/components/common/Warning.js +4 -0
- package/dist/esm/anyspend/react/components/index.d.ts +2 -0
- package/dist/esm/anyspend/react/components/index.js +2 -0
- package/dist/esm/anyspend/react/components/modals/EnterRecipientModal.d.ts +1 -1
- package/dist/esm/anyspend/react/components/modals/EnterRecipientModal.js +2 -2
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampOrderStatus.js +0 -1
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +1 -1
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.js +16 -15
- package/dist/esm/anyspend/react/hooks/index.d.ts +1 -2
- package/dist/esm/anyspend/react/hooks/index.js +1 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +3 -18
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +6 -6
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +1 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.js +7 -7
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +14 -70
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +14 -70
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.js +3 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendQuote.js +3 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendTokens.js +3 -3
- package/dist/esm/anyspend/react/hooks/useCoinbaseOnrampOptions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useGeoOnrampOptions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useGetGeo.js +1 -1
- package/dist/esm/anyspend/react/hooks/useSigMint.d.ts +140 -0
- package/dist/esm/anyspend/react/hooks/useSigMint.js +33 -0
- package/dist/esm/anyspend/react/hooks/useStripeClientSecret.js +2 -2
- package/dist/esm/anyspend/react/hooks/useStripeSupport.js +2 -2
- package/dist/esm/anyspend/react/providers/AnyspendProvider.js +5 -4
- package/dist/esm/anyspend/services/anyspend.d.ts +9 -40
- package/dist/esm/anyspend/services/anyspend.js +12 -25
- package/dist/esm/anyspend/types/custom.js +2 -2
- package/dist/esm/anyspend/types/globalWallet.js +1 -1
- package/dist/esm/anyspend/types/index.d.ts +1 -1
- package/dist/esm/anyspend/types/index.js +1 -1
- package/dist/esm/anyspend/types/metadata.d.ts +26 -0
- package/dist/esm/anyspend/types/metadata.js +11 -0
- package/dist/esm/anyspend/types/nft.d.ts +7 -0
- package/dist/esm/anyspend/types/nft.js +8 -6
- package/dist/esm/anyspend/types/onramp.d.ts +3 -0
- package/dist/esm/anyspend/types/onramp.js +2 -1
- package/dist/esm/anyspend/types/order.d.ts +40 -200
- package/dist/esm/anyspend/types/order.js +7 -12
- package/dist/esm/anyspend/types/req-res/createOrder.d.ts +98 -235
- package/dist/esm/anyspend/types/req-res/createOrder.js +9 -9
- package/dist/esm/anyspend/types/req-res/getCoinbaseOnrampOptions.js +5 -5
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.d.ts +63 -305
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.js +4 -4
- package/dist/esm/anyspend/types/req-res/getOrderByCreator.js +2 -2
- package/dist/esm/anyspend/types/req-res/getOrderHistory.d.ts +49 -235
- package/dist/esm/anyspend/types/req-res/getOrderHistory.js +1 -1
- package/dist/esm/anyspend/types/req-res/getQuote.d.ts +37 -0
- package/dist/esm/anyspend/types/req-res/getQuote.js +14 -9
- package/dist/esm/anyspend/types/req-res/getTokenList.js +3 -3
- package/dist/esm/anyspend/types/req-res/index.d.ts +0 -1
- package/dist/esm/anyspend/types/req-res/index.js +0 -1
- package/dist/esm/anyspend/types/signature-mint.d.ts +69 -0
- package/dist/esm/anyspend/types/signature-mint.js +1 -0
- package/dist/esm/anyspend/types/swap.js +2 -2
- package/dist/esm/anyspend/types/token.js +2 -2
- package/dist/esm/anyspend/types/tournament.js +4 -4
- package/dist/esm/anyspend/types/transaction.js +4 -4
- package/dist/esm/anyspend/utils/chain.js +18 -18
- package/dist/esm/anyspend/utils/format.js +2 -6
- package/dist/esm/anyspend/utils/orderPayload.d.ts +3 -3
- package/dist/esm/anyspend/utils/orderPayload.js +23 -9
- package/dist/esm/anyspend/utils/token.js +10 -10
- package/dist/esm/global-account/app.js +4 -4
- package/dist/esm/global-account/app.native.js +4 -4
- package/dist/esm/global-account/bsmnt.js +4 -4
- package/dist/esm/global-account/bsmnt.native.js +4 -4
- package/dist/esm/global-account/react/components/B3DynamicModal.js +14 -4
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +3 -3
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +8 -7
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.d.ts +2 -2
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +4 -4
- package/dist/esm/global-account/react/components/B3Provider/types.js +1 -1
- package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -1
- package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.js +6 -6
- package/dist/esm/global-account/react/components/MintButton/MintButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/MintButton/MintButton.js +5 -5
- package/dist/esm/global-account/react/components/RelayKitProviderWrapper.js +2 -2
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +1 -1
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissions.js +6 -6
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissionsButton.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.d.ts +14 -0
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +44 -0
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +1 -2
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.js +8 -13
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +13 -13
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.js +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/WalletRow.js +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.js +9 -9
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +3 -3
- package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.js +2 -2
- package/dist/esm/global-account/react/components/StyleRoot.js +0 -1
- package/dist/esm/global-account/react/components/Transak/TransakModal.js +4 -4
- package/dist/esm/global-account/react/components/custom/Button.js +5 -5
- package/dist/esm/global-account/react/components/custom/Icon.d.ts +7 -0
- package/dist/esm/global-account/react/components/custom/Icon.js +50 -0
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.d.ts +4 -0
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.js +17 -0
- package/dist/esm/global-account/react/components/custom/StaggeredFadeLoader.js +3 -3
- package/dist/esm/global-account/react/components/custom/WalletConnectorIcon.js +1 -1
- package/dist/esm/global-account/react/components/index.d.ts +4 -4
- package/dist/esm/global-account/react/components/index.js +4 -4
- package/dist/esm/global-account/react/components/magicui/AnimatedLottie.js +1 -1
- package/dist/esm/global-account/react/components/ui/Loading.js +2 -2
- package/dist/esm/global-account/react/components/ui/ShinyButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/ShinyButton.js +3 -3
- package/dist/esm/global-account/react/components/ui/TabSystem.js +1 -1
- package/dist/esm/global-account/react/components/ui/Tabs.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/Tabs.js +1 -1
- package/dist/esm/global-account/react/components/ui/badge.js +4 -4
- package/dist/esm/global-account/react/components/ui/button.js +5 -5
- package/dist/esm/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/command.js +1 -1
- package/dist/esm/global-account/react/components/ui/dialog.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/dialog.js +1 -1
- package/dist/esm/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/drawer.js +1 -1
- package/dist/esm/global-account/react/components/ui/glare-card-rounded.js +12 -12
- package/dist/esm/global-account/react/components/ui/glare-card.js +11 -11
- package/dist/esm/global-account/react/components/ui/input.js +1 -1
- package/dist/esm/global-account/react/components/ui/text-loop.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/text-loop.js +2 -2
- package/dist/esm/global-account/react/components/ui/text-shimmer.js +2 -2
- package/dist/esm/global-account/react/components/ui/tooltip.js +1 -1
- package/dist/esm/global-account/react/hooks/useAccountAssets.js +4 -4
- package/dist/esm/global-account/react/hooks/useAccountWallet.js +8 -8
- package/dist/esm/global-account/react/hooks/useAddTWSessionKey.d.ts +2 -2
- package/dist/esm/global-account/react/hooks/useAddTWSessionKey.js +6 -6
- package/dist/esm/global-account/react/hooks/useAuthentication.js +3 -3
- package/dist/esm/global-account/react/hooks/useB3BalanceFromAddresses.js +7 -7
- package/dist/esm/global-account/react/hooks/useB3EnsName.d.ts +8 -4
- package/dist/esm/global-account/react/hooks/useB3EnsName.js +34 -22
- package/dist/esm/global-account/react/hooks/useBestTransactionPath.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useBestTransactionPath.js +10 -10
- package/dist/esm/global-account/react/hooks/useBsmntProfile.js +1 -1
- package/dist/esm/global-account/react/hooks/useChainSwitchWithAction.js +3 -3
- package/dist/esm/global-account/react/hooks/useClaim.js +4 -4
- package/dist/esm/global-account/react/hooks/useConnect.js +3 -3
- package/dist/esm/global-account/react/hooks/useExchangeRate.js +3 -3
- package/dist/esm/global-account/react/hooks/useGetAllTWSigners.js +7 -7
- package/dist/esm/global-account/react/hooks/useGetGeo.js +1 -1
- package/dist/esm/global-account/react/hooks/useHandleConnectWithPrivy.js +2 -2
- package/dist/esm/global-account/react/hooks/useNativeBalance.js +6 -6
- package/dist/esm/global-account/react/hooks/useOnchainName.js +10 -10
- package/dist/esm/global-account/react/hooks/useOneBalance.js +2 -2
- package/dist/esm/global-account/react/hooks/useRemoveSessionKey.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useRemoveSessionKey.js +3 -3
- package/dist/esm/global-account/react/hooks/useRouter.js +6 -6
- package/dist/esm/global-account/react/hooks/useSiwe.js +4 -4
- package/dist/esm/global-account/react/hooks/useTokenBalance.js +6 -6
- package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.js +9 -9
- package/dist/esm/global-account/react/hooks/useTokenData.js +3 -3
- package/dist/esm/global-account/react/hooks/useTokenFromUrl.js +13 -13
- package/dist/esm/global-account/react/hooks/useTokenPrice.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokenPrice.js +6 -6
- package/dist/esm/global-account/react/hooks/useTokenPriceWithFallback.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokenPriceWithFallback.js +7 -7
- package/dist/esm/global-account/react/hooks/useTokensFromAddress.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokensFromAddress.js +2 -2
- package/dist/esm/global-account/react/hooks/useURLParams.js +1 -1
- package/dist/esm/global-account/react/stores/index.d.ts +1 -1
- package/dist/esm/global-account/react/stores/useAuthStore.js +3 -3
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +18 -1
- package/dist/esm/global-account/react/stores/useModalStore.js +3 -3
- package/dist/esm/global-account/server.js +3 -3
- package/dist/esm/global-account/types/chain-networks.js +8 -8
- package/dist/esm/global-account/types/feature-flags.js +1 -1
- package/dist/esm/index.d.ts +0 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/shared/constants/chains/b3Chain.js +35 -35
- package/dist/esm/shared/constants/chains/chainPlatformMap.js +1 -1
- package/dist/esm/shared/constants/chains/supported.js +4 -1
- package/dist/esm/shared/constants/index.d.ts +1 -0
- package/dist/esm/shared/constants/index.js +2 -1
- package/dist/esm/shared/react/hooks/index.d.ts +1 -0
- package/dist/esm/shared/react/hooks/index.js +1 -0
- package/dist/esm/shared/react/hooks/useNavigation.d.ts +17 -0
- package/dist/esm/shared/react/hooks/useNavigation.js +52 -0
- package/dist/esm/shared/react/index.d.ts +1 -0
- package/dist/esm/shared/react/index.js +1 -0
- package/dist/esm/shared/thirdweb/generated/sdk.gen.d.ts +2 -2
- package/dist/esm/shared/thirdweb/generated/sdk.gen.js +1 -1
- package/dist/esm/shared/thirdweb/initiateClient.js +2 -2
- package/dist/esm/shared/thirdweb/openapi-ts.config.js +1 -1
- package/dist/esm/shared/utils/b3Ens.js +4 -4
- package/dist/esm/shared/utils/chain-transformers.js +9 -9
- package/dist/esm/shared/utils/fetchBalances.js +4 -4
- package/dist/esm/shared/utils/formatUsername.d.ts +1 -0
- package/dist/esm/shared/utils/formatUsername.js +5 -0
- package/dist/esm/shared/utils/index.d.ts +3 -1
- package/dist/esm/shared/utils/index.js +4 -5
- package/dist/esm/shared/utils/insights.js +28 -28
- package/dist/esm/shared/utils/ipfs.js +1 -1
- package/dist/esm/shared/utils/number.js +3 -3
- package/dist/esm/shared/utils/simplehash.js +23 -23
- package/dist/esm/shared/utils/thirdweb-insights.js +15 -15
- package/dist/esm/shared/utils/truncateAddress.d.ts +6 -0
- package/dist/esm/shared/utils/truncateAddress.js +12 -0
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/abis/signature-minting.d.ts +79 -0
- package/dist/types/anyspend/index.d.ts +4 -2
- package/dist/types/anyspend/react/components/AnySpend.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +4 -4
- package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +3 -2
- package/dist/types/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnyspendSignatureMint.d.ts +8 -0
- package/dist/types/anyspend/react/components/common/ChainTokenIcon.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/OrderToken.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/OrderTokenAmount.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/PanelOnrampPayment.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/TokenBalance.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/Warning.d.ts +3 -0
- package/dist/types/anyspend/react/components/index.d.ts +2 -0
- package/dist/types/anyspend/react/components/modals/EnterRecipientModal.d.ts +1 -1
- package/dist/types/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +1 -1
- package/dist/types/anyspend/react/hooks/index.d.ts +1 -2
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +3 -18
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +1 -0
- package/dist/types/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +14 -70
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +14 -70
- package/dist/types/anyspend/react/hooks/useSigMint.d.ts +140 -0
- package/dist/types/anyspend/services/anyspend.d.ts +9 -40
- package/dist/types/anyspend/types/index.d.ts +1 -1
- package/dist/types/anyspend/types/metadata.d.ts +26 -0
- package/dist/types/anyspend/types/nft.d.ts +7 -0
- package/dist/types/anyspend/types/onramp.d.ts +3 -0
- package/dist/types/anyspend/types/order.d.ts +40 -200
- package/dist/types/anyspend/types/req-res/createOrder.d.ts +98 -235
- package/dist/types/anyspend/types/req-res/getOrderAndTransactions.d.ts +63 -305
- package/dist/types/anyspend/types/req-res/getOrderHistory.d.ts +49 -235
- package/dist/types/anyspend/types/req-res/getQuote.d.ts +37 -0
- package/dist/types/anyspend/types/req-res/index.d.ts +0 -1
- package/dist/types/anyspend/types/signature-mint.d.ts +69 -0
- package/dist/types/anyspend/utils/orderPayload.d.ts +3 -3
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +3 -3
- package/dist/types/global-account/react/components/B3Provider/B3Provider.native.d.ts +2 -2
- package/dist/types/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -1
- package/dist/types/global-account/react/components/MintButton/MintButton.d.ts +1 -1
- package/dist/types/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +1 -1
- package/dist/types/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/SignIn.d.ts +14 -0
- package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +1 -2
- package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/types/global-account/react/components/custom/Icon.d.ts +7 -0
- package/dist/types/global-account/react/components/custom/ManageAccountButton.d.ts +4 -0
- package/dist/types/global-account/react/components/index.d.ts +4 -4
- package/dist/types/global-account/react/components/ui/ShinyButton.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/Tabs.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/dialog.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/text-loop.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useAddTWSessionKey.d.ts +2 -2
- package/dist/types/global-account/react/hooks/useB3EnsName.d.ts +8 -4
- package/dist/types/global-account/react/hooks/useBestTransactionPath.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useRemoveSessionKey.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokenBalancesByChain.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokenPrice.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokenPriceWithFallback.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokensFromAddress.d.ts +1 -1
- package/dist/types/global-account/react/stores/index.d.ts +1 -1
- package/dist/types/global-account/react/stores/useModalStore.d.ts +18 -1
- package/dist/types/index.d.ts +0 -0
- package/dist/types/shared/constants/index.d.ts +1 -0
- package/dist/types/shared/react/hooks/index.d.ts +1 -0
- package/dist/types/shared/react/hooks/useNavigation.d.ts +17 -0
- package/dist/types/shared/react/index.d.ts +1 -0
- package/dist/types/shared/thirdweb/generated/sdk.gen.d.ts +2 -2
- package/dist/types/shared/utils/formatUsername.d.ts +1 -0
- package/dist/types/shared/utils/index.d.ts +3 -1
- package/dist/types/shared/utils/truncateAddress.d.ts +6 -0
- package/package.json +24 -4
- package/src/anyspend/README.md +12 -0
- package/src/anyspend/abis/abi-usdc-base.ts +97 -97
- package/src/anyspend/abis/erc20-staking.ts +51 -51
- package/src/anyspend/abis/signature-minting.ts +43 -0
- package/src/anyspend/constants/index.ts +13 -11
- package/src/anyspend/index.ts +4 -6
- package/src/anyspend/react/components/AnySpend.tsx +44 -39
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +46 -41
- package/src/anyspend/react/components/AnySpendCustom.tsx +214 -89
- package/src/anyspend/react/components/AnySpendNFT.tsx +11 -6
- package/src/anyspend/react/components/AnySpendNFTButton.tsx +1 -1
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +23 -22
- package/src/anyspend/react/components/AnySpendTournament.tsx +7 -4
- package/src/anyspend/react/components/AnyspendSignatureMint.tsx +147 -0
- package/src/anyspend/react/components/common/ChainTokenIcon.tsx +1 -1
- package/src/anyspend/react/components/common/OrderDetails.tsx +75 -77
- package/src/anyspend/react/components/common/OrderHistory.tsx +1 -1
- package/src/anyspend/react/components/common/OrderHistoryItem.tsx +3 -3
- package/src/anyspend/react/components/common/OrderToken.tsx +5 -5
- package/src/anyspend/react/components/common/OrderTokenAmount.tsx +4 -4
- package/src/anyspend/react/components/common/PanelOnramp.tsx +4 -4
- package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +9 -17
- package/src/anyspend/react/components/common/PaymentMethodIcons.tsx +1 -1
- package/src/anyspend/react/components/common/PaymentOneClick.tsx +3 -3
- package/src/anyspend/react/components/common/PaymentStripeWeb2.tsx +16 -15
- package/src/anyspend/react/components/common/TokenBalance.tsx +2 -2
- package/src/anyspend/react/components/common/Warning.tsx +7 -0
- package/src/anyspend/react/components/index.ts +2 -0
- package/src/anyspend/react/components/modals/EnterRecipientModal.tsx +2 -2
- package/src/anyspend/react/components/webview/WebviewOnrampOrderStatus.tsx +0 -1
- package/src/anyspend/react/components/webview/WebviewOnrampPayment.tsx +18 -20
- package/src/anyspend/react/hooks/index.ts +1 -2
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +10 -20
- package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +9 -8
- package/src/anyspend/react/hooks/useAnyspendOrderAndTransactions.ts +3 -3
- package/src/anyspend/react/hooks/useAnyspendOrderHistory.ts +4 -4
- package/src/anyspend/react/hooks/useAnyspendQuote.ts +6 -6
- package/src/anyspend/react/hooks/useAnyspendTokens.ts +4 -4
- package/src/anyspend/react/hooks/useCoinbaseOnrampOptions.ts +3 -3
- package/src/anyspend/react/hooks/useGeoOnrampOptions.ts +3 -3
- package/src/anyspend/react/hooks/useGetGeo.ts +1 -1
- package/src/anyspend/react/hooks/useSigMint.tsx +55 -0
- package/src/anyspend/react/hooks/useStripeClientSecret.ts +3 -3
- package/src/anyspend/react/hooks/useStripeSupport.ts +3 -3
- package/src/anyspend/react/providers/AnyspendProvider.tsx +9 -4
- package/src/anyspend/services/anyspend.ts +21 -39
- package/src/anyspend/types/chain.ts +1 -1
- package/src/anyspend/types/custom.ts +2 -2
- package/src/anyspend/types/globalWallet.ts +1 -1
- package/src/anyspend/types/index.ts +1 -1
- package/src/anyspend/types/metadata.ts +41 -0
- package/src/anyspend/types/nft.ts +10 -7
- package/src/anyspend/types/onramp.ts +3 -2
- package/src/anyspend/types/order.ts +9 -16
- package/src/anyspend/types/relay.ts +1 -1
- package/src/anyspend/types/req-res/createOrder.ts +9 -9
- package/src/anyspend/types/req-res/getCoinbaseOnrampOptions.ts +5 -5
- package/src/anyspend/types/req-res/getOrderAndTransactions.ts +4 -4
- package/src/anyspend/types/req-res/getOrderByCreator.ts +2 -2
- package/src/anyspend/types/req-res/getOrderHistory.ts +1 -1
- package/src/anyspend/types/req-res/getQuote.ts +14 -9
- package/src/anyspend/types/req-res/getTokenList.ts +4 -4
- package/src/anyspend/types/req-res/index.ts +0 -1
- package/src/anyspend/types/signature-mint.ts +77 -0
- package/src/anyspend/types/swap.ts +2 -2
- package/src/anyspend/types/token.ts +2 -2
- package/src/anyspend/types/tournament.ts +4 -4
- package/src/anyspend/types/transaction.ts +4 -4
- package/src/anyspend/utils/chain.ts +25 -25
- package/src/anyspend/utils/format.ts +2 -7
- package/src/anyspend/utils/orderPayload.ts +21 -9
- package/src/anyspend/utils/token.ts +10 -10
- package/src/global-account/app.native.ts +5 -5
- package/src/global-account/app.ts +5 -5
- package/src/global-account/bsmnt.native.ts +5 -5
- package/src/global-account/bsmnt.ts +5 -5
- package/src/global-account/react/components/B3DynamicModal.tsx +15 -6
- package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +4 -4
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +22 -20
- package/src/global-account/react/components/B3Provider/types.ts +1 -1
- package/src/global-account/react/components/ManageAccount/ManageAccount.tsx +6 -6
- package/src/global-account/react/components/MintButton/MintButton.tsx +5 -5
- package/src/global-account/react/components/RelayKitProviderWrapper.tsx +2 -2
- package/src/global-account/react/components/RequestPermissions/RequestPermissions.tsx +7 -7
- package/src/global-account/react/components/RequestPermissions/RequestPermissionsButton.tsx +2 -2
- package/src/global-account/react/components/SignInWithB3/SignIn.tsx +190 -0
- package/src/global-account/react/components/SignInWithB3/SignInWithB3.tsx +16 -28
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +14 -14
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Privy.tsx +2 -2
- package/src/global-account/react/components/SignInWithB3/components/AuthButton.tsx +1 -1
- package/src/global-account/react/components/SignInWithB3/components/WalletRow.tsx +1 -1
- package/src/global-account/react/components/SignInWithB3/steps/LoginStep.tsx +10 -10
- package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +3 -3
- package/src/global-account/react/components/SignInWithB3/utils/signInUtils.ts +2 -2
- package/src/global-account/react/components/StyleRoot.tsx +0 -1
- package/src/global-account/react/components/Transak/TransakModal.tsx +4 -4
- package/src/global-account/react/components/custom/Button.tsx +7 -7
- package/src/global-account/react/components/custom/Icon.tsx +102 -0
- package/src/global-account/react/components/custom/ManageAccountButton.tsx +33 -0
- package/src/global-account/react/components/custom/StaggeredFadeLoader.tsx +3 -3
- package/src/global-account/react/components/custom/WalletConnectorIcon.tsx +1 -1
- package/src/global-account/react/components/index.ts +4 -4
- package/src/global-account/react/components/magicui/AnimatedLottie.tsx +5 -5
- package/src/global-account/react/components/ui/Loading.tsx +2 -2
- package/src/global-account/react/components/ui/ShinyButton.tsx +5 -5
- package/src/global-account/react/components/ui/TabSystem.tsx +2 -2
- package/src/global-account/react/components/ui/Tabs.tsx +4 -4
- package/src/global-account/react/components/ui/badge.tsx +5 -5
- package/src/global-account/react/components/ui/button.tsx +7 -7
- package/src/global-account/react/components/ui/command.tsx +5 -5
- package/src/global-account/react/components/ui/dialog.tsx +5 -5
- package/src/global-account/react/components/ui/drawer.tsx +2 -2
- package/src/global-account/react/components/ui/glare-card-rounded.tsx +12 -12
- package/src/global-account/react/components/ui/glare-card.tsx +11 -11
- package/src/global-account/react/components/ui/input.tsx +2 -2
- package/src/global-account/react/components/ui/popover.tsx +1 -1
- package/src/global-account/react/components/ui/scroll-area.tsx +1 -1
- package/src/global-account/react/components/ui/text-loop.tsx +2 -2
- package/src/global-account/react/components/ui/text-shimmer.tsx +3 -3
- package/src/global-account/react/components/ui/tooltip.tsx +2 -2
- package/src/global-account/react/hooks/useAccountAssets.ts +4 -4
- package/src/global-account/react/hooks/useAccountWallet.tsx +9 -9
- package/src/global-account/react/hooks/useAddTWSessionKey.tsx +7 -7
- package/src/global-account/react/hooks/useAuthentication.ts +3 -3
- package/src/global-account/react/hooks/useB3BalanceFromAddresses.ts +9 -9
- package/src/global-account/react/hooks/useB3EnsName.ts +43 -31
- package/src/global-account/react/hooks/useBestTransactionPath.tsx +11 -11
- package/src/global-account/react/hooks/useBsmntProfile.ts +1 -1
- package/src/global-account/react/hooks/useChainSwitchWithAction.ts +4 -4
- package/src/global-account/react/hooks/useClaim.tsx +5 -5
- package/src/global-account/react/hooks/useConnect.tsx +4 -4
- package/src/global-account/react/hooks/useExchangeRate.tsx +3 -3
- package/src/global-account/react/hooks/useGetAllTWSigners.tsx +9 -9
- package/src/global-account/react/hooks/useGetGeo.tsx +1 -1
- package/src/global-account/react/hooks/useHandleConnectWithPrivy.tsx +2 -2
- package/src/global-account/react/hooks/useMediaQuery.tsx +1 -1
- package/src/global-account/react/hooks/useNativeBalance.tsx +7 -7
- package/src/global-account/react/hooks/useOnchainName.tsx +11 -11
- package/src/global-account/react/hooks/useOneBalance.tsx +2 -2
- package/src/global-account/react/hooks/useQueryB3.ts +2 -2
- package/src/global-account/react/hooks/useQueryBSMNT.ts +2 -2
- package/src/global-account/react/hooks/useRemoveSessionKey.tsx +5 -5
- package/src/global-account/react/hooks/useRouter.tsx +6 -6
- package/src/global-account/react/hooks/useSiwe.tsx +4 -4
- package/src/global-account/react/hooks/useTokenBalance.tsx +6 -6
- package/src/global-account/react/hooks/useTokenBalancesByChain.tsx +10 -10
- package/src/global-account/react/hooks/useTokenData.ts +3 -3
- package/src/global-account/react/hooks/useTokenFromUrl.tsx +14 -14
- package/src/global-account/react/hooks/useTokenPrice.tsx +7 -7
- package/src/global-account/react/hooks/useTokenPriceWithFallback.tsx +7 -7
- package/src/global-account/react/hooks/useTokensFromAddress.ts +2 -2
- package/src/global-account/react/hooks/useURLParams.ts +2 -2
- package/src/global-account/react/stores/index.ts +1 -1
- package/src/global-account/react/stores/useAuthStore.ts +3 -3
- package/src/global-account/react/stores/useModalStore.ts +23 -4
- package/src/global-account/server.ts +3 -3
- package/src/global-account/types/chain-networks.ts +10 -10
- package/src/global-account/types/feature-flags.ts +2 -2
- package/src/index.ts +1 -0
- package/src/shared/constants/chains/b3Chain.ts +35 -35
- package/src/shared/constants/chains/chainPlatformMap.ts +1 -1
- package/src/shared/constants/chains/supported.ts +6 -1
- package/src/shared/constants/index.ts +3 -1
- package/src/shared/react/hooks/index.ts +1 -0
- package/src/shared/react/hooks/useNavigation.ts +61 -0
- package/src/shared/react/index.ts +1 -0
- package/src/shared/thirdweb/generated/sdk.gen.ts +3 -3
- package/src/shared/thirdweb/initiateClient.ts +2 -2
- package/src/shared/thirdweb/openapi-ts.config.ts +1 -1
- package/src/shared/utils/b3Ens.ts +4 -4
- package/src/shared/utils/chain-transformers.ts +9 -9
- package/src/shared/utils/fetchBalances.ts +5 -5
- package/src/shared/utils/fetchBsmntProfile.ts +1 -1
- package/src/shared/utils/formatUsername.ts +5 -0
- package/src/shared/utils/index.ts +4 -6
- package/src/shared/utils/insights.ts +31 -31
- package/src/shared/utils/ipfs.ts +1 -1
- package/src/shared/utils/number.ts +5 -5
- package/src/shared/utils/simplehash.ts +28 -28
- package/src/shared/utils/thirdweb-insights.ts +20 -20
- package/src/shared/utils/truncateAddress.ts +11 -0
- package/src/styles/index.css +5 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendSendPermitData.d.ts +0 -16
- package/dist/cjs/anyspend/react/hooks/useAnyspendSendPermitData.js +0 -39
- package/dist/cjs/anyspend/react/hooks/usePermitData.d.ts +0 -92
- package/dist/cjs/anyspend/react/hooks/usePermitData.js +0 -158
- package/dist/cjs/anyspend/types/permit.d.ts +0 -21
- package/dist/cjs/anyspend/types/permit.js +0 -11
- package/dist/cjs/anyspend/types/req-res/sendPermitData.d.ts +0 -66
- package/dist/cjs/anyspend/types/req-res/sendPermitData.js +0 -11
- package/dist/esm/anyspend/react/hooks/useAnyspendSendPermitData.d.ts +0 -16
- package/dist/esm/anyspend/react/hooks/useAnyspendSendPermitData.js +0 -36
- package/dist/esm/anyspend/react/hooks/usePermitData.d.ts +0 -92
- package/dist/esm/anyspend/react/hooks/usePermitData.js +0 -154
- package/dist/esm/anyspend/types/permit.d.ts +0 -21
- package/dist/esm/anyspend/types/permit.js +0 -8
- package/dist/esm/anyspend/types/req-res/sendPermitData.d.ts +0 -66
- package/dist/esm/anyspend/types/req-res/sendPermitData.js +0 -8
- package/dist/types/anyspend/react/hooks/useAnyspendSendPermitData.d.ts +0 -16
- package/dist/types/anyspend/react/hooks/usePermitData.d.ts +0 -92
- package/dist/types/anyspend/types/permit.d.ts +0 -21
- package/dist/types/anyspend/types/req-res/sendPermitData.d.ts +0 -66
- package/src/anyspend/react/hooks/useAnyspendSendPermitData.ts +0 -38
- package/src/anyspend/react/hooks/usePermitData.ts +0 -183
- package/src/anyspend/types/permit.ts +0 -10
- package/src/anyspend/types/req-res/sendPermitData.ts +0 -10
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
import { getDefaultToken, OrderType, Token, TradeType, USDC_BASE } from "@b3dotfun/sdk/anyspend";
|
|
3
4
|
import {
|
|
4
|
-
getDefaultToken,
|
|
5
|
-
OrderType,
|
|
6
|
-
Token,
|
|
7
|
-
TradeType,
|
|
8
|
-
USDC_BASE,
|
|
9
5
|
useAnyspendCreateOrder,
|
|
10
6
|
useAnyspendOrderAndTransactions,
|
|
11
|
-
useAnyspendQuote
|
|
12
|
-
} from "@b3dotfun/sdk/anyspend";
|
|
7
|
+
useAnyspendQuote,
|
|
8
|
+
} from "@b3dotfun/sdk/anyspend/react";
|
|
13
9
|
import {
|
|
14
10
|
Button,
|
|
15
11
|
ShinyButton,
|
|
@@ -20,7 +16,7 @@ import {
|
|
|
20
16
|
useRouter,
|
|
21
17
|
useSearchParamsSSR,
|
|
22
18
|
useTokenData,
|
|
23
|
-
useTokenFromUrl
|
|
19
|
+
useTokenFromUrl,
|
|
24
20
|
} from "@b3dotfun/sdk/global-account/react";
|
|
25
21
|
import { cn } from "@b3dotfun/sdk/shared/utils/cn";
|
|
26
22
|
import { shortenAddress } from "@b3dotfun/sdk/shared/utils/formatAddress";
|
|
@@ -31,7 +27,7 @@ import { ArrowDown, ChevronRightCircle, ChevronsUpDown, CircleAlert, ClipboardIc
|
|
|
31
27
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
32
28
|
import { toast } from "sonner";
|
|
33
29
|
import { parseUnits } from "viem";
|
|
34
|
-
import { b3Sepolia, base, mainnet, sepolia } from "viem/chains";
|
|
30
|
+
import { b3, b3Sepolia, base, mainnet, sepolia } from "viem/chains";
|
|
35
31
|
import { OrderDetails, OrderDetailsLoadingView } from "./common/OrderDetails";
|
|
36
32
|
import { OrderHistory } from "./common/OrderHistory";
|
|
37
33
|
import { OrderStatus } from "./common/OrderStatus";
|
|
@@ -39,6 +35,7 @@ import { OrderTokenAmount } from "./common/OrderTokenAmount";
|
|
|
39
35
|
import { PanelOnramp } from "./common/PanelOnramp";
|
|
40
36
|
import { PanelOnrampPayment } from "./common/PanelOnrampPayment";
|
|
41
37
|
import { TokenBalance } from "./common/TokenBalance";
|
|
38
|
+
import { Warning } from "./common/Warning";
|
|
42
39
|
import { EnterRecipientModal } from "./modals/EnterRecipientModal";
|
|
43
40
|
|
|
44
41
|
export interface RecipientOption {
|
|
@@ -53,7 +50,7 @@ export enum PanelView {
|
|
|
53
50
|
HISTORY,
|
|
54
51
|
ORDER_DETAILS,
|
|
55
52
|
LOADING,
|
|
56
|
-
FIAT_PAYMENT
|
|
53
|
+
FIAT_PAYMENT,
|
|
57
54
|
}
|
|
58
55
|
|
|
59
56
|
const ANYSPEND_RECIPIENTS_KEY = "anyspend_recipients";
|
|
@@ -66,7 +63,7 @@ export function AnySpend({
|
|
|
66
63
|
defaultActiveTab = "crypto",
|
|
67
64
|
loadOrder,
|
|
68
65
|
hideTransactionHistoryButton,
|
|
69
|
-
recipientAddress: recipientAddressFromProps
|
|
66
|
+
recipientAddress: recipientAddressFromProps,
|
|
70
67
|
}: {
|
|
71
68
|
destinationTokenAddress?: string;
|
|
72
69
|
destinationTokenChainId?: number;
|
|
@@ -106,7 +103,7 @@ export function AnySpend({
|
|
|
106
103
|
const [orderId, setOrderId] = useState<string | undefined>(loadOrder);
|
|
107
104
|
const { orderAndTransactions: oat, getOrderAndTransactionsError } = useAnyspendOrderAndTransactions(
|
|
108
105
|
isMainnet,
|
|
109
|
-
orderId
|
|
106
|
+
orderId,
|
|
110
107
|
);
|
|
111
108
|
!!getOrderAndTransactionsError && console.log("getOrderAndTransactionsError", getOrderAndTransactionsError);
|
|
112
109
|
|
|
@@ -126,7 +123,7 @@ export function AnySpend({
|
|
|
126
123
|
const defaultSrcToken = getDefaultToken(selectedSrcChainId);
|
|
127
124
|
const srcTokenFromUrl = useTokenFromUrl({
|
|
128
125
|
defaultToken: defaultSrcToken,
|
|
129
|
-
prefix: "from"
|
|
126
|
+
prefix: "from",
|
|
130
127
|
});
|
|
131
128
|
const [selectedSrcToken, setSelectedSrcToken] = useState<Token>(srcTokenFromUrl);
|
|
132
129
|
const { data: srcTokenMetadata } = useTokenData(selectedSrcToken?.chainId, selectedSrcToken?.address);
|
|
@@ -144,12 +141,12 @@ export function AnySpend({
|
|
|
144
141
|
address: destinationTokenAddress,
|
|
145
142
|
name: "",
|
|
146
143
|
decimals: 18,
|
|
147
|
-
metadata: {}
|
|
144
|
+
metadata: {},
|
|
148
145
|
}
|
|
149
146
|
: getDefaultToken(selectedDstChainId);
|
|
150
147
|
const dstTokenFromUrl = useTokenFromUrl({
|
|
151
148
|
defaultToken: defaultDstToken,
|
|
152
|
-
prefix: "to"
|
|
149
|
+
prefix: "to",
|
|
153
150
|
});
|
|
154
151
|
const [selectedDstToken, setSelectedDstToken] = useState<Token>(isBuyMode ? defaultDstToken : dstTokenFromUrl);
|
|
155
152
|
const { data: dstTokenMetadata } = useTokenData(selectedDstToken?.chainId, selectedDstToken?.address);
|
|
@@ -173,8 +170,8 @@ export function AnySpend({
|
|
|
173
170
|
name: srcTokenMetadata.name || selectedSrcToken.name,
|
|
174
171
|
metadata: {
|
|
175
172
|
...selectedSrcToken.metadata,
|
|
176
|
-
logoURI: srcTokenMetadata?.logoURI || selectedSrcToken.metadata.logoURI
|
|
177
|
-
}
|
|
173
|
+
logoURI: srcTokenMetadata?.logoURI || selectedSrcToken.metadata.logoURI,
|
|
174
|
+
},
|
|
178
175
|
};
|
|
179
176
|
|
|
180
177
|
setSelectedSrcToken(enhancedToken);
|
|
@@ -199,8 +196,8 @@ export function AnySpend({
|
|
|
199
196
|
name: dstTokenMetadata.name || selectedDstToken.name,
|
|
200
197
|
metadata: {
|
|
201
198
|
...selectedDstToken.metadata,
|
|
202
|
-
logoURI: dstTokenMetadata?.logoURI || selectedDstToken.metadata.logoURI
|
|
203
|
-
}
|
|
199
|
+
logoURI: dstTokenMetadata?.logoURI || selectedDstToken.metadata.logoURI,
|
|
200
|
+
},
|
|
204
201
|
};
|
|
205
202
|
|
|
206
203
|
setSelectedDstToken(enhancedToken);
|
|
@@ -273,7 +270,7 @@ export function AnySpend({
|
|
|
273
270
|
fromAmount: activeTab === "crypto" ? srcAmount : undefined,
|
|
274
271
|
toChainId: selectedDstChainId.toString(),
|
|
275
272
|
toCurrency: selectedDstToken.address,
|
|
276
|
-
toAmount: dstAmount
|
|
273
|
+
toAmount: dstAmount,
|
|
277
274
|
};
|
|
278
275
|
|
|
279
276
|
// Compare with last update to prevent unnecessary URL changes
|
|
@@ -331,7 +328,7 @@ export function AnySpend({
|
|
|
331
328
|
selectedDstToken.address,
|
|
332
329
|
dstAmount,
|
|
333
330
|
router,
|
|
334
|
-
srcAmountOnRamp
|
|
331
|
+
srcAmountOnRamp,
|
|
335
332
|
]);
|
|
336
333
|
|
|
337
334
|
// Update URL when relevant state changes - but only after initial render
|
|
@@ -346,7 +343,7 @@ export function AnySpend({
|
|
|
346
343
|
selectedSrcToken.address,
|
|
347
344
|
selectedDstChainId,
|
|
348
345
|
selectedDstToken.address,
|
|
349
|
-
updateSwapParamsInURL
|
|
346
|
+
updateSwapParamsInURL,
|
|
350
347
|
]);
|
|
351
348
|
|
|
352
349
|
// Use our hook for ENS resolution
|
|
@@ -393,7 +390,7 @@ export function AnySpend({
|
|
|
393
390
|
dstTokenAddress: isBuyMode ? destinationTokenAddress : selectedDstToken.address,
|
|
394
391
|
type: OrderType.Swap,
|
|
395
392
|
tradeType: isSrcInputDirty ? TradeType.EXACT_INPUT : TradeType.EXPECTED_OUTPUT,
|
|
396
|
-
amount: activeInputAmountInWei
|
|
393
|
+
amount: activeInputAmountInWei,
|
|
397
394
|
}
|
|
398
395
|
: {
|
|
399
396
|
srcChain: base.id,
|
|
@@ -402,8 +399,8 @@ export function AnySpend({
|
|
|
402
399
|
dstTokenAddress: isBuyMode ? destinationTokenAddress : selectedDstToken.address,
|
|
403
400
|
type: OrderType.Swap,
|
|
404
401
|
tradeType: TradeType.EXACT_INPUT,
|
|
405
|
-
amount: srcAmountOnrampInWei
|
|
406
|
-
}
|
|
402
|
+
amount: srcAmountOnrampInWei,
|
|
403
|
+
},
|
|
407
404
|
);
|
|
408
405
|
|
|
409
406
|
// Replace the old ENS lookup with our new hooks
|
|
@@ -601,7 +598,7 @@ export function AnySpend({
|
|
|
601
598
|
onError: error => {
|
|
602
599
|
console.error(error);
|
|
603
600
|
toast.error("Failed to create order: " + error.message);
|
|
604
|
-
}
|
|
601
|
+
},
|
|
605
602
|
});
|
|
606
603
|
|
|
607
604
|
// Determine button state and text
|
|
@@ -621,7 +618,7 @@ export function AnySpend({
|
|
|
621
618
|
anyspendQuote,
|
|
622
619
|
activeTab,
|
|
623
620
|
isBuyMode,
|
|
624
|
-
selectedDstToken.symbol
|
|
621
|
+
selectedDstToken.symbol,
|
|
625
622
|
]);
|
|
626
623
|
|
|
627
624
|
// Handle main button click
|
|
@@ -656,7 +653,7 @@ export function AnySpend({
|
|
|
656
653
|
: selectedDstToken,
|
|
657
654
|
srcAmount: srcAmountBigInt.toString(),
|
|
658
655
|
expectedDstAmount: anyspendQuote?.data?.currencyOut?.amount || "0",
|
|
659
|
-
creatorAddress: globalAddress
|
|
656
|
+
creatorAddress: globalAddress,
|
|
660
657
|
});
|
|
661
658
|
} catch (err: any) {
|
|
662
659
|
console.error(err);
|
|
@@ -735,7 +732,7 @@ export function AnySpend({
|
|
|
735
732
|
|
|
736
733
|
return {
|
|
737
734
|
percentage: Math.abs(percentageValue).toFixed(2),
|
|
738
|
-
isNegative: percentageValue < 0
|
|
735
|
+
isNegative: percentageValue < 0,
|
|
739
736
|
};
|
|
740
737
|
};
|
|
741
738
|
|
|
@@ -800,14 +797,14 @@ export function AnySpend({
|
|
|
800
797
|
className={cn(
|
|
801
798
|
"bg-as-brand absolute bottom-0 left-0 top-0 z-0 rounded-xl transition-transform duration-100",
|
|
802
799
|
"h-full w-1/2",
|
|
803
|
-
activeTab === "fiat" ? "translate-x-full" : "translate-x-0"
|
|
800
|
+
activeTab === "fiat" ? "translate-x-full" : "translate-x-0",
|
|
804
801
|
)}
|
|
805
802
|
style={{ willChange: "transform" }}
|
|
806
803
|
/>
|
|
807
804
|
<button
|
|
808
805
|
className={cn(
|
|
809
806
|
"relative z-10 h-full w-full rounded-xl px-6 text-sm font-medium transition-colors duration-100",
|
|
810
|
-
activeTab === "crypto" ? "text-white" : "text-as-primary/70 hover:bg-as-on-surface-2 bg-transparent"
|
|
807
|
+
activeTab === "crypto" ? "text-white" : "text-as-primary/70 hover:bg-as-on-surface-2 bg-transparent",
|
|
811
808
|
)}
|
|
812
809
|
onClick={() => setActiveTab("crypto")}
|
|
813
810
|
>
|
|
@@ -816,7 +813,7 @@ export function AnySpend({
|
|
|
816
813
|
<button
|
|
817
814
|
className={cn(
|
|
818
815
|
"relative z-10 h-full w-full rounded-xl px-6 text-sm font-medium transition-colors duration-100",
|
|
819
|
-
activeTab === "fiat" ? "text-white" : "text-as-primary/70 hover:bg-as-on-surface-2 bg-transparent"
|
|
816
|
+
activeTab === "fiat" ? "text-white" : "text-as-primary/70 hover:bg-as-on-surface-2 bg-transparent",
|
|
820
817
|
)}
|
|
821
818
|
onClick={() => setActiveTab("fiat")}
|
|
822
819
|
>
|
|
@@ -824,6 +821,14 @@ export function AnySpend({
|
|
|
824
821
|
</button>
|
|
825
822
|
</div>
|
|
826
823
|
|
|
824
|
+
{/* {selectedSrcChainId === base.id || selectedDstChainId === base.id || activeTab === "fiat" ? (
|
|
825
|
+
<>
|
|
826
|
+
<Warning text="Base is experiencing temporary issues. Please check back later." />
|
|
827
|
+
|
|
828
|
+
<div className="h-1" />
|
|
829
|
+
</>
|
|
830
|
+
) : null} */}
|
|
831
|
+
|
|
827
832
|
<div className="relative flex max-w-[calc(100vw-32px)] flex-col gap-2">
|
|
828
833
|
{/* Send section */}
|
|
829
834
|
{activeTab === "crypto" ? (
|
|
@@ -876,7 +881,7 @@ export function AnySpend({
|
|
|
876
881
|
variant="ghost"
|
|
877
882
|
className={cn(
|
|
878
883
|
"bg-as-n-8 border-as-stroke absolute left-1/2 top-1/2 z-10 h-10 w-10 -translate-x-1/2 -translate-y-1/2 rounded-2xl border-2 sm:h-8 sm:w-8 sm:rounded-xl",
|
|
879
|
-
(activeTab === "fiat" || isBuyMode) && "top-[calc(50%+56px)] cursor-default"
|
|
884
|
+
(activeTab === "fiat" || isBuyMode) && "top-[calc(50%+56px)] cursor-default",
|
|
880
885
|
)}
|
|
881
886
|
onClick={() => {
|
|
882
887
|
if (activeTab === "fiat" || isBuyMode) {
|
|
@@ -922,7 +927,7 @@ export function AnySpend({
|
|
|
922
927
|
"text-as-primary/50 flex h-7 items-center gap-1 rounded-lg px-2",
|
|
923
928
|
globalAddress && recipientAddress === globalAddress
|
|
924
929
|
? "bg-as-on-surface-2 hover:bg-as-on-surface-3"
|
|
925
|
-
: "bg-as-yellow/70 hover:bg-as-yellow text-as-primary"
|
|
930
|
+
: "bg-as-yellow/70 hover:bg-as-yellow text-as-primary",
|
|
926
931
|
)}
|
|
927
932
|
onClick={() => setIsOpenPasteRecipientAddressModal(true)}
|
|
928
933
|
>
|
|
@@ -986,7 +991,7 @@ export function AnySpend({
|
|
|
986
991
|
(() => {
|
|
987
992
|
const { percentage, isNegative } = calculatePriceImpact(
|
|
988
993
|
anyspendQuote.data.currencyIn.amountUsd,
|
|
989
|
-
anyspendQuote.data.currencyOut.amountUsd
|
|
994
|
+
anyspendQuote.data.currencyOut.amountUsd,
|
|
990
995
|
);
|
|
991
996
|
|
|
992
997
|
// Parse the percentage as a number for comparison
|
|
@@ -1051,7 +1056,7 @@ export function AnySpend({
|
|
|
1051
1056
|
onClick={onMainButtonClick}
|
|
1052
1057
|
className={cn(
|
|
1053
1058
|
"relative w-full",
|
|
1054
|
-
btnInfo.error ? "!bg-as-red" : btnInfo.disable ? "!bg-as-on-surface-2" : "!bg-as-brand"
|
|
1059
|
+
btnInfo.error ? "!bg-as-red" : btnInfo.disable ? "!bg-as-on-surface-2" : "!bg-as-brand",
|
|
1055
1060
|
)}
|
|
1056
1061
|
textClassName={cn(btnInfo.error ? "text-white" : btnInfo.disable ? "text-as-secondary" : "text-white")}
|
|
1057
1062
|
>
|
|
@@ -1119,12 +1124,12 @@ export function AnySpend({
|
|
|
1119
1124
|
: activePanel
|
|
1120
1125
|
}
|
|
1121
1126
|
className={cn("w-full", {
|
|
1122
|
-
"mt-0": mode === "modal"
|
|
1127
|
+
"mt-0": mode === "modal",
|
|
1123
1128
|
})}
|
|
1124
1129
|
variants={{
|
|
1125
1130
|
enter: { x: 300, opacity: 0 },
|
|
1126
1131
|
center: { x: 0, opacity: 1 },
|
|
1127
|
-
exit: { x: -300, opacity: 0 }
|
|
1132
|
+
exit: { x: -300, opacity: 0 },
|
|
1128
1133
|
}}
|
|
1129
1134
|
transition={{ type: "spring", stiffness: 300, damping: 30 }}
|
|
1130
1135
|
>
|
|
@@ -1133,7 +1138,7 @@ export function AnySpend({
|
|
|
1133
1138
|
<div key="history-view">{historyView}</div>,
|
|
1134
1139
|
<div key="order-details-view">{orderDetailsView}</div>,
|
|
1135
1140
|
<div key="loading-view">{OrderDetailsLoadingView}</div>,
|
|
1136
|
-
<div key="fiat-payment-view">{onrampPaymentView}</div
|
|
1141
|
+
<div key="fiat-payment-view">{onrampPaymentView}</div>,
|
|
1137
1142
|
]}
|
|
1138
1143
|
</TransitionPanel>
|
|
1139
1144
|
<EnterRecipientModal
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import { B3_TOKEN, OrderType } from "@b3dotfun/sdk/anyspend";
|
|
2
|
-
import { baseMainnet } from "@b3dotfun/sdk/shared/constants/chains/supported";
|
|
3
|
-
import { EthIcon } from "./icons/EthIcon";
|
|
4
|
-
import { SolIcon } from "./icons/SolIcon";
|
|
5
|
-
import { UsdcIcon } from "./icons/USDCIcon";
|
|
6
|
-
import { StyleRoot } from "@b3dotfun/sdk/global-account/react";
|
|
7
2
|
import {
|
|
8
3
|
Button,
|
|
9
4
|
GlareCardRounded,
|
|
10
5
|
Input,
|
|
6
|
+
StyleRoot,
|
|
11
7
|
TextLoop,
|
|
12
8
|
useChainSwitchWithAction,
|
|
13
9
|
useHasMounted,
|
|
10
|
+
useModalStore,
|
|
14
11
|
useTokenBalance,
|
|
15
|
-
useModalStore
|
|
16
12
|
} from "@b3dotfun/sdk/global-account/react";
|
|
13
|
+
import { baseMainnet } from "@b3dotfun/sdk/shared/constants/chains/supported";
|
|
17
14
|
import { motion } from "framer-motion";
|
|
18
15
|
import invariant from "invariant";
|
|
19
16
|
import { ArrowRight, Loader2 } from "lucide-react";
|
|
@@ -22,6 +19,9 @@ import { toast } from "sonner";
|
|
|
22
19
|
import { createPublicClient, encodeFunctionData, erc20Abi, formatUnits, http } from "viem";
|
|
23
20
|
import { useAccount, useWaitForTransactionReceipt, useWriteContract } from "wagmi";
|
|
24
21
|
import { AnySpendCustom } from "./AnySpendCustom";
|
|
22
|
+
import { EthIcon } from "./icons/EthIcon";
|
|
23
|
+
import { SolIcon } from "./icons/SolIcon";
|
|
24
|
+
import { UsdcIcon } from "./icons/USDCIcon";
|
|
25
25
|
|
|
26
26
|
const SPIN_WHEEL_ABI = [
|
|
27
27
|
{
|
|
@@ -31,27 +31,27 @@ const SPIN_WHEEL_ABI = [
|
|
|
31
31
|
{ internalType: "address", name: "paymentToken", type: "address" },
|
|
32
32
|
{ internalType: "uint256", name: "pricePerEntry", type: "uint256" },
|
|
33
33
|
{ internalType: "uint256", name: "maxEntriesPerUser", type: "uint256" },
|
|
34
|
-
{ internalType: "address", name: "paymentRecipient", type: "address" }
|
|
34
|
+
{ internalType: "address", name: "paymentRecipient", type: "address" },
|
|
35
35
|
],
|
|
36
36
|
stateMutability: "view",
|
|
37
|
-
type: "function"
|
|
37
|
+
type: "function",
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
inputs: [],
|
|
41
41
|
name: "entryModule",
|
|
42
42
|
outputs: [{ internalType: "contract IEntryModuleV2", name: "", type: "address" }],
|
|
43
43
|
stateMutability: "view",
|
|
44
|
-
type: "function"
|
|
44
|
+
type: "function",
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
inputs: [
|
|
48
48
|
{ internalType: "address", name: "user", type: "address" },
|
|
49
|
-
{ internalType: "uint256", name: "quantity", type: "uint256" }
|
|
49
|
+
{ internalType: "uint256", name: "quantity", type: "uint256" },
|
|
50
50
|
],
|
|
51
51
|
name: "buyEntriesAndSpin",
|
|
52
52
|
outputs: [],
|
|
53
53
|
stateMutability: "payable",
|
|
54
|
-
type: "function"
|
|
54
|
+
type: "function",
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
inputs: [],
|
|
@@ -62,11 +62,11 @@ const SPIN_WHEEL_ABI = [
|
|
|
62
62
|
{ internalType: "uint256", name: "endTime_", type: "uint256" },
|
|
63
63
|
{ internalType: "uint256", name: "totalPrizesAvailable_", type: "uint256" },
|
|
64
64
|
{ internalType: "uint256", name: "prizesRequestedCount_", type: "uint256" },
|
|
65
|
-
{ internalType: "enum SpinWheelV2.WheelState", name: "state_", type: "uint8" }
|
|
65
|
+
{ internalType: "enum SpinWheelV2.WheelState", name: "state_", type: "uint8" },
|
|
66
66
|
],
|
|
67
67
|
stateMutability: "view",
|
|
68
|
-
type: "function"
|
|
69
|
-
}
|
|
68
|
+
type: "function",
|
|
69
|
+
},
|
|
70
70
|
] as const;
|
|
71
71
|
|
|
72
72
|
interface PaymentConfig {
|
|
@@ -113,14 +113,14 @@ function generateEncodedDataForBuyEntriesAndSpin(user: string, quantity: string)
|
|
|
113
113
|
const encodedData = encodeFunctionData({
|
|
114
114
|
abi: SPIN_WHEEL_ABI,
|
|
115
115
|
functionName: "buyEntriesAndSpin",
|
|
116
|
-
args: [user as `0x${string}`, BigInt(quantity)]
|
|
116
|
+
args: [user as `0x${string}`, BigInt(quantity)],
|
|
117
117
|
});
|
|
118
118
|
return encodedData;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
const basePublicClient = createPublicClient({
|
|
122
122
|
chain: baseMainnet,
|
|
123
|
-
transport: http()
|
|
123
|
+
transport: http(),
|
|
124
124
|
});
|
|
125
125
|
|
|
126
126
|
export function AnySpendBuySpin({
|
|
@@ -131,7 +131,7 @@ export function AnySpendBuySpin({
|
|
|
131
131
|
chainId,
|
|
132
132
|
recipientAddress,
|
|
133
133
|
prefillQuantity,
|
|
134
|
-
onSuccess
|
|
134
|
+
onSuccess,
|
|
135
135
|
}: {
|
|
136
136
|
isMainnet?: boolean;
|
|
137
137
|
loadOrder?: string;
|
|
@@ -155,9 +155,9 @@ export function AnySpendBuySpin({
|
|
|
155
155
|
const {
|
|
156
156
|
formattedBalance: b3Balance,
|
|
157
157
|
isLoading: isBalanceLoading,
|
|
158
|
-
rawBalance: b3RawBalance
|
|
158
|
+
rawBalance: b3RawBalance,
|
|
159
159
|
} = useTokenBalance({
|
|
160
|
-
token: B3_TOKEN
|
|
160
|
+
token: B3_TOKEN,
|
|
161
161
|
});
|
|
162
162
|
|
|
163
163
|
// Wagmi hooks
|
|
@@ -172,12 +172,12 @@ export function AnySpendBuySpin({
|
|
|
172
172
|
isLoading: isTxPending,
|
|
173
173
|
isSuccess: isTxSuccess,
|
|
174
174
|
isError: isTxError,
|
|
175
|
-
error: txError
|
|
175
|
+
error: txError,
|
|
176
176
|
} = useWaitForTransactionReceipt({
|
|
177
177
|
hash: buyingTxHash as `0x${string}`,
|
|
178
178
|
query: {
|
|
179
|
-
structuralSharing: false
|
|
180
|
-
}
|
|
179
|
+
structuralSharing: false,
|
|
180
|
+
},
|
|
181
181
|
});
|
|
182
182
|
|
|
183
183
|
// Handle transaction status
|
|
@@ -232,25 +232,25 @@ export function AnySpendBuySpin({
|
|
|
232
232
|
basePublicClient.readContract({
|
|
233
233
|
address: spinwheelContractAddress as `0x${string}`,
|
|
234
234
|
abi: SPIN_WHEEL_ABI,
|
|
235
|
-
functionName: "getPaymentConfig"
|
|
235
|
+
functionName: "getPaymentConfig",
|
|
236
236
|
}),
|
|
237
237
|
basePublicClient.readContract({
|
|
238
238
|
address: spinwheelContractAddress as `0x${string}`,
|
|
239
239
|
abi: SPIN_WHEEL_ABI,
|
|
240
|
-
functionName: "entryModule"
|
|
240
|
+
functionName: "entryModule",
|
|
241
241
|
}),
|
|
242
242
|
basePublicClient.readContract({
|
|
243
243
|
address: spinwheelContractAddress as `0x${string}`,
|
|
244
244
|
abi: SPIN_WHEEL_ABI,
|
|
245
|
-
functionName: "getWheelInfo"
|
|
246
|
-
})
|
|
245
|
+
functionName: "getWheelInfo",
|
|
246
|
+
}),
|
|
247
247
|
]);
|
|
248
248
|
|
|
249
249
|
const paymentConfig: PaymentConfig = {
|
|
250
250
|
pricePerEntry: config[1],
|
|
251
251
|
maxEntriesPerUser: config[2],
|
|
252
252
|
paymentRecipient: config[3],
|
|
253
|
-
entryModule: entryModuleAddress
|
|
253
|
+
entryModule: entryModuleAddress,
|
|
254
254
|
};
|
|
255
255
|
|
|
256
256
|
const wheelInfoData: WheelInfo = {
|
|
@@ -259,7 +259,7 @@ export function AnySpendBuySpin({
|
|
|
259
259
|
endTime_: wheelInfo[2],
|
|
260
260
|
totalPrizesAvailable_: wheelInfo[3],
|
|
261
261
|
prizesRequestedCount_: wheelInfo[4],
|
|
262
|
-
state_: wheelInfo[5]
|
|
262
|
+
state_: wheelInfo[5],
|
|
263
263
|
};
|
|
264
264
|
|
|
265
265
|
setPaymentConfig(paymentConfig);
|
|
@@ -315,7 +315,11 @@ export function AnySpendBuySpin({
|
|
|
315
315
|
}
|
|
316
316
|
|
|
317
317
|
// Check maximum entries per user (0 means no limit)
|
|
318
|
-
if (
|
|
318
|
+
if (
|
|
319
|
+
paymentConfig &&
|
|
320
|
+
paymentConfig.maxEntriesPerUser > BigInt(0) &&
|
|
321
|
+
BigInt(numValue) > paymentConfig.maxEntriesPerUser
|
|
322
|
+
) {
|
|
319
323
|
setIsQuantityValid(false);
|
|
320
324
|
setUserSpinQuantity("");
|
|
321
325
|
setValidationError(`Maximum ${paymentConfig.maxEntriesPerUser.toString()} spins allowed`);
|
|
@@ -327,7 +331,7 @@ export function AnySpendBuySpin({
|
|
|
327
331
|
setIsQuantityValid(false);
|
|
328
332
|
setUserSpinQuantity("");
|
|
329
333
|
setValidationError(
|
|
330
|
-
`Only ${(wheelInfo.totalPrizesAvailable_ - wheelInfo.prizesRequestedCount_).toString()} spins remaining
|
|
334
|
+
`Only ${(wheelInfo.totalPrizesAvailable_ - wheelInfo.prizesRequestedCount_).toString()} spins remaining`,
|
|
331
335
|
);
|
|
332
336
|
return;
|
|
333
337
|
}
|
|
@@ -354,7 +358,7 @@ export function AnySpendBuySpin({
|
|
|
354
358
|
address: B3_TOKEN.address as `0x${string}`,
|
|
355
359
|
abi: erc20Abi,
|
|
356
360
|
functionName: "allowance",
|
|
357
|
-
args: [address, paymentConfig.entryModule as `0x${string}`]
|
|
361
|
+
args: [address, paymentConfig.entryModule as `0x${string}`],
|
|
358
362
|
});
|
|
359
363
|
|
|
360
364
|
// If allowance is insufficient, request approval
|
|
@@ -365,7 +369,7 @@ export function AnySpendBuySpin({
|
|
|
365
369
|
address: B3_TOKEN.address as `0x${string}`,
|
|
366
370
|
abi: erc20Abi,
|
|
367
371
|
functionName: "approve",
|
|
368
|
-
args: [paymentConfig.entryModule as `0x${string}`, totalCost]
|
|
372
|
+
args: [paymentConfig.entryModule as `0x${string}`, totalCost],
|
|
369
373
|
});
|
|
370
374
|
|
|
371
375
|
toast.info("Approval confirmed. Proceeding with spin purchase...");
|
|
@@ -377,7 +381,7 @@ export function AnySpendBuySpin({
|
|
|
377
381
|
address: spinwheelContractAddress as `0x${string}`,
|
|
378
382
|
abi: SPIN_WHEEL_ABI,
|
|
379
383
|
functionName: "buyEntriesAndSpin",
|
|
380
|
-
args: [address, BigInt(userSpinQuantity)]
|
|
384
|
+
args: [address, BigInt(userSpinQuantity)],
|
|
381
385
|
});
|
|
382
386
|
|
|
383
387
|
setBuyingTxHash(buyHash);
|
|
@@ -465,7 +469,7 @@ export function AnySpendBuySpin({
|
|
|
465
469
|
// Render quantity input prompt
|
|
466
470
|
if (showAmountPrompt) {
|
|
467
471
|
const pricePerEntry = formatUnits(paymentConfig.pricePerEntry, 18);
|
|
468
|
-
const remainingEntries = wheelInfo ? wheelInfo.totalPrizesAvailable_ - wheelInfo.prizesRequestedCount_ :
|
|
472
|
+
const remainingEntries = wheelInfo ? wheelInfo.totalPrizesAvailable_ - wheelInfo.prizesRequestedCount_ : BigInt(0);
|
|
469
473
|
const wheelStatus = wheelInfo ? getWheelStatus(wheelInfo) : null;
|
|
470
474
|
const isSoldOut = wheelStatus === "sold_out";
|
|
471
475
|
const isActive = wheelStatus === "active";
|
|
@@ -481,17 +485,17 @@ export function AnySpendBuySpin({
|
|
|
481
485
|
case "not_started":
|
|
482
486
|
return {
|
|
483
487
|
title: "Spin Wheel Not Started",
|
|
484
|
-
message: `Starts at ${formatDate(wheelInfo.startTime_)}
|
|
488
|
+
message: `Starts at ${formatDate(wheelInfo.startTime_)}`,
|
|
485
489
|
};
|
|
486
490
|
case "ended":
|
|
487
491
|
return {
|
|
488
492
|
title: "Spin Wheel Ended",
|
|
489
|
-
message: `Ended at ${formatDate(wheelInfo.endTime_)}
|
|
493
|
+
message: `Ended at ${formatDate(wheelInfo.endTime_)}`,
|
|
490
494
|
};
|
|
491
495
|
case "sold_out":
|
|
492
496
|
return {
|
|
493
497
|
title: "All Spins Have Been Claimed",
|
|
494
|
-
message: "Stay tuned for the next spin wheel event!"
|
|
498
|
+
message: "Stay tuned for the next spin wheel event!",
|
|
495
499
|
};
|
|
496
500
|
default:
|
|
497
501
|
return null;
|
|
@@ -509,7 +513,7 @@ export function AnySpendBuySpin({
|
|
|
509
513
|
animate={{
|
|
510
514
|
opacity: hasMounted ? 1 : 0,
|
|
511
515
|
y: hasMounted ? 0 : 20,
|
|
512
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
516
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
513
517
|
}}
|
|
514
518
|
transition={{ duration: 0.3, delay: 0, ease: "easeInOut" }}
|
|
515
519
|
className={`flex justify-center ${isActive ? "mb-4" : ""}`}
|
|
@@ -529,7 +533,7 @@ export function AnySpendBuySpin({
|
|
|
529
533
|
animate={{
|
|
530
534
|
opacity: hasMounted ? 1 : 0,
|
|
531
535
|
y: hasMounted ? 0 : 20,
|
|
532
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
536
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
533
537
|
}}
|
|
534
538
|
transition={{ duration: 0.3, delay: 0.1, ease: "easeInOut" }}
|
|
535
539
|
className="text-center"
|
|
@@ -569,7 +573,7 @@ export function AnySpendBuySpin({
|
|
|
569
573
|
animate={{
|
|
570
574
|
opacity: hasMounted ? 1 : 0,
|
|
571
575
|
y: hasMounted ? 0 : 20,
|
|
572
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
576
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
573
577
|
}}
|
|
574
578
|
transition={{ duration: 0.3, delay: 0.2, ease: "easeInOut" }}
|
|
575
579
|
className="bg-b3-react-background w-full p-6"
|
|
@@ -668,7 +672,8 @@ export function AnySpendBuySpin({
|
|
|
668
672
|
spenderAddress={paymentConfig.entryModule}
|
|
669
673
|
encodedData={encodedData}
|
|
670
674
|
metadata={{
|
|
671
|
-
|
|
675
|
+
type: OrderType.Custom,
|
|
676
|
+
action: `buy ${userSpinQuantity} spin${userSpinQuantity !== "1" ? "s" : ""}`,
|
|
672
677
|
}}
|
|
673
678
|
header={header}
|
|
674
679
|
onSuccess={txHash => onSuccess?.(txHash)}
|