@b3dotfun/sdk 0.0.7-alpha.18 → 0.0.7-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/anyspend/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 -13
- package/dist/cjs/anyspend/index.d.ts +0 -1
- package/dist/cjs/anyspend/index.js +0 -1
- 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 +66 -68
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +4 -4
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +90 -133
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +2 -3
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +5 -7
- 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 +20 -21
- package/dist/cjs/anyspend/react/components/AnySpendTournament.js +4 -7
- 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 +23 -52
- 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 +0 -1
- package/dist/cjs/anyspend/react/components/index.js +1 -3
- package/dist/cjs/anyspend/react/components/modals/EnterRecipientModal.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/modals/EnterRecipientModal.js +6 -6
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.js +14 -14
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +18 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +0 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.js +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +0 -14
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +0 -14
- 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 +2 -9
- package/dist/cjs/anyspend/services/anyspend.js +14 -14
- package/dist/cjs/anyspend/types/custom.js +2 -2
- package/dist/cjs/anyspend/types/globalWallet.js +1 -1
- package/dist/cjs/anyspend/types/index.d.ts +0 -1
- package/dist/cjs/anyspend/types/index.js +0 -1
- package/dist/cjs/anyspend/types/nft.d.ts +0 -7
- package/dist/cjs/anyspend/types/nft.js +6 -8
- package/dist/cjs/anyspend/types/onramp.d.ts +0 -3
- package/dist/cjs/anyspend/types/onramp.js +1 -2
- package/dist/cjs/anyspend/types/order.d.ts +0 -40
- 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 +0 -98
- 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 +0 -63
- 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 +0 -49
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.js +1 -1
- package/dist/cjs/anyspend/types/req-res/getQuote.d.ts +0 -37
- package/dist/cjs/anyspend/types/req-res/getQuote.js +9 -14
- 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.d.ts +3 -3
- package/dist/cjs/anyspend/utils/orderPayload.js +8 -22
- 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 +3 -3
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +6 -6
- 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/SignInWithB3.d.ts +2 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.js +17 -12
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +12 -12
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/WalletRow.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.js +9 -9
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +2 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.js +2 -2
- package/dist/cjs/global-account/react/components/StyleRoot.js +1 -0
- 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/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 +8 -8
- package/dist/cjs/global-account/react/hooks/useAddTWSessionKey.d.ts +2 -2
- package/dist/cjs/global-account/react/hooks/useAddTWSessionKey.js +6 -6
- package/dist/cjs/global-account/react/hooks/useAuthentication.js +3 -3
- package/dist/cjs/global-account/react/hooks/useB3BalanceFromAddresses.js +7 -7
- package/dist/cjs/global-account/react/hooks/useB3EnsName.d.ts +4 -8
- package/dist/cjs/global-account/react/hooks/useB3EnsName.js +23 -32
- package/dist/cjs/global-account/react/hooks/useBestTransactionPath.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useBestTransactionPath.js +10 -10
- package/dist/cjs/global-account/react/hooks/useBsmntProfile.js +1 -1
- package/dist/cjs/global-account/react/hooks/useChainSwitchWithAction.js +3 -3
- package/dist/cjs/global-account/react/hooks/useClaim.js +4 -4
- package/dist/cjs/global-account/react/hooks/useConnect.js +3 -3
- package/dist/cjs/global-account/react/hooks/useExchangeRate.js +3 -3
- package/dist/cjs/global-account/react/hooks/useGetAllTWSigners.js +7 -7
- package/dist/cjs/global-account/react/hooks/useGetGeo.js +1 -1
- package/dist/cjs/global-account/react/hooks/useHandleConnectWithPrivy.js +2 -2
- package/dist/cjs/global-account/react/hooks/useNativeBalance.js +6 -6
- package/dist/cjs/global-account/react/hooks/useOnchainName.js +10 -10
- package/dist/cjs/global-account/react/hooks/useOneBalance.js +2 -2
- package/dist/cjs/global-account/react/hooks/useRemoveSessionKey.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useRemoveSessionKey.js +3 -3
- package/dist/cjs/global-account/react/hooks/useRouter.js +6 -6
- package/dist/cjs/global-account/react/hooks/useSiwe.js +4 -4
- package/dist/cjs/global-account/react/hooks/useTokenBalance.js +6 -6
- package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.js +9 -9
- package/dist/cjs/global-account/react/hooks/useTokenData.js +3 -3
- package/dist/cjs/global-account/react/hooks/useTokenFromUrl.js +14 -14
- package/dist/cjs/global-account/react/hooks/useTokenPrice.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokenPrice.js +6 -6
- package/dist/cjs/global-account/react/hooks/useTokenPriceWithFallback.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokenPriceWithFallback.js +7 -7
- package/dist/cjs/global-account/react/hooks/useTokensFromAddress.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokensFromAddress.js +2 -2
- package/dist/cjs/global-account/react/hooks/useURLParams.js +1 -1
- package/dist/cjs/global-account/react/stores/index.d.ts +1 -1
- package/dist/cjs/global-account/react/stores/useAuthStore.js +3 -3
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +0 -2
- 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.d.ts +0 -1
- package/dist/cjs/shared/constants/index.js +2 -3
- 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/index.d.ts +0 -9
- package/dist/cjs/shared/utils/index.js +0 -17
- 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 -13
- package/dist/esm/anyspend/index.d.ts +0 -1
- package/dist/esm/anyspend/index.js +0 -1
- 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 +39 -41
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +4 -4
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +71 -114
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +2 -3
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +5 -7
- 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 +21 -22
- package/dist/esm/anyspend/react/components/AnySpendTournament.js +4 -7
- 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 +24 -53
- 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 +0 -1
- package/dist/esm/anyspend/react/components/index.js +0 -1
- package/dist/esm/anyspend/react/components/modals/EnterRecipientModal.d.ts +1 -1
- package/dist/esm/anyspend/react/components/modals/EnterRecipientModal.js +2 -2
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +1 -1
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.js +15 -15
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +18 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +6 -6
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +0 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.js +7 -7
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +0 -14
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +0 -14
- 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 +2 -9
- package/dist/esm/anyspend/services/anyspend.js +15 -15
- package/dist/esm/anyspend/types/custom.js +2 -2
- package/dist/esm/anyspend/types/globalWallet.js +1 -1
- package/dist/esm/anyspend/types/index.d.ts +0 -1
- package/dist/esm/anyspend/types/index.js +0 -1
- package/dist/esm/anyspend/types/nft.d.ts +0 -7
- package/dist/esm/anyspend/types/nft.js +6 -8
- package/dist/esm/anyspend/types/onramp.d.ts +0 -3
- package/dist/esm/anyspend/types/onramp.js +1 -2
- package/dist/esm/anyspend/types/order.d.ts +0 -40
- 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 +0 -98
- 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 +0 -63
- 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 +0 -49
- package/dist/esm/anyspend/types/req-res/getOrderHistory.js +1 -1
- package/dist/esm/anyspend/types/req-res/getQuote.d.ts +0 -37
- package/dist/esm/anyspend/types/req-res/getQuote.js +9 -14
- 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.d.ts +3 -3
- package/dist/esm/anyspend/utils/orderPayload.js +9 -23
- 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 +3 -3
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +6 -6
- 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/SignInWithB3.d.ts +2 -1
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.js +13 -8
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +13 -13
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.js +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/WalletRow.js +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.js +9 -9
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +3 -3
- package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.js +2 -2
- package/dist/esm/global-account/react/components/StyleRoot.js +1 -0
- 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/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 +8 -8
- package/dist/esm/global-account/react/hooks/useAddTWSessionKey.d.ts +2 -2
- package/dist/esm/global-account/react/hooks/useAddTWSessionKey.js +6 -6
- package/dist/esm/global-account/react/hooks/useAuthentication.js +3 -3
- package/dist/esm/global-account/react/hooks/useB3BalanceFromAddresses.js +7 -7
- package/dist/esm/global-account/react/hooks/useB3EnsName.d.ts +4 -8
- package/dist/esm/global-account/react/hooks/useB3EnsName.js +22 -34
- package/dist/esm/global-account/react/hooks/useBestTransactionPath.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useBestTransactionPath.js +10 -10
- package/dist/esm/global-account/react/hooks/useBsmntProfile.js +1 -1
- package/dist/esm/global-account/react/hooks/useChainSwitchWithAction.js +3 -3
- package/dist/esm/global-account/react/hooks/useClaim.js +4 -4
- package/dist/esm/global-account/react/hooks/useConnect.js +3 -3
- package/dist/esm/global-account/react/hooks/useExchangeRate.js +3 -3
- package/dist/esm/global-account/react/hooks/useGetAllTWSigners.js +7 -7
- package/dist/esm/global-account/react/hooks/useGetGeo.js +1 -1
- package/dist/esm/global-account/react/hooks/useHandleConnectWithPrivy.js +2 -2
- package/dist/esm/global-account/react/hooks/useNativeBalance.js +6 -6
- package/dist/esm/global-account/react/hooks/useOnchainName.js +10 -10
- package/dist/esm/global-account/react/hooks/useOneBalance.js +2 -2
- package/dist/esm/global-account/react/hooks/useRemoveSessionKey.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useRemoveSessionKey.js +3 -3
- package/dist/esm/global-account/react/hooks/useRouter.js +6 -6
- package/dist/esm/global-account/react/hooks/useSiwe.js +4 -4
- package/dist/esm/global-account/react/hooks/useTokenBalance.js +6 -6
- package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.js +9 -9
- package/dist/esm/global-account/react/hooks/useTokenData.js +3 -3
- package/dist/esm/global-account/react/hooks/useTokenFromUrl.js +13 -13
- package/dist/esm/global-account/react/hooks/useTokenPrice.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokenPrice.js +6 -6
- package/dist/esm/global-account/react/hooks/useTokenPriceWithFallback.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokenPriceWithFallback.js +7 -7
- package/dist/esm/global-account/react/hooks/useTokensFromAddress.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokensFromAddress.js +2 -2
- package/dist/esm/global-account/react/hooks/useURLParams.js +1 -1
- package/dist/esm/global-account/react/stores/index.d.ts +1 -1
- package/dist/esm/global-account/react/stores/useAuthStore.js +3 -3
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +0 -2
- 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.d.ts +0 -1
- package/dist/esm/shared/constants/index.js +1 -2
- 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/index.d.ts +0 -9
- package/dist/esm/shared/utils/index.js +0 -15
- 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/styles/index.css +1 -1
- package/dist/types/anyspend/index.d.ts +0 -1
- package/dist/types/anyspend/react/components/AnySpend.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +4 -4
- package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +2 -3
- 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 +0 -1
- 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/useAnyspendCreateOnrampOrder.d.ts +18 -3
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +0 -1
- package/dist/types/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +0 -14
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +0 -14
- package/dist/types/anyspend/services/anyspend.d.ts +2 -9
- package/dist/types/anyspend/types/index.d.ts +0 -1
- package/dist/types/anyspend/types/nft.d.ts +0 -7
- package/dist/types/anyspend/types/onramp.d.ts +0 -3
- package/dist/types/anyspend/types/order.d.ts +0 -40
- package/dist/types/anyspend/types/req-res/createOrder.d.ts +0 -98
- package/dist/types/anyspend/types/req-res/getOrderAndTransactions.d.ts +0 -63
- package/dist/types/anyspend/types/req-res/getOrderHistory.d.ts +0 -49
- package/dist/types/anyspend/types/req-res/getQuote.d.ts +0 -37
- package/dist/types/anyspend/utils/orderPayload.d.ts +3 -3
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +3 -3
- package/dist/types/global-account/react/components/B3Provider/B3Provider.native.d.ts +2 -2
- package/dist/types/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -1
- package/dist/types/global-account/react/components/MintButton/MintButton.d.ts +1 -1
- package/dist/types/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +1 -1
- package/dist/types/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +2 -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/useB3EnsName.d.ts +4 -8
- package/dist/types/global-account/react/hooks/useBestTransactionPath.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useRemoveSessionKey.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokenBalancesByChain.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokenPrice.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokenPriceWithFallback.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokensFromAddress.d.ts +1 -1
- package/dist/types/global-account/react/stores/index.d.ts +1 -1
- package/dist/types/global-account/react/stores/useModalStore.d.ts +0 -2
- package/dist/types/shared/constants/index.d.ts +0 -1
- package/dist/types/shared/utils/index.d.ts +0 -9
- package/package.json +3 -15
- 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 +11 -13
- package/src/anyspend/index.ts +0 -1
- package/src/anyspend/react/components/AnySpend.tsx +32 -33
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +41 -46
- package/src/anyspend/react/components/AnySpendCustom.tsx +70 -158
- package/src/anyspend/react/components/AnySpendNFT.tsx +6 -11
- package/src/anyspend/react/components/AnySpendNFTButton.tsx +1 -1
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +22 -23
- package/src/anyspend/react/components/AnySpendTournament.tsx +4 -7
- package/src/anyspend/react/components/common/ChainTokenIcon.tsx +1 -1
- package/src/anyspend/react/components/common/OrderDetails.tsx +31 -75
- 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 +0 -1
- package/src/anyspend/react/components/modals/EnterRecipientModal.tsx +2 -2
- package/src/anyspend/react/components/webview/WebviewOnrampPayment.tsx +18 -18
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +20 -10
- package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +8 -9
- 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 +25 -25
- package/src/anyspend/types/chain.ts +1 -1
- package/src/anyspend/types/custom.ts +2 -2
- package/src/anyspend/types/globalWallet.ts +1 -1
- package/src/anyspend/types/index.ts +0 -1
- package/src/anyspend/types/nft.ts +7 -10
- package/src/anyspend/types/onramp.ts +2 -3
- 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 +9 -14
- 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 +9 -21
- 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 +8 -7
- 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/SignInWithB3.tsx +28 -16
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +14 -14
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Privy.tsx +2 -2
- package/src/global-account/react/components/SignInWithB3/components/AuthButton.tsx +1 -1
- package/src/global-account/react/components/SignInWithB3/components/WalletRow.tsx +1 -1
- package/src/global-account/react/components/SignInWithB3/steps/LoginStep.tsx +10 -10
- package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +3 -3
- package/src/global-account/react/components/SignInWithB3/utils/signInUtils.ts +2 -2
- package/src/global-account/react/components/StyleRoot.tsx +1 -0
- 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/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 +9 -9
- package/src/global-account/react/hooks/useAddTWSessionKey.tsx +7 -7
- package/src/global-account/react/hooks/useAuthentication.ts +3 -3
- package/src/global-account/react/hooks/useB3BalanceFromAddresses.ts +9 -9
- package/src/global-account/react/hooks/useB3EnsName.ts +31 -43
- package/src/global-account/react/hooks/useBestTransactionPath.tsx +11 -11
- package/src/global-account/react/hooks/useBsmntProfile.ts +1 -1
- package/src/global-account/react/hooks/useChainSwitchWithAction.ts +4 -4
- package/src/global-account/react/hooks/useClaim.tsx +5 -5
- package/src/global-account/react/hooks/useConnect.tsx +4 -4
- package/src/global-account/react/hooks/useExchangeRate.tsx +3 -3
- package/src/global-account/react/hooks/useGetAllTWSigners.tsx +9 -9
- package/src/global-account/react/hooks/useGetGeo.tsx +1 -1
- package/src/global-account/react/hooks/useHandleConnectWithPrivy.tsx +2 -2
- package/src/global-account/react/hooks/useMediaQuery.tsx +1 -1
- package/src/global-account/react/hooks/useNativeBalance.tsx +7 -7
- package/src/global-account/react/hooks/useOnchainName.tsx +11 -11
- package/src/global-account/react/hooks/useOneBalance.tsx +2 -2
- package/src/global-account/react/hooks/useQueryB3.ts +2 -2
- package/src/global-account/react/hooks/useQueryBSMNT.ts +2 -2
- package/src/global-account/react/hooks/useRemoveSessionKey.tsx +5 -5
- package/src/global-account/react/hooks/useRouter.tsx +6 -6
- package/src/global-account/react/hooks/useSiwe.tsx +4 -4
- package/src/global-account/react/hooks/useTokenBalance.tsx +6 -6
- package/src/global-account/react/hooks/useTokenBalancesByChain.tsx +10 -10
- package/src/global-account/react/hooks/useTokenData.ts +3 -3
- package/src/global-account/react/hooks/useTokenFromUrl.tsx +14 -14
- package/src/global-account/react/hooks/useTokenPrice.tsx +7 -7
- package/src/global-account/react/hooks/useTokenPriceWithFallback.tsx +7 -7
- package/src/global-account/react/hooks/useTokensFromAddress.ts +2 -2
- package/src/global-account/react/hooks/useURLParams.ts +2 -2
- package/src/global-account/react/stores/index.ts +1 -1
- package/src/global-account/react/stores/useAuthStore.ts +3 -3
- package/src/global-account/react/stores/useModalStore.ts +3 -5
- 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 -3
- package/src/shared/thirdweb/initiateClient.ts +2 -2
- package/src/shared/thirdweb/openapi-ts.config.ts +1 -1
- package/src/shared/utils/b3Ens.ts +4 -4
- package/src/shared/utils/chain-transformers.ts +9 -9
- package/src/shared/utils/fetchBalances.ts +5 -5
- package/src/shared/utils/fetchBsmntProfile.ts +1 -1
- package/src/shared/utils/index.ts +0 -16
- package/src/shared/utils/insights.ts +31 -31
- package/src/shared/utils/ipfs.ts +1 -1
- package/src/shared/utils/number.ts +5 -5
- package/src/shared/utils/simplehash.ts +28 -28
- package/src/shared/utils/thirdweb-insights.ts +20 -20
- package/dist/cjs/anyspend/types/metadata.d.ts +0 -26
- package/dist/cjs/anyspend/types/metadata.js +0 -16
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.d.ts +0 -14
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +0 -50
- package/dist/cjs/global-account/react/components/custom/Icon.d.ts +0 -7
- package/dist/cjs/global-account/react/components/custom/Icon.js +0 -52
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.d.ts +0 -4
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.js +0 -20
- package/dist/cjs/shared/react/hooks/index.d.ts +0 -1
- package/dist/cjs/shared/react/hooks/index.js +0 -17
- package/dist/cjs/shared/react/hooks/useNavigation.d.ts +0 -17
- package/dist/cjs/shared/react/hooks/useNavigation.js +0 -57
- package/dist/cjs/shared/react/index.d.ts +0 -1
- package/dist/cjs/shared/react/index.js +0 -17
- package/dist/esm/anyspend/types/metadata.d.ts +0 -26
- package/dist/esm/anyspend/types/metadata.js +0 -11
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.d.ts +0 -14
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +0 -44
- package/dist/esm/global-account/react/components/custom/Icon.d.ts +0 -7
- package/dist/esm/global-account/react/components/custom/Icon.js +0 -50
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.d.ts +0 -4
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.js +0 -17
- package/dist/esm/shared/react/hooks/index.d.ts +0 -1
- package/dist/esm/shared/react/hooks/index.js +0 -1
- package/dist/esm/shared/react/hooks/useNavigation.d.ts +0 -17
- package/dist/esm/shared/react/hooks/useNavigation.js +0 -52
- package/dist/esm/shared/react/index.d.ts +0 -1
- package/dist/esm/shared/react/index.js +0 -1
- package/dist/types/anyspend/types/metadata.d.ts +0 -26
- package/dist/types/global-account/react/components/SignInWithB3/SignIn.d.ts +0 -14
- package/dist/types/global-account/react/components/custom/Icon.d.ts +0 -7
- package/dist/types/global-account/react/components/custom/ManageAccountButton.d.ts +0 -4
- package/dist/types/shared/react/hooks/index.d.ts +0 -1
- package/dist/types/shared/react/hooks/useNavigation.d.ts +0 -17
- package/dist/types/shared/react/index.d.ts +0 -1
- package/src/anyspend/types/metadata.ts +0 -41
- package/src/global-account/react/components/SignInWithB3/SignIn.tsx +0 -190
- package/src/global-account/react/components/custom/Icon.tsx +0 -102
- package/src/global-account/react/components/custom/ManageAccountButton.tsx +0 -33
- package/src/shared/react/hooks/index.ts +0 -1
- package/src/shared/react/hooks/useNavigation.ts +0 -61
- package/src/shared/react/index.ts +0 -1
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
Token,
|
|
7
7
|
Tournament,
|
|
8
8
|
useAnyspendCreateOnrampOrder,
|
|
9
|
-
useGeoOnrampOptions
|
|
9
|
+
useGeoOnrampOptions
|
|
10
10
|
} from "@b3dotfun/sdk/anyspend";
|
|
11
11
|
import { Button } from "@b3dotfun/sdk/global-account/react";
|
|
12
12
|
import centerTruncate from "@b3dotfun/sdk/shared/utils/centerTruncate";
|
|
@@ -57,7 +57,7 @@ export function PanelOnrampPayment({
|
|
|
57
57
|
tournament,
|
|
58
58
|
payload,
|
|
59
59
|
recipientEnsName,
|
|
60
|
-
recipientImageUrl
|
|
60
|
+
recipientImageUrl
|
|
61
61
|
}: PanelOnrampPaymentProps) {
|
|
62
62
|
// Use a stable amount for geo onramp options to prevent unnecessary refetches
|
|
63
63
|
const [stableAmountForGeo, setStableAmountForGeo] = useState(srcAmountOnRamp);
|
|
@@ -77,7 +77,7 @@ export function PanelOnrampPayment({
|
|
|
77
77
|
coinbaseAvailablePaymentMethods,
|
|
78
78
|
isStripeOnrampSupported,
|
|
79
79
|
isStripeWeb2Supported,
|
|
80
|
-
isLoading: isLoadingGeoOnramp
|
|
80
|
+
isLoading: isLoadingGeoOnramp
|
|
81
81
|
} = useGeoOnrampOptions(isMainnet, stableAmountForGeo);
|
|
82
82
|
|
|
83
83
|
const { createOrder, isCreatingOrder } = useAnyspendCreateOnrampOrder({
|
|
@@ -88,7 +88,7 @@ export function PanelOnrampPayment({
|
|
|
88
88
|
onError: error => {
|
|
89
89
|
console.error(error);
|
|
90
90
|
toast.error("Failed to create order: " + error.message);
|
|
91
|
-
}
|
|
91
|
+
}
|
|
92
92
|
});
|
|
93
93
|
|
|
94
94
|
const handlePaymentMethodClick = async (vendor: OnrampVendor, paymentMethod?: string) => {
|
|
@@ -129,7 +129,7 @@ export function PanelOnrampPayment({
|
|
|
129
129
|
return {
|
|
130
130
|
...selectedDstToken,
|
|
131
131
|
chainId: destinationTokenChainId || selectedDstChainId,
|
|
132
|
-
address: destinationTokenAddress
|
|
132
|
+
address: destinationTokenAddress
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
135
|
return selectedDstToken;
|
|
@@ -148,13 +148,13 @@ export function PanelOnrampPayment({
|
|
|
148
148
|
country: geoData?.country || "US",
|
|
149
149
|
ipAddress: geoData?.ip,
|
|
150
150
|
redirectUrl:
|
|
151
|
-
window.location.origin === "https://basement.fun" ? "https://basement.fun/deposit" : window.location.origin
|
|
151
|
+
window.location.origin === "https://basement.fun" ? "https://basement.fun/deposit" : window.location.origin
|
|
152
152
|
},
|
|
153
153
|
expectedDstAmount: anyspendQuote?.data?.currencyOut?.amount?.toString() || "0",
|
|
154
154
|
creatorAddress: globalAddress,
|
|
155
155
|
nft,
|
|
156
156
|
tournament,
|
|
157
|
-
payload
|
|
157
|
+
payload
|
|
158
158
|
});
|
|
159
159
|
} catch (err: any) {
|
|
160
160
|
console.error(err);
|
|
@@ -175,7 +175,7 @@ export function PanelOnrampPayment({
|
|
|
175
175
|
animate={{
|
|
176
176
|
opacity: 1,
|
|
177
177
|
y: 0,
|
|
178
|
-
filter: "blur(0px)"
|
|
178
|
+
filter: "blur(0px)"
|
|
179
179
|
}}
|
|
180
180
|
transition={{ duration: 0.3, delay: 0.2, ease: "easeInOut" }}
|
|
181
181
|
className="flex items-center justify-between"
|
|
@@ -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
|
|
|
12
12
|
return (
|
|
@@ -17,12 +17,12 @@ export default function PaymentOneClick({ order }: PaymentOneClickProps) {
|
|
|
17
17
|
const howItWorksSteps = [
|
|
18
18
|
{
|
|
19
19
|
number: 1,
|
|
20
|
-
description: `Click the link above to pay with ${paymentDescription}
|
|
20
|
+
description: `Click the link above to pay with ${paymentDescription}`
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
number: 2,
|
|
24
|
-
description: `After payment, you'll be redirected back here, where we continue to execute the order
|
|
25
|
-
}
|
|
24
|
+
description: `After payment, you'll be redirected back here, where we continue to execute the order.`
|
|
25
|
+
}
|
|
26
26
|
];
|
|
27
27
|
|
|
28
28
|
return (
|
|
@@ -22,7 +22,7 @@ export default function PaymentStripeWeb2({ isMainnet, order, onPaymentSuccess }
|
|
|
22
22
|
|
|
23
23
|
const { clientSecret, isLoadingStripeClientSecret, stripeClientSecretError } = useStripeClientSecret(
|
|
24
24
|
isMainnet,
|
|
25
|
-
order.stripePaymentIntentId
|
|
25
|
+
order.stripePaymentIntentId!
|
|
26
26
|
);
|
|
27
27
|
|
|
28
28
|
if (isLoadingStripeClientSecret) {
|
|
@@ -38,7 +38,7 @@ export default function PaymentStripeWeb2({ isMainnet, order, onPaymentSuccess }
|
|
|
38
38
|
stripe={stripePromise}
|
|
39
39
|
options={{
|
|
40
40
|
clientSecret: clientSecret || undefined,
|
|
41
|
-
appearance: { theme: theme === "light" ? "stripe" : "night" }
|
|
41
|
+
appearance: { theme: theme === "light" ? "stripe" : "night" }
|
|
42
42
|
}}
|
|
43
43
|
>
|
|
44
44
|
<StripePaymentForm order={order} clientSecret={clientSecret} onPaymentSuccess={onPaymentSuccess} />
|
|
@@ -80,7 +80,7 @@ function StripeErrorState({ error }: { error: string }) {
|
|
|
80
80
|
function StripePaymentForm({
|
|
81
81
|
order,
|
|
82
82
|
clientSecret,
|
|
83
|
-
onPaymentSuccess
|
|
83
|
+
onPaymentSuccess
|
|
84
84
|
}: {
|
|
85
85
|
order: Order;
|
|
86
86
|
clientSecret: string | null;
|
|
@@ -135,7 +135,7 @@ function StripePaymentForm({
|
|
|
135
135
|
console.log("@@stripe-web2-payment:confirming-payment:", JSON.stringify({ orderId: order.id }, null, 2));
|
|
136
136
|
const { error, paymentIntent } = await stripe.confirmPayment({
|
|
137
137
|
elements,
|
|
138
|
-
redirect: "if_required"
|
|
138
|
+
redirect: "if_required"
|
|
139
139
|
});
|
|
140
140
|
|
|
141
141
|
if (error) {
|
|
@@ -144,7 +144,7 @@ function StripePaymentForm({
|
|
|
144
144
|
} else if (paymentIntent && paymentIntent.status === "succeeded") {
|
|
145
145
|
console.log(
|
|
146
146
|
"@@stripe-web2-payment:success:",
|
|
147
|
-
JSON.stringify({ orderId: order.id, paymentIntentId: paymentIntent.id }, null, 2)
|
|
147
|
+
JSON.stringify({ orderId: order.id, paymentIntentId: paymentIntent.id }, null, 2)
|
|
148
148
|
);
|
|
149
149
|
// Payment succeeded without redirect - handle success in the modal
|
|
150
150
|
setMessage(null);
|
|
@@ -174,31 +174,31 @@ function StripePaymentForm({
|
|
|
174
174
|
defaultValues: {
|
|
175
175
|
billingDetails: {
|
|
176
176
|
name: "",
|
|
177
|
-
email: ""
|
|
178
|
-
}
|
|
177
|
+
email: ""
|
|
178
|
+
}
|
|
179
179
|
},
|
|
180
180
|
fields: {
|
|
181
|
-
billingDetails: "auto" as const
|
|
181
|
+
billingDetails: "auto" as const
|
|
182
182
|
},
|
|
183
183
|
wallets: {
|
|
184
184
|
applePay: "auto" as const,
|
|
185
|
-
googlePay: "auto" as const
|
|
186
|
-
}
|
|
185
|
+
googlePay: "auto" as const
|
|
186
|
+
}
|
|
187
187
|
};
|
|
188
188
|
|
|
189
189
|
const howItWorksSteps = [
|
|
190
190
|
{
|
|
191
191
|
number: 1,
|
|
192
|
-
description: "Enter your payment details securely using Stripe's encrypted form"
|
|
192
|
+
description: "Enter your payment details securely using Stripe's encrypted form"
|
|
193
193
|
},
|
|
194
194
|
{
|
|
195
195
|
number: 2,
|
|
196
|
-
description: "Your payment is processed instantly and securely through our payment partner"
|
|
196
|
+
description: "Your payment is processed instantly and securely through our payment partner"
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
199
|
number: 3,
|
|
200
|
-
description: "After payment confirmation, your order will be processed and completed automatically"
|
|
201
|
-
}
|
|
200
|
+
description: "After payment confirmation, your order will be processed and completed automatically"
|
|
201
|
+
}
|
|
202
202
|
];
|
|
203
203
|
|
|
204
204
|
return (
|
|
@@ -5,7 +5,7 @@ import { formatUnits } from "viem";
|
|
|
5
5
|
export function TokenBalance({
|
|
6
6
|
token,
|
|
7
7
|
walletAddress,
|
|
8
|
-
onChangeInput
|
|
8
|
+
onChangeInput
|
|
9
9
|
}: {
|
|
10
10
|
token: Token;
|
|
11
11
|
walletAddress: string | undefined;
|
|
@@ -13,7 +13,7 @@ export function TokenBalance({
|
|
|
13
13
|
}) {
|
|
14
14
|
const { rawBalance, formattedBalance, isLoading } = useTokenBalance({
|
|
15
15
|
token,
|
|
16
|
-
address: walletAddress
|
|
16
|
+
address: walletAddress
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
const handlePercentageClick = (percentage: number) => {
|
|
@@ -8,7 +8,6 @@ export { AnySpendStakeB3 } from "./AnySpendStakeB3";
|
|
|
8
8
|
export { AnySpendTournament } from "./AnySpendTournament";
|
|
9
9
|
|
|
10
10
|
// Common Components
|
|
11
|
-
export { ChainTokenIcon } from "./common/ChainTokenIcon";
|
|
12
11
|
export { OrderDetails } from "./common/OrderDetails";
|
|
13
12
|
export { OrderHistory } from "./common/OrderHistory";
|
|
14
13
|
export { OrderHistoryItem } from "./common/OrderHistoryItem";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Dialog, DialogContent, Input, ShinyButton } from "@b3dotfun/sdk/global-account/react";
|
|
2
1
|
import { useEffect, useState } from "react";
|
|
2
|
+
import { Dialog, DialogContent, Input, ShinyButton } from "@b3dotfun/sdk/global-account/react";
|
|
3
3
|
|
|
4
4
|
export function EnterRecipientModal({
|
|
5
5
|
isOpenPasteRecipientAddress,
|
|
6
6
|
setIsOpenPasteRecipientAddress,
|
|
7
7
|
recipientAddress,
|
|
8
|
-
setRecipientAddress
|
|
8
|
+
setRecipientAddress
|
|
9
9
|
}: {
|
|
10
10
|
isOpenPasteRecipientAddress: boolean;
|
|
11
11
|
setIsOpenPasteRecipientAddress: (isOpen: boolean) => void;
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
Token,
|
|
9
9
|
useAnyspendCreateOnrampOrder,
|
|
10
10
|
useGeoOnrampOptions,
|
|
11
|
-
useStripeClientSecret
|
|
11
|
+
useStripeClientSecret
|
|
12
12
|
} from "@b3dotfun/sdk/anyspend";
|
|
13
13
|
import centerTruncate from "@b3dotfun/sdk/shared/utils/centerTruncate";
|
|
14
14
|
import { Elements, PaymentElement, useElements, useStripe } from "@stripe/react-stripe-js";
|
|
@@ -51,7 +51,7 @@ function StripePaymentForm({ order, onPaymentSuccess }: { order: Order; onPaymen
|
|
|
51
51
|
try {
|
|
52
52
|
const { error: submitError } = await stripe.confirmPayment({
|
|
53
53
|
elements,
|
|
54
|
-
redirect: "if_required"
|
|
54
|
+
redirect: "if_required"
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
if (submitError) {
|
|
@@ -74,9 +74,9 @@ function StripePaymentForm({ order, onPaymentSuccess }: { order: Order; onPaymen
|
|
|
74
74
|
defaultValues: {
|
|
75
75
|
billingDetails: {
|
|
76
76
|
name: "",
|
|
77
|
-
email: ""
|
|
78
|
-
}
|
|
79
|
-
}
|
|
77
|
+
email: ""
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
return (
|
|
@@ -117,7 +117,7 @@ export function WebviewOnrampPayment({
|
|
|
117
117
|
anyspendQuote,
|
|
118
118
|
onPaymentSuccess,
|
|
119
119
|
userId,
|
|
120
|
-
partnerId
|
|
120
|
+
partnerId
|
|
121
121
|
}: WebviewOnrampPaymentProps) {
|
|
122
122
|
const [stableAmountForGeo, setStableAmountForGeo] = useState(srcAmountOnRamp);
|
|
123
123
|
const hasInitialized = useRef(false);
|
|
@@ -135,7 +135,7 @@ export function WebviewOnrampPayment({
|
|
|
135
135
|
const {
|
|
136
136
|
geoData,
|
|
137
137
|
isStripeWeb2Supported,
|
|
138
|
-
isLoading: isLoadingGeoOnramp
|
|
138
|
+
isLoading: isLoadingGeoOnramp
|
|
139
139
|
} = useGeoOnrampOptions(true, stableAmountForGeo);
|
|
140
140
|
|
|
141
141
|
const { createOrder, isCreatingOrder } = useAnyspendCreateOnrampOrder({
|
|
@@ -146,12 +146,12 @@ export function WebviewOnrampPayment({
|
|
|
146
146
|
onError: error => {
|
|
147
147
|
console.error(error);
|
|
148
148
|
toast.error("Failed to create order: " + error.message);
|
|
149
|
-
}
|
|
149
|
+
}
|
|
150
150
|
});
|
|
151
151
|
|
|
152
152
|
const { clientSecret, isLoadingStripeClientSecret } = useStripeClientSecret(
|
|
153
153
|
true,
|
|
154
|
-
createdOrder?.stripePaymentIntentId || ""
|
|
154
|
+
createdOrder?.stripePaymentIntentId || ""
|
|
155
155
|
);
|
|
156
156
|
|
|
157
157
|
// Create order when component mounts and all required data is available
|
|
@@ -173,7 +173,7 @@ export function WebviewOnrampPayment({
|
|
|
173
173
|
return {
|
|
174
174
|
...destinationToken,
|
|
175
175
|
chainId: destinationToken.chainId,
|
|
176
|
-
address: destinationToken.address
|
|
176
|
+
address: destinationToken.address
|
|
177
177
|
};
|
|
178
178
|
};
|
|
179
179
|
|
|
@@ -189,10 +189,10 @@ export function WebviewOnrampPayment({
|
|
|
189
189
|
paymentMethod: "",
|
|
190
190
|
country: geoData.country || "US",
|
|
191
191
|
ipAddress: geoData.ip,
|
|
192
|
-
redirectUrl: `${window.location.origin}${userId ? `?userId=${userId}` : ""}
|
|
192
|
+
redirectUrl: `${window.location.origin}${userId ? `?userId=${userId}` : ""}`
|
|
193
193
|
},
|
|
194
194
|
expectedDstAmount: anyspendQuote.data?.currencyOut?.amount?.toString() || "0",
|
|
195
|
-
partnerId
|
|
195
|
+
partnerId
|
|
196
196
|
});
|
|
197
197
|
} catch (err: any) {
|
|
198
198
|
console.error(err);
|
|
@@ -211,7 +211,7 @@ export function WebviewOnrampPayment({
|
|
|
211
211
|
createOrder,
|
|
212
212
|
destinationToken,
|
|
213
213
|
userId,
|
|
214
|
-
partnerId
|
|
214
|
+
partnerId
|
|
215
215
|
]);
|
|
216
216
|
|
|
217
217
|
// Check if all required data is loaded
|
|
@@ -256,7 +256,7 @@ export function WebviewOnrampPayment({
|
|
|
256
256
|
<span className="font-medium">
|
|
257
257
|
{anyspendQuote?.data?.currencyOut?.amount
|
|
258
258
|
? Number(
|
|
259
|
-
formatUnits(BigInt(anyspendQuote.data.currencyOut.amount), destinationToken.decimals)
|
|
259
|
+
formatUnits(BigInt(anyspendQuote.data.currencyOut.amount), destinationToken.decimals)
|
|
260
260
|
).toFixed(4)
|
|
261
261
|
: "0"}{" "}
|
|
262
262
|
{destinationToken.symbol}
|
|
@@ -297,9 +297,9 @@ export function WebviewOnrampPayment({
|
|
|
297
297
|
variables: {
|
|
298
298
|
colorPrimary: "#2563eb",
|
|
299
299
|
colorBackground: "#ffffff",
|
|
300
|
-
borderRadius: "12px"
|
|
301
|
-
}
|
|
302
|
-
}
|
|
300
|
+
borderRadius: "12px"
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
303
|
}}
|
|
304
304
|
>
|
|
305
305
|
<StripePaymentForm order={createdOrder} onPaymentSuccess={onPaymentSuccess} />
|
|
@@ -334,7 +334,7 @@ export function WebviewOnrampPayment({
|
|
|
334
334
|
<span className="font-medium">
|
|
335
335
|
{anyspendQuote?.data?.currencyOut?.amount
|
|
336
336
|
? Number(
|
|
337
|
-
formatUnits(BigInt(anyspendQuote.data.currencyOut.amount), destinationToken.decimals)
|
|
337
|
+
formatUnits(BigInt(anyspendQuote.data.currencyOut.amount), destinationToken.decimals)
|
|
338
338
|
).toFixed(4)
|
|
339
339
|
: "0"}{" "}
|
|
340
340
|
{destinationToken.symbol}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { USDC_BASE } from "@b3dotfun/sdk/anyspend/constants";
|
|
2
2
|
import { anyspendService } from "@b3dotfun/sdk/anyspend/services/anyspend";
|
|
3
|
-
import { OnrampVendor } from "@b3dotfun/sdk/anyspend/types";
|
|
3
|
+
import { Nft, OnrampVendor, OrderType, Token, Tournament } from "@b3dotfun/sdk/anyspend/types";
|
|
4
4
|
import { buildMetadata, buildPayload, normalizeAddress } from "@b3dotfun/sdk/anyspend/utils";
|
|
5
5
|
import { useMutation } from "@tanstack/react-query";
|
|
6
6
|
import { useMemo } from "react";
|
|
7
7
|
import { parseUnits } from "viem";
|
|
8
8
|
import { base } from "viem/chains";
|
|
9
|
-
import { CreateOrderParams } from "./useAnyspendCreateOrder";
|
|
10
9
|
|
|
11
10
|
export type OnrampOptions = {
|
|
12
11
|
vendor: OnrampVendor;
|
|
@@ -16,9 +15,20 @@ export type OnrampOptions = {
|
|
|
16
15
|
ipAddress?: string; // Required for Stripe
|
|
17
16
|
};
|
|
18
17
|
|
|
19
|
-
export type CreateOnrampOrderParams =
|
|
18
|
+
export type CreateOnrampOrderParams = {
|
|
19
|
+
isMainnet: boolean;
|
|
20
|
+
recipientAddress: string;
|
|
21
|
+
orderType: OrderType;
|
|
22
|
+
dstChain: number;
|
|
23
|
+
dstToken: Token;
|
|
20
24
|
srcFiatAmount: string;
|
|
21
25
|
onramp: OnrampOptions;
|
|
26
|
+
partnerId?: string;
|
|
27
|
+
expectedDstAmount: string;
|
|
28
|
+
creatorAddress?: string;
|
|
29
|
+
nft?: Nft & { price: string };
|
|
30
|
+
tournament?: Tournament & { contractAddress: string; entryPriceOrFundAmount: string };
|
|
31
|
+
payload?: any;
|
|
22
32
|
};
|
|
23
33
|
|
|
24
34
|
export type UseAnyspendCreateOnrampOrderProps = {
|
|
@@ -46,7 +56,7 @@ export function useAnyspendCreateOnrampOrder({ onSuccess, onError }: UseAnyspend
|
|
|
46
56
|
nft,
|
|
47
57
|
tournament,
|
|
48
58
|
payload,
|
|
49
|
-
partnerId
|
|
59
|
+
partnerId
|
|
50
60
|
} = params;
|
|
51
61
|
|
|
52
62
|
try {
|
|
@@ -82,7 +92,7 @@ export function useAnyspendCreateOnrampOrder({ onSuccess, onError }: UseAnyspend
|
|
|
82
92
|
expectedDstAmount,
|
|
83
93
|
nft,
|
|
84
94
|
tournament,
|
|
85
|
-
payload
|
|
95
|
+
payload
|
|
86
96
|
}),
|
|
87
97
|
onramp,
|
|
88
98
|
metadata: buildMetadata(orderType, {
|
|
@@ -92,10 +102,10 @@ export function useAnyspendCreateOnrampOrder({ onSuccess, onError }: UseAnyspend
|
|
|
92
102
|
expectedDstAmount,
|
|
93
103
|
nft,
|
|
94
104
|
tournament,
|
|
95
|
-
payload
|
|
105
|
+
payload
|
|
96
106
|
}),
|
|
97
107
|
creatorAddress: creatorAddress ? normalizeAddress(creatorAddress) : undefined,
|
|
98
|
-
partnerId
|
|
108
|
+
partnerId
|
|
99
109
|
});
|
|
100
110
|
} catch (error: any) {
|
|
101
111
|
// If the error has a response with message and statusCode, throw that
|
|
@@ -111,14 +121,14 @@ export function useAnyspendCreateOnrampOrder({ onSuccess, onError }: UseAnyspend
|
|
|
111
121
|
},
|
|
112
122
|
onError: (error: Error) => {
|
|
113
123
|
onError?.(error);
|
|
114
|
-
}
|
|
124
|
+
}
|
|
115
125
|
});
|
|
116
126
|
|
|
117
127
|
return useMemo(
|
|
118
128
|
() => ({
|
|
119
129
|
createOrder,
|
|
120
|
-
isCreatingOrder: isPending
|
|
130
|
+
isCreatingOrder: isPending
|
|
121
131
|
}),
|
|
122
|
-
[createOrder, isPending]
|
|
132
|
+
[createOrder, isPending]
|
|
123
133
|
);
|
|
124
134
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { anyspendService } from "@b3dotfun/sdk/anyspend/services/anyspend";
|
|
2
2
|
import { Nft, OrderType, Token, Tournament } from "@b3dotfun/sdk/anyspend/types";
|
|
3
|
-
import { buildMetadata, buildPayload
|
|
3
|
+
import { normalizeAddress, buildMetadata, buildPayload } from "@b3dotfun/sdk/anyspend/utils";
|
|
4
4
|
import { useMutation } from "@tanstack/react-query";
|
|
5
5
|
import { useMemo } from "react";
|
|
6
6
|
|
|
@@ -18,7 +18,6 @@ export type CreateOrderParams = {
|
|
|
18
18
|
tournament?: Tournament & { contractAddress: string; entryPriceOrFundAmount: string };
|
|
19
19
|
creatorAddress?: string;
|
|
20
20
|
payload?: any;
|
|
21
|
-
partnerId?: string;
|
|
22
21
|
};
|
|
23
22
|
|
|
24
23
|
export type UseAnyspendCreateOrderProps = {
|
|
@@ -43,7 +42,7 @@ export function useAnyspendCreateOrder({ onSuccess, onError }: UseAnyspendCreate
|
|
|
43
42
|
srcToken,
|
|
44
43
|
dstToken,
|
|
45
44
|
srcAmount,
|
|
46
|
-
creatorAddress
|
|
45
|
+
creatorAddress
|
|
47
46
|
} = params;
|
|
48
47
|
|
|
49
48
|
try {
|
|
@@ -63,7 +62,7 @@ export function useAnyspendCreateOrder({ onSuccess, onError }: UseAnyspendCreate
|
|
|
63
62
|
expectedDstAmount: params.expectedDstAmount,
|
|
64
63
|
nft: params.nft,
|
|
65
64
|
tournament: params.tournament,
|
|
66
|
-
payload: params.payload
|
|
65
|
+
payload: params.payload
|
|
67
66
|
}),
|
|
68
67
|
metadata: buildMetadata(orderType, {
|
|
69
68
|
orderType,
|
|
@@ -72,9 +71,9 @@ export function useAnyspendCreateOrder({ onSuccess, onError }: UseAnyspendCreate
|
|
|
72
71
|
expectedDstAmount: params.expectedDstAmount,
|
|
73
72
|
nft: params.nft,
|
|
74
73
|
tournament: params.tournament,
|
|
75
|
-
payload: params.payload
|
|
74
|
+
payload: params.payload
|
|
76
75
|
}),
|
|
77
|
-
creatorAddress: creatorAddress ? normalizeAddress(creatorAddress) : undefined
|
|
76
|
+
creatorAddress: creatorAddress ? normalizeAddress(creatorAddress) : undefined
|
|
78
77
|
});
|
|
79
78
|
} catch (error: any) {
|
|
80
79
|
// If the error has a response with message and statusCode, throw that
|
|
@@ -90,14 +89,14 @@ export function useAnyspendCreateOrder({ onSuccess, onError }: UseAnyspendCreate
|
|
|
90
89
|
},
|
|
91
90
|
onError: (error: Error) => {
|
|
92
91
|
onError?.(error);
|
|
93
|
-
}
|
|
92
|
+
}
|
|
94
93
|
});
|
|
95
94
|
|
|
96
95
|
return useMemo(
|
|
97
96
|
() => ({
|
|
98
97
|
createOrder,
|
|
99
|
-
isCreatingOrder: isPending
|
|
98
|
+
isCreatingOrder: isPending
|
|
100
99
|
}),
|
|
101
|
-
[createOrder, isPending]
|
|
100
|
+
[createOrder, isPending]
|
|
102
101
|
);
|
|
103
102
|
}
|
|
@@ -21,7 +21,7 @@ export function useAnyspendOrderAndTransactions(isMainnet: boolean, orderId: str
|
|
|
21
21
|
structuralSharing: (oldData, newData) => {
|
|
22
22
|
if (isEqual(oldData, newData)) return oldData;
|
|
23
23
|
return newData;
|
|
24
|
-
}
|
|
24
|
+
}
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
return useMemo(
|
|
@@ -29,8 +29,8 @@ export function useAnyspendOrderAndTransactions(isMainnet: boolean, orderId: str
|
|
|
29
29
|
orderAndTransactions: data,
|
|
30
30
|
isLoadingOrderAndTransactions: isLoading,
|
|
31
31
|
getOrderAndTransactionsError: error,
|
|
32
|
-
refetchOrderAndTransactions: refetch
|
|
32
|
+
refetchOrderAndTransactions: refetch
|
|
33
33
|
}),
|
|
34
|
-
[data, error, isLoading, refetch]
|
|
34
|
+
[data, error, isLoading, refetch]
|
|
35
35
|
);
|
|
36
36
|
}
|
|
@@ -5,25 +5,25 @@ export function useAnyspendOrderHistory(
|
|
|
5
5
|
isMainnet: boolean,
|
|
6
6
|
creatorAddress: string | undefined,
|
|
7
7
|
limit: number = 100,
|
|
8
|
-
offset: number = 0
|
|
8
|
+
offset: number = 0
|
|
9
9
|
) {
|
|
10
10
|
const {
|
|
11
11
|
data: rawData = [],
|
|
12
12
|
isLoading,
|
|
13
13
|
refetch,
|
|
14
|
-
error
|
|
14
|
+
error
|
|
15
15
|
} = useQuery({
|
|
16
16
|
queryKey: ["getOrderHistory", creatorAddress, limit, offset],
|
|
17
17
|
queryFn: async () => {
|
|
18
18
|
const response = await anyspendService.getOrderHistory(isMainnet, creatorAddress, limit, offset);
|
|
19
19
|
return response.data;
|
|
20
|
-
}
|
|
20
|
+
}
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
return {
|
|
24
24
|
orderHistory: rawData,
|
|
25
25
|
isLoadingOrderHistory: isLoading,
|
|
26
26
|
getOrderHistoryError: error,
|
|
27
|
-
refetchOrderHistory: refetch
|
|
27
|
+
refetchOrderHistory: refetch
|
|
28
28
|
};
|
|
29
29
|
}
|
|
@@ -39,11 +39,11 @@ export function useAnyspendQuote(isMainnet: boolean, req: GetQuoteRequest) {
|
|
|
39
39
|
? req.price
|
|
40
40
|
: req.type === OrderType.FundTournament
|
|
41
41
|
? req.fundAmount
|
|
42
|
-
: req.payload.amount
|
|
43
|
-
) !== BigInt(0)
|
|
42
|
+
: req.payload.amount
|
|
43
|
+
) !== BigInt(0)
|
|
44
44
|
),
|
|
45
45
|
refetchInterval: 10000,
|
|
46
|
-
retry: false
|
|
46
|
+
retry: false
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
return useMemo(
|
|
@@ -51,8 +51,8 @@ export function useAnyspendQuote(isMainnet: boolean, req: GetQuoteRequest) {
|
|
|
51
51
|
anyspendQuote: data,
|
|
52
52
|
isLoadingAnyspendQuote: isLoading,
|
|
53
53
|
getAnyspendQuoteError: error,
|
|
54
|
-
refetchAnyspendQuote: refetch
|
|
54
|
+
refetchAnyspendQuote: refetch
|
|
55
55
|
}),
|
|
56
|
-
[data, error, isLoading, refetch]
|
|
56
|
+
[data, error, isLoading, refetch]
|
|
57
57
|
);
|
|
58
58
|
}
|
|
@@ -10,7 +10,7 @@ export function useAnyspendSendPermitData({ onSuccess, onError }: UseAnyspendCre
|
|
|
10
10
|
const response = await anyspendService.sendPermitData({
|
|
11
11
|
isMainnet,
|
|
12
12
|
orderId,
|
|
13
|
-
permitData
|
|
13
|
+
permitData
|
|
14
14
|
});
|
|
15
15
|
if (response.statusCode !== 200) throw response;
|
|
16
16
|
return response;
|
|
@@ -28,11 +28,11 @@ export function useAnyspendSendPermitData({ onSuccess, onError }: UseAnyspendCre
|
|
|
28
28
|
},
|
|
29
29
|
onError: (error: Error) => {
|
|
30
30
|
onError?.(error);
|
|
31
|
-
}
|
|
31
|
+
}
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
return {
|
|
35
35
|
sendPermitData,
|
|
36
|
-
isSendingPermitData: isPending
|
|
36
|
+
isSendingPermitData: isPending
|
|
37
37
|
};
|
|
38
38
|
}
|
|
@@ -6,19 +6,19 @@ export function useAnyspendTokenList(isMainnet: boolean, chainId: number, query:
|
|
|
6
6
|
const {
|
|
7
7
|
data = [],
|
|
8
8
|
isLoading,
|
|
9
|
-
refetch
|
|
9
|
+
refetch
|
|
10
10
|
} = useQuery({
|
|
11
11
|
queryKey: ["getAnyspendTokenList", chainId, query],
|
|
12
12
|
queryFn: () => anyspendService.getTokenList(isMainnet, chainId, query),
|
|
13
|
-
enabled: true
|
|
13
|
+
enabled: true
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
return useMemo(
|
|
17
17
|
() => ({
|
|
18
18
|
data,
|
|
19
19
|
isLoading,
|
|
20
|
-
refetch
|
|
20
|
+
refetch
|
|
21
21
|
}),
|
|
22
|
-
[data, isLoading, refetch]
|
|
22
|
+
[data, isLoading, refetch]
|
|
23
23
|
);
|
|
24
24
|
}
|
|
@@ -6,7 +6,7 @@ export function useCoinbaseOnrampOptions(isMainnet: boolean, country?: string) {
|
|
|
6
6
|
const { data, isLoading, error, refetch } = useQuery({
|
|
7
7
|
queryKey: ["getCoinbaseOnrampOptions", isMainnet, country],
|
|
8
8
|
queryFn: () => anyspendService.getCoinbaseOnrampOptions(isMainnet, country!),
|
|
9
|
-
enabled: Boolean(country)
|
|
9
|
+
enabled: Boolean(country)
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
return useMemo(
|
|
@@ -14,8 +14,8 @@ export function useCoinbaseOnrampOptions(isMainnet: boolean, country?: string) {
|
|
|
14
14
|
coinbaseOnrampOptions: data,
|
|
15
15
|
isLoadingCoinbaseOnrampOptions: isLoading,
|
|
16
16
|
coinbaseOnrampOptionsError: error,
|
|
17
|
-
refetchCoinbaseOnrampOptions: refetch
|
|
17
|
+
refetchCoinbaseOnrampOptions: refetch
|
|
18
18
|
}),
|
|
19
|
-
[data, isLoading, error, refetch]
|
|
19
|
+
[data, isLoading, error, refetch]
|
|
20
20
|
);
|
|
21
21
|
}
|
|
@@ -39,7 +39,7 @@ export function useGeoOnrampOptions(isMainnet: boolean, srcFiatAmount: string) {
|
|
|
39
39
|
isLoadingStripeSupport,
|
|
40
40
|
geoError,
|
|
41
41
|
coinbaseOnrampOptionsError,
|
|
42
|
-
stripeSupportError
|
|
42
|
+
stripeSupportError
|
|
43
43
|
}),
|
|
44
44
|
[
|
|
45
45
|
geoData,
|
|
@@ -52,7 +52,7 @@ export function useGeoOnrampOptions(isMainnet: boolean, srcFiatAmount: string) {
|
|
|
52
52
|
isLoadingStripeSupport,
|
|
53
53
|
geoError,
|
|
54
54
|
coinbaseOnrampOptionsError,
|
|
55
|
-
stripeSupportError
|
|
56
|
-
]
|
|
55
|
+
stripeSupportError
|
|
56
|
+
]
|
|
57
57
|
);
|
|
58
58
|
}
|