@b3dotfun/sdk 0.0.7-alpha.12 → 0.0.7-alpha.14
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/constants/index.js +10 -10
- package/dist/cjs/anyspend/react/components/AnySpend.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpend.js +20 -20
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +32 -32
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +29 -29
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +4 -4
- 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 +17 -17
- package/dist/cjs/anyspend/react/components/AnySpendTournament.js +4 -4
- 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 +9 -9
- 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 +2 -2
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +7 -7
- 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 +12 -12
- 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/index.d.ts +1 -0
- package/dist/cjs/anyspend/react/components/index.js +3 -1
- package/dist/cjs/anyspend/react/components/modals/EnterRecipientModal.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/modals/EnterRecipientModal.js +1 -1
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.js +14 -14
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.js +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +10 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +10 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.js +3 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendQuote.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendSendPermitData.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/usePermitData.js +19 -19
- 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 +3 -3
- package/dist/cjs/anyspend/services/anyspend.d.ts +6 -1
- package/dist/cjs/anyspend/services/anyspend.js +13 -13
- package/dist/cjs/anyspend/types/custom.js +2 -2
- package/dist/cjs/anyspend/types/globalWallet.js +1 -1
- package/dist/cjs/anyspend/types/nft.js +6 -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 +30 -0
- package/dist/cjs/anyspend/types/order.js +7 -7
- package/dist/cjs/anyspend/types/permit.js +1 -1
- package/dist/cjs/anyspend/types/req-res/createOrder.d.ts +70 -0
- 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 +45 -0
- 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 +35 -0
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.js +1 -1
- package/dist/cjs/anyspend/types/req-res/getQuote.d.ts +26 -0
- package/dist/cjs/anyspend/types/req-res/getQuote.js +10 -8
- package/dist/cjs/anyspend/types/req-res/getTokenList.js +3 -3
- package/dist/cjs/anyspend/types/req-res/sendPermitData.js +2 -2
- 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 -2
- package/dist/cjs/anyspend/utils/orderPayload.js +6 -6
- 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 +1 -1
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +2 -2
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +5 -5
- 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.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.js +1 -1
- 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/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.js +1 -1
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.js +1 -1
- 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/hooks/useAccountAssets.js +4 -4
- package/dist/cjs/global-account/react/hooks/useAccountWallet.js +4 -4
- 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.js +5 -5
- 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 +10 -10
- 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.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/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 +1 -1
- package/dist/cjs/shared/constants/index.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/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/esm/anyspend/abis/abi-usdc-base.js +97 -97
- package/dist/esm/anyspend/abis/erc20-staking.js +51 -51
- package/dist/esm/anyspend/constants/index.js +10 -10
- package/dist/esm/anyspend/react/components/AnySpend.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpend.js +22 -22
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +33 -33
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +2 -2
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +31 -31
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +4 -4
- 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 +18 -18
- package/dist/esm/anyspend/react/components/AnySpendTournament.js +4 -4
- 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 +12 -12
- 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 +2 -2
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +8 -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 +12 -12
- 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/index.d.ts +1 -0
- package/dist/esm/anyspend/react/components/index.js +1 -0
- package/dist/esm/anyspend/react/components/modals/EnterRecipientModal.d.ts +1 -1
- package/dist/esm/anyspend/react/components/modals/EnterRecipientModal.js +1 -1
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +1 -1
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.js +15 -15
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +6 -6
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.js +6 -6
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +10 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +10 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.js +3 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendQuote.js +2 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendSendPermitData.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/usePermitData.js +19 -19
- 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 +3 -3
- package/dist/esm/anyspend/services/anyspend.d.ts +6 -1
- package/dist/esm/anyspend/services/anyspend.js +14 -14
- package/dist/esm/anyspend/types/custom.js +2 -2
- package/dist/esm/anyspend/types/globalWallet.js +1 -1
- package/dist/esm/anyspend/types/nft.js +6 -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 +30 -0
- package/dist/esm/anyspend/types/order.js +7 -7
- package/dist/esm/anyspend/types/permit.js +1 -1
- package/dist/esm/anyspend/types/req-res/createOrder.d.ts +70 -0
- 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 +45 -0
- 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 +35 -0
- package/dist/esm/anyspend/types/req-res/getOrderHistory.js +1 -1
- package/dist/esm/anyspend/types/req-res/getQuote.d.ts +26 -0
- package/dist/esm/anyspend/types/req-res/getQuote.js +10 -8
- package/dist/esm/anyspend/types/req-res/getTokenList.js +3 -3
- package/dist/esm/anyspend/types/req-res/sendPermitData.js +2 -2
- 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 -2
- package/dist/esm/anyspend/utils/orderPayload.js +6 -6
- 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 +2 -2
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +2 -2
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +5 -5
- 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.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.js +2 -2
- 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/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.js +1 -1
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.js +1 -1
- 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/hooks/useAccountAssets.js +4 -4
- package/dist/esm/global-account/react/hooks/useAccountWallet.js +4 -4
- 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.js +5 -5
- 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 +10 -10
- 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.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/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 +1 -1
- package/dist/esm/shared/constants/index.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/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/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 +2 -2
- package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- 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/index.d.ts +1 -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/useAnyspendOrderAndTransactions.d.ts +10 -0
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +10 -0
- package/dist/types/anyspend/services/anyspend.d.ts +6 -1
- package/dist/types/anyspend/types/onramp.d.ts +3 -0
- package/dist/types/anyspend/types/order.d.ts +30 -0
- package/dist/types/anyspend/types/req-res/createOrder.d.ts +70 -0
- package/dist/types/anyspend/types/req-res/getOrderAndTransactions.d.ts +45 -0
- package/dist/types/anyspend/types/req-res/getOrderHistory.d.ts +35 -0
- package/dist/types/anyspend/types/req-res/getQuote.d.ts +26 -0
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +2 -2
- 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/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/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/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/package.json +1 -1
- package/src/anyspend/abis/abi-usdc-base.ts +97 -97
- package/src/anyspend/abis/erc20-staking.ts +51 -51
- package/src/anyspend/constants/index.ts +10 -10
- package/src/anyspend/react/components/AnySpend.tsx +33 -32
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +34 -34
- package/src/anyspend/react/components/AnySpendCustom.tsx +39 -39
- package/src/anyspend/react/components/AnySpendNFT.tsx +4 -4
- package/src/anyspend/react/components/AnySpendNFTButton.tsx +1 -1
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +18 -18
- package/src/anyspend/react/components/AnySpendTournament.tsx +4 -4
- package/src/anyspend/react/components/common/ChainTokenIcon.tsx +1 -1
- package/src/anyspend/react/components/common/OrderDetails.tsx +15 -15
- 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 +3 -3
- package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +8 -8
- 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 +14 -14
- package/src/anyspend/react/components/common/TokenBalance.tsx +2 -2
- package/src/anyspend/react/components/index.ts +1 -0
- package/src/anyspend/react/components/modals/EnterRecipientModal.tsx +1 -1
- package/src/anyspend/react/components/webview/WebviewOnrampPayment.tsx +18 -18
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +7 -7
- package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +7 -7
- 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 +5 -5
- package/src/anyspend/react/hooks/useAnyspendSendPermitData.ts +3 -3
- 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/usePermitData.ts +19 -19
- 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 +3 -3
- package/src/anyspend/services/anyspend.ts +23 -23
- 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/nft.ts +7 -7
- package/src/anyspend/types/onramp.ts +3 -2
- package/src/anyspend/types/order.ts +9 -9
- package/src/anyspend/types/permit.ts +1 -1
- 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 +10 -8
- package/src/anyspend/types/req-res/getTokenList.ts +4 -4
- package/src/anyspend/types/req-res/sendPermitData.ts +2 -2
- 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 -2
- package/src/anyspend/utils/orderPayload.ts +6 -6
- 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 +3 -3
- package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +4 -4
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +5 -5
- 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 +4 -4
- package/src/global-account/react/components/SignInWithB3/SignInWithB3.tsx +2 -2
- 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/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 +1 -1
- package/src/global-account/react/components/custom/ManageAccountButton.tsx +1 -1
- 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 +1 -1
- package/src/global-account/react/hooks/useAccountAssets.ts +4 -4
- package/src/global-account/react/hooks/useAccountWallet.tsx +5 -5
- 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 +6 -6
- 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 +11 -11
- 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 +3 -3
- 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/shared/constants/chains/b3Chain.ts +35 -35
- package/src/shared/constants/chains/chainPlatformMap.ts +1 -1
- package/src/shared/constants/chains/supported.ts +1 -1
- package/src/shared/constants/index.ts +1 -1
- 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/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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { ABI_ERC20_STAKING, B3_TOKEN, OrderType } from "../../../anyspend/index.js";
|
|
3
|
-
import { Button, GlareCardRounded, Input, StyleRoot, TextLoop, useChainSwitchWithAction, useHasMounted, useModalStore, useTokenBalance } from "../../../global-account/react/index.js";
|
|
3
|
+
import { Button, GlareCardRounded, Input, StyleRoot, TextLoop, useChainSwitchWithAction, useHasMounted, useModalStore, useTokenBalance, } from "../../../global-account/react/index.js";
|
|
4
4
|
import { formatTokenAmount } from "../../../shared/utils/number.js";
|
|
5
5
|
import { motion } from "framer-motion";
|
|
6
6
|
import invariant from "invariant";
|
|
@@ -16,7 +16,7 @@ import { SolIcon } from "./icons/SolIcon.js";
|
|
|
16
16
|
import { UsdcIcon } from "./icons/USDCIcon.js";
|
|
17
17
|
const basePublicClient = createPublicClient({
|
|
18
18
|
chain: base,
|
|
19
|
-
transport: http()
|
|
19
|
+
transport: http(),
|
|
20
20
|
});
|
|
21
21
|
const ERC20Staking = "0xbf04200be3cbf371467a539706393c81c470f523";
|
|
22
22
|
function generateEncodedDataForStakingB3(amount, beneficiary) {
|
|
@@ -24,16 +24,16 @@ function generateEncodedDataForStakingB3(amount, beneficiary) {
|
|
|
24
24
|
const encodedData = encodeFunctionData({
|
|
25
25
|
abi: ABI_ERC20_STAKING,
|
|
26
26
|
functionName: "stake",
|
|
27
|
-
args: [BigInt(amount), beneficiary]
|
|
27
|
+
args: [BigInt(amount), beneficiary],
|
|
28
28
|
});
|
|
29
29
|
return encodedData;
|
|
30
30
|
}
|
|
31
|
-
export function AnySpendStakeB3({ isMainnet = true, loadOrder, mode = "modal", recipientAddress, stakeAmount, onSuccess }) {
|
|
31
|
+
export function AnySpendStakeB3({ isMainnet = true, loadOrder, mode = "modal", recipientAddress, stakeAmount, onSuccess, }) {
|
|
32
32
|
const hasMounted = useHasMounted();
|
|
33
33
|
const { setB3ModalOpen } = useModalStore();
|
|
34
34
|
// Fetch B3 token balance
|
|
35
|
-
const { formattedBalance: b3Balance, isLoading: isBalanceLoading, rawBalance: b3RawBalance } = useTokenBalance({
|
|
36
|
-
token: B3_TOKEN
|
|
35
|
+
const { formattedBalance: b3Balance, isLoading: isBalanceLoading, rawBalance: b3RawBalance, } = useTokenBalance({
|
|
36
|
+
token: B3_TOKEN,
|
|
37
37
|
});
|
|
38
38
|
// Wagmi hooks for direct staking
|
|
39
39
|
const { address } = useAccount();
|
|
@@ -47,8 +47,8 @@ export function AnySpendStakeB3({ isMainnet = true, loadOrder, mode = "modal", r
|
|
|
47
47
|
const { isLoading: isTxPending, isSuccess: isTxSuccess } = useWaitForTransactionReceipt({
|
|
48
48
|
hash: stakingTxHash,
|
|
49
49
|
query: {
|
|
50
|
-
structuralSharing: false // Disable to avoid BigInt serialization issues
|
|
51
|
-
}
|
|
50
|
+
structuralSharing: false, // Disable to avoid BigInt serialization issues
|
|
51
|
+
},
|
|
52
52
|
});
|
|
53
53
|
// Show success modal when transaction is confirmed
|
|
54
54
|
useEffect(() => {
|
|
@@ -148,7 +148,7 @@ export function AnySpendStakeB3({ isMainnet = true, loadOrder, mode = "modal", r
|
|
|
148
148
|
address: B3_TOKEN.address,
|
|
149
149
|
abi: erc20Abi,
|
|
150
150
|
functionName: "allowance",
|
|
151
|
-
args: [address, ERC20Staking]
|
|
151
|
+
args: [address, ERC20Staking],
|
|
152
152
|
});
|
|
153
153
|
// If allowance is insufficient, request approval
|
|
154
154
|
if (allowance < BigInt(userStakeAmount)) {
|
|
@@ -157,7 +157,7 @@ export function AnySpendStakeB3({ isMainnet = true, loadOrder, mode = "modal", r
|
|
|
157
157
|
address: B3_TOKEN.address,
|
|
158
158
|
abi: erc20Abi,
|
|
159
159
|
functionName: "approve",
|
|
160
|
-
args: [ERC20Staking, BigInt(userStakeAmount)]
|
|
160
|
+
args: [ERC20Staking, BigInt(userStakeAmount)],
|
|
161
161
|
});
|
|
162
162
|
toast.info("Approval confirmed. Proceeding with stake...");
|
|
163
163
|
}
|
|
@@ -167,7 +167,7 @@ export function AnySpendStakeB3({ isMainnet = true, loadOrder, mode = "modal", r
|
|
|
167
167
|
address: ERC20Staking,
|
|
168
168
|
abi: ABI_ERC20_STAKING,
|
|
169
169
|
functionName: "stake",
|
|
170
|
-
args: [BigInt(userStakeAmount), recipientAddress]
|
|
170
|
+
args: [BigInt(userStakeAmount), recipientAddress],
|
|
171
171
|
});
|
|
172
172
|
setStakingTxHash(stakeHash);
|
|
173
173
|
toast.success("Staking transaction submitted!");
|
|
@@ -208,18 +208,18 @@ export function AnySpendStakeB3({ isMainnet = true, loadOrder, mode = "modal", r
|
|
|
208
208
|
return (_jsx(StyleRoot, { children: _jsxs("div", { className: "bg-b3-react-background flex w-full flex-col items-center", children: [_jsxs("div", { className: "w-full px-4", children: [_jsx(motion.div, { initial: false, animate: {
|
|
209
209
|
opacity: hasMounted ? 1 : 0,
|
|
210
210
|
y: hasMounted ? 0 : 20,
|
|
211
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
211
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
212
212
|
}, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, className: "relative mx-auto size-48", children: _jsx("video", { autoPlay: true, muted: true, playsInline: true, className: "size-full", src: "https://cdn.b3.fun/b3-sphere-to-coin.mp4" }) }), _jsx(motion.div, { initial: false, animate: {
|
|
213
213
|
opacity: hasMounted ? 1 : 0,
|
|
214
214
|
y: hasMounted ? 0 : 20,
|
|
215
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
215
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
216
216
|
}, transition: { duration: 0.3, delay: 0.1, ease: "easeInOut" }, children: _jsx("h2", { className: "font-sf-rounded font-neue-montreal-medium mb-1 text-center text-2xl font-semibold", children: (() => {
|
|
217
217
|
const hasEnoughBalance = b3RawBalance && BigInt(debouncedUserStakeAmount || "0") <= b3RawBalance;
|
|
218
218
|
return hasEnoughBalance || !debouncedAmount ? "Stake B3" : "Swap & Stake B3";
|
|
219
219
|
})() }) })] }), _jsxs(motion.div, { initial: false, animate: {
|
|
220
220
|
opacity: hasMounted ? 1 : 0,
|
|
221
221
|
y: hasMounted ? 0 : 20,
|
|
222
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
222
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
223
223
|
}, transition: { duration: 0.3, delay: 0.2, ease: "easeInOut" }, className: "bg-b3-react-background w-full p-6", children: [_jsx("div", { className: "mb-2", children: _jsxs("div", { className: "flex items-center justify-between", children: [_jsx("p", { className: "text-as-primary/70 text-sm font-medium", children: "I want to stake" }), _jsxs("span", { className: "text-as-primary/50 flex items-center gap-1 text-sm", children: ["Available: ", isBalanceLoading ? _jsx(Loader2, { className: "h-3 w-3 animate-spin" }) : `${b3Balance} B3`] })] }) }), _jsxs("div", { className: "relative", children: [_jsx(Input, { onFocus: onFocusStakeAmountInput, type: "text", placeholder: "0.00", value: displayAmount, onChange: e => validateAndSetAmount(e.target.value), className: `h-14 px-4 text-lg ${!isAmountValid && displayAmount ? "border-as-red" : "border-b3-react-border"}` }), _jsx("div", { className: "font-pack absolute right-4 top-1/2 -translate-y-1/2 text-lg font-medium text-blue-500/70", children: "B3" })] }), !isAmountValid && displayAmount && _jsx("p", { className: "text-as-red mt-2 text-sm", children: validationError }), _jsx("div", { className: "mt-4", children: (() => {
|
|
224
224
|
const hasEnoughBalance = b3RawBalance && BigInt(debouncedUserStakeAmount || "0") <= b3RawBalance;
|
|
225
225
|
if (!hasEnoughBalance || !debouncedAmount) {
|
|
@@ -234,15 +234,15 @@ export function AnySpendStakeB3({ isMainnet = true, loadOrder, mode = "modal", r
|
|
|
234
234
|
return (_jsx(StyleRoot, { children: _jsxs("div", { className: "bg-b3-react-background flex w-full flex-col items-center", children: [_jsxs("div", { className: "w-full p-4", children: [_jsxs(motion.div, { initial: false, animate: {
|
|
235
235
|
opacity: hasMounted ? 1 : 0,
|
|
236
236
|
y: hasMounted ? 0 : 20,
|
|
237
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
237
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
238
238
|
}, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, className: "relative mx-auto mb-4 size-[120px]", children: [_jsx("div", { className: "absolute inset-0 scale-95 rounded-[50%] bg-black/30 blur-md" }), _jsxs(GlareCardRounded, { className: "overflow-hidden rounded-full border-none", children: [_jsx("img", { alt: "b3 coin", loading: "lazy", width: "64", height: "64", decoding: "async", "data-nimg": "1", className: "size-full shrink-0 bg-transparent text-transparent", src: "https://cdn.b3.fun/b3-coin-3d.png" }), _jsx("div", { className: "absolute inset-0 rounded-[50%] border border-white/10" })] })] }), _jsx(motion.div, { initial: false, animate: {
|
|
239
239
|
opacity: hasMounted ? 1 : 0,
|
|
240
240
|
y: hasMounted ? 0 : 20,
|
|
241
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
241
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
242
242
|
}, transition: { duration: 0.3, delay: 0.1, ease: "easeInOut" }, children: _jsxs("h2", { className: "font-sf-rounded mb-1 text-center text-2xl font-semibold", children: ["Staked ", formatTokenAmount(BigInt(userStakeAmount), 18), " B3"] }) })] }), _jsxs(motion.div, { initial: false, animate: {
|
|
243
243
|
opacity: hasMounted ? 1 : 0,
|
|
244
244
|
y: hasMounted ? 0 : 20,
|
|
245
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
245
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
246
246
|
}, transition: { duration: 0.3, delay: 0.2, ease: "easeInOut" }, className: "bg-b3-react-background w-full p-6", children: [_jsx("div", { className: "mb-6", children: _jsx("a", { href: `https://basescan.org/tx/${stakingTxHash}`, target: "_blank", rel: "noopener noreferrer", className: "text-as-primary/70 hover:text-as-primary block break-all text-center font-mono text-sm underline transition-colors", children: "View transaction" }) }), _jsx(Button, { onClick: () => {
|
|
247
247
|
setB3ModalOpen(false);
|
|
248
248
|
onSuccess?.();
|
|
@@ -251,6 +251,6 @@ export function AnySpendStakeB3({ isMainnet = true, loadOrder, mode = "modal", r
|
|
|
251
251
|
const encodedData = generateEncodedDataForStakingB3(userStakeAmount, recipientAddress);
|
|
252
252
|
return (_jsx(AnySpendCustom, { isMainnet: isMainnet, loadOrder: loadOrder, mode: mode, recipientAddress: recipientAddress, orderType: OrderType.Custom, dstChainId: base.id, dstToken: B3_TOKEN, dstAmount: userStakeAmount, contractAddress: ERC20Staking, encodedData: encodedData, metadata: {
|
|
253
253
|
type: OrderType.Custom,
|
|
254
|
-
action: "stake B3"
|
|
254
|
+
action: "stake B3",
|
|
255
255
|
}, header: header, onSuccess: onSuccess, showRecipient: true }));
|
|
256
256
|
}
|
|
@@ -5,14 +5,14 @@ import { formatDisplayNumber, formatTokenAmount } from "../../../shared/utils/nu
|
|
|
5
5
|
import { AnimatePresence } from "framer-motion";
|
|
6
6
|
import { AnySpendCustom } from "./AnySpendCustom.js";
|
|
7
7
|
export function AnySpendTournament(props) {
|
|
8
|
-
const { isMainnet = true, mode = "modal", action, loadOrder, tournamentChainId, tournamentContractAddress, tournamentMetadata, onSuccess } = props;
|
|
8
|
+
const { isMainnet = true, mode = "modal", action, loadOrder, tournamentChainId, tournamentContractAddress, tournamentMetadata, onSuccess, } = props;
|
|
9
9
|
const dstToken = action === "join" ? props.tournamentEntryToken : props.tournamentFundToken;
|
|
10
10
|
const dstAmount = action === "join" ? props.tournamentEntryFee : props.tournamentFundAmount;
|
|
11
|
-
const header = ({ anyspendPrice, isLoadingAnyspendPrice }) => (_jsxs(_Fragment, { children: [_jsx("div", { className: "z-10 mt-[-100px] flex h-[270px] w-full items-end justify-center", children: _jsx("img", { src: "https://cdn.b3.fun/tournament-play.svg", alt: "Tournament Play", className: "h-[200px] w-[360px] object-cover object-center" }) }), _jsxs("div", { className: "from-b3-react-background to-as-on-surface-1 mt-[-100px] w-full rounded-t-lg bg-gradient-to-t", children: [_jsx("div", { className: "h-[100px] w-full" }), _jsxs("div", { className: "flex w-full flex-col items-center gap-1 p-6 pt-0", children: [_jsxs("span", { className: "font-sf-rounded text-center text-lg font-semibold", children: [action === "join" ? "Pay entry fee to join " : "Pay to fund ", " ", tournamentMetadata.name] }), _jsx("div", { className: "mt-2 flex w-fit items-center gap-1", children: anyspendPrice ? (_jsx(AnimatePresence, { mode: "wait", children: _jsxs("div", { className: cn("text-as-primary group flex items-center text-2xl font-semibold transition-all", {
|
|
12
|
-
"opacity-0": isLoadingAnyspendPrice
|
|
11
|
+
const header = ({ anyspendPrice, isLoadingAnyspendPrice, }) => (_jsxs(_Fragment, { children: [_jsx("div", { className: "z-10 mt-[-100px] flex h-[270px] w-full items-end justify-center", children: _jsx("img", { src: "https://cdn.b3.fun/tournament-play.svg", alt: "Tournament Play", className: "h-[200px] w-[360px] object-cover object-center" }) }), _jsxs("div", { className: "from-b3-react-background to-as-on-surface-1 mt-[-100px] w-full rounded-t-lg bg-gradient-to-t", children: [_jsx("div", { className: "h-[100px] w-full" }), _jsxs("div", { className: "flex w-full flex-col items-center gap-1 p-6 pt-0", children: [_jsxs("span", { className: "font-sf-rounded text-center text-lg font-semibold", children: [action === "join" ? "Pay entry fee to join " : "Pay to fund ", " ", tournamentMetadata.name] }), _jsx("div", { className: "mt-2 flex w-fit items-center gap-1", children: anyspendPrice ? (_jsx(AnimatePresence, { mode: "wait", children: _jsxs("div", { className: cn("text-as-primary group flex items-center text-2xl font-semibold transition-all", {
|
|
12
|
+
"opacity-0": isLoadingAnyspendPrice,
|
|
13
13
|
}), children: [formatDisplayNumber(anyspendPrice?.data?.currencyIn?.amountUsd, { style: "currency" }), " (", formatTokenAmount(BigInt(dstAmount), dstToken.decimals, 6, true), " ", dstToken.symbol, ")"] }) })) : (_jsx("div", { className: "h-[32px] w-full" })) })] })] })] }));
|
|
14
14
|
return (_jsx(AnySpendCustom, { isMainnet: isMainnet, loadOrder: loadOrder, mode: mode, recipientAddress: action === "join" ? props.joinFor : undefined, orderType: action === "join" ? OrderType.JoinTournament : OrderType.FundTournament, dstChainId: tournamentChainId, dstToken: dstToken, dstAmount: dstAmount, contractAddress: tournamentContractAddress, encodedData: "0x", metadata: {
|
|
15
15
|
type: action === "join" ? OrderType.JoinTournament : OrderType.FundTournament,
|
|
16
|
-
tournament: tournamentMetadata
|
|
16
|
+
tournament: tournamentMetadata,
|
|
17
17
|
}, header: header, onSuccess: onSuccess, showRecipient: action === "join" }));
|
|
18
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export function ChainTokenIcon({ chainUrl, tokenUrl, className = "" }) {
|
|
2
|
+
export function ChainTokenIcon({ chainUrl, tokenUrl, className = "", }) {
|
|
3
3
|
return (_jsxs("div", { className: `relative ${className}`, children: [_jsx("img", { src: tokenUrl, alt: "Token", className: "h-full w-full rounded-full" }), _jsx("div", { className: "bg-as-on-surface-1 border-as-stroke absolute bottom-0 right-0 h-[45%] w-[45%] rounded border", children: _jsx("img", { src: chainUrl, alt: "Chain", className: "h-full w-full rounded" }) })] }));
|
|
4
4
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { ALL_CHAINS, capitalizeFirstLetter, EVM_CHAINS, getChainName, getErrorDisplay, getExplorerTxUrl, getPaymentUrl, getStatusDisplay, isNativeToken, OrderStatus, OrderType, RELAY_ETH_ADDRESS, zNft, zToken, zTournament } from "../../../../anyspend/index.js";
|
|
4
|
-
import { Badge, Button, CopyToClipboard, ShinyButton, Skeleton, TextLoop, TextShimmer, useAccountWallet, useChainSwitchWithAction, useModalStore, useOnchainName } from "../../../../global-account/react/index.js";
|
|
3
|
+
import { ALL_CHAINS, capitalizeFirstLetter, EVM_CHAINS, getChainName, getErrorDisplay, getExplorerTxUrl, getPaymentUrl, getStatusDisplay, isNativeToken, OrderStatus, OrderType, RELAY_ETH_ADDRESS, zNft, zToken, zTournament, } from "../../../../anyspend/index.js";
|
|
4
|
+
import { Badge, Button, CopyToClipboard, ShinyButton, Skeleton, TextLoop, TextShimmer, useAccountWallet, useChainSwitchWithAction, useModalStore, useOnchainName, } from "../../../../global-account/react/index.js";
|
|
5
5
|
import { cn } from "../../../../shared/utils/index.js";
|
|
6
6
|
import centerTruncate from "../../../../shared/utils/centerTruncate.js";
|
|
7
7
|
import { formatTokenAmount } from "../../../../shared/utils/number.js";
|
|
8
8
|
import { useColorMode } from "@chakra-ui/react";
|
|
9
9
|
import { WalletCoinbase, WalletMetamask, WalletPhantom, WalletTrust, WalletWalletConnect } from "@web3icons/react";
|
|
10
10
|
import { motion } from "framer-motion";
|
|
11
|
-
import { CheckIcon, ChevronDown, ChevronRight, Copy, ExternalLink, Home, Loader2, RefreshCcw, SquareArrowOutUpRight } from "lucide-react";
|
|
11
|
+
import { CheckIcon, ChevronDown, ChevronRight, Copy, ExternalLink, Home, Loader2, RefreshCcw, SquareArrowOutUpRight, } from "lucide-react";
|
|
12
12
|
import { useRouter, useSearchParams } from "next/navigation";
|
|
13
13
|
import { QRCodeSVG } from "qrcode.react";
|
|
14
14
|
import { memo, useCallback, useEffect, useMemo, useState } from "react";
|
|
@@ -19,7 +19,7 @@ import { b3 } from "viem/chains";
|
|
|
19
19
|
import { useWaitForTransactionReceipt, useWalletClient } from "wagmi";
|
|
20
20
|
import PaymentVendorUI from "./PaymentVendorUI.js";
|
|
21
21
|
// Add this helper function near the top or just above the component
|
|
22
|
-
function getOrderSuccessText({ order, tournament, formattedActualDstAmount, dstToken, recipientName, centerTruncate }) {
|
|
22
|
+
function getOrderSuccessText({ order, tournament, formattedActualDstAmount, dstToken, recipientName, centerTruncate, }) {
|
|
23
23
|
const recipient = recipientName || centerTruncate(order.recipientAddress, 8);
|
|
24
24
|
let actionText = "";
|
|
25
25
|
switch (order.type) {
|
|
@@ -114,7 +114,7 @@ function roundTokenAmount(amount) {
|
|
|
114
114
|
const roundedDecimalPart = digits.join("");
|
|
115
115
|
return `${wholePart}.${roundedDecimalPart}`;
|
|
116
116
|
}
|
|
117
|
-
export const OrderDetails = memo(function OrderDetails({ isMainnet, mode = "modal", order, depositTxs, relayTx, executeTx, refundTxs, onBack }) {
|
|
117
|
+
export const OrderDetails = memo(function OrderDetails({ isMainnet, mode = "modal", order, depositTxs, relayTx, executeTx, refundTxs, onBack, }) {
|
|
118
118
|
const router = useRouter();
|
|
119
119
|
const searchParams = useSearchParams();
|
|
120
120
|
const setB3ModalOpen = useModalStore(state => state.setB3ModalOpen);
|
|
@@ -194,7 +194,7 @@ export const OrderDetails = memo(function OrderDetails({ isMainnet, mode = "moda
|
|
|
194
194
|
account: signer,
|
|
195
195
|
chain: EVM_CHAINS[order.srcChain].viem,
|
|
196
196
|
to: order.globalAddress,
|
|
197
|
-
value: BigInt(order.srcAmount)
|
|
197
|
+
value: BigInt(order.srcAmount),
|
|
198
198
|
});
|
|
199
199
|
setTxHash(hash);
|
|
200
200
|
}
|
|
@@ -205,7 +205,7 @@ export const OrderDetails = memo(function OrderDetails({ isMainnet, mode = "moda
|
|
|
205
205
|
address: order.srcTokenAddress,
|
|
206
206
|
abi: erc20Abi,
|
|
207
207
|
functionName: "transfer",
|
|
208
|
-
args: [order.globalAddress, BigInt(order.srcAmount)]
|
|
208
|
+
args: [order.globalAddress, BigInt(order.srcAmount)],
|
|
209
209
|
});
|
|
210
210
|
setTxHash(hash);
|
|
211
211
|
}
|
|
@@ -290,7 +290,7 @@ export const OrderDetails = memo(function OrderDetails({ isMainnet, mode = "moda
|
|
|
290
290
|
formattedActualDstAmount: formattedActualDstAmount,
|
|
291
291
|
dstToken,
|
|
292
292
|
recipientName,
|
|
293
|
-
centerTruncate
|
|
293
|
+
centerTruncate,
|
|
294
294
|
}), _jsx(ExternalLink, { className: "ml-2 h-4 w-4" })] }) }) }), order.type === OrderType.JoinTournament && order.status === OrderStatus.Executed && (_jsxs(ShinyButton, { accentColor: "hsl(var(--as-brand))", textColor: "text-white", className: "flex w-full items-center gap-2", disabled: txLoading || isSwitchingOrExecuting, onClick: () => setB3ModalOpen(false), children: [_jsx("span", { className: "pl-4", children: "Continue to Tournament" }), _jsx(ChevronRight, { className: "h-4 w-4" })] })), order.status === OrderStatus.Executed && (_jsx("button", { className: "bg-as-on-surface-2 text-as-secondary flex w-full items-center justify-center gap-2 rounded-lg p-2", onClick: mode === "page" ? onBack : () => setB3ModalOpen(false), children: mode === "page" ? (_jsxs(_Fragment, { children: ["Return to Home ", _jsx(Home, { className: "ml-2 h-4 w-4" })] })) : ("Close") }))] }));
|
|
295
295
|
}
|
|
296
296
|
if (relayTx && relayTx.status === "success") {
|
|
@@ -318,7 +318,7 @@ export const OrderDetails = memo(function OrderDetails({ isMainnet, mode = "moda
|
|
|
318
318
|
formattedActualDstAmount,
|
|
319
319
|
dstToken,
|
|
320
320
|
recipientName,
|
|
321
|
-
centerTruncate
|
|
321
|
+
centerTruncate,
|
|
322
322
|
}), _jsx(ExternalLink, { className: "ml-2 h-4 w-4" })] }) }) }), order.type === OrderType.JoinTournament && order.status === OrderStatus.Executed && (_jsxs(ShinyButton, { accentColor: "hsl(var(--as-brand))", textColor: "text-white", className: "flex w-full items-center gap-2", disabled: txLoading || isSwitchingOrExecuting, onClick: () => setB3ModalOpen(false), children: [_jsx("span", { className: "pl-4", children: "Continue to Tournament" }), _jsx(ChevronRight, { className: "h-4 w-4" })] })), order.status === OrderStatus.Executed && (_jsx("button", { className: "bg-as-on-surface-2 text-as-secondary flex w-full items-center justify-center gap-2 rounded-lg p-2", onClick: mode === "page" ? onBack : () => setB3ModalOpen(false), children: mode === "page" ? (_jsxs(_Fragment, { children: ["Return to Home ", _jsx(Home, { className: "ml-2 h-4 w-4" })] })) : ("Close") }))] }));
|
|
323
323
|
}
|
|
324
324
|
// This boolean indicates that user finish payment, and waiting for the deposit to be confirmed. We get this from query params (waitingForDeposit=true)
|
|
@@ -346,7 +346,7 @@ export const OrderDetails = memo(function OrderDetails({ isMainnet, mode = "moda
|
|
|
346
346
|
.share({
|
|
347
347
|
title: "Complete Deposit",
|
|
348
348
|
text: "Complete your deposit on BSMNT.fun",
|
|
349
|
-
url: permalink
|
|
349
|
+
url: permalink,
|
|
350
350
|
})
|
|
351
351
|
.catch(error => console.log("Error sharing:", error));
|
|
352
352
|
}
|
|
@@ -367,9 +367,9 @@ export const OrderDetails = memo(function OrderDetails({ isMainnet, mode = "moda
|
|
|
367
367
|
toast.success("Copied recipient address to clipboard");
|
|
368
368
|
}, children: _jsxs("div", { className: "text-as-primary flex items-center gap-2", children: [centerTruncate(order.recipientAddress, 10), _jsx(Copy, { className: "text-as-primary/50 hover:text-as-primary h-4 w-4 cursor-pointer transition-all duration-200" })] }) })] })] })] }) })) : (_jsxs("div", { className: "flex w-full items-center", children: [_jsx("div", { className: "divider w-full" }), _jsx("button", { className: "whitespace-nowrap text-sm", onClick: () => setShowOrderDetails(true), children: "Order Details" }), _jsx(ChevronDown, { className: "text-as-primary mx-1 h-4 min-h-4 w-4 min-w-4" }), _jsx("div", { className: "divider w-full" })] })), _jsxs("button", { className: "bg-as-on-surface-2 text-as-secondary flex w-full items-center justify-center gap-2 rounded-lg p-2", onClick: onBack, children: ["Cancel and start over ", _jsx(RefreshCcw, { className: "ml-2 h-4 w-4" })] })] }));
|
|
369
369
|
});
|
|
370
|
-
function TransactionDetails({ title, chainId, tx, isProcessing, delay }) {
|
|
370
|
+
function TransactionDetails({ title, chainId, tx, isProcessing, delay, }) {
|
|
371
371
|
return (_jsxs("div", { className: "relative flex w-full flex-1 items-center justify-between gap-4", children: [_jsxs("div", { className: "flex grow items-center gap-4", children: [_jsx(motion.div, { className: "bg-b3-react-background relative h-10 w-10 rounded-full", children: isProcessing ? (_jsx(motion.div, { initial: { opacity: 0, scale: 0.3 }, animate: { opacity: 1, scale: 1 }, transition: { duration: 0.5, ease: "easeInOut", delay }, className: "absolute z-10 m-2 flex h-6 w-6 items-center justify-center rounded-full bg-black/70 shadow-lg backdrop-blur-sm", children: _jsx(Loader2, { className: "text-as-primary h-4 w-4 animate-spin" }) })) : (_jsx(motion.div, { initial: { opacity: 0, scale: 0.3 }, animate: { opacity: 1, scale: 1 }, transition: { duration: 0.5, ease: "easeOut", delay }, className: "bg-as-brand/70 absolute z-10 m-2 flex h-6 w-6 items-center justify-center rounded-full border border-white/30 shadow-lg shadow-purple-500/30 backdrop-blur-sm", style: {
|
|
372
|
-
boxShadow: "0 0 15px 5px rgba(138, 43, 226, 0.2)"
|
|
372
|
+
boxShadow: "0 0 15px 5px rgba(138, 43, 226, 0.2)",
|
|
373
373
|
}, children: _jsx(CheckIcon, { className: "text-as-primary h-3 w-3" }) })) }), _jsx(motion.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { duration: 0.3, ease: "easeInOut", delay }, className: "shrink-0 text-base", children: isProcessing ? (_jsx(TextShimmer, { duration: 1, children: title })) : (_jsx("span", { className: "text-as-primary", children: title })) })] }), _jsx("div", { className: "flex flex-col gap-1", children: tx ? (_jsx(motion.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { duration: 0.3, ease: "easeInOut", delay: (delay || 0) + 0.3 }, className: "flex items-center gap-3", children: _jsx("a", { href: getExplorerTxUrl(chainId, tx.txHash), target: "_blank", children: _jsx("div", { className: "text-as-primary/30 font-mono text-xs", children: centerTruncate(tx?.txHash, 6) }) }) })) : null })] }));
|
|
374
374
|
}
|
|
375
375
|
export const OrderDetailsLoadingView = (_jsxs("div", { className: "mx-auto flex w-[460px] max-w-full flex-col items-center gap-4", children: [_jsxs(Badge, { variant: "default", className: "hover:bg-b3-react-background flex items-center gap-3 border-white/20 bg-white/10 px-4 py-1 text-base transition-colors", children: [_jsx(Loader2, { className: "text-as-primary h-4 w-4 animate-spin" }), _jsx(TextShimmer, { duration: 1, className: "font-sf-rounded text-base font-semibold", children: "Loading..." })] }), _jsxs("div", { className: "flex w-full flex-1 flex-col", children: [_jsxs("div", { className: "mb-4 flex flex-col gap-1", children: [_jsx(Skeleton, { className: "h-4 w-24" }), _jsxs("div", { className: "mt-2 flex items-center gap-2", children: [_jsx(Skeleton, { className: "h-8 w-48" }), _jsx(Skeleton, { className: "ml-4 h-8 w-32" })] }), _jsx(Skeleton, { className: "mt-4 h-8 w-24" })] }), _jsx(Skeleton, { className: "mb-4 h-12 w-full" }), _jsxs("div", { className: "flex w-full items-center justify-between gap-4", children: [_jsxs(Skeleton, { className: "rounded-lg p-6 pb-3", children: [_jsx("div", { className: "h-[200px] w-[200px]" }), _jsx("div", { className: "mt-3 flex items-center justify-center gap-2", children: _jsx("div", { className: "h-5 w-5 rounded-full" }) })] }), _jsx("div", { className: "flex flex-1 flex-col gap-2", children: [1, 2, 3].map(i => (_jsx(Skeleton, { className: "h-10 w-full" }, i))) })] })] }), _jsxs("div", { className: "bg-b3-react-background mt-8 w-full rounded-lg p-4", children: [_jsx(Skeleton, { className: "mb-3 h-4 w-48" }), _jsxs("div", { className: "flex items-center gap-4", children: [_jsx(Skeleton, { className: "h-10 flex-1" }), _jsx(Skeleton, { className: "h-10 flex-1" })] })] }), _jsx(Skeleton, { className: "h-10 w-full" })] }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Token } from "../../../../anyspend";
|
|
2
|
-
export declare function OrderToken({ context, address, chainId, setChainId, token, setToken, requiredAmount, tokenSelectClassName }: {
|
|
2
|
+
export declare function OrderToken({ context, address, chainId, setChainId, token, setToken, requiredAmount, tokenSelectClassName, }: {
|
|
3
3
|
context: "from" | "to";
|
|
4
4
|
address: string | undefined;
|
|
5
5
|
token: Token;
|
|
@@ -9,13 +9,13 @@ import { TokenSelector } from "@reservoir0x/relay-kit-ui";
|
|
|
9
9
|
import { CheckCircle2, ChevronsUpDown } from "lucide-react";
|
|
10
10
|
import { useMemo } from "react";
|
|
11
11
|
import { ChainTokenIcon } from "./ChainTokenIcon.js";
|
|
12
|
-
export function OrderToken({ context, address, chainId, setChainId, token, setToken, requiredAmount, tokenSelectClassName }) {
|
|
12
|
+
export function OrderToken({ context, address, chainId, setChainId, token, setToken, requiredAmount, tokenSelectClassName, }) {
|
|
13
13
|
const { wallet } = useAccountWallet();
|
|
14
14
|
const chainName = useMemo(() => simpleHashChainToChainName(chainId), [chainId]);
|
|
15
15
|
const { nativeTokens, fungibleTokens } = useTokenBalancesByChain({
|
|
16
16
|
address: wallet?.address || "",
|
|
17
17
|
chainsIds: [chainId],
|
|
18
|
-
enabled: !!wallet?.address && !!chainName
|
|
18
|
+
enabled: !!wallet?.address && !!chainName,
|
|
19
19
|
});
|
|
20
20
|
const { formattedBalance, hasEnoughBalance } = useMemo(() => {
|
|
21
21
|
// Get balance for the selected token
|
|
@@ -37,7 +37,7 @@ export function OrderToken({ context, address, chainId, setChainId, token, setTo
|
|
|
37
37
|
const formattedBalance = balance ? formatTokenAmount(balance, token.decimals, 6, false) : null;
|
|
38
38
|
return {
|
|
39
39
|
formattedBalance,
|
|
40
|
-
hasEnoughBalance
|
|
40
|
+
hasEnoughBalance,
|
|
41
41
|
};
|
|
42
42
|
}, [chainId, fungibleTokens, nativeTokens, requiredAmount, token, wallet?.address]);
|
|
43
43
|
return (_jsx(TokenSelector, { address: address, chainIdsFilter: Object.values(ALL_CHAINS).map(chain => chain.id), context: context, fromChainWalletVMSupported: true, isValidAddress: true, lockedChainIds: Object.values(ALL_CHAINS).map(chain => chain.id), multiWalletSupportEnabled: true, onAnalyticEvent: undefined, popularChainIds: [1, 8453, RELAY_SOLANA_MAINNET_CHAIN_ID], restrictedToken: undefined, setToken: token => {
|
|
@@ -48,7 +48,7 @@ export function OrderToken({ context, address, chainId, setChainId, token, setTo
|
|
|
48
48
|
decimals: token.decimals,
|
|
49
49
|
metadata: { logoURI: token.logoURI },
|
|
50
50
|
name: token.name,
|
|
51
|
-
symbol: token.symbol
|
|
51
|
+
symbol: token.symbol,
|
|
52
52
|
});
|
|
53
53
|
}, supportedWalletVMs: ["evm", "svm"], token: undefined, trigger: _jsxs(Button, { variant: "outline", role: "combobox", className: cn("bg-b3-react-background border-as-stroke flex h-auto w-fit shrink-0 items-center justify-center gap-2 rounded-xl border-2 px-2 py-1 pr-2 text-center", tokenSelectClassName), children: [token.metadata.logoURI ? (_jsx(ChainTokenIcon, { chainUrl: ALL_CHAINS[chainId].logoUrl, tokenUrl: token.metadata.logoURI, className: "h-8 min-h-8 w-8 min-w-8" })) : (_jsx("div", { className: "h-8 w-8 rounded-full bg-gray-700" })), _jsxs("div", { className: "flex flex-col items-start gap-0", children: [_jsxs("div", { className: "text-as-primary font-semibold", children: [token.symbol, " on ", ALL_CHAINS[chainId].name] }), formattedBalance && (_jsxs("div", { className: "flex items-center gap-1", children: [_jsxs("div", { className: "text-as-primary/50 text-xs", children: [formattedBalance || "--", " ", token.symbol] }), hasEnoughBalance && _jsx(CheckCircle2, { className: "text-as-brand -mt-0.5 h-4 w-4" })] }))] }), _jsx(ChevronsUpDown, { className: "h-4 w-4 shrink-0 opacity-70" })] }) }, undefined));
|
|
54
54
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Token } from "../../../../anyspend";
|
|
2
|
-
export declare function OrderTokenAmount({ disabled, inputValue, onChangeInput, context, address, chainId, setChainId, token, setToken, hideTokenSelect, canEditAmount, className, innerClassName, amountClassName, tokenSelectClassName }: {
|
|
2
|
+
export declare function OrderTokenAmount({ disabled, inputValue, onChangeInput, context, address, chainId, setChainId, token, setToken, hideTokenSelect, canEditAmount, className, innerClassName, amountClassName, tokenSelectClassName, }: {
|
|
3
3
|
disabled?: boolean;
|
|
4
4
|
inputValue: string;
|
|
5
5
|
onChangeInput: (value: string) => void;
|
|
@@ -8,7 +8,7 @@ import { Button } from "../../../../global-account/react/index.js";
|
|
|
8
8
|
import { cn } from "../../../../shared/utils/index.js";
|
|
9
9
|
import { TokenSelector } from "@reservoir0x/relay-kit-ui";
|
|
10
10
|
import { ChainTokenIcon } from "./ChainTokenIcon.js";
|
|
11
|
-
export function OrderTokenAmount({ disabled, inputValue, onChangeInput, context, address, chainId, setChainId, token, setToken, hideTokenSelect = false, canEditAmount = true, className, innerClassName, amountClassName, tokenSelectClassName }) {
|
|
11
|
+
export function OrderTokenAmount({ disabled, inputValue, onChangeInput, context, address, chainId, setChainId, token, setToken, hideTokenSelect = false, canEditAmount = true, className, innerClassName, amountClassName, tokenSelectClassName, }) {
|
|
12
12
|
// Track previous token to detect changes
|
|
13
13
|
const prevTokenRef = useRef(token.address);
|
|
14
14
|
useEffect(() => {
|
|
@@ -36,7 +36,7 @@ export function OrderTokenAmount({ disabled, inputValue, onChangeInput, context,
|
|
|
36
36
|
decimals: newToken.decimals,
|
|
37
37
|
metadata: { logoURI: newToken.logoURI },
|
|
38
38
|
name: newToken.name,
|
|
39
|
-
symbol: newToken.symbol
|
|
39
|
+
symbol: newToken.symbol,
|
|
40
40
|
});
|
|
41
41
|
// If this is the source token, reset the amount immediately
|
|
42
42
|
if (context === "from") {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp }: {
|
|
1
|
+
export declare function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, }: {
|
|
2
2
|
srcAmountOnRamp: string;
|
|
3
3
|
setSrcAmountOnRamp: (amount: string) => void;
|
|
4
4
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,7 +5,7 @@ import { AnimatePresence, motion } from "framer-motion";
|
|
|
5
5
|
import { useRef } from "react";
|
|
6
6
|
import { toast } from "sonner";
|
|
7
7
|
import { PaymentOptions } from "./PaymentOptions.js";
|
|
8
|
-
export function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp }) {
|
|
8
|
+
export function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, }) {
|
|
9
9
|
// Get geo data for onramp availability
|
|
10
10
|
const { geoData } = useGetGeo();
|
|
11
11
|
const { coinbaseOnrampOptions } = useCoinbaseOnrampOptions(true, geoData?.country || "US");
|
|
@@ -32,7 +32,7 @@ export function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp }) {
|
|
|
32
32
|
: 25000) ? (_jsxs("p", { className: "label-style -mb-3 mt-3 text-xs text-red-400 dark:bg-transparent", children: ["Maximum amount is $", coinbaseOnrampOptions?.paymentCurrencies?.[0]?.limits?.find(l => l.id === "ACH_BANK_ACCOUNT")?.max ||
|
|
33
33
|
"25,000"] })) : (_jsx("p", { className: "label-style text-b3-react-foreground/60 -mb-3 mt-3 text-xs dark:bg-transparent", children: "Buy amount in USD" })), _jsxs("div", { className: "relative inline-flex items-center dark:bg-transparent", children: [_jsx("span", { className: "text-b3-react-foreground/60 -ms-3 -mt-2 text-2xl font-semibold dark:bg-transparent", children: "$" }), _jsx(Input, { ref: amountInputRef, type: "text", value: srcAmountOnRamp, onChange: handleAmountChange, placeholder: "0.00", className: "placeholder:text-b3-react-foreground/60 h-auto min-w-[70px] border-0 bg-transparent py-6 text-center text-4xl font-semibold focus-visible:ring-0 focus-visible:ring-offset-0 dark:bg-transparent", style: {
|
|
34
34
|
width: `${Math.max(50, srcAmountOnRamp.length * 34)}px`,
|
|
35
|
-
minWidth: srcAmountOnRamp ? `auto` : "105px"
|
|
35
|
+
minWidth: srcAmountOnRamp ? `auto` : "105px",
|
|
36
36
|
} }), _jsx(AnimatePresence, { mode: "wait", children: _jsx(motion.div, { animate: { opacity: !srcAmountOnRamp || parseFloat(srcAmountOnRamp) <= 0 ? 1 : 0 }, exit: { opacity: 0 }, transition: { duration: 0.5, ease: "easeInOut" }, className: "border-b3-react-foreground/10 absolute bottom-3 left-1 h-1 w-[90%] rounded-full border-t-2 border-dashed bg-transparent" }) })] })] }), _jsx("div", { className: "grid grid-cols-4 gap-4", children: ["5", "10", "25", "100"].map(value => (_jsxs("button", { onClick: () => handleQuickAmount(value), className: `rounded-lg border px-4 py-3 ${srcAmountOnRamp === value
|
|
37
37
|
? "border-as-brand bg-as-brand/30"
|
|
38
38
|
: "border-as-stroke hover:border-as-brand hover:bg-as-brand/30"} transition-all duration-200`, children: ["$", value] }, value))) })] }));
|
|
@@ -25,5 +25,5 @@ interface PanelOnrampPaymentProps {
|
|
|
25
25
|
recipientEnsName?: string;
|
|
26
26
|
recipientImageUrl?: string;
|
|
27
27
|
}
|
|
28
|
-
export declare function PanelOnrampPayment({ srcAmountOnRamp, recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationTokenAddress, selectedDstChainId, selectedDstToken, anyspendQuote, globalAddress, onOrderCreated, onBack, orderType, nft, tournament, payload, recipientEnsName, recipientImageUrl }: PanelOnrampPaymentProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function PanelOnrampPayment({ srcAmountOnRamp, recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationTokenAddress, selectedDstChainId, selectedDstToken, anyspendQuote, globalAddress, onOrderCreated, onBack, orderType, nft, tournament, payload, recipientEnsName, recipientImageUrl, }: PanelOnrampPaymentProps): import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { OnrampVendor, OrderType, useAnyspendCreateOnrampOrder, useGeoOnrampOptions } from "../../../../anyspend/index.js";
|
|
2
|
+
import { OnrampVendor, OrderType, useAnyspendCreateOnrampOrder, useGeoOnrampOptions, } from "../../../../anyspend/index.js";
|
|
3
3
|
import { Button } from "../../../../global-account/react/index.js";
|
|
4
4
|
import centerTruncate from "../../../../shared/utils/centerTruncate.js";
|
|
5
5
|
import { motion } from "framer-motion";
|
|
@@ -9,7 +9,7 @@ import { useEffect, useRef, useState } from "react";
|
|
|
9
9
|
import { toast } from "sonner";
|
|
10
10
|
export function PanelOnrampPayment({ srcAmountOnRamp,
|
|
11
11
|
// recipientName,
|
|
12
|
-
recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationTokenAddress, selectedDstChainId, selectedDstToken, anyspendQuote, globalAddress, onOrderCreated, onBack, orderType, nft, tournament, payload, recipientEnsName, recipientImageUrl }) {
|
|
12
|
+
recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationTokenAddress, selectedDstChainId, selectedDstToken, anyspendQuote, globalAddress, onOrderCreated, onBack, orderType, nft, tournament, payload, recipientEnsName, recipientImageUrl, }) {
|
|
13
13
|
// Use a stable amount for geo onramp options to prevent unnecessary refetches
|
|
14
14
|
const [stableAmountForGeo, setStableAmountForGeo] = useState(srcAmountOnRamp);
|
|
15
15
|
const hasInitialized = useRef(false);
|
|
@@ -20,7 +20,7 @@ recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationToke
|
|
|
20
20
|
hasInitialized.current = true;
|
|
21
21
|
}
|
|
22
22
|
}, [srcAmountOnRamp]);
|
|
23
|
-
const { geoData, coinbaseOnrampOptions, coinbaseAvailablePaymentMethods, isStripeOnrampSupported, isStripeWeb2Supported, isLoading: isLoadingGeoOnramp } = useGeoOnrampOptions(isMainnet, stableAmountForGeo);
|
|
23
|
+
const { geoData, coinbaseOnrampOptions, coinbaseAvailablePaymentMethods, isStripeOnrampSupported, isStripeWeb2Supported, isLoading: isLoadingGeoOnramp, } = useGeoOnrampOptions(isMainnet, stableAmountForGeo);
|
|
24
24
|
const { createOrder, isCreatingOrder } = useAnyspendCreateOnrampOrder({
|
|
25
25
|
onSuccess: data => {
|
|
26
26
|
const orderId = data.data.id;
|
|
@@ -29,7 +29,7 @@ recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationToke
|
|
|
29
29
|
onError: error => {
|
|
30
30
|
console.error(error);
|
|
31
31
|
toast.error("Failed to create order: " + error.message);
|
|
32
|
-
}
|
|
32
|
+
},
|
|
33
33
|
});
|
|
34
34
|
const handlePaymentMethodClick = async (vendor, paymentMethod) => {
|
|
35
35
|
try {
|
|
@@ -63,7 +63,7 @@ recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationToke
|
|
|
63
63
|
return {
|
|
64
64
|
...selectedDstToken,
|
|
65
65
|
chainId: destinationTokenChainId || selectedDstChainId,
|
|
66
|
-
address: destinationTokenAddress
|
|
66
|
+
address: destinationTokenAddress,
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
69
|
return selectedDstToken;
|
|
@@ -80,13 +80,13 @@ recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationToke
|
|
|
80
80
|
paymentMethod: paymentMethod || "",
|
|
81
81
|
country: geoData?.country || "US",
|
|
82
82
|
ipAddress: geoData?.ip,
|
|
83
|
-
redirectUrl: window.location.origin === "https://basement.fun" ? "https://basement.fun/deposit" : window.location.origin
|
|
83
|
+
redirectUrl: window.location.origin === "https://basement.fun" ? "https://basement.fun/deposit" : window.location.origin,
|
|
84
84
|
},
|
|
85
85
|
expectedDstAmount: anyspendQuote?.data?.currencyOut?.amount?.toString() || "0",
|
|
86
86
|
creatorAddress: globalAddress,
|
|
87
87
|
nft,
|
|
88
88
|
tournament,
|
|
89
|
-
payload
|
|
89
|
+
payload,
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
catch (err) {
|
|
@@ -97,7 +97,7 @@ recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationToke
|
|
|
97
97
|
return (_jsxs("div", { className: "mx-auto flex w-full max-w-[460px] flex-col gap-6", children: [_jsxs(_Fragment, { children: [_jsx("h2", { className: "-mb-3 text-lg font-semibold", children: "Order summary" }), _jsxs("div", { className: "bg-b3-react-background border-b3-react-border flex flex-col gap-3 rounded-lg border p-4", children: [recipientAddress && (_jsxs(motion.div, { initial: false, animate: {
|
|
98
98
|
opacity: 1,
|
|
99
99
|
y: 0,
|
|
100
|
-
filter: "blur(0px)"
|
|
100
|
+
filter: "blur(0px)",
|
|
101
101
|
}, transition: { duration: 0.3, delay: 0.2, ease: "easeInOut" }, className: "flex items-center justify-between", children: [_jsx("p", { className: "text-b3-react-foreground/60", children: orderType === OrderType.Swap
|
|
102
102
|
? "Recipient"
|
|
103
103
|
: orderType === OrderType.MintNFT
|
|
@@ -6,7 +6,7 @@ export default function PaymentMethodIcons() {
|
|
|
6
6
|
{ name: "Mastercard", src: PAYMENT_METHOD_ICONS.mastercard },
|
|
7
7
|
{ name: "Amex", src: PAYMENT_METHOD_ICONS.amex },
|
|
8
8
|
{ name: "Apple Pay", src: PAYMENT_METHOD_ICONS.applePay },
|
|
9
|
-
{ name: "Google Pay", src: PAYMENT_METHOD_ICONS.googlePay }
|
|
9
|
+
{ name: "Google Pay", src: PAYMENT_METHOD_ICONS.googlePay },
|
|
10
10
|
];
|
|
11
11
|
return (_jsxs("div", { className: "mt-6 flex w-full flex-col items-center gap-3", children: [_jsx("div", { className: "text-as-primary/30 text-xs", children: "Supported payment methods" }), _jsx("div", { className: "flex items-center gap-3", children: paymentMethods.map(method => (_jsx("img", { src: method.src, alt: method.name, className: "h-6 opacity-70" }, method.name))) })] }));
|
|
12
12
|
}
|
|
@@ -10,12 +10,12 @@ export default function PaymentOneClick({ order }) {
|
|
|
10
10
|
const howItWorksSteps = [
|
|
11
11
|
{
|
|
12
12
|
number: 1,
|
|
13
|
-
description: `Click the link above to pay with ${paymentDescription}
|
|
13
|
+
description: `Click the link above to pay with ${paymentDescription}`,
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
number: 2,
|
|
17
|
-
description: `After payment, you'll be redirected back here, where we continue to execute the order
|
|
18
|
-
}
|
|
17
|
+
description: `After payment, you'll be redirected back here, where we continue to execute the order.`,
|
|
18
|
+
},
|
|
19
19
|
];
|
|
20
20
|
return (_jsxs("div", { className: "relative my-8 flex w-full flex-1 flex-col items-center justify-center", children: [_jsx("a", { href: order.oneClickBuyUrl || "", target: "_blank", className: "w-4/5", children: _jsx(ShinyButton, { accentColor: "hsl(var(--as-brand))", className: "relative w-full py-6", children: _jsxs("div", { className: "relative z-10 flex items-center justify-center gap-3", children: [_jsxs("span", { className: "text-lg font-medium text-white", children: ["Continue to ", vendorName] }), _jsx(ChevronRight, { className: "h-5 w-5 text-white/90" })] }) }) }), _jsx(HowItWorks, { steps: howItWorksSteps })] }));
|
|
21
21
|
}
|
|
@@ -21,7 +21,7 @@ export default function PaymentStripeWeb2({ isMainnet, order, onPaymentSuccess }
|
|
|
21
21
|
}
|
|
22
22
|
return (_jsx(Elements, { stripe: stripePromise, options: {
|
|
23
23
|
clientSecret: clientSecret || undefined,
|
|
24
|
-
appearance: { theme: theme === "light" ? "stripe" : "night" }
|
|
24
|
+
appearance: { theme: theme === "light" ? "stripe" : "night" },
|
|
25
25
|
}, children: _jsx(StripePaymentForm, { order: order, clientSecret: clientSecret, onPaymentSuccess: onPaymentSuccess }) }));
|
|
26
26
|
}
|
|
27
27
|
function StripeLoadingState() {
|
|
@@ -30,7 +30,7 @@ function StripeLoadingState() {
|
|
|
30
30
|
function StripeErrorState({ error }) {
|
|
31
31
|
return (_jsx("div", { className: "relative my-8 flex w-full flex-1 flex-col items-center justify-center", children: _jsxs("div", { className: "bg-as-red/10 border-as-red/20 flex w-full items-center gap-3 rounded-2xl border p-4", children: [_jsx("div", { className: "bg-as-red flex h-6 w-6 shrink-0 items-center justify-center rounded-full", children: _jsx("svg", { className: "h-4 w-4 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) }), _jsxs("div", { className: "text-as-red text-sm font-medium", children: ["Error: ", error] })] }) }));
|
|
32
32
|
}
|
|
33
|
-
function StripePaymentForm({ order, clientSecret, onPaymentSuccess }) {
|
|
33
|
+
function StripePaymentForm({ order, clientSecret, onPaymentSuccess, }) {
|
|
34
34
|
const stripe = useStripe();
|
|
35
35
|
const elements = useElements();
|
|
36
36
|
const [loading, setLoading] = useState(false);
|
|
@@ -73,7 +73,7 @@ function StripePaymentForm({ order, clientSecret, onPaymentSuccess }) {
|
|
|
73
73
|
console.log("@@stripe-web2-payment:confirming-payment:", JSON.stringify({ orderId: order.id }, null, 2));
|
|
74
74
|
const { error, paymentIntent } = await stripe.confirmPayment({
|
|
75
75
|
elements,
|
|
76
|
-
redirect: "if_required"
|
|
76
|
+
redirect: "if_required",
|
|
77
77
|
});
|
|
78
78
|
if (error) {
|
|
79
79
|
console.error("@@stripe-web2-payment:error:", JSON.stringify(error, null, 2));
|
|
@@ -107,30 +107,30 @@ function StripePaymentForm({ order, clientSecret, onPaymentSuccess }) {
|
|
|
107
107
|
defaultValues: {
|
|
108
108
|
billingDetails: {
|
|
109
109
|
name: "",
|
|
110
|
-
email: ""
|
|
111
|
-
}
|
|
110
|
+
email: "",
|
|
111
|
+
},
|
|
112
112
|
},
|
|
113
113
|
fields: {
|
|
114
|
-
billingDetails: "auto"
|
|
114
|
+
billingDetails: "auto",
|
|
115
115
|
},
|
|
116
116
|
wallets: {
|
|
117
117
|
applePay: "auto",
|
|
118
|
-
googlePay: "auto"
|
|
119
|
-
}
|
|
118
|
+
googlePay: "auto",
|
|
119
|
+
},
|
|
120
120
|
};
|
|
121
121
|
const howItWorksSteps = [
|
|
122
122
|
{
|
|
123
123
|
number: 1,
|
|
124
|
-
description: "Enter your payment details securely using Stripe's encrypted form"
|
|
124
|
+
description: "Enter your payment details securely using Stripe's encrypted form",
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
127
|
number: 2,
|
|
128
|
-
description: "Your payment is processed instantly and securely through our payment partner"
|
|
128
|
+
description: "Your payment is processed instantly and securely through our payment partner",
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
131
|
number: 3,
|
|
132
|
-
description: "After payment confirmation, your order will be processed and completed automatically"
|
|
133
|
-
}
|
|
132
|
+
description: "After payment confirmation, your order will be processed and completed automatically",
|
|
133
|
+
},
|
|
134
134
|
];
|
|
135
135
|
return (_jsxs("div", { className: "relative my-8 flex w-full flex-1 flex-col items-center justify-center", children: [_jsxs("form", { onSubmit: handleSubmit, className: "w-full space-y-6", children: [_jsxs("div", { className: "bg-as-on-surface-1 w-full rounded-2xl p-6", children: [_jsxs("div", { className: "mb-4 flex items-center justify-between", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("div", { className: "bg-as-brand/20 flex h-8 w-8 shrink-0 items-center justify-center rounded-full", children: _jsx("svg", { className: "text-as-brand h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" }) }) }), _jsxs("div", { children: [_jsx("div", { className: "text-as-primary text-sm font-medium", children: "Secured by Stripe" }), _jsx("div", { className: "text-as-primary/50 text-xs", children: "End-to-end encrypted payment" })] })] }), _jsxs("button", { type: "button", onClick: () => setShowHowItWorks(true), className: "text-as-primary/60 hover:text-as-primary flex items-center gap-1 text-xs transition-colors", children: [_jsx(HelpCircle, { className: "h-4 w-4" }), _jsx("span", { children: "How it works" })] })] }), amount && (_jsxs("div", { className: "border-as-stroke border-t pt-4", children: [_jsx("div", { className: "text-as-primary/50 mb-3 text-sm", children: "Payment Breakdown" }), (() => {
|
|
136
136
|
const originalAmount = Number(order.srcAmount) / 10 ** USDC_BASE.decimals;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Token } from "../../../../anyspend";
|
|
2
|
-
export declare function TokenBalance({ token, walletAddress, onChangeInput }: {
|
|
2
|
+
export declare function TokenBalance({ token, walletAddress, onChangeInput, }: {
|
|
3
3
|
token: Token;
|
|
4
4
|
walletAddress: string | undefined;
|
|
5
5
|
onChangeInput: (value: string) => void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useTokenBalance } from "../../../../global-account/react/index.js";
|
|
3
3
|
import { formatUnits } from "viem";
|
|
4
|
-
export function TokenBalance({ token, walletAddress, onChangeInput }) {
|
|
4
|
+
export function TokenBalance({ token, walletAddress, onChangeInput, }) {
|
|
5
5
|
const { rawBalance, formattedBalance, isLoading } = useTokenBalance({
|
|
6
6
|
token,
|
|
7
|
-
address: walletAddress
|
|
7
|
+
address: walletAddress,
|
|
8
8
|
});
|
|
9
9
|
const handlePercentageClick = (percentage) => {
|
|
10
10
|
if (!rawBalance)
|
|
@@ -5,6 +5,7 @@ export { AnySpendNFT } from "./AnySpendNFT";
|
|
|
5
5
|
export { AnySpendNFTButton } from "./AnySpendNFTButton";
|
|
6
6
|
export { AnySpendStakeB3 } from "./AnySpendStakeB3";
|
|
7
7
|
export { AnySpendTournament } from "./AnySpendTournament";
|
|
8
|
+
export { ChainTokenIcon } from "./common/ChainTokenIcon";
|
|
8
9
|
export { OrderDetails } from "./common/OrderDetails";
|
|
9
10
|
export { OrderHistory } from "./common/OrderHistory";
|
|
10
11
|
export { OrderHistoryItem } from "./common/OrderHistoryItem";
|
|
@@ -7,6 +7,7 @@ export { AnySpendNFTButton } from "./AnySpendNFTButton.js";
|
|
|
7
7
|
export { AnySpendStakeB3 } from "./AnySpendStakeB3.js";
|
|
8
8
|
export { AnySpendTournament } from "./AnySpendTournament.js";
|
|
9
9
|
// Common Components
|
|
10
|
+
export { ChainTokenIcon } from "./common/ChainTokenIcon.js";
|
|
10
11
|
export { OrderDetails } from "./common/OrderDetails.js";
|
|
11
12
|
export { OrderHistory } from "./common/OrderHistory.js";
|
|
12
13
|
export { OrderHistoryItem } from "./common/OrderHistoryItem.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function EnterRecipientModal({ isOpenPasteRecipientAddress, setIsOpenPasteRecipientAddress, recipientAddress, setRecipientAddress }: {
|
|
1
|
+
export declare function EnterRecipientModal({ isOpenPasteRecipientAddress, setIsOpenPasteRecipientAddress, recipientAddress, setRecipientAddress, }: {
|
|
2
2
|
isOpenPasteRecipientAddress: boolean;
|
|
3
3
|
setIsOpenPasteRecipientAddress: (isOpen: boolean) => void;
|
|
4
4
|
recipientAddress: string | undefined;
|