@b3dotfun/sdk 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/anyspend/abis/abi-usdc-base.js +97 -97
- package/dist/cjs/anyspend/abis/erc20-staking.js +51 -51
- package/dist/cjs/anyspend/abis/signature-minting.d.ts +79 -0
- package/dist/cjs/anyspend/abis/signature-minting.js +45 -0
- package/dist/cjs/anyspend/constants/index.js +13 -10
- package/dist/cjs/anyspend/index.d.ts +4 -2
- package/dist/cjs/anyspend/index.js +4 -4
- package/dist/cjs/anyspend/react/components/AnySpend.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpend.js +69 -68
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +68 -66
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +4 -4
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +158 -101
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +3 -2
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +7 -5
- package/dist/cjs/anyspend/react/components/AnySpendNFTButton.js +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +21 -20
- package/dist/cjs/anyspend/react/components/AnySpendTournament.js +7 -4
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.d.ts +8 -0
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.js +77 -0
- package/dist/cjs/anyspend/react/components/common/ChainTokenIcon.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/ChainTokenIcon.js +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +52 -63
- package/dist/cjs/anyspend/react/components/common/OrderHistory.js +6 -6
- package/dist/cjs/anyspend/react/components/common/OrderToken.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderToken.js +4 -4
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmount.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmount.js +2 -2
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +9 -9
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +15 -14
- package/dist/cjs/anyspend/react/components/common/PaymentMethodIcons.js +1 -1
- package/dist/cjs/anyspend/react/components/common/PaymentOneClick.js +3 -3
- package/dist/cjs/anyspend/react/components/common/PaymentStripeWeb2.js +26 -25
- package/dist/cjs/anyspend/react/components/common/TokenBalance.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/TokenBalance.js +2 -2
- package/dist/cjs/anyspend/react/components/common/Warning.d.ts +3 -0
- package/dist/cjs/anyspend/react/components/common/Warning.js +7 -0
- package/dist/cjs/anyspend/react/components/index.d.ts +2 -0
- package/dist/cjs/anyspend/react/components/index.js +5 -1
- package/dist/cjs/anyspend/react/components/modals/EnterRecipientModal.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/modals/EnterRecipientModal.js +6 -6
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampOrderStatus.js +0 -1
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.js +26 -25
- package/dist/cjs/anyspend/react/hooks/index.d.ts +1 -2
- package/dist/cjs/anyspend/react/hooks/index.js +1 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +3 -18
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +1 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.js +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +14 -70
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +14 -70
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.js +3 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendQuote.js +3 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendTokens.js +3 -3
- package/dist/cjs/anyspend/react/hooks/useCoinbaseOnrampOptions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useGeoOnrampOptions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useGetGeo.js +1 -1
- package/dist/cjs/anyspend/react/hooks/useSigMint.d.ts +140 -0
- package/dist/cjs/anyspend/react/hooks/useSigMint.js +39 -0
- package/dist/cjs/anyspend/react/hooks/useStripeClientSecret.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useStripeSupport.js +2 -2
- package/dist/cjs/anyspend/react/providers/AnyspendProvider.js +7 -6
- package/dist/cjs/anyspend/services/anyspend.d.ts +9 -40
- package/dist/cjs/anyspend/services/anyspend.js +11 -24
- package/dist/cjs/anyspend/types/custom.js +2 -2
- package/dist/cjs/anyspend/types/globalWallet.js +1 -1
- package/dist/cjs/anyspend/types/index.d.ts +1 -1
- package/dist/cjs/anyspend/types/index.js +1 -1
- package/dist/cjs/anyspend/types/metadata.d.ts +26 -0
- package/dist/cjs/anyspend/types/metadata.js +16 -0
- package/dist/cjs/anyspend/types/nft.d.ts +7 -0
- package/dist/cjs/anyspend/types/nft.js +8 -6
- package/dist/cjs/anyspend/types/onramp.d.ts +3 -0
- package/dist/cjs/anyspend/types/onramp.js +2 -1
- package/dist/cjs/anyspend/types/order.d.ts +40 -200
- package/dist/cjs/anyspend/types/order.js +7 -12
- package/dist/cjs/anyspend/types/req-res/createOrder.d.ts +98 -235
- package/dist/cjs/anyspend/types/req-res/createOrder.js +9 -9
- package/dist/cjs/anyspend/types/req-res/getCoinbaseOnrampOptions.js +5 -5
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.d.ts +63 -305
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.js +4 -4
- package/dist/cjs/anyspend/types/req-res/getOrderByCreator.js +2 -2
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.d.ts +49 -235
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.js +1 -1
- package/dist/cjs/anyspend/types/req-res/getQuote.d.ts +37 -0
- package/dist/cjs/anyspend/types/req-res/getQuote.js +14 -9
- package/dist/cjs/anyspend/types/req-res/getTokenList.js +3 -3
- package/dist/cjs/anyspend/types/req-res/index.d.ts +0 -1
- package/dist/cjs/anyspend/types/req-res/index.js +0 -1
- package/dist/cjs/anyspend/types/signature-mint.d.ts +69 -0
- package/dist/cjs/anyspend/types/signature-mint.js +2 -0
- package/dist/cjs/anyspend/types/swap.js +2 -2
- package/dist/cjs/anyspend/types/token.js +2 -2
- package/dist/cjs/anyspend/types/tournament.js +4 -4
- package/dist/cjs/anyspend/types/transaction.js +4 -4
- package/dist/cjs/anyspend/utils/chain.js +16 -16
- package/dist/cjs/anyspend/utils/format.js +2 -6
- package/dist/cjs/anyspend/utils/orderPayload.d.ts +3 -3
- package/dist/cjs/anyspend/utils/orderPayload.js +22 -8
- package/dist/cjs/anyspend/utils/token.js +10 -10
- package/dist/cjs/global-account/app.js +4 -4
- package/dist/cjs/global-account/app.native.js +4 -4
- package/dist/cjs/global-account/bsmnt.js +4 -4
- package/dist/cjs/global-account/bsmnt.native.js +4 -4
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +13 -3
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +3 -3
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +17 -16
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.d.ts +2 -2
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +4 -4
- package/dist/cjs/global-account/react/components/B3Provider/types.js +1 -1
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.js +5 -5
- package/dist/cjs/global-account/react/components/MintButton/MintButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/MintButton/MintButton.js +5 -5
- package/dist/cjs/global-account/react/components/RelayKitProviderWrapper.js +2 -2
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +1 -1
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.js +5 -5
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissionsButton.js +2 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.d.ts +14 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +50 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +1 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.js +12 -17
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +12 -12
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/WalletRow.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.js +9 -9
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +2 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.js +2 -2
- package/dist/cjs/global-account/react/components/StyleRoot.js +0 -1
- package/dist/cjs/global-account/react/components/Transak/TransakModal.js +4 -4
- package/dist/cjs/global-account/react/components/custom/Button.js +5 -5
- package/dist/cjs/global-account/react/components/custom/Icon.d.ts +7 -0
- package/dist/cjs/global-account/react/components/custom/Icon.js +52 -0
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.d.ts +4 -0
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.js +20 -0
- package/dist/cjs/global-account/react/components/custom/StaggeredFadeLoader.js +3 -3
- package/dist/cjs/global-account/react/components/index.d.ts +4 -4
- package/dist/cjs/global-account/react/components/magicui/AnimatedLottie.js +1 -1
- package/dist/cjs/global-account/react/components/ui/Loading.js +2 -2
- package/dist/cjs/global-account/react/components/ui/ShinyButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/ShinyButton.js +3 -3
- package/dist/cjs/global-account/react/components/ui/TabSystem.js +1 -1
- package/dist/cjs/global-account/react/components/ui/Tabs.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/Tabs.js +1 -1
- package/dist/cjs/global-account/react/components/ui/badge.js +4 -4
- package/dist/cjs/global-account/react/components/ui/button.js +5 -5
- package/dist/cjs/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/dialog.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/glare-card-rounded.js +12 -12
- package/dist/cjs/global-account/react/components/ui/glare-card.js +11 -11
- package/dist/cjs/global-account/react/components/ui/input.js +1 -1
- package/dist/cjs/global-account/react/components/ui/text-loop.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/text-loop.js +2 -2
- package/dist/cjs/global-account/react/components/ui/text-shimmer.js +2 -2
- package/dist/cjs/global-account/react/components/ui/tooltip.js +1 -1
- package/dist/cjs/global-account/react/hooks/useAccountAssets.js +4 -4
- package/dist/cjs/global-account/react/hooks/useAccountWallet.js +8 -8
- package/dist/cjs/global-account/react/hooks/useAddTWSessionKey.d.ts +2 -2
- package/dist/cjs/global-account/react/hooks/useAddTWSessionKey.js +6 -6
- package/dist/cjs/global-account/react/hooks/useAuthentication.js +3 -3
- package/dist/cjs/global-account/react/hooks/useB3BalanceFromAddresses.js +7 -7
- package/dist/cjs/global-account/react/hooks/useB3EnsName.d.ts +8 -4
- package/dist/cjs/global-account/react/hooks/useB3EnsName.js +32 -23
- package/dist/cjs/global-account/react/hooks/useBestTransactionPath.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useBestTransactionPath.js +10 -10
- package/dist/cjs/global-account/react/hooks/useBsmntProfile.js +1 -1
- package/dist/cjs/global-account/react/hooks/useChainSwitchWithAction.js +3 -3
- package/dist/cjs/global-account/react/hooks/useClaim.js +4 -4
- package/dist/cjs/global-account/react/hooks/useConnect.js +3 -3
- package/dist/cjs/global-account/react/hooks/useExchangeRate.js +3 -3
- package/dist/cjs/global-account/react/hooks/useGetAllTWSigners.js +7 -7
- package/dist/cjs/global-account/react/hooks/useGetGeo.js +1 -1
- package/dist/cjs/global-account/react/hooks/useHandleConnectWithPrivy.js +2 -2
- package/dist/cjs/global-account/react/hooks/useNativeBalance.js +6 -6
- package/dist/cjs/global-account/react/hooks/useOnchainName.js +10 -10
- package/dist/cjs/global-account/react/hooks/useOneBalance.js +2 -2
- package/dist/cjs/global-account/react/hooks/useRemoveSessionKey.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useRemoveSessionKey.js +3 -3
- package/dist/cjs/global-account/react/hooks/useRouter.js +6 -6
- package/dist/cjs/global-account/react/hooks/useSiwe.js +4 -4
- package/dist/cjs/global-account/react/hooks/useTokenBalance.js +6 -6
- package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.js +9 -9
- package/dist/cjs/global-account/react/hooks/useTokenData.js +3 -3
- package/dist/cjs/global-account/react/hooks/useTokenFromUrl.js +14 -14
- package/dist/cjs/global-account/react/hooks/useTokenPrice.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokenPrice.js +6 -6
- package/dist/cjs/global-account/react/hooks/useTokenPriceWithFallback.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokenPriceWithFallback.js +7 -7
- package/dist/cjs/global-account/react/hooks/useTokensFromAddress.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokensFromAddress.js +2 -2
- package/dist/cjs/global-account/react/hooks/useURLParams.js +1 -1
- package/dist/cjs/global-account/react/stores/index.d.ts +1 -1
- package/dist/cjs/global-account/react/stores/useAuthStore.js +3 -3
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +18 -1
- package/dist/cjs/global-account/react/stores/useModalStore.js +3 -3
- package/dist/cjs/global-account/server.js +3 -3
- package/dist/cjs/global-account/types/chain-networks.js +8 -8
- package/dist/cjs/global-account/types/feature-flags.js +1 -1
- package/dist/cjs/index.d.ts +0 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/shared/constants/chains/b3Chain.js +35 -35
- package/dist/cjs/shared/constants/chains/chainPlatformMap.js +1 -1
- package/dist/cjs/shared/constants/chains/supported.js +4 -1
- package/dist/cjs/shared/constants/index.d.ts +1 -0
- package/dist/cjs/shared/constants/index.js +3 -2
- package/dist/cjs/shared/react/hooks/index.d.ts +1 -0
- package/dist/cjs/shared/react/hooks/index.js +17 -0
- package/dist/cjs/shared/react/hooks/useNavigation.d.ts +17 -0
- package/dist/cjs/shared/react/hooks/useNavigation.js +57 -0
- package/dist/cjs/shared/react/index.d.ts +1 -0
- package/dist/cjs/shared/react/index.js +17 -0
- package/dist/cjs/shared/thirdweb/generated/sdk.gen.d.ts +2 -2
- package/dist/cjs/shared/thirdweb/generated/sdk.gen.js +1 -1
- package/dist/cjs/shared/thirdweb/initiateClient.js +2 -2
- package/dist/cjs/shared/thirdweb/openapi-ts.config.js +1 -1
- package/dist/cjs/shared/utils/b3Ens.js +4 -4
- package/dist/cjs/shared/utils/chain-transformers.js +9 -9
- package/dist/cjs/shared/utils/fetchBalances.js +4 -4
- package/dist/cjs/shared/utils/formatUsername.d.ts +1 -0
- package/dist/cjs/shared/utils/formatUsername.js +8 -0
- package/dist/cjs/shared/utils/index.d.ts +3 -1
- package/dist/cjs/shared/utils/index.js +4 -6
- package/dist/cjs/shared/utils/insights.js +28 -28
- package/dist/cjs/shared/utils/ipfs.js +1 -1
- package/dist/cjs/shared/utils/number.js +3 -3
- package/dist/cjs/shared/utils/simplehash.js +22 -22
- package/dist/cjs/shared/utils/thirdweb-insights.js +15 -15
- package/dist/cjs/shared/utils/truncateAddress.d.ts +6 -0
- package/dist/cjs/shared/utils/truncateAddress.js +16 -0
- package/dist/esm/anyspend/abis/abi-usdc-base.js +97 -97
- package/dist/esm/anyspend/abis/erc20-staking.js +51 -51
- package/dist/esm/anyspend/abis/signature-minting.d.ts +79 -0
- package/dist/esm/anyspend/abis/signature-minting.js +42 -0
- package/dist/esm/anyspend/constants/index.js +13 -10
- package/dist/esm/anyspend/index.d.ts +4 -2
- package/dist/esm/anyspend/index.js +4 -4
- package/dist/esm/anyspend/react/components/AnySpend.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpend.js +23 -22
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +41 -39
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +4 -4
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +138 -81
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +3 -2
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +7 -5
- package/dist/esm/anyspend/react/components/AnySpendNFTButton.js +1 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +22 -21
- package/dist/esm/anyspend/react/components/AnySpendTournament.js +7 -4
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.d.ts +8 -0
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.js +71 -0
- package/dist/esm/anyspend/react/components/common/ChainTokenIcon.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/ChainTokenIcon.js +1 -1
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +53 -64
- package/dist/esm/anyspend/react/components/common/OrderHistory.js +1 -1
- package/dist/esm/anyspend/react/components/common/OrderToken.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/OrderToken.js +4 -4
- package/dist/esm/anyspend/react/components/common/OrderTokenAmount.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/OrderTokenAmount.js +2 -2
- package/dist/esm/anyspend/react/components/common/PanelOnramp.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/PanelOnramp.js +3 -3
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +9 -8
- package/dist/esm/anyspend/react/components/common/PaymentMethodIcons.js +1 -1
- package/dist/esm/anyspend/react/components/common/PaymentOneClick.js +3 -3
- package/dist/esm/anyspend/react/components/common/PaymentStripeWeb2.js +14 -13
- package/dist/esm/anyspend/react/components/common/TokenBalance.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/TokenBalance.js +2 -2
- package/dist/esm/anyspend/react/components/common/Warning.d.ts +3 -0
- package/dist/esm/anyspend/react/components/common/Warning.js +4 -0
- package/dist/esm/anyspend/react/components/index.d.ts +2 -0
- package/dist/esm/anyspend/react/components/index.js +2 -0
- package/dist/esm/anyspend/react/components/modals/EnterRecipientModal.d.ts +1 -1
- package/dist/esm/anyspend/react/components/modals/EnterRecipientModal.js +2 -2
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampOrderStatus.js +0 -1
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +1 -1
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.js +16 -15
- package/dist/esm/anyspend/react/hooks/index.d.ts +1 -2
- package/dist/esm/anyspend/react/hooks/index.js +1 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +3 -18
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +6 -6
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +1 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.js +7 -7
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +14 -70
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +14 -70
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.js +3 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendQuote.js +3 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendTokens.js +3 -3
- package/dist/esm/anyspend/react/hooks/useCoinbaseOnrampOptions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useGeoOnrampOptions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useGetGeo.js +1 -1
- package/dist/esm/anyspend/react/hooks/useSigMint.d.ts +140 -0
- package/dist/esm/anyspend/react/hooks/useSigMint.js +33 -0
- package/dist/esm/anyspend/react/hooks/useStripeClientSecret.js +2 -2
- package/dist/esm/anyspend/react/hooks/useStripeSupport.js +2 -2
- package/dist/esm/anyspend/react/providers/AnyspendProvider.js +5 -4
- package/dist/esm/anyspend/services/anyspend.d.ts +9 -40
- package/dist/esm/anyspend/services/anyspend.js +12 -25
- package/dist/esm/anyspend/types/custom.js +2 -2
- package/dist/esm/anyspend/types/globalWallet.js +1 -1
- package/dist/esm/anyspend/types/index.d.ts +1 -1
- package/dist/esm/anyspend/types/index.js +1 -1
- package/dist/esm/anyspend/types/metadata.d.ts +26 -0
- package/dist/esm/anyspend/types/metadata.js +11 -0
- package/dist/esm/anyspend/types/nft.d.ts +7 -0
- package/dist/esm/anyspend/types/nft.js +8 -6
- package/dist/esm/anyspend/types/onramp.d.ts +3 -0
- package/dist/esm/anyspend/types/onramp.js +2 -1
- package/dist/esm/anyspend/types/order.d.ts +40 -200
- package/dist/esm/anyspend/types/order.js +7 -12
- package/dist/esm/anyspend/types/req-res/createOrder.d.ts +98 -235
- package/dist/esm/anyspend/types/req-res/createOrder.js +9 -9
- package/dist/esm/anyspend/types/req-res/getCoinbaseOnrampOptions.js +5 -5
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.d.ts +63 -305
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.js +4 -4
- package/dist/esm/anyspend/types/req-res/getOrderByCreator.js +2 -2
- package/dist/esm/anyspend/types/req-res/getOrderHistory.d.ts +49 -235
- package/dist/esm/anyspend/types/req-res/getOrderHistory.js +1 -1
- package/dist/esm/anyspend/types/req-res/getQuote.d.ts +37 -0
- package/dist/esm/anyspend/types/req-res/getQuote.js +14 -9
- package/dist/esm/anyspend/types/req-res/getTokenList.js +3 -3
- package/dist/esm/anyspend/types/req-res/index.d.ts +0 -1
- package/dist/esm/anyspend/types/req-res/index.js +0 -1
- package/dist/esm/anyspend/types/signature-mint.d.ts +69 -0
- package/dist/esm/anyspend/types/signature-mint.js +1 -0
- package/dist/esm/anyspend/types/swap.js +2 -2
- package/dist/esm/anyspend/types/token.js +2 -2
- package/dist/esm/anyspend/types/tournament.js +4 -4
- package/dist/esm/anyspend/types/transaction.js +4 -4
- package/dist/esm/anyspend/utils/chain.js +18 -18
- package/dist/esm/anyspend/utils/format.js +2 -6
- package/dist/esm/anyspend/utils/orderPayload.d.ts +3 -3
- package/dist/esm/anyspend/utils/orderPayload.js +23 -9
- package/dist/esm/anyspend/utils/token.js +10 -10
- package/dist/esm/global-account/app.js +4 -4
- package/dist/esm/global-account/app.native.js +4 -4
- package/dist/esm/global-account/bsmnt.js +4 -4
- package/dist/esm/global-account/bsmnt.native.js +4 -4
- package/dist/esm/global-account/react/components/B3DynamicModal.js +14 -4
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +3 -3
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +8 -7
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.d.ts +2 -2
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +4 -4
- package/dist/esm/global-account/react/components/B3Provider/types.js +1 -1
- package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -1
- package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.js +6 -6
- package/dist/esm/global-account/react/components/MintButton/MintButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/MintButton/MintButton.js +5 -5
- package/dist/esm/global-account/react/components/RelayKitProviderWrapper.js +2 -2
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +1 -1
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissions.js +6 -6
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissionsButton.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.d.ts +14 -0
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +44 -0
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +1 -2
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.js +8 -13
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +13 -13
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.js +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/WalletRow.js +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.js +9 -9
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +3 -3
- package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.js +2 -2
- package/dist/esm/global-account/react/components/StyleRoot.js +0 -1
- package/dist/esm/global-account/react/components/Transak/TransakModal.js +4 -4
- package/dist/esm/global-account/react/components/custom/Button.js +5 -5
- package/dist/esm/global-account/react/components/custom/Icon.d.ts +7 -0
- package/dist/esm/global-account/react/components/custom/Icon.js +50 -0
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.d.ts +4 -0
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.js +17 -0
- package/dist/esm/global-account/react/components/custom/StaggeredFadeLoader.js +3 -3
- package/dist/esm/global-account/react/components/custom/WalletConnectorIcon.js +1 -1
- package/dist/esm/global-account/react/components/index.d.ts +4 -4
- package/dist/esm/global-account/react/components/index.js +4 -4
- package/dist/esm/global-account/react/components/magicui/AnimatedLottie.js +1 -1
- package/dist/esm/global-account/react/components/ui/Loading.js +2 -2
- package/dist/esm/global-account/react/components/ui/ShinyButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/ShinyButton.js +3 -3
- package/dist/esm/global-account/react/components/ui/TabSystem.js +1 -1
- package/dist/esm/global-account/react/components/ui/Tabs.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/Tabs.js +1 -1
- package/dist/esm/global-account/react/components/ui/badge.js +4 -4
- package/dist/esm/global-account/react/components/ui/button.js +5 -5
- package/dist/esm/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/command.js +1 -1
- package/dist/esm/global-account/react/components/ui/dialog.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/dialog.js +1 -1
- package/dist/esm/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/drawer.js +1 -1
- package/dist/esm/global-account/react/components/ui/glare-card-rounded.js +12 -12
- package/dist/esm/global-account/react/components/ui/glare-card.js +11 -11
- package/dist/esm/global-account/react/components/ui/input.js +1 -1
- package/dist/esm/global-account/react/components/ui/text-loop.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/text-loop.js +2 -2
- package/dist/esm/global-account/react/components/ui/text-shimmer.js +2 -2
- package/dist/esm/global-account/react/components/ui/tooltip.js +1 -1
- package/dist/esm/global-account/react/hooks/useAccountAssets.js +4 -4
- package/dist/esm/global-account/react/hooks/useAccountWallet.js +8 -8
- package/dist/esm/global-account/react/hooks/useAddTWSessionKey.d.ts +2 -2
- package/dist/esm/global-account/react/hooks/useAddTWSessionKey.js +6 -6
- package/dist/esm/global-account/react/hooks/useAuthentication.js +3 -3
- package/dist/esm/global-account/react/hooks/useB3BalanceFromAddresses.js +7 -7
- package/dist/esm/global-account/react/hooks/useB3EnsName.d.ts +8 -4
- package/dist/esm/global-account/react/hooks/useB3EnsName.js +34 -22
- package/dist/esm/global-account/react/hooks/useBestTransactionPath.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useBestTransactionPath.js +10 -10
- package/dist/esm/global-account/react/hooks/useBsmntProfile.js +1 -1
- package/dist/esm/global-account/react/hooks/useChainSwitchWithAction.js +3 -3
- package/dist/esm/global-account/react/hooks/useClaim.js +4 -4
- package/dist/esm/global-account/react/hooks/useConnect.js +3 -3
- package/dist/esm/global-account/react/hooks/useExchangeRate.js +3 -3
- package/dist/esm/global-account/react/hooks/useGetAllTWSigners.js +7 -7
- package/dist/esm/global-account/react/hooks/useGetGeo.js +1 -1
- package/dist/esm/global-account/react/hooks/useHandleConnectWithPrivy.js +2 -2
- package/dist/esm/global-account/react/hooks/useNativeBalance.js +6 -6
- package/dist/esm/global-account/react/hooks/useOnchainName.js +10 -10
- package/dist/esm/global-account/react/hooks/useOneBalance.js +2 -2
- package/dist/esm/global-account/react/hooks/useRemoveSessionKey.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useRemoveSessionKey.js +3 -3
- package/dist/esm/global-account/react/hooks/useRouter.js +6 -6
- package/dist/esm/global-account/react/hooks/useSiwe.js +4 -4
- package/dist/esm/global-account/react/hooks/useTokenBalance.js +6 -6
- package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.js +9 -9
- package/dist/esm/global-account/react/hooks/useTokenData.js +3 -3
- package/dist/esm/global-account/react/hooks/useTokenFromUrl.js +13 -13
- package/dist/esm/global-account/react/hooks/useTokenPrice.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokenPrice.js +6 -6
- package/dist/esm/global-account/react/hooks/useTokenPriceWithFallback.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokenPriceWithFallback.js +7 -7
- package/dist/esm/global-account/react/hooks/useTokensFromAddress.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokensFromAddress.js +2 -2
- package/dist/esm/global-account/react/hooks/useURLParams.js +1 -1
- package/dist/esm/global-account/react/stores/index.d.ts +1 -1
- package/dist/esm/global-account/react/stores/useAuthStore.js +3 -3
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +18 -1
- package/dist/esm/global-account/react/stores/useModalStore.js +3 -3
- package/dist/esm/global-account/server.js +3 -3
- package/dist/esm/global-account/types/chain-networks.js +8 -8
- package/dist/esm/global-account/types/feature-flags.js +1 -1
- package/dist/esm/index.d.ts +0 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/shared/constants/chains/b3Chain.js +35 -35
- package/dist/esm/shared/constants/chains/chainPlatformMap.js +1 -1
- package/dist/esm/shared/constants/chains/supported.js +4 -1
- package/dist/esm/shared/constants/index.d.ts +1 -0
- package/dist/esm/shared/constants/index.js +2 -1
- package/dist/esm/shared/react/hooks/index.d.ts +1 -0
- package/dist/esm/shared/react/hooks/index.js +1 -0
- package/dist/esm/shared/react/hooks/useNavigation.d.ts +17 -0
- package/dist/esm/shared/react/hooks/useNavigation.js +52 -0
- package/dist/esm/shared/react/index.d.ts +1 -0
- package/dist/esm/shared/react/index.js +1 -0
- package/dist/esm/shared/thirdweb/generated/sdk.gen.d.ts +2 -2
- package/dist/esm/shared/thirdweb/generated/sdk.gen.js +1 -1
- package/dist/esm/shared/thirdweb/initiateClient.js +2 -2
- package/dist/esm/shared/thirdweb/openapi-ts.config.js +1 -1
- package/dist/esm/shared/utils/b3Ens.js +4 -4
- package/dist/esm/shared/utils/chain-transformers.js +9 -9
- package/dist/esm/shared/utils/fetchBalances.js +4 -4
- package/dist/esm/shared/utils/formatUsername.d.ts +1 -0
- package/dist/esm/shared/utils/formatUsername.js +5 -0
- package/dist/esm/shared/utils/index.d.ts +3 -1
- package/dist/esm/shared/utils/index.js +4 -5
- package/dist/esm/shared/utils/insights.js +28 -28
- package/dist/esm/shared/utils/ipfs.js +1 -1
- package/dist/esm/shared/utils/number.js +3 -3
- package/dist/esm/shared/utils/simplehash.js +23 -23
- package/dist/esm/shared/utils/thirdweb-insights.js +15 -15
- package/dist/esm/shared/utils/truncateAddress.d.ts +6 -0
- package/dist/esm/shared/utils/truncateAddress.js +12 -0
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/abis/signature-minting.d.ts +79 -0
- package/dist/types/anyspend/index.d.ts +4 -2
- package/dist/types/anyspend/react/components/AnySpend.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +4 -4
- package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +3 -2
- package/dist/types/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnyspendSignatureMint.d.ts +8 -0
- package/dist/types/anyspend/react/components/common/ChainTokenIcon.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/OrderToken.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/OrderTokenAmount.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/PanelOnrampPayment.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/TokenBalance.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/Warning.d.ts +3 -0
- package/dist/types/anyspend/react/components/index.d.ts +2 -0
- package/dist/types/anyspend/react/components/modals/EnterRecipientModal.d.ts +1 -1
- package/dist/types/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +1 -1
- package/dist/types/anyspend/react/hooks/index.d.ts +1 -2
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +3 -18
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +1 -0
- package/dist/types/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +14 -70
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +14 -70
- package/dist/types/anyspend/react/hooks/useSigMint.d.ts +140 -0
- package/dist/types/anyspend/services/anyspend.d.ts +9 -40
- package/dist/types/anyspend/types/index.d.ts +1 -1
- package/dist/types/anyspend/types/metadata.d.ts +26 -0
- package/dist/types/anyspend/types/nft.d.ts +7 -0
- package/dist/types/anyspend/types/onramp.d.ts +3 -0
- package/dist/types/anyspend/types/order.d.ts +40 -200
- package/dist/types/anyspend/types/req-res/createOrder.d.ts +98 -235
- package/dist/types/anyspend/types/req-res/getOrderAndTransactions.d.ts +63 -305
- package/dist/types/anyspend/types/req-res/getOrderHistory.d.ts +49 -235
- package/dist/types/anyspend/types/req-res/getQuote.d.ts +37 -0
- package/dist/types/anyspend/types/req-res/index.d.ts +0 -1
- package/dist/types/anyspend/types/signature-mint.d.ts +69 -0
- package/dist/types/anyspend/utils/orderPayload.d.ts +3 -3
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +3 -3
- package/dist/types/global-account/react/components/B3Provider/B3Provider.native.d.ts +2 -2
- package/dist/types/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -1
- package/dist/types/global-account/react/components/MintButton/MintButton.d.ts +1 -1
- package/dist/types/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +1 -1
- package/dist/types/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/SignIn.d.ts +14 -0
- package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +1 -2
- package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/types/global-account/react/components/custom/Icon.d.ts +7 -0
- package/dist/types/global-account/react/components/custom/ManageAccountButton.d.ts +4 -0
- package/dist/types/global-account/react/components/index.d.ts +4 -4
- package/dist/types/global-account/react/components/ui/ShinyButton.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/Tabs.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/dialog.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/text-loop.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useAddTWSessionKey.d.ts +2 -2
- package/dist/types/global-account/react/hooks/useB3EnsName.d.ts +8 -4
- package/dist/types/global-account/react/hooks/useBestTransactionPath.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useRemoveSessionKey.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokenBalancesByChain.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokenPrice.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokenPriceWithFallback.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokensFromAddress.d.ts +1 -1
- package/dist/types/global-account/react/stores/index.d.ts +1 -1
- package/dist/types/global-account/react/stores/useModalStore.d.ts +18 -1
- package/dist/types/index.d.ts +0 -0
- package/dist/types/shared/constants/index.d.ts +1 -0
- package/dist/types/shared/react/hooks/index.d.ts +1 -0
- package/dist/types/shared/react/hooks/useNavigation.d.ts +17 -0
- package/dist/types/shared/react/index.d.ts +1 -0
- package/dist/types/shared/thirdweb/generated/sdk.gen.d.ts +2 -2
- package/dist/types/shared/utils/formatUsername.d.ts +1 -0
- package/dist/types/shared/utils/index.d.ts +3 -1
- package/dist/types/shared/utils/truncateAddress.d.ts +6 -0
- package/package.json +24 -4
- package/src/anyspend/README.md +12 -0
- package/src/anyspend/abis/abi-usdc-base.ts +97 -97
- package/src/anyspend/abis/erc20-staking.ts +51 -51
- package/src/anyspend/abis/signature-minting.ts +43 -0
- package/src/anyspend/constants/index.ts +13 -11
- package/src/anyspend/index.ts +4 -6
- package/src/anyspend/react/components/AnySpend.tsx +44 -39
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +46 -41
- package/src/anyspend/react/components/AnySpendCustom.tsx +214 -89
- package/src/anyspend/react/components/AnySpendNFT.tsx +11 -6
- package/src/anyspend/react/components/AnySpendNFTButton.tsx +1 -1
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +23 -22
- package/src/anyspend/react/components/AnySpendTournament.tsx +7 -4
- package/src/anyspend/react/components/AnyspendSignatureMint.tsx +147 -0
- package/src/anyspend/react/components/common/ChainTokenIcon.tsx +1 -1
- package/src/anyspend/react/components/common/OrderDetails.tsx +75 -77
- package/src/anyspend/react/components/common/OrderHistory.tsx +1 -1
- package/src/anyspend/react/components/common/OrderHistoryItem.tsx +3 -3
- package/src/anyspend/react/components/common/OrderToken.tsx +5 -5
- package/src/anyspend/react/components/common/OrderTokenAmount.tsx +4 -4
- package/src/anyspend/react/components/common/PanelOnramp.tsx +4 -4
- package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +9 -17
- package/src/anyspend/react/components/common/PaymentMethodIcons.tsx +1 -1
- package/src/anyspend/react/components/common/PaymentOneClick.tsx +3 -3
- package/src/anyspend/react/components/common/PaymentStripeWeb2.tsx +16 -15
- package/src/anyspend/react/components/common/TokenBalance.tsx +2 -2
- package/src/anyspend/react/components/common/Warning.tsx +7 -0
- package/src/anyspend/react/components/index.ts +2 -0
- package/src/anyspend/react/components/modals/EnterRecipientModal.tsx +2 -2
- package/src/anyspend/react/components/webview/WebviewOnrampOrderStatus.tsx +0 -1
- package/src/anyspend/react/components/webview/WebviewOnrampPayment.tsx +18 -20
- package/src/anyspend/react/hooks/index.ts +1 -2
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +10 -20
- package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +9 -8
- package/src/anyspend/react/hooks/useAnyspendOrderAndTransactions.ts +3 -3
- package/src/anyspend/react/hooks/useAnyspendOrderHistory.ts +4 -4
- package/src/anyspend/react/hooks/useAnyspendQuote.ts +6 -6
- package/src/anyspend/react/hooks/useAnyspendTokens.ts +4 -4
- package/src/anyspend/react/hooks/useCoinbaseOnrampOptions.ts +3 -3
- package/src/anyspend/react/hooks/useGeoOnrampOptions.ts +3 -3
- package/src/anyspend/react/hooks/useGetGeo.ts +1 -1
- package/src/anyspend/react/hooks/useSigMint.tsx +55 -0
- package/src/anyspend/react/hooks/useStripeClientSecret.ts +3 -3
- package/src/anyspend/react/hooks/useStripeSupport.ts +3 -3
- package/src/anyspend/react/providers/AnyspendProvider.tsx +9 -4
- package/src/anyspend/services/anyspend.ts +21 -39
- package/src/anyspend/types/chain.ts +1 -1
- package/src/anyspend/types/custom.ts +2 -2
- package/src/anyspend/types/globalWallet.ts +1 -1
- package/src/anyspend/types/index.ts +1 -1
- package/src/anyspend/types/metadata.ts +41 -0
- package/src/anyspend/types/nft.ts +10 -7
- package/src/anyspend/types/onramp.ts +3 -2
- package/src/anyspend/types/order.ts +9 -16
- package/src/anyspend/types/relay.ts +1 -1
- package/src/anyspend/types/req-res/createOrder.ts +9 -9
- package/src/anyspend/types/req-res/getCoinbaseOnrampOptions.ts +5 -5
- package/src/anyspend/types/req-res/getOrderAndTransactions.ts +4 -4
- package/src/anyspend/types/req-res/getOrderByCreator.ts +2 -2
- package/src/anyspend/types/req-res/getOrderHistory.ts +1 -1
- package/src/anyspend/types/req-res/getQuote.ts +14 -9
- package/src/anyspend/types/req-res/getTokenList.ts +4 -4
- package/src/anyspend/types/req-res/index.ts +0 -1
- package/src/anyspend/types/signature-mint.ts +77 -0
- package/src/anyspend/types/swap.ts +2 -2
- package/src/anyspend/types/token.ts +2 -2
- package/src/anyspend/types/tournament.ts +4 -4
- package/src/anyspend/types/transaction.ts +4 -4
- package/src/anyspend/utils/chain.ts +25 -25
- package/src/anyspend/utils/format.ts +2 -7
- package/src/anyspend/utils/orderPayload.ts +21 -9
- package/src/anyspend/utils/token.ts +10 -10
- package/src/global-account/app.native.ts +5 -5
- package/src/global-account/app.ts +5 -5
- package/src/global-account/bsmnt.native.ts +5 -5
- package/src/global-account/bsmnt.ts +5 -5
- package/src/global-account/react/components/B3DynamicModal.tsx +15 -6
- package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +4 -4
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +22 -20
- package/src/global-account/react/components/B3Provider/types.ts +1 -1
- package/src/global-account/react/components/ManageAccount/ManageAccount.tsx +6 -6
- package/src/global-account/react/components/MintButton/MintButton.tsx +5 -5
- package/src/global-account/react/components/RelayKitProviderWrapper.tsx +2 -2
- package/src/global-account/react/components/RequestPermissions/RequestPermissions.tsx +7 -7
- package/src/global-account/react/components/RequestPermissions/RequestPermissionsButton.tsx +2 -2
- package/src/global-account/react/components/SignInWithB3/SignIn.tsx +190 -0
- package/src/global-account/react/components/SignInWithB3/SignInWithB3.tsx +16 -28
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +14 -14
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Privy.tsx +2 -2
- package/src/global-account/react/components/SignInWithB3/components/AuthButton.tsx +1 -1
- package/src/global-account/react/components/SignInWithB3/components/WalletRow.tsx +1 -1
- package/src/global-account/react/components/SignInWithB3/steps/LoginStep.tsx +10 -10
- package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +3 -3
- package/src/global-account/react/components/SignInWithB3/utils/signInUtils.ts +2 -2
- package/src/global-account/react/components/StyleRoot.tsx +0 -1
- package/src/global-account/react/components/Transak/TransakModal.tsx +4 -4
- package/src/global-account/react/components/custom/Button.tsx +7 -7
- package/src/global-account/react/components/custom/Icon.tsx +102 -0
- package/src/global-account/react/components/custom/ManageAccountButton.tsx +33 -0
- package/src/global-account/react/components/custom/StaggeredFadeLoader.tsx +3 -3
- package/src/global-account/react/components/custom/WalletConnectorIcon.tsx +1 -1
- package/src/global-account/react/components/index.ts +4 -4
- package/src/global-account/react/components/magicui/AnimatedLottie.tsx +5 -5
- package/src/global-account/react/components/ui/Loading.tsx +2 -2
- package/src/global-account/react/components/ui/ShinyButton.tsx +5 -5
- package/src/global-account/react/components/ui/TabSystem.tsx +2 -2
- package/src/global-account/react/components/ui/Tabs.tsx +4 -4
- package/src/global-account/react/components/ui/badge.tsx +5 -5
- package/src/global-account/react/components/ui/button.tsx +7 -7
- package/src/global-account/react/components/ui/command.tsx +5 -5
- package/src/global-account/react/components/ui/dialog.tsx +5 -5
- package/src/global-account/react/components/ui/drawer.tsx +2 -2
- package/src/global-account/react/components/ui/glare-card-rounded.tsx +12 -12
- package/src/global-account/react/components/ui/glare-card.tsx +11 -11
- package/src/global-account/react/components/ui/input.tsx +2 -2
- package/src/global-account/react/components/ui/popover.tsx +1 -1
- package/src/global-account/react/components/ui/scroll-area.tsx +1 -1
- package/src/global-account/react/components/ui/text-loop.tsx +2 -2
- package/src/global-account/react/components/ui/text-shimmer.tsx +3 -3
- package/src/global-account/react/components/ui/tooltip.tsx +2 -2
- package/src/global-account/react/hooks/useAccountAssets.ts +4 -4
- package/src/global-account/react/hooks/useAccountWallet.tsx +9 -9
- package/src/global-account/react/hooks/useAddTWSessionKey.tsx +7 -7
- package/src/global-account/react/hooks/useAuthentication.ts +3 -3
- package/src/global-account/react/hooks/useB3BalanceFromAddresses.ts +9 -9
- package/src/global-account/react/hooks/useB3EnsName.ts +43 -31
- package/src/global-account/react/hooks/useBestTransactionPath.tsx +11 -11
- package/src/global-account/react/hooks/useBsmntProfile.ts +1 -1
- package/src/global-account/react/hooks/useChainSwitchWithAction.ts +4 -4
- package/src/global-account/react/hooks/useClaim.tsx +5 -5
- package/src/global-account/react/hooks/useConnect.tsx +4 -4
- package/src/global-account/react/hooks/useExchangeRate.tsx +3 -3
- package/src/global-account/react/hooks/useGetAllTWSigners.tsx +9 -9
- package/src/global-account/react/hooks/useGetGeo.tsx +1 -1
- package/src/global-account/react/hooks/useHandleConnectWithPrivy.tsx +2 -2
- package/src/global-account/react/hooks/useMediaQuery.tsx +1 -1
- package/src/global-account/react/hooks/useNativeBalance.tsx +7 -7
- package/src/global-account/react/hooks/useOnchainName.tsx +11 -11
- package/src/global-account/react/hooks/useOneBalance.tsx +2 -2
- package/src/global-account/react/hooks/useQueryB3.ts +2 -2
- package/src/global-account/react/hooks/useQueryBSMNT.ts +2 -2
- package/src/global-account/react/hooks/useRemoveSessionKey.tsx +5 -5
- package/src/global-account/react/hooks/useRouter.tsx +6 -6
- package/src/global-account/react/hooks/useSiwe.tsx +4 -4
- package/src/global-account/react/hooks/useTokenBalance.tsx +6 -6
- package/src/global-account/react/hooks/useTokenBalancesByChain.tsx +10 -10
- package/src/global-account/react/hooks/useTokenData.ts +3 -3
- package/src/global-account/react/hooks/useTokenFromUrl.tsx +14 -14
- package/src/global-account/react/hooks/useTokenPrice.tsx +7 -7
- package/src/global-account/react/hooks/useTokenPriceWithFallback.tsx +7 -7
- package/src/global-account/react/hooks/useTokensFromAddress.ts +2 -2
- package/src/global-account/react/hooks/useURLParams.ts +2 -2
- package/src/global-account/react/stores/index.ts +1 -1
- package/src/global-account/react/stores/useAuthStore.ts +3 -3
- package/src/global-account/react/stores/useModalStore.ts +23 -4
- package/src/global-account/server.ts +3 -3
- package/src/global-account/types/chain-networks.ts +10 -10
- package/src/global-account/types/feature-flags.ts +2 -2
- package/src/index.ts +1 -0
- package/src/shared/constants/chains/b3Chain.ts +35 -35
- package/src/shared/constants/chains/chainPlatformMap.ts +1 -1
- package/src/shared/constants/chains/supported.ts +6 -1
- package/src/shared/constants/index.ts +3 -1
- package/src/shared/react/hooks/index.ts +1 -0
- package/src/shared/react/hooks/useNavigation.ts +61 -0
- package/src/shared/react/index.ts +1 -0
- package/src/shared/thirdweb/generated/sdk.gen.ts +3 -3
- package/src/shared/thirdweb/initiateClient.ts +2 -2
- package/src/shared/thirdweb/openapi-ts.config.ts +1 -1
- package/src/shared/utils/b3Ens.ts +4 -4
- package/src/shared/utils/chain-transformers.ts +9 -9
- package/src/shared/utils/fetchBalances.ts +5 -5
- package/src/shared/utils/fetchBsmntProfile.ts +1 -1
- package/src/shared/utils/formatUsername.ts +5 -0
- package/src/shared/utils/index.ts +4 -6
- package/src/shared/utils/insights.ts +31 -31
- package/src/shared/utils/ipfs.ts +1 -1
- package/src/shared/utils/number.ts +5 -5
- package/src/shared/utils/simplehash.ts +28 -28
- package/src/shared/utils/thirdweb-insights.ts +20 -20
- package/src/shared/utils/truncateAddress.ts +11 -0
- package/src/styles/index.css +5 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendSendPermitData.d.ts +0 -16
- package/dist/cjs/anyspend/react/hooks/useAnyspendSendPermitData.js +0 -39
- package/dist/cjs/anyspend/react/hooks/usePermitData.d.ts +0 -92
- package/dist/cjs/anyspend/react/hooks/usePermitData.js +0 -158
- package/dist/cjs/anyspend/types/permit.d.ts +0 -21
- package/dist/cjs/anyspend/types/permit.js +0 -11
- package/dist/cjs/anyspend/types/req-res/sendPermitData.d.ts +0 -66
- package/dist/cjs/anyspend/types/req-res/sendPermitData.js +0 -11
- package/dist/esm/anyspend/react/hooks/useAnyspendSendPermitData.d.ts +0 -16
- package/dist/esm/anyspend/react/hooks/useAnyspendSendPermitData.js +0 -36
- package/dist/esm/anyspend/react/hooks/usePermitData.d.ts +0 -92
- package/dist/esm/anyspend/react/hooks/usePermitData.js +0 -154
- package/dist/esm/anyspend/types/permit.d.ts +0 -21
- package/dist/esm/anyspend/types/permit.js +0 -8
- package/dist/esm/anyspend/types/req-res/sendPermitData.d.ts +0 -66
- package/dist/esm/anyspend/types/req-res/sendPermitData.js +0 -8
- package/dist/types/anyspend/react/hooks/useAnyspendSendPermitData.d.ts +0 -16
- package/dist/types/anyspend/react/hooks/usePermitData.d.ts +0 -92
- package/dist/types/anyspend/types/permit.d.ts +0 -21
- package/dist/types/anyspend/types/req-res/sendPermitData.d.ts +0 -66
- package/src/anyspend/react/hooks/useAnyspendSendPermitData.ts +0 -38
- package/src/anyspend/react/hooks/usePermitData.ts +0 -183
- package/src/anyspend/types/permit.ts +0 -10
- package/src/anyspend/types/req-res/sendPermitData.ts +0 -10
|
@@ -37,5 +37,5 @@ interface UseBestTransactionPathProps {
|
|
|
37
37
|
* - sprinterOptions: Available chains and balances for bridging
|
|
38
38
|
* @returns TransactionPathResult object containing path information and loading state
|
|
39
39
|
*/
|
|
40
|
-
export declare function useBestTransactionPath({ amount, token, address, transactionType: _transactionType }: UseBestTransactionPathProps): TransactionPathResult;
|
|
40
|
+
export declare function useBestTransactionPath({ amount, token, address, transactionType: _transactionType, }: UseBestTransactionPathProps): TransactionPathResult;
|
|
41
41
|
export {};
|
|
@@ -22,7 +22,7 @@ const supportedSprinterTokenSymbols = ["ETH", "USDC", "WETH"];
|
|
|
22
22
|
* - sprinterOptions: Available chains and balances for bridging
|
|
23
23
|
* @returns TransactionPathResult object containing path information and loading state
|
|
24
24
|
*/
|
|
25
|
-
function useBestTransactionPath({ amount, token, address, transactionType: _transactionType = "send" }) {
|
|
25
|
+
function useBestTransactionPath({ amount, token, address, transactionType: _transactionType = "send", }) {
|
|
26
26
|
const account = (0, react_1.useAccountWallet)();
|
|
27
27
|
const effectiveAddress = address || account?.address;
|
|
28
28
|
const isSupportedSprinterToken = supportedSprinterTokenSymbols.includes(token.symbol.toUpperCase());
|
|
@@ -31,7 +31,7 @@ function useBestTransactionPath({ amount, token, address, transactionType: _tran
|
|
|
31
31
|
// Get the token balance using our new hook
|
|
32
32
|
const { rawBalance, isLoading: tokenBalanceLoading } = (0, react_1.useTokenBalance)({
|
|
33
33
|
token,
|
|
34
|
-
address: effectiveAddress
|
|
34
|
+
address: effectiveAddress,
|
|
35
35
|
});
|
|
36
36
|
// Check if amount is available natively on destination chain
|
|
37
37
|
const hasNativeBalance = (0, react_2.useMemo)(() => {
|
|
@@ -63,7 +63,7 @@ function useBestTransactionPath({ amount, token, address, transactionType: _tran
|
|
|
63
63
|
isSupportedSprinterToken,
|
|
64
64
|
oneBalanceLoading,
|
|
65
65
|
aggregatedBalances,
|
|
66
|
-
rawBalance
|
|
66
|
+
rawBalance,
|
|
67
67
|
]);
|
|
68
68
|
const totalCrossChainBalance = (0, react_2.useMemo)(() => {
|
|
69
69
|
if (oneBalanceLoading || !aggregatedTokenBalances || !token.symbol)
|
|
@@ -87,13 +87,13 @@ function useBestTransactionPath({ amount, token, address, transactionType: _tran
|
|
|
87
87
|
options.push({
|
|
88
88
|
chainId: chainBalance.chainId,
|
|
89
89
|
balance: balanceBi,
|
|
90
|
-
formattedBalance: (0, viem_1.formatUnits)(balanceBi, chainBalance.tokenDecimals)
|
|
90
|
+
formattedBalance: (0, viem_1.formatUnits)(balanceBi, chainBalance.tokenDecimals),
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
return {
|
|
95
95
|
hasSprinterPath: options.length > 0,
|
|
96
|
-
sprinterOptions: options
|
|
96
|
+
sprinterOptions: options,
|
|
97
97
|
};
|
|
98
98
|
}, [isSupportedSprinterToken, oneBalanceLoading, aggregatedBalances, token.symbol, token.chainId, amount]);
|
|
99
99
|
// Determine the best path
|
|
@@ -107,7 +107,7 @@ function useBestTransactionPath({ amount, token, address, transactionType: _tran
|
|
|
107
107
|
hasSprinterPath,
|
|
108
108
|
availableBalance,
|
|
109
109
|
totalCrossChainBalance,
|
|
110
|
-
sprinterOptions
|
|
110
|
+
sprinterOptions,
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
// Case 2: Sprinter path if available
|
|
@@ -118,7 +118,7 @@ function useBestTransactionPath({ amount, token, address, transactionType: _tran
|
|
|
118
118
|
hasSprinterPath: true,
|
|
119
119
|
availableBalance,
|
|
120
120
|
totalCrossChainBalance,
|
|
121
|
-
sprinterOptions
|
|
121
|
+
sprinterOptions,
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
// Case 3: Fallback to anyspend
|
|
@@ -128,7 +128,7 @@ function useBestTransactionPath({ amount, token, address, transactionType: _tran
|
|
|
128
128
|
hasSprinterPath: false,
|
|
129
129
|
availableBalance,
|
|
130
130
|
totalCrossChainBalance,
|
|
131
|
-
sprinterOptions: []
|
|
131
|
+
sprinterOptions: [],
|
|
132
132
|
};
|
|
133
133
|
}, [
|
|
134
134
|
token.address,
|
|
@@ -137,12 +137,12 @@ function useBestTransactionPath({ amount, token, address, transactionType: _tran
|
|
|
137
137
|
hasNativeBalance,
|
|
138
138
|
hasSprinterPath,
|
|
139
139
|
totalCrossChainBalance,
|
|
140
|
-
sprinterOptions
|
|
140
|
+
sprinterOptions,
|
|
141
141
|
]);
|
|
142
142
|
// Combine all loading states
|
|
143
143
|
const loading = oneBalanceLoading || tokenBalanceLoading;
|
|
144
144
|
return {
|
|
145
145
|
...path,
|
|
146
|
-
loading
|
|
146
|
+
loading,
|
|
147
147
|
};
|
|
148
148
|
}
|
|
@@ -7,7 +7,7 @@ const useBsmntProfile = ({ address }) => {
|
|
|
7
7
|
return (0, react_query_1.useQuery)({
|
|
8
8
|
queryKey: ["useBsmntProfile", address],
|
|
9
9
|
queryFn: () => (0, fetchBsmntProfile_1.fetchBsmntProfile)(undefined, address),
|
|
10
|
-
enabled: !!address
|
|
10
|
+
enabled: !!address,
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
13
|
exports.useBsmntProfile = useBsmntProfile;
|
|
@@ -52,9 +52,9 @@ function useChainSwitchWithAction() {
|
|
|
52
52
|
nativeCurrency: {
|
|
53
53
|
name: nativeCurrency.name,
|
|
54
54
|
symbol: nativeCurrency.symbol,
|
|
55
|
-
decimals: nativeCurrency.decimals
|
|
56
|
-
}
|
|
57
|
-
}
|
|
55
|
+
decimals: nativeCurrency.decimals,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
58
|
});
|
|
59
59
|
await run(() => action(walletClient));
|
|
60
60
|
}
|
|
@@ -18,7 +18,7 @@ function useClaim({ contractAddress, quantity = 1, chain, to, tokenId }) {
|
|
|
18
18
|
const contract = (0, thirdweb_2.getContract)({
|
|
19
19
|
client: thirdweb_1.client,
|
|
20
20
|
chain,
|
|
21
|
-
address: contractAddress
|
|
21
|
+
address: contractAddress,
|
|
22
22
|
});
|
|
23
23
|
// If tokenId is provided, use ERC1155 claim
|
|
24
24
|
const transaction = tokenId !== undefined
|
|
@@ -26,16 +26,16 @@ function useClaim({ contractAddress, quantity = 1, chain, to, tokenId }) {
|
|
|
26
26
|
contract,
|
|
27
27
|
to,
|
|
28
28
|
quantity: BigInt(quantity),
|
|
29
|
-
tokenId: BigInt(tokenId)
|
|
29
|
+
tokenId: BigInt(tokenId),
|
|
30
30
|
})
|
|
31
31
|
: (0, erc721_1.claimTo)({
|
|
32
32
|
contract,
|
|
33
33
|
to,
|
|
34
|
-
quantity: BigInt(quantity)
|
|
34
|
+
quantity: BigInt(quantity),
|
|
35
35
|
});
|
|
36
36
|
const tx = await (0, thirdweb_2.sendTransaction)({
|
|
37
37
|
transaction,
|
|
38
|
-
account
|
|
38
|
+
account,
|
|
39
39
|
});
|
|
40
40
|
return tx.transactionHash;
|
|
41
41
|
}
|
|
@@ -29,17 +29,17 @@ function useConnect(partnerId, chain) {
|
|
|
29
29
|
debug("@@useConnect:strategyOptions", {
|
|
30
30
|
partnerId,
|
|
31
31
|
strategyOptions,
|
|
32
|
-
clientId: constants_1.THIRDWEB_CLIENT_ID
|
|
32
|
+
clientId: constants_1.THIRDWEB_CLIENT_ID,
|
|
33
33
|
});
|
|
34
34
|
// Create a wallet for "Allowlist" ecosystems restricted to partners
|
|
35
35
|
const wallet = (0, wallets_1.ecosystemWallet)(constants_1.ecosystemWalletId, {
|
|
36
|
-
partnerId: partnerId
|
|
36
|
+
partnerId: partnerId,
|
|
37
37
|
});
|
|
38
38
|
const connect = await wallet.connect({
|
|
39
39
|
client: thirdweb_1.client,
|
|
40
40
|
chain,
|
|
41
41
|
// This is the payload that is sent to the auth endpoint
|
|
42
|
-
...strategyOptions
|
|
42
|
+
...strategyOptions,
|
|
43
43
|
});
|
|
44
44
|
debug("@@useConnect:connect:", connect);
|
|
45
45
|
setIsLoading(false);
|
|
@@ -12,19 +12,19 @@ async function fetchExchangeRate(baseCurrency, quoteCurrency) {
|
|
|
12
12
|
return parseFloat(data.data.rates[quoteCurrency]);
|
|
13
13
|
}
|
|
14
14
|
function useExchangeRate({ baseCurrency, quoteCurrency, refreshInterval = 30000 }) {
|
|
15
|
-
const { data: rate = 0, isLoading, error, refetch } = (0, react_query_1.useQuery)({
|
|
15
|
+
const { data: rate = 0, isLoading, error, refetch, } = (0, react_query_1.useQuery)({
|
|
16
16
|
queryKey: ["exchangeRate", baseCurrency, quoteCurrency],
|
|
17
17
|
queryFn: () => fetchExchangeRate(baseCurrency, quoteCurrency),
|
|
18
18
|
refetchInterval: refreshInterval,
|
|
19
19
|
staleTime: refreshInterval / 2, // Consider data stale after half the refresh interval
|
|
20
20
|
retry: 3,
|
|
21
|
-
retryDelay: attemptIndex => Math.min(1000 * 2 ** attemptIndex, 30000)
|
|
21
|
+
retryDelay: attemptIndex => Math.min(1000 * 2 ** attemptIndex, 30000),
|
|
22
22
|
});
|
|
23
23
|
return {
|
|
24
24
|
rate,
|
|
25
25
|
isLoading,
|
|
26
26
|
error,
|
|
27
|
-
refetch
|
|
27
|
+
refetch,
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
exports.default = useExchangeRate;
|
|
@@ -22,8 +22,8 @@ function useGetAllTWSigners({ chain, accountAddress, queryOptions }) {
|
|
|
22
22
|
contract: {
|
|
23
23
|
client: thirdweb_1.client,
|
|
24
24
|
chain,
|
|
25
|
-
address: accountAddress
|
|
26
|
-
}
|
|
25
|
+
address: accountAddress,
|
|
26
|
+
},
|
|
27
27
|
});
|
|
28
28
|
// Wait half a second for the sync, this is a hack
|
|
29
29
|
await new Promise(resolve => setTimeout(resolve, 500));
|
|
@@ -33,8 +33,8 @@ function useGetAllTWSigners({ chain, accountAddress, queryOptions }) {
|
|
|
33
33
|
const response = await fetch(`https://partner-session-keys-production.sean-430.workers.dev/?address=${accountAddress}×tamp=${Date.now()}`, {
|
|
34
34
|
method: "GET",
|
|
35
35
|
headers: {
|
|
36
|
-
"Content-Type": "application/json"
|
|
37
|
-
}
|
|
36
|
+
"Content-Type": "application/json",
|
|
37
|
+
},
|
|
38
38
|
});
|
|
39
39
|
if (response.ok) {
|
|
40
40
|
const data = (await response.json());
|
|
@@ -61,9 +61,9 @@ function useGetAllTWSigners({ chain, accountAddress, queryOptions }) {
|
|
|
61
61
|
metadata,
|
|
62
62
|
partner: {
|
|
63
63
|
id: metadata?.partnerId || signer.signer,
|
|
64
|
-
name: metadata?.partnerInfo?.name || ""
|
|
64
|
+
name: metadata?.partnerInfo?.name || "",
|
|
65
65
|
},
|
|
66
|
-
createdAt: metadata ? new Date(metadata.timestamp).toISOString() : ""
|
|
66
|
+
createdAt: metadata ? new Date(metadata.timestamp).toISOString() : "",
|
|
67
67
|
};
|
|
68
68
|
});
|
|
69
69
|
return result;
|
|
@@ -72,6 +72,6 @@ function useGetAllTWSigners({ chain, accountAddress, queryOptions }) {
|
|
|
72
72
|
refetchOnMount: true,
|
|
73
73
|
refetchOnWindowFocus: true,
|
|
74
74
|
refetchOnReconnect: true,
|
|
75
|
-
staleTime: 0 // Consider data stale immediately
|
|
75
|
+
staleTime: 0, // Consider data stale immediately
|
|
76
76
|
});
|
|
77
77
|
}
|
|
@@ -12,7 +12,7 @@ async function fetchGeoData() {
|
|
|
12
12
|
return response.json();
|
|
13
13
|
}
|
|
14
14
|
function useGetGeo() {
|
|
15
|
-
const { data: geoData, isLoading: loading, error } = (0, react_query_1.useQuery)({ queryKey: ["useGetGeo"], queryFn: fetchGeoData, retry: 3 });
|
|
15
|
+
const { data: geoData, isLoading: loading, error, } = (0, react_query_1.useQuery)({ queryKey: ["useGetGeo"], queryFn: fetchGeoData, retry: 3 });
|
|
16
16
|
if (error) {
|
|
17
17
|
(0, debug_1.debug)("@@useGetGeo error fetching geo data", error);
|
|
18
18
|
}
|
|
@@ -39,8 +39,8 @@ function useHandleConnectWithPrivy(partnerId, chain, onSuccess) {
|
|
|
39
39
|
strategy: "auth_endpoint",
|
|
40
40
|
payload: JSON.stringify({
|
|
41
41
|
strategy: "basement",
|
|
42
|
-
accessToken: fullToken
|
|
43
|
-
})
|
|
42
|
+
accessToken: fullToken,
|
|
43
|
+
}),
|
|
44
44
|
});
|
|
45
45
|
debug("@@useHandleConnectWithPrivy:connect:return", wallet);
|
|
46
46
|
setIsLoading(false);
|
|
@@ -26,8 +26,8 @@ async function fetchNativeBalance(address, chainIds) {
|
|
|
26
26
|
breakdown: data.data.map(item => ({
|
|
27
27
|
chainId: item.chainId,
|
|
28
28
|
balance: BigInt(item.balance),
|
|
29
|
-
formatted: (0, formatNumber_1.formatNumber)(Number((0, viem_1.formatUnits)(BigInt(item.balance), item.tokenDecimals)))
|
|
30
|
-
}))
|
|
29
|
+
formatted: (0, formatNumber_1.formatNumber)(Number((0, viem_1.formatUnits)(BigInt(item.balance), item.tokenDecimals))),
|
|
30
|
+
})),
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
function useNativeBalance(address, chainIds = "8333") {
|
|
@@ -36,7 +36,7 @@ function useNativeBalance(address, chainIds = "8333") {
|
|
|
36
36
|
queryFn: () => fetchNativeBalance(address, chainIds),
|
|
37
37
|
enabled: Boolean(address),
|
|
38
38
|
staleTime: 30 * 1000, // Consider data fresh for 30 seconds
|
|
39
|
-
gcTime: 5 * 60 * 1000 // Keep unused data in cache for 5 minutes
|
|
39
|
+
gcTime: 5 * 60 * 1000, // Keep unused data in cache for 5 minutes
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
@@ -57,10 +57,10 @@ function useNativeBalanceFromRPC(address, chainId) {
|
|
|
57
57
|
try {
|
|
58
58
|
const publicClient = (0, viem_1.createPublicClient)({
|
|
59
59
|
chain: chainId === 8333 ? supported_1.b3Mainnet : supported_1.b3Testnet,
|
|
60
|
-
transport: (0, viem_1.http)()
|
|
60
|
+
transport: (0, viem_1.http)(),
|
|
61
61
|
});
|
|
62
62
|
const balance = await publicClient.getBalance({
|
|
63
|
-
address: address
|
|
63
|
+
address: address,
|
|
64
64
|
});
|
|
65
65
|
return parseFloat((0, viem_1.formatEther)(balance));
|
|
66
66
|
}
|
|
@@ -70,7 +70,7 @@ function useNativeBalanceFromRPC(address, chainId) {
|
|
|
70
70
|
return 0;
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
|
-
enabled: Boolean(address)
|
|
73
|
+
enabled: Boolean(address),
|
|
74
74
|
});
|
|
75
75
|
return { balance, isLoading };
|
|
76
76
|
}
|
|
@@ -22,7 +22,7 @@ function useOnchainName(address) {
|
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
enabled: !!address
|
|
25
|
+
enabled: !!address,
|
|
26
26
|
});
|
|
27
27
|
const { data: b3Name, isLoading: isLoadingB3 } = (0, react_query_1.useQuery)({
|
|
28
28
|
queryKey: ["b3-name", address?.toLowerCase()],
|
|
@@ -37,7 +37,7 @@ function useOnchainName(address) {
|
|
|
37
37
|
return null;
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
|
-
enabled: !!address
|
|
40
|
+
enabled: !!address,
|
|
41
41
|
});
|
|
42
42
|
const { data: ensName, isLoading: isLoadingEns } = (0, react_query_1.useQuery)({
|
|
43
43
|
queryKey: ["ens-name", address?.toLowerCase()],
|
|
@@ -55,13 +55,13 @@ function useOnchainName(address) {
|
|
|
55
55
|
return null;
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
enabled: !!address
|
|
58
|
+
enabled: !!address,
|
|
59
59
|
});
|
|
60
60
|
return {
|
|
61
61
|
name: bsmntName || b3Name || ensName || null,
|
|
62
62
|
isLoading: isLoadingBsmnt || isLoadingB3 || isLoadingEns,
|
|
63
63
|
b3Name,
|
|
64
|
-
ensName
|
|
64
|
+
ensName,
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
function useOnchainNames(addresses) {
|
|
@@ -85,12 +85,12 @@ function useOnchainNames(addresses) {
|
|
|
85
85
|
return null;
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
|
-
enabled: !!address
|
|
88
|
+
enabled: !!address,
|
|
89
89
|
}));
|
|
90
90
|
const results = (0, react_query_1.useQueries)({ queries });
|
|
91
91
|
return {
|
|
92
92
|
names: results.map(result => result.data),
|
|
93
|
-
isLoading: results.some(result => result.isLoading)
|
|
93
|
+
isLoading: results.some(result => result.isLoading),
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
// Add a new hook to resolve ENS/B3 names to addresses
|
|
@@ -149,11 +149,11 @@ function useResolveOnchainName(name) {
|
|
|
149
149
|
return null;
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
|
-
enabled: !!name
|
|
152
|
+
enabled: !!name,
|
|
153
153
|
});
|
|
154
154
|
return {
|
|
155
155
|
address,
|
|
156
|
-
isLoading
|
|
156
|
+
isLoading,
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
159
|
// Add a new hook to fetch ENS profile image
|
|
@@ -183,11 +183,11 @@ function useOnchainPFP(name) {
|
|
|
183
183
|
return null;
|
|
184
184
|
}
|
|
185
185
|
},
|
|
186
|
-
enabled: !!name
|
|
186
|
+
enabled: !!name,
|
|
187
187
|
});
|
|
188
188
|
return {
|
|
189
189
|
pfp,
|
|
190
190
|
isLoading,
|
|
191
|
-
address
|
|
191
|
+
address,
|
|
192
192
|
};
|
|
193
193
|
}
|
|
@@ -15,7 +15,7 @@ const useOneBalance = (bypassCache = false) => {
|
|
|
15
15
|
queryFn: () => (0, fetchBalances_1.fetchBalances)(address, sprinterTestnet),
|
|
16
16
|
enabled: !!address,
|
|
17
17
|
staleTime: 1000 * 60 * 1, // 1 minute
|
|
18
|
-
gcTime: 1000 * 60 * 5 // 5 minutes (renamed from cacheTime in v5)
|
|
18
|
+
gcTime: 1000 * 60 * 5, // 5 minutes (renamed from cacheTime in v5)
|
|
19
19
|
});
|
|
20
20
|
(0, react_1.useEffect)(() => {
|
|
21
21
|
if (bypassCache) {
|
|
@@ -63,7 +63,7 @@ const useOneBalance = (bypassCache = false) => {
|
|
|
63
63
|
aggregatedBalances: data || [],
|
|
64
64
|
aggregatedTokenBalances,
|
|
65
65
|
loading: isLoading,
|
|
66
|
-
refetch
|
|
66
|
+
refetch,
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
69
|
exports.useOneBalance = useOneBalance;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ActiveSigners } from "../../../global-account/types";
|
|
2
2
|
import { Chain, Hex, ThirdwebClient } from "thirdweb";
|
|
3
|
-
export declare function useRemoveSessionKey({ onSuccess, onError, refetchSigners, chain }: {
|
|
3
|
+
export declare function useRemoveSessionKey({ onSuccess, onError, refetchSigners, chain, }: {
|
|
4
4
|
chain?: Chain;
|
|
5
5
|
onSuccess: (transactionResult: {
|
|
6
6
|
transactionHash: Hex;
|
|
@@ -11,7 +11,7 @@ const thirdweb_2 = require("thirdweb");
|
|
|
11
11
|
const erc4337_1 = require("thirdweb/extensions/erc4337");
|
|
12
12
|
const react_2 = require("thirdweb/react");
|
|
13
13
|
const debug = (0, debug_1.default)("@@b3:useHandleTWConnect");
|
|
14
|
-
function useRemoveSessionKey({ onSuccess, onError, refetchSigners, chain }) {
|
|
14
|
+
function useRemoveSessionKey({ onSuccess, onError, refetchSigners, chain, }) {
|
|
15
15
|
const [isRemovingSessionKey, setIsRemovingSessionKey] = (0, react_1.useState)(false);
|
|
16
16
|
if (!chain) {
|
|
17
17
|
throw new Error("Chain is required");
|
|
@@ -26,10 +26,10 @@ function useRemoveSessionKey({ onSuccess, onError, refetchSigners, chain }) {
|
|
|
26
26
|
contract: {
|
|
27
27
|
client: thirdweb_1.client,
|
|
28
28
|
chain,
|
|
29
|
-
address: account.address
|
|
29
|
+
address: account.address,
|
|
30
30
|
},
|
|
31
31
|
account,
|
|
32
|
-
sessionKeyAddress: signer.signer
|
|
32
|
+
sessionKeyAddress: signer.signer,
|
|
33
33
|
});
|
|
34
34
|
debug("@@ecosystem:removeSessionKey:transaction:", transaction);
|
|
35
35
|
const transactionResult = await (0, thirdweb_2.sendTransaction)({ transaction, account });
|
|
@@ -18,14 +18,14 @@ function useRouter() {
|
|
|
18
18
|
push: () => { },
|
|
19
19
|
replace: () => { },
|
|
20
20
|
back: () => { },
|
|
21
|
-
forward: () => { }
|
|
21
|
+
forward: () => { },
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
// Initialize state with current location
|
|
25
25
|
const [routerState, setRouterState] = (0, react_1.useState)(() => ({
|
|
26
26
|
pathname: window.location.pathname,
|
|
27
27
|
search: window.location.search,
|
|
28
|
-
hash: window.location.hash
|
|
28
|
+
hash: window.location.hash,
|
|
29
29
|
}));
|
|
30
30
|
// Update state when location changes
|
|
31
31
|
(0, react_1.useEffect)(() => {
|
|
@@ -33,7 +33,7 @@ function useRouter() {
|
|
|
33
33
|
setRouterState({
|
|
34
34
|
pathname: window.location.pathname,
|
|
35
35
|
search: window.location.search,
|
|
36
|
-
hash: window.location.hash
|
|
36
|
+
hash: window.location.hash,
|
|
37
37
|
});
|
|
38
38
|
};
|
|
39
39
|
// Listen for popstate event (browser back/forward)
|
|
@@ -49,7 +49,7 @@ function useRouter() {
|
|
|
49
49
|
setRouterState({
|
|
50
50
|
pathname: window.location.pathname,
|
|
51
51
|
search: window.location.search,
|
|
52
|
-
hash: window.location.hash
|
|
52
|
+
hash: window.location.hash,
|
|
53
53
|
});
|
|
54
54
|
}, []);
|
|
55
55
|
const replace = (0, react_1.useCallback)((url) => {
|
|
@@ -58,7 +58,7 @@ function useRouter() {
|
|
|
58
58
|
setRouterState({
|
|
59
59
|
pathname: window.location.pathname,
|
|
60
60
|
search: window.location.search,
|
|
61
|
-
hash: window.location.hash
|
|
61
|
+
hash: window.location.hash,
|
|
62
62
|
});
|
|
63
63
|
}, []);
|
|
64
64
|
const back = (0, react_1.useCallback)(() => {
|
|
@@ -72,7 +72,7 @@ function useRouter() {
|
|
|
72
72
|
push,
|
|
73
73
|
replace,
|
|
74
74
|
back,
|
|
75
|
-
forward
|
|
75
|
+
forward,
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
exports.default = useRouter;
|
|
@@ -13,12 +13,12 @@ function useSiwe() {
|
|
|
13
13
|
throw new Error("Account not found");
|
|
14
14
|
// generate challenge
|
|
15
15
|
const challenge = await app_1.default.service("global-accounts-challenge").create({
|
|
16
|
-
address: account.address
|
|
16
|
+
address: account.address,
|
|
17
17
|
});
|
|
18
18
|
(0, debug_1.default)("@@useAuthenticate:challenge", challenge);
|
|
19
19
|
// sign challenge
|
|
20
20
|
const signature = await account.signMessage({
|
|
21
|
-
message: challenge.message
|
|
21
|
+
message: challenge.message,
|
|
22
22
|
});
|
|
23
23
|
(0, debug_1.default)("@@useAuthenticate:signature", signature);
|
|
24
24
|
// authenticate
|
|
@@ -27,12 +27,12 @@ function useSiwe() {
|
|
|
27
27
|
message: challenge.message,
|
|
28
28
|
signature,
|
|
29
29
|
serverSignature: challenge.serverSignature,
|
|
30
|
-
nonce: challenge.nonce
|
|
30
|
+
nonce: challenge.nonce,
|
|
31
31
|
});
|
|
32
32
|
(0, debug_1.default)("@@useAuthenticate:response", response);
|
|
33
33
|
return response;
|
|
34
34
|
}, []);
|
|
35
35
|
return {
|
|
36
|
-
authenticate
|
|
36
|
+
authenticate,
|
|
37
37
|
};
|
|
38
38
|
}
|
|
@@ -12,7 +12,7 @@ function useTokenBalance({ token, address }) {
|
|
|
12
12
|
const { ready } = (0, react_1.useB3)();
|
|
13
13
|
const account = (0, react_1.useAccountWallet)();
|
|
14
14
|
const effectiveAddress = address || account?.address;
|
|
15
|
-
const { data: tokenBalance, isLoading, isFetching, refetch } = (0, react_query_1.useQuery)({
|
|
15
|
+
const { data: tokenBalance, isLoading, isFetching, refetch, } = (0, react_query_1.useQuery)({
|
|
16
16
|
queryKey: ["tokenBalance", effectiveAddress, token.chainId, token.address],
|
|
17
17
|
queryFn: async () => {
|
|
18
18
|
if (!effectiveAddress)
|
|
@@ -23,20 +23,20 @@ function useTokenBalance({ token, address }) {
|
|
|
23
23
|
const rawBalance = nativeToken.balance;
|
|
24
24
|
return {
|
|
25
25
|
formatted: (0, number_1.formatTokenAmount)(BigInt(rawBalance), Number(nativeToken.decimals || 18)),
|
|
26
|
-
raw: BigInt(rawBalance)
|
|
26
|
+
raw: BigInt(rawBalance),
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
return { formatted: "0", raw: null };
|
|
30
30
|
}
|
|
31
31
|
const response = await (0, thirdweb_insights_1.getERC20Balances)(effectiveAddress, {
|
|
32
32
|
chainIds: [token.chainId],
|
|
33
|
-
includeSpam: false
|
|
33
|
+
includeSpam: false,
|
|
34
34
|
});
|
|
35
35
|
const tokenBalance = response.data?.find(t => t.token_address === token.address);
|
|
36
36
|
if (tokenBalance?.balance) {
|
|
37
37
|
return {
|
|
38
38
|
formatted: (0, number_1.formatTokenAmount)(BigInt(tokenBalance.balance), Number(tokenBalance.decimals || 18)),
|
|
39
|
-
raw: BigInt(tokenBalance.balance)
|
|
39
|
+
raw: BigInt(tokenBalance.balance),
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
return { formatted: "0", raw: null };
|
|
@@ -45,7 +45,7 @@ function useTokenBalance({ token, address }) {
|
|
|
45
45
|
staleTime: 30000,
|
|
46
46
|
gcTime: 5 * 60 * 1000,
|
|
47
47
|
retry: 2,
|
|
48
|
-
structuralSharing: false
|
|
48
|
+
structuralSharing: false,
|
|
49
49
|
});
|
|
50
50
|
// Force a refetch when the wallet or token changes
|
|
51
51
|
(0, react_2.useEffect)(() => {
|
|
@@ -58,6 +58,6 @@ function useTokenBalance({ token, address }) {
|
|
|
58
58
|
return {
|
|
59
59
|
rawBalance: tokenBalance?.raw || BigInt(0),
|
|
60
60
|
formattedBalance: tokenBalance?.formatted || "0",
|
|
61
|
-
isLoading: isActuallyLoading
|
|
61
|
+
isLoading: isActuallyLoading,
|
|
62
62
|
};
|
|
63
63
|
}
|
|
@@ -18,5 +18,5 @@ interface UseTokenBalancesByChainProps {
|
|
|
18
18
|
chainsIds: number | number[];
|
|
19
19
|
enabled?: boolean;
|
|
20
20
|
}
|
|
21
|
-
export declare function useTokenBalancesByChain({ address, chainsIds, enabled }: UseTokenBalancesByChainProps): TokenBalancesByChain;
|
|
21
|
+
export declare function useTokenBalancesByChain({ address, chainsIds, enabled, }: UseTokenBalancesByChainProps): TokenBalancesByChain;
|
|
22
22
|
export {};
|
|
@@ -8,10 +8,10 @@ const b3Chain_1 = require("../../../shared/constants/chains/b3Chain");
|
|
|
8
8
|
const chains_1 = require("../../../shared/utils/chains");
|
|
9
9
|
const thirdweb_1 = require("../../../shared/utils/thirdweb");
|
|
10
10
|
const wallets_1 = require("thirdweb/wallets");
|
|
11
|
-
function useTokenBalancesByChain({ address, chainsIds, enabled = true }) {
|
|
11
|
+
function useTokenBalancesByChain({ address, chainsIds, enabled = true, }) {
|
|
12
12
|
// Normalize chains to array
|
|
13
13
|
const chainIds = Array.isArray(chainsIds) ? chainsIds : [chainsIds];
|
|
14
|
-
const { data: combinedData, isLoading, error } = (0, react_query_1.useQuery)({
|
|
14
|
+
const { data: combinedData, isLoading, error, } = (0, react_query_1.useQuery)({
|
|
15
15
|
queryKey: ["tokenBalancesByChain", address, chainIds.join(",")],
|
|
16
16
|
queryFn: async () => {
|
|
17
17
|
try {
|
|
@@ -22,20 +22,20 @@ function useTokenBalancesByChain({ address, chainsIds, enabled = true }) {
|
|
|
22
22
|
const walletBalance = await (0, wallets_1.getWalletBalance)({
|
|
23
23
|
address,
|
|
24
24
|
client: thirdweb_1.client,
|
|
25
|
-
chain: (0, b3Chain_1.viemToThirdwebChain)((0, chains_1.getChainById)(chainId))
|
|
25
|
+
chain: (0, b3Chain_1.viemToThirdwebChain)((0, chains_1.getChainById)(chainId)),
|
|
26
26
|
});
|
|
27
27
|
return {
|
|
28
28
|
chainId,
|
|
29
|
-
...walletBalance
|
|
29
|
+
...walletBalance,
|
|
30
30
|
};
|
|
31
31
|
})),
|
|
32
32
|
(0, thirdweb_insights_1.getERC20Balances)(address, {
|
|
33
|
-
chainIds
|
|
34
|
-
})
|
|
33
|
+
chainIds,
|
|
34
|
+
}),
|
|
35
35
|
]);
|
|
36
36
|
return {
|
|
37
37
|
nativeTokens,
|
|
38
|
-
fungibleTokens: fungibleResponse.data
|
|
38
|
+
fungibleTokens: fungibleResponse.data,
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
catch (err) {
|
|
@@ -47,12 +47,12 @@ function useTokenBalancesByChain({ address, chainsIds, enabled = true }) {
|
|
|
47
47
|
staleTime: 30000, // Consider data fresh for 30 seconds
|
|
48
48
|
gcTime: 5 * 60 * 1000, // Keep in cache for 5 minutes
|
|
49
49
|
retry: 2, // Limit retries on failure
|
|
50
|
-
structuralSharing: false
|
|
50
|
+
structuralSharing: false,
|
|
51
51
|
});
|
|
52
52
|
return {
|
|
53
53
|
nativeTokens: combinedData?.nativeTokens ?? [],
|
|
54
54
|
fungibleTokens: combinedData?.fungibleTokens ?? [],
|
|
55
55
|
isLoading,
|
|
56
|
-
error: error
|
|
56
|
+
error: error,
|
|
57
57
|
};
|
|
58
58
|
}
|
|
@@ -17,9 +17,9 @@ function useTokenData(chainId, address) {
|
|
|
17
17
|
method: "POST",
|
|
18
18
|
headers: {
|
|
19
19
|
"X-Service-Method": "findByAddress",
|
|
20
|
-
"Content-Type": "application/json"
|
|
20
|
+
"Content-Type": "application/json",
|
|
21
21
|
},
|
|
22
|
-
body: JSON.stringify({ chainId, address: normalizedAddress })
|
|
22
|
+
body: JSON.stringify({ chainId, address: normalizedAddress }),
|
|
23
23
|
});
|
|
24
24
|
if (response.ok) {
|
|
25
25
|
const data = await response.json();
|
|
@@ -42,6 +42,6 @@ function useTokenData(chainId, address) {
|
|
|
42
42
|
enabled: Boolean(chainId) && Boolean(address) && address?.trim() !== "",
|
|
43
43
|
refetchOnWindowFocus: false,
|
|
44
44
|
refetchOnMount: false,
|
|
45
|
-
refetchOnReconnect: false
|
|
45
|
+
refetchOnReconnect: false,
|
|
46
46
|
});
|
|
47
47
|
}
|