@b3dotfun/sdk 0.0.7-alpha.9 → 0.0.8-alpha.0
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 +10 -10
- package/dist/cjs/anyspend/index.d.ts +3 -2
- package/dist/cjs/anyspend/index.js +3 -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 +36 -34
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +122 -102
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +4 -4
- package/dist/cjs/anyspend/react/components/AnySpendNFTButton.js +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +17 -17
- package/dist/cjs/anyspend/react/components/AnySpendTournament.js +4 -4
- package/dist/cjs/anyspend/react/components/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 +50 -61
- 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 +10 -70
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +10 -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 +7 -40
- package/dist/cjs/anyspend/services/anyspend.js +10 -23
- 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.js +6 -6
- package/dist/cjs/anyspend/types/onramp.d.ts +3 -0
- package/dist/cjs/anyspend/types/onramp.js +2 -1
- package/dist/cjs/anyspend/types/order.d.ts +30 -200
- package/dist/cjs/anyspend/types/order.js +7 -12
- package/dist/cjs/anyspend/types/req-res/createOrder.d.ts +70 -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 +45 -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 +35 -235
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.js +1 -1
- package/dist/cjs/anyspend/types/req-res/getQuote.d.ts +26 -0
- package/dist/cjs/anyspend/types/req-res/getQuote.js +10 -8
- package/dist/cjs/anyspend/types/req-res/getTokenList.js +3 -3
- package/dist/cjs/anyspend/types/req-res/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.js +6 -6
- package/dist/cjs/anyspend/utils/token.js +10 -10
- package/dist/cjs/global-account/app.js +4 -4
- package/dist/cjs/global-account/app.native.js +4 -4
- package/dist/cjs/global-account/bsmnt.js +4 -4
- package/dist/cjs/global-account/bsmnt.native.js +4 -4
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +13 -3
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +2 -2
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +16 -15
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.d.ts +2 -2
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +4 -4
- package/dist/cjs/global-account/react/components/B3Provider/types.js +1 -1
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.js +5 -5
- package/dist/cjs/global-account/react/components/MintButton/MintButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/MintButton/MintButton.js +5 -5
- package/dist/cjs/global-account/react/components/RelayKitProviderWrapper.js +2 -2
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +1 -1
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.js +5 -5
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissionsButton.js +2 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +12 -12
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/WalletRow.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.js +9 -9
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +2 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.js +2 -2
- package/dist/cjs/global-account/react/components/Transak/TransakModal.js +4 -4
- package/dist/cjs/global-account/react/components/custom/Button.js +5 -5
- package/dist/cjs/global-account/react/components/custom/Icon.js +1 -1
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.js +1 -1
- package/dist/cjs/global-account/react/components/custom/StaggeredFadeLoader.js +3 -3
- package/dist/cjs/global-account/react/components/index.d.ts +4 -4
- package/dist/cjs/global-account/react/components/magicui/AnimatedLottie.js +1 -1
- package/dist/cjs/global-account/react/components/ui/Loading.js +2 -2
- package/dist/cjs/global-account/react/components/ui/ShinyButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/ShinyButton.js +3 -3
- package/dist/cjs/global-account/react/components/ui/TabSystem.js +1 -1
- package/dist/cjs/global-account/react/components/ui/Tabs.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/Tabs.js +1 -1
- package/dist/cjs/global-account/react/components/ui/badge.js +4 -4
- package/dist/cjs/global-account/react/components/ui/button.js +5 -5
- package/dist/cjs/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/dialog.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/glare-card-rounded.js +12 -12
- package/dist/cjs/global-account/react/components/ui/glare-card.js +11 -11
- package/dist/cjs/global-account/react/components/ui/input.js +1 -1
- package/dist/cjs/global-account/react/components/ui/text-loop.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/text-loop.js +2 -2
- package/dist/cjs/global-account/react/components/ui/text-shimmer.js +2 -2
- package/dist/cjs/global-account/react/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 +7 -0
- package/dist/cjs/global-account/react/hooks/useB3EnsName.js +15 -6
- 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 +17 -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.js +1 -1
- 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 -10
- package/dist/cjs/shared/utils/index.js +4 -23
- 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 +10 -10
- package/dist/esm/anyspend/index.d.ts +3 -2
- package/dist/esm/anyspend/index.js +3 -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 +37 -35
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +2 -2
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +94 -74
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +4 -4
- package/dist/esm/anyspend/react/components/AnySpendNFTButton.js +1 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +18 -18
- package/dist/esm/anyspend/react/components/AnySpendTournament.js +4 -4
- package/dist/esm/anyspend/react/components/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 +51 -62
- 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 +10 -70
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +10 -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 +7 -40
- package/dist/esm/anyspend/services/anyspend.js +11 -24
- 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.js +6 -6
- package/dist/esm/anyspend/types/onramp.d.ts +3 -0
- package/dist/esm/anyspend/types/onramp.js +2 -1
- package/dist/esm/anyspend/types/order.d.ts +30 -200
- package/dist/esm/anyspend/types/order.js +7 -12
- package/dist/esm/anyspend/types/req-res/createOrder.d.ts +70 -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 +45 -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 +35 -235
- package/dist/esm/anyspend/types/req-res/getOrderHistory.js +1 -1
- package/dist/esm/anyspend/types/req-res/getQuote.d.ts +26 -0
- package/dist/esm/anyspend/types/req-res/getQuote.js +10 -8
- package/dist/esm/anyspend/types/req-res/getTokenList.js +3 -3
- package/dist/esm/anyspend/types/req-res/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.js +6 -6
- package/dist/esm/anyspend/utils/token.js +10 -10
- package/dist/esm/global-account/app.js +4 -4
- package/dist/esm/global-account/app.native.js +4 -4
- package/dist/esm/global-account/bsmnt.js +4 -4
- package/dist/esm/global-account/bsmnt.native.js +4 -4
- package/dist/esm/global-account/react/components/B3DynamicModal.js +14 -4
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +2 -2
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +7 -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/SignIn.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +13 -13
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.js +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/WalletRow.js +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.js +9 -9
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +3 -3
- package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.js +2 -2
- package/dist/esm/global-account/react/components/Transak/TransakModal.js +4 -4
- package/dist/esm/global-account/react/components/custom/Button.js +5 -5
- package/dist/esm/global-account/react/components/custom/Icon.js +1 -1
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.js +1 -1
- package/dist/esm/global-account/react/components/custom/StaggeredFadeLoader.js +3 -3
- package/dist/esm/global-account/react/components/custom/WalletConnectorIcon.js +1 -1
- package/dist/esm/global-account/react/components/index.d.ts +4 -4
- package/dist/esm/global-account/react/components/index.js +4 -4
- package/dist/esm/global-account/react/components/magicui/AnimatedLottie.js +1 -1
- package/dist/esm/global-account/react/components/ui/Loading.js +2 -2
- package/dist/esm/global-account/react/components/ui/ShinyButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/ShinyButton.js +3 -3
- package/dist/esm/global-account/react/components/ui/TabSystem.js +1 -1
- package/dist/esm/global-account/react/components/ui/Tabs.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/Tabs.js +1 -1
- package/dist/esm/global-account/react/components/ui/badge.js +4 -4
- package/dist/esm/global-account/react/components/ui/button.js +5 -5
- package/dist/esm/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/command.js +1 -1
- package/dist/esm/global-account/react/components/ui/dialog.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/dialog.js +1 -1
- package/dist/esm/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/drawer.js +1 -1
- package/dist/esm/global-account/react/components/ui/glare-card-rounded.js +12 -12
- package/dist/esm/global-account/react/components/ui/glare-card.js +11 -11
- package/dist/esm/global-account/react/components/ui/input.js +1 -1
- package/dist/esm/global-account/react/components/ui/text-loop.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/text-loop.js +2 -2
- package/dist/esm/global-account/react/components/ui/text-shimmer.js +2 -2
- package/dist/esm/global-account/react/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 +7 -0
- package/dist/esm/global-account/react/hooks/useB3EnsName.js +15 -6
- 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 +17 -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.js +1 -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 -10
- package/dist/esm/shared/utils/index.js +4 -20
- 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 +3 -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 +2 -2
- package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- package/dist/types/anyspend/react/components/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 +10 -70
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +10 -70
- package/dist/types/anyspend/react/hooks/useSigMint.d.ts +140 -0
- package/dist/types/anyspend/services/anyspend.d.ts +7 -40
- package/dist/types/anyspend/types/index.d.ts +0 -1
- package/dist/types/anyspend/types/onramp.d.ts +3 -0
- package/dist/types/anyspend/types/order.d.ts +30 -200
- package/dist/types/anyspend/types/req-res/createOrder.d.ts +70 -235
- package/dist/types/anyspend/types/req-res/getOrderAndTransactions.d.ts +45 -305
- package/dist/types/anyspend/types/req-res/getOrderHistory.d.ts +35 -235
- package/dist/types/anyspend/types/req-res/getQuote.d.ts +26 -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/global-account/react/components/B3Provider/B3Provider.d.ts +2 -2
- package/dist/types/global-account/react/components/B3Provider/B3Provider.native.d.ts +2 -2
- package/dist/types/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -1
- package/dist/types/global-account/react/components/MintButton/MintButton.d.ts +1 -1
- package/dist/types/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +1 -1
- package/dist/types/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/types/global-account/react/components/index.d.ts +4 -4
- package/dist/types/global-account/react/components/ui/ShinyButton.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/Tabs.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/dialog.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/text-loop.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useAddTWSessionKey.d.ts +2 -2
- package/dist/types/global-account/react/hooks/useB3EnsName.d.ts +7 -0
- 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 +17 -2
- 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 -10
- package/dist/types/shared/utils/truncateAddress.d.ts +6 -0
- package/package.json +3 -2
- 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 +10 -10
- package/src/anyspend/index.ts +3 -6
- package/src/anyspend/react/components/AnySpend.tsx +44 -39
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +40 -36
- package/src/anyspend/react/components/AnySpendCustom.tsx +158 -82
- package/src/anyspend/react/components/AnySpendNFT.tsx +4 -4
- package/src/anyspend/react/components/AnySpendNFTButton.tsx +1 -1
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +18 -18
- package/src/anyspend/react/components/AnySpendTournament.tsx +4 -4
- package/src/anyspend/react/components/AnyspendSignatureMint.tsx +147 -0
- package/src/anyspend/react/components/common/ChainTokenIcon.tsx +1 -1
- package/src/anyspend/react/components/common/OrderDetails.tsx +71 -73
- 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 +19 -37
- 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 -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 +10 -8
- 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 +6 -6
- package/src/anyspend/utils/token.ts +10 -10
- package/src/global-account/app.native.ts +5 -5
- package/src/global-account/app.ts +5 -5
- package/src/global-account/bsmnt.native.ts +5 -5
- package/src/global-account/bsmnt.ts +5 -5
- package/src/global-account/react/components/B3DynamicModal.tsx +15 -6
- package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +4 -4
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +21 -18
- package/src/global-account/react/components/B3Provider/types.ts +1 -1
- package/src/global-account/react/components/ManageAccount/ManageAccount.tsx +6 -6
- package/src/global-account/react/components/MintButton/MintButton.tsx +5 -5
- package/src/global-account/react/components/RelayKitProviderWrapper.tsx +2 -2
- package/src/global-account/react/components/RequestPermissions/RequestPermissions.tsx +7 -7
- package/src/global-account/react/components/RequestPermissions/RequestPermissionsButton.tsx +2 -2
- package/src/global-account/react/components/SignInWithB3/SignIn.tsx +4 -4
- package/src/global-account/react/components/SignInWithB3/SignInWithB3.tsx +2 -2
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +14 -14
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Privy.tsx +2 -2
- package/src/global-account/react/components/SignInWithB3/components/AuthButton.tsx +1 -1
- package/src/global-account/react/components/SignInWithB3/components/WalletRow.tsx +1 -1
- package/src/global-account/react/components/SignInWithB3/steps/LoginStep.tsx +10 -10
- package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +3 -3
- package/src/global-account/react/components/SignInWithB3/utils/signInUtils.ts +2 -2
- package/src/global-account/react/components/Transak/TransakModal.tsx +4 -4
- package/src/global-account/react/components/custom/Button.tsx +7 -7
- package/src/global-account/react/components/custom/Icon.tsx +1 -1
- package/src/global-account/react/components/custom/ManageAccountButton.tsx +1 -1
- package/src/global-account/react/components/custom/StaggeredFadeLoader.tsx +3 -3
- package/src/global-account/react/components/custom/WalletConnectorIcon.tsx +1 -1
- package/src/global-account/react/components/index.ts +4 -4
- package/src/global-account/react/components/magicui/AnimatedLottie.tsx +5 -5
- package/src/global-account/react/components/ui/Loading.tsx +2 -2
- package/src/global-account/react/components/ui/ShinyButton.tsx +5 -5
- package/src/global-account/react/components/ui/TabSystem.tsx +2 -2
- package/src/global-account/react/components/ui/Tabs.tsx +4 -4
- package/src/global-account/react/components/ui/badge.tsx +5 -5
- package/src/global-account/react/components/ui/button.tsx +7 -7
- package/src/global-account/react/components/ui/command.tsx +5 -5
- package/src/global-account/react/components/ui/dialog.tsx +5 -5
- package/src/global-account/react/components/ui/drawer.tsx +2 -2
- package/src/global-account/react/components/ui/glare-card-rounded.tsx +12 -12
- package/src/global-account/react/components/ui/glare-card.tsx +11 -11
- package/src/global-account/react/components/ui/input.tsx +2 -2
- package/src/global-account/react/components/ui/popover.tsx +1 -1
- package/src/global-account/react/components/ui/scroll-area.tsx +1 -1
- package/src/global-account/react/components/ui/text-loop.tsx +2 -2
- package/src/global-account/react/components/ui/text-shimmer.tsx +3 -3
- package/src/global-account/react/components/ui/tooltip.tsx +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 +25 -7
- 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 +22 -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 -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 -22
- 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
|
@@ -9,16 +9,16 @@ export const GlareCard = ({ children, className }) => {
|
|
|
9
9
|
const state = useRef({
|
|
10
10
|
glare: {
|
|
11
11
|
x: 50,
|
|
12
|
-
y: 50
|
|
12
|
+
y: 50,
|
|
13
13
|
},
|
|
14
14
|
background: {
|
|
15
15
|
x: 50,
|
|
16
|
-
y: 50
|
|
16
|
+
y: 50,
|
|
17
17
|
},
|
|
18
18
|
rotate: {
|
|
19
19
|
x: 0,
|
|
20
|
-
y: 0
|
|
21
|
-
}
|
|
20
|
+
y: 0,
|
|
21
|
+
},
|
|
22
22
|
});
|
|
23
23
|
const containerStyle = {
|
|
24
24
|
"--m-x": "50%",
|
|
@@ -33,7 +33,7 @@ export const GlareCard = ({ children, className }) => {
|
|
|
33
33
|
"--radius": "13px",
|
|
34
34
|
"--easing": "ease",
|
|
35
35
|
"--transition": "var(--duration) var(--easing)",
|
|
36
|
-
transition: "transform var(--duration) var(--easing), opacity var(--duration) var(--easing), background var(--duration) var(--easing)"
|
|
36
|
+
transition: "transform var(--duration) var(--easing), opacity var(--duration) var(--easing), background var(--duration) var(--easing)",
|
|
37
37
|
};
|
|
38
38
|
const backgroundStyle = {
|
|
39
39
|
"--step": "5%",
|
|
@@ -42,7 +42,7 @@ export const GlareCard = ({ children, className }) => {
|
|
|
42
42
|
"--rainbow": "repeating-linear-gradient( 0deg,rgb(255,119,115) calc(var(--step) * 1),rgba(255,237,95,1) calc(var(--step) * 2),rgba(168,255,95,1) calc(var(--step) * 3),rgba(131,255,247,1) calc(var(--step) * 4),rgba(120,148,255,1) calc(var(--step) * 5),rgb(216,117,255) calc(var(--step) * 6),rgb(255,119,115) calc(var(--step) * 7) ) 0% var(--bg-y)/200% 700% no-repeat",
|
|
43
43
|
"--diagonal": "repeating-linear-gradient( 128deg,#0e152e 0%,hsl(180,10%,60%) 3.8%,hsl(180,10%,60%) 4.5%,hsl(180,10%,60%) 5.2%,#0e152e 10%,#0e152e 12% ) var(--bg-x) var(--bg-y)/300% no-repeat",
|
|
44
44
|
"--shade": "radial-gradient( farthest-corner circle at var(--m-x) var(--m-y),rgba(255,255,255,0.1) 12%,rgba(255,255,255,0.15) 20%,rgba(255,255,255,0.25) 120% ) var(--bg-x) var(--bg-y)/300% no-repeat",
|
|
45
|
-
backgroundBlendMode: "hue, hue, hue, overlay"
|
|
45
|
+
backgroundBlendMode: "hue, hue, hue, overlay",
|
|
46
46
|
};
|
|
47
47
|
const updateStyles = () => {
|
|
48
48
|
if (refElement.current) {
|
|
@@ -56,21 +56,21 @@ export const GlareCard = ({ children, className }) => {
|
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
return (_jsx("div", { style: {
|
|
59
|
-
...containerStyle
|
|
59
|
+
...containerStyle,
|
|
60
60
|
}, className: "relative isolate h-auto w-full will-change-transform [contain:layout_style] [perspective:600px]", ref: refElement, onPointerMove: event => {
|
|
61
61
|
const rotateFactor = 0.4;
|
|
62
62
|
const rect = event.currentTarget.getBoundingClientRect();
|
|
63
63
|
const position = {
|
|
64
64
|
x: event.clientX - rect.left,
|
|
65
|
-
y: event.clientY - rect.top
|
|
65
|
+
y: event.clientY - rect.top,
|
|
66
66
|
};
|
|
67
67
|
const percentage = {
|
|
68
68
|
x: (100 / rect.width) * position.x,
|
|
69
|
-
y: (100 / rect.height) * position.y
|
|
69
|
+
y: (100 / rect.height) * position.y,
|
|
70
70
|
};
|
|
71
71
|
const delta = {
|
|
72
72
|
x: percentage.x - 50,
|
|
73
|
-
y: percentage.y - 50
|
|
73
|
+
y: percentage.y - 50,
|
|
74
74
|
};
|
|
75
75
|
const { background, rotate, glare } = state.current;
|
|
76
76
|
background.x = 50 + percentage.x / 4 - 12.5;
|
|
@@ -99,6 +99,6 @@ export const GlareCard = ({ children, className }) => {
|
|
|
99
99
|
refElement.current?.style.setProperty("--r-y", `0deg`);
|
|
100
100
|
}
|
|
101
101
|
}, children: _jsxs("div", { className: "grid h-full w-full origin-center overflow-hidden rounded-[var(--radius)] border border-black/50 will-change-transform [transform:rotateY(var(--r-x))_rotateX(var(--r-y))] hover:filter-none hover:[--duration:200ms] hover:[--easing:linear] hover:[--opacity:0.1]", children: [_jsx("div", { className: "grid h-full w-full mix-blend-soft-light [clip-path:inset(0_0_0_0_round_var(--radius))] [grid-area:1/1]", children: _jsx("div", { ref: contentRef, className: cn("h-full w-full bg-slate-950 object-cover", className), children: children }) }), _jsx("div", { className: "grid h-full w-full opacity-[var(--opacity)] mix-blend-soft-light [grid-area:1/1] [background:radial-gradient(farthest-corner_circle_at_var(--m-x)_var(--m-y),_rgba(255,255,255,0.8)_10%,_rgba(255,255,255,0.65)_20%,_rgba(255,255,255,0)_90%)] [clip-path:inset(0_0_1px_0_round_var(--radius))]", style: {
|
|
102
|
-
transition: "opacity var(--duration) var(--easing), background var(--duration) var(--easing)"
|
|
102
|
+
transition: "opacity var(--duration) var(--easing), background var(--duration) var(--easing)",
|
|
103
103
|
} }), _jsx("div", { className: "relative grid h-full w-full opacity-[var(--opacity)] mix-blend-color-dodge transition-opacity [grid-area:1/1] [clip-path:inset(0_0_1px_0_round_var(--radius))] [background-blend-mode:hue_hue_hue_overlay] [background:var(--pattern),_var(--rainbow),_var(--diagonal),_var(--shade)] after:bg-[inherit] after:mix-blend-exclusion after:content-[''] after:[background-blend-mode:soft-light,_hue,_hard-light] after:[background-position:center,_0%_var(--bg-y),_calc(var(--bg-x)*_-1)_calc(var(--bg-y)*_-1),_var(--bg-x)_var(--bg-y)] after:[background-size:var(--foil-size),_200%_400%,_800%,_200%]", style: { ...backgroundStyle } })] }) }));
|
|
104
104
|
};
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { cn } from "../../../../shared/utils/index.js";
|
|
4
4
|
const Input = React.forwardRef(({ className, type, ...props }, ref) => {
|
|
5
5
|
return (_jsx("input", { type: type, className: cn("border-b3-react-border bg-b3-react-background ring-offset-b3-react-background placeholder:text-b3-react-muted-foreground focus-visible:ring-b3-react-ring flex h-10 w-full rounded-md border px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className), style: {
|
|
6
|
-
boxShadow: "inset 0 0 0 1px rgba(255, 255, 255, 0.05)"
|
|
6
|
+
boxShadow: "inset 0 0 0 1px rgba(255, 255, 255, 0.05)",
|
|
7
7
|
}, ref: ref, ...props }));
|
|
8
8
|
});
|
|
9
9
|
Input.displayName = "Input";
|
|
@@ -7,5 +7,5 @@ type TextLoopProps = {
|
|
|
7
7
|
variants?: Variants;
|
|
8
8
|
onIndexChange?: (index: number) => void;
|
|
9
9
|
};
|
|
10
|
-
export declare function TextLoop({ children, className, interval, transition, variants, onIndexChange }: TextLoopProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function TextLoop({ children, className, interval, transition, variants, onIndexChange, }: TextLoopProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { cn } from "../../../../shared/utils/cn.js";
|
|
4
4
|
import { AnimatePresence, motion } from "framer-motion";
|
|
5
5
|
import { Children, useEffect, useState } from "react";
|
|
6
|
-
export function TextLoop({ children, className, interval = 2, transition = { duration: 0.3 }, variants, onIndexChange }) {
|
|
6
|
+
export function TextLoop({ children, className, interval = 2, transition = { duration: 0.3 }, variants, onIndexChange, }) {
|
|
7
7
|
const [currentIndex, setCurrentIndex] = useState(0);
|
|
8
8
|
const items = Children.toArray(children);
|
|
9
9
|
useEffect(() => {
|
|
@@ -20,7 +20,7 @@ export function TextLoop({ children, className, interval = 2, transition = { dur
|
|
|
20
20
|
const motionVariants = {
|
|
21
21
|
initial: { y: 20, opacity: 0 },
|
|
22
22
|
animate: { y: 0, opacity: 1 },
|
|
23
|
-
exit: { y: -20, opacity: 0 }
|
|
23
|
+
exit: { y: -20, opacity: 0 },
|
|
24
24
|
};
|
|
25
25
|
return (_jsx("div", { className: cn("relative inline-block whitespace-nowrap", className), children: _jsx(AnimatePresence, { mode: "popLayout", initial: false, children: _jsx(motion.div, { initial: "initial", animate: "animate", exit: "exit", transition: transition, variants: variants || motionVariants, children: items[currentIndex] }, currentIndex) }) }));
|
|
26
26
|
}
|
|
@@ -11,9 +11,9 @@ export function TextShimmer({ children, as: Component = "p", className, duration
|
|
|
11
11
|
return (_jsx(MotionComponent, { className: cn("relative inline-block bg-[length:250%_100%,auto] bg-clip-text", "text-transparent [--base-color:#a1a1aa] [--base-gradient-color:#000]", "[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--base-gradient-color),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]", "dark:[--base-color:#71717a] dark:[--base-gradient-color:#ffffff] dark:[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--base-gradient-color),#0000_calc(50%+var(--spread)))]", className), initial: { backgroundPosition: "100% center" }, animate: { backgroundPosition: "0% center" }, transition: {
|
|
12
12
|
repeat: Infinity,
|
|
13
13
|
duration,
|
|
14
|
-
ease: "linear"
|
|
14
|
+
ease: "linear",
|
|
15
15
|
}, style: {
|
|
16
16
|
"--spread": `${dynamicSpread}px`,
|
|
17
|
-
backgroundImage: `var(--bg), linear-gradient(var(--base-color), var(--base-color))
|
|
17
|
+
backgroundImage: `var(--bg), linear-gradient(var(--base-color), var(--base-color))`,
|
|
18
18
|
}, children: children }));
|
|
19
19
|
}
|
|
@@ -6,6 +6,6 @@ import { cn } from "../../../../shared/utils/cn.js";
|
|
|
6
6
|
const TooltipProvider = TooltipPrimitive.Provider;
|
|
7
7
|
const Tooltip = TooltipPrimitive.Root;
|
|
8
8
|
const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
9
|
-
const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(TooltipPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn("bg-popover text-
|
|
9
|
+
const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(TooltipPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn("bg-b3-react-popover text-b3-react-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md", className), ...props })));
|
|
10
10
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
11
11
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -7,8 +7,8 @@ async function fetchAccountAssets(address) {
|
|
|
7
7
|
fetchSimpleHashData(`/v0/nfts/owners`, {
|
|
8
8
|
chains: "b3,b3-sepolia,base",
|
|
9
9
|
wallet_addresses: address,
|
|
10
|
-
count: true
|
|
11
|
-
})
|
|
10
|
+
count: true,
|
|
11
|
+
}),
|
|
12
12
|
// we are not using the tokenResponse anywhere in the app, let's not call it, if we don't need it
|
|
13
13
|
// getERC20Balances(address, {
|
|
14
14
|
// chainIds: [8333, 1993, 8453, 84532],
|
|
@@ -17,7 +17,7 @@ async function fetchAccountAssets(address) {
|
|
|
17
17
|
// }),
|
|
18
18
|
]);
|
|
19
19
|
return {
|
|
20
|
-
nftResponse
|
|
20
|
+
nftResponse,
|
|
21
21
|
//tokenResponse,
|
|
22
22
|
};
|
|
23
23
|
}
|
|
@@ -27,6 +27,6 @@ export function useAccountAssets(address) {
|
|
|
27
27
|
queryFn: () => fetchAccountAssets(address),
|
|
28
28
|
enabled: Boolean(address),
|
|
29
29
|
staleTime: 30 * 1000, // Consider data fresh for 30 seconds
|
|
30
|
-
gcTime: 5 * 60 * 1000 // Keep unused data in cache for 5 minutes
|
|
30
|
+
gcTime: 5 * 60 * 1000, // Keep unused data in cache for 5 minutes
|
|
31
31
|
});
|
|
32
32
|
}
|
|
@@ -37,8 +37,8 @@ export function useAccountWallet() {
|
|
|
37
37
|
...account,
|
|
38
38
|
ensName,
|
|
39
39
|
meta: {
|
|
40
|
-
icon: avatarUrl || (isActiveSmartWallet ? smartWalletIcon : walletImage) || ""
|
|
41
|
-
}
|
|
40
|
+
icon: avatarUrl || (isActiveSmartWallet ? smartWalletIcon : walletImage) || "",
|
|
41
|
+
},
|
|
42
42
|
},
|
|
43
43
|
address: account?.address,
|
|
44
44
|
ensName,
|
|
@@ -47,7 +47,7 @@ export function useAccountWallet() {
|
|
|
47
47
|
isActiveSmartWallet: isActiveSmartWallet,
|
|
48
48
|
isActiveEOAWallet: isActiveEOAWallet,
|
|
49
49
|
smartWalletIcon: smartWalletIcon,
|
|
50
|
-
eoaWalletIcon: walletImage
|
|
50
|
+
eoaWalletIcon: walletImage,
|
|
51
51
|
}), [
|
|
52
52
|
account,
|
|
53
53
|
avatarUrl,
|
|
@@ -57,11 +57,11 @@ export function useAccountWallet() {
|
|
|
57
57
|
isActiveEOAWallet,
|
|
58
58
|
isActiveSmartWallet,
|
|
59
59
|
smartWalletIcon,
|
|
60
|
-
walletImage
|
|
60
|
+
walletImage,
|
|
61
61
|
]);
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
console.log(`account`, account);
|
|
64
|
+
console.log(`useAccountWallet`, res);
|
|
65
|
+
}, [account, res]);
|
|
66
66
|
return res;
|
|
67
67
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Chain, Hex, ThirdwebClient } from "thirdweb";
|
|
2
2
|
import { Address } from "viem";
|
|
3
|
-
export declare function useAddTWSessionKey({ onSuccess, onError, refetchSigners, chain }: {
|
|
3
|
+
export declare function useAddTWSessionKey({ onSuccess, onError, refetchSigners, chain, }: {
|
|
4
4
|
chain?: Chain;
|
|
5
5
|
onSuccess: (transactionResult: {
|
|
6
6
|
transactionHash: Hex;
|
|
@@ -11,7 +11,7 @@ export declare function useAddTWSessionKey({ onSuccess, onError, refetchSigners,
|
|
|
11
11
|
onError: (error: Error) => void;
|
|
12
12
|
refetchSigners: () => Promise<any>;
|
|
13
13
|
}): {
|
|
14
|
-
newSessionKey: ({ sessionKeyAddress, approvedTargets, nativeTokenLimitPerTransaction, permissionStartTimestamp, permissionEndTimestamp }: {
|
|
14
|
+
newSessionKey: ({ sessionKeyAddress, approvedTargets, nativeTokenLimitPerTransaction, permissionStartTimestamp, permissionEndTimestamp, }: {
|
|
15
15
|
sessionKeyAddress: Address;
|
|
16
16
|
approvedTargets: Address[];
|
|
17
17
|
nativeTokenLimitPerTransaction: number;
|
|
@@ -4,12 +4,12 @@ import { sendTransaction } from "thirdweb";
|
|
|
4
4
|
import { addSessionKey } from "thirdweb/extensions/erc4337";
|
|
5
5
|
import { useActiveAccount } from "thirdweb/react";
|
|
6
6
|
const debug = createDebug("@@b3:useHandleTWConnect");
|
|
7
|
-
export function useAddTWSessionKey({ onSuccess, onError, refetchSigners, chain }) {
|
|
7
|
+
export function useAddTWSessionKey({ onSuccess, onError, refetchSigners, chain, }) {
|
|
8
8
|
if (!chain) {
|
|
9
9
|
throw new Error("Chain is required");
|
|
10
10
|
}
|
|
11
11
|
const account = useActiveAccount();
|
|
12
|
-
const newSessionKey = async ({ sessionKeyAddress, approvedTargets, nativeTokenLimitPerTransaction, permissionStartTimestamp, permissionEndTimestamp }) => {
|
|
12
|
+
const newSessionKey = async ({ sessionKeyAddress, approvedTargets, nativeTokenLimitPerTransaction, permissionStartTimestamp, permissionEndTimestamp, }) => {
|
|
13
13
|
if (!account || !chain)
|
|
14
14
|
return;
|
|
15
15
|
debug("@@newSessionKey:", {
|
|
@@ -17,14 +17,14 @@ export function useAddTWSessionKey({ onSuccess, onError, refetchSigners, chain }
|
|
|
17
17
|
approvedTargets,
|
|
18
18
|
nativeTokenLimitPerTransaction,
|
|
19
19
|
permissionStartTimestamp,
|
|
20
|
-
permissionEndTimestamp
|
|
20
|
+
permissionEndTimestamp,
|
|
21
21
|
});
|
|
22
22
|
try {
|
|
23
23
|
const transaction = addSessionKey({
|
|
24
24
|
contract: {
|
|
25
25
|
client,
|
|
26
26
|
chain,
|
|
27
|
-
address: account.address
|
|
27
|
+
address: account.address,
|
|
28
28
|
},
|
|
29
29
|
account,
|
|
30
30
|
sessionKeyAddress,
|
|
@@ -32,8 +32,8 @@ export function useAddTWSessionKey({ onSuccess, onError, refetchSigners, chain }
|
|
|
32
32
|
approvedTargets,
|
|
33
33
|
nativeTokenLimitPerTransaction,
|
|
34
34
|
permissionStartTimestamp,
|
|
35
|
-
permissionEndTimestamp
|
|
36
|
-
}
|
|
35
|
+
permissionEndTimestamp,
|
|
36
|
+
},
|
|
37
37
|
});
|
|
38
38
|
debug("@@ecosystem:newSessionKey:transaction:", transaction);
|
|
39
39
|
const transactionResult = await sendTransaction({ transaction, account });
|
|
@@ -23,7 +23,7 @@ export function useAuthentication(partnerId, loginWithSiwe) {
|
|
|
23
23
|
const setIsAuthenticating = useAuthStore(state => state.setIsAuthenticating);
|
|
24
24
|
const { connect } = useConnect(partnerId, b3MainnetThirdWeb);
|
|
25
25
|
const wallet = ecosystemWallet(ecosystemWalletId, {
|
|
26
|
-
partnerId: partnerId
|
|
26
|
+
partnerId: partnerId,
|
|
27
27
|
});
|
|
28
28
|
const { isLoading: useAutoConnectLoading } = useAutoConnect({
|
|
29
29
|
client,
|
|
@@ -60,7 +60,7 @@ export function useAuthentication(partnerId, loginWithSiwe) {
|
|
|
60
60
|
setIsAuthenticated(false);
|
|
61
61
|
setUser();
|
|
62
62
|
}
|
|
63
|
-
}
|
|
63
|
+
},
|
|
64
64
|
});
|
|
65
65
|
// Ensure isAuthenticating stays true until we're fully ready
|
|
66
66
|
useEffect(() => {
|
|
@@ -111,6 +111,6 @@ export function useAuthentication(partnerId, loginWithSiwe) {
|
|
|
111
111
|
isReady,
|
|
112
112
|
wallet,
|
|
113
113
|
preAuthenticate,
|
|
114
|
-
connect
|
|
114
|
+
connect,
|
|
115
115
|
};
|
|
116
116
|
}
|
|
@@ -10,13 +10,13 @@ const abi = [
|
|
|
10
10
|
name: "balanceOf",
|
|
11
11
|
outputs: [{ name: "", type: "uint256" }],
|
|
12
12
|
stateMutability: "view",
|
|
13
|
-
type: "function"
|
|
14
|
-
}
|
|
13
|
+
type: "function",
|
|
14
|
+
},
|
|
15
15
|
];
|
|
16
16
|
// Create a public client for Base
|
|
17
17
|
const client = createPublicClient({
|
|
18
18
|
chain: base,
|
|
19
|
-
transport: http()
|
|
19
|
+
transport: http(),
|
|
20
20
|
});
|
|
21
21
|
async function fetchB3Balances(addresses) {
|
|
22
22
|
try {
|
|
@@ -26,12 +26,12 @@ async function fetchB3Balances(addresses) {
|
|
|
26
26
|
address: B3_TOKEN.address,
|
|
27
27
|
abi,
|
|
28
28
|
functionName: "balanceOf",
|
|
29
|
-
args: [address]
|
|
29
|
+
args: [address],
|
|
30
30
|
});
|
|
31
31
|
return {
|
|
32
32
|
address,
|
|
33
33
|
balance,
|
|
34
|
-
formatted: formatUnits(balance, B3_TOKEN.decimals)
|
|
34
|
+
formatted: formatUnits(balance, B3_TOKEN.decimals),
|
|
35
35
|
};
|
|
36
36
|
}));
|
|
37
37
|
// Calculate total
|
|
@@ -39,7 +39,7 @@ async function fetchB3Balances(addresses) {
|
|
|
39
39
|
return {
|
|
40
40
|
totalBalance,
|
|
41
41
|
formattedTotal: formatNumber(Number(formatUnits(totalBalance, B3_TOKEN.decimals))),
|
|
42
|
-
breakdown: balances
|
|
42
|
+
breakdown: balances,
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
catch (error) {
|
|
@@ -61,7 +61,7 @@ export function useB3BalanceFromAddresses(addresses, options) {
|
|
|
61
61
|
queryFn: () => fetchB3Balances(normalizedAddresses),
|
|
62
62
|
enabled: (options?.enabled ?? true) && normalizedAddresses.length > 0,
|
|
63
63
|
refetchInterval: options?.refetchInterval ?? 30000, // Default 30s refresh
|
|
64
|
-
staleTime: 10000 // Consider data stale after 10s
|
|
64
|
+
staleTime: 10000, // Consider data stale after 10s
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
export default useB3BalanceFromAddresses;
|
|
@@ -3,4 +3,11 @@ export declare const useB3EnsName: () => {
|
|
|
3
3
|
getEns: (address: string) => Promise<{
|
|
4
4
|
name: string;
|
|
5
5
|
}>;
|
|
6
|
+
lookupEnsName: (name: `${string}.b3.fun`) => Promise<{
|
|
7
|
+
name: string;
|
|
8
|
+
owner: `0x${string}`;
|
|
9
|
+
addresses: Record<string, `0x${string}`>;
|
|
10
|
+
createdAt: number;
|
|
11
|
+
updatedAt: number;
|
|
12
|
+
}>;
|
|
6
13
|
};
|
|
@@ -2,11 +2,11 @@ import { ENS_GATEWAY_URL } from "../../../shared/constants/index.js";
|
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
export const useB3EnsName = () => {
|
|
4
4
|
const registerEns = async (name, address, hash) => {
|
|
5
|
-
const message = `Register ${name}`;
|
|
5
|
+
const message = `Register "${name}"`;
|
|
6
6
|
const response = await fetch(ENS_GATEWAY_URL + "set", {
|
|
7
7
|
method: "POST",
|
|
8
8
|
headers: {
|
|
9
|
-
"Content-Type": "application/json"
|
|
9
|
+
"Content-Type": "application/json",
|
|
10
10
|
},
|
|
11
11
|
body: JSON.stringify({
|
|
12
12
|
name: name,
|
|
@@ -14,9 +14,9 @@ export const useB3EnsName = () => {
|
|
|
14
14
|
addresses: { "60": address.toLowerCase() },
|
|
15
15
|
signature: {
|
|
16
16
|
message: message,
|
|
17
|
-
hash: hash
|
|
18
|
-
}
|
|
19
|
-
})
|
|
17
|
+
hash: hash,
|
|
18
|
+
},
|
|
19
|
+
}),
|
|
20
20
|
});
|
|
21
21
|
return response;
|
|
22
22
|
};
|
|
@@ -28,8 +28,17 @@ export const useB3EnsName = () => {
|
|
|
28
28
|
const data = await response.json();
|
|
29
29
|
return data;
|
|
30
30
|
};
|
|
31
|
+
const lookupEnsName = async (name) => {
|
|
32
|
+
const response = await fetch(`${ENS_GATEWAY_URL}get/${name}`);
|
|
33
|
+
if (!response.ok) {
|
|
34
|
+
throw new Error(`Failed to fetch ENS lookup: ${response.statusText}`);
|
|
35
|
+
}
|
|
36
|
+
const data = await response.json();
|
|
37
|
+
return data;
|
|
38
|
+
};
|
|
31
39
|
return useMemo(() => ({
|
|
32
40
|
registerEns,
|
|
33
|
-
getEns
|
|
41
|
+
getEns,
|
|
42
|
+
lookupEnsName,
|
|
34
43
|
}), []);
|
|
35
44
|
};
|
|
@@ -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 {};
|
|
@@ -19,7 +19,7 @@ const supportedSprinterTokenSymbols = ["ETH", "USDC", "WETH"];
|
|
|
19
19
|
* - sprinterOptions: Available chains and balances for bridging
|
|
20
20
|
* @returns TransactionPathResult object containing path information and loading state
|
|
21
21
|
*/
|
|
22
|
-
export function useBestTransactionPath({ amount, token, address, transactionType: _transactionType = "send" }) {
|
|
22
|
+
export function useBestTransactionPath({ amount, token, address, transactionType: _transactionType = "send", }) {
|
|
23
23
|
const account = useAccountWallet();
|
|
24
24
|
const effectiveAddress = address || account?.address;
|
|
25
25
|
const isSupportedSprinterToken = supportedSprinterTokenSymbols.includes(token.symbol.toUpperCase());
|
|
@@ -28,7 +28,7 @@ export function useBestTransactionPath({ amount, token, address, transactionType
|
|
|
28
28
|
// Get the token balance using our new hook
|
|
29
29
|
const { rawBalance, isLoading: tokenBalanceLoading } = useTokenBalance({
|
|
30
30
|
token,
|
|
31
|
-
address: effectiveAddress
|
|
31
|
+
address: effectiveAddress,
|
|
32
32
|
});
|
|
33
33
|
// Check if amount is available natively on destination chain
|
|
34
34
|
const hasNativeBalance = useMemo(() => {
|
|
@@ -60,7 +60,7 @@ export function useBestTransactionPath({ amount, token, address, transactionType
|
|
|
60
60
|
isSupportedSprinterToken,
|
|
61
61
|
oneBalanceLoading,
|
|
62
62
|
aggregatedBalances,
|
|
63
|
-
rawBalance
|
|
63
|
+
rawBalance,
|
|
64
64
|
]);
|
|
65
65
|
const totalCrossChainBalance = useMemo(() => {
|
|
66
66
|
if (oneBalanceLoading || !aggregatedTokenBalances || !token.symbol)
|
|
@@ -84,13 +84,13 @@ export function useBestTransactionPath({ amount, token, address, transactionType
|
|
|
84
84
|
options.push({
|
|
85
85
|
chainId: chainBalance.chainId,
|
|
86
86
|
balance: balanceBi,
|
|
87
|
-
formattedBalance: formatUnits(balanceBi, chainBalance.tokenDecimals)
|
|
87
|
+
formattedBalance: formatUnits(balanceBi, chainBalance.tokenDecimals),
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
return {
|
|
92
92
|
hasSprinterPath: options.length > 0,
|
|
93
|
-
sprinterOptions: options
|
|
93
|
+
sprinterOptions: options,
|
|
94
94
|
};
|
|
95
95
|
}, [isSupportedSprinterToken, oneBalanceLoading, aggregatedBalances, token.symbol, token.chainId, amount]);
|
|
96
96
|
// Determine the best path
|
|
@@ -104,7 +104,7 @@ export function useBestTransactionPath({ amount, token, address, transactionType
|
|
|
104
104
|
hasSprinterPath,
|
|
105
105
|
availableBalance,
|
|
106
106
|
totalCrossChainBalance,
|
|
107
|
-
sprinterOptions
|
|
107
|
+
sprinterOptions,
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
110
|
// Case 2: Sprinter path if available
|
|
@@ -115,7 +115,7 @@ export function useBestTransactionPath({ amount, token, address, transactionType
|
|
|
115
115
|
hasSprinterPath: true,
|
|
116
116
|
availableBalance,
|
|
117
117
|
totalCrossChainBalance,
|
|
118
|
-
sprinterOptions
|
|
118
|
+
sprinterOptions,
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
121
|
// Case 3: Fallback to anyspend
|
|
@@ -125,7 +125,7 @@ export function useBestTransactionPath({ amount, token, address, transactionType
|
|
|
125
125
|
hasSprinterPath: false,
|
|
126
126
|
availableBalance,
|
|
127
127
|
totalCrossChainBalance,
|
|
128
|
-
sprinterOptions: []
|
|
128
|
+
sprinterOptions: [],
|
|
129
129
|
};
|
|
130
130
|
}, [
|
|
131
131
|
token.address,
|
|
@@ -134,12 +134,12 @@ export function useBestTransactionPath({ amount, token, address, transactionType
|
|
|
134
134
|
hasNativeBalance,
|
|
135
135
|
hasSprinterPath,
|
|
136
136
|
totalCrossChainBalance,
|
|
137
|
-
sprinterOptions
|
|
137
|
+
sprinterOptions,
|
|
138
138
|
]);
|
|
139
139
|
// Combine all loading states
|
|
140
140
|
const loading = oneBalanceLoading || tokenBalanceLoading;
|
|
141
141
|
return {
|
|
142
142
|
...path,
|
|
143
|
-
loading
|
|
143
|
+
loading,
|
|
144
144
|
};
|
|
145
145
|
}
|
|
@@ -49,9 +49,9 @@ export function useChainSwitchWithAction() {
|
|
|
49
49
|
nativeCurrency: {
|
|
50
50
|
name: nativeCurrency.name,
|
|
51
51
|
symbol: nativeCurrency.symbol,
|
|
52
|
-
decimals: nativeCurrency.decimals
|
|
53
|
-
}
|
|
54
|
-
}
|
|
52
|
+
decimals: nativeCurrency.decimals,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
55
|
});
|
|
56
56
|
await run(() => action(walletClient));
|
|
57
57
|
}
|
|
@@ -14,7 +14,7 @@ export function useClaim({ contractAddress, quantity = 1, chain, to, tokenId })
|
|
|
14
14
|
const contract = getContract({
|
|
15
15
|
client,
|
|
16
16
|
chain,
|
|
17
|
-
address: contractAddress
|
|
17
|
+
address: contractAddress,
|
|
18
18
|
});
|
|
19
19
|
// If tokenId is provided, use ERC1155 claim
|
|
20
20
|
const transaction = tokenId !== undefined
|
|
@@ -22,16 +22,16 @@ export function useClaim({ contractAddress, quantity = 1, chain, to, tokenId })
|
|
|
22
22
|
contract,
|
|
23
23
|
to,
|
|
24
24
|
quantity: BigInt(quantity),
|
|
25
|
-
tokenId: BigInt(tokenId)
|
|
25
|
+
tokenId: BigInt(tokenId),
|
|
26
26
|
})
|
|
27
27
|
: claimTo721({
|
|
28
28
|
contract,
|
|
29
29
|
to,
|
|
30
|
-
quantity: BigInt(quantity)
|
|
30
|
+
quantity: BigInt(quantity),
|
|
31
31
|
});
|
|
32
32
|
const tx = await sendTransaction({
|
|
33
33
|
transaction,
|
|
34
|
-
account
|
|
34
|
+
account,
|
|
35
35
|
});
|
|
36
36
|
return tx.transactionHash;
|
|
37
37
|
}
|
|
@@ -26,17 +26,17 @@ export function useConnect(partnerId, chain) {
|
|
|
26
26
|
debug("@@useConnect:strategyOptions", {
|
|
27
27
|
partnerId,
|
|
28
28
|
strategyOptions,
|
|
29
|
-
clientId: THIRDWEB_CLIENT_ID
|
|
29
|
+
clientId: THIRDWEB_CLIENT_ID,
|
|
30
30
|
});
|
|
31
31
|
// Create a wallet for "Allowlist" ecosystems restricted to partners
|
|
32
32
|
const wallet = ecosystemWallet(ecosystemWalletId, {
|
|
33
|
-
partnerId: partnerId
|
|
33
|
+
partnerId: partnerId,
|
|
34
34
|
});
|
|
35
35
|
const connect = await wallet.connect({
|
|
36
36
|
client,
|
|
37
37
|
chain,
|
|
38
38
|
// This is the payload that is sent to the auth endpoint
|
|
39
|
-
...strategyOptions
|
|
39
|
+
...strategyOptions,
|
|
40
40
|
});
|
|
41
41
|
debug("@@useConnect:connect:", connect);
|
|
42
42
|
setIsLoading(false);
|
|
@@ -9,19 +9,19 @@ async function fetchExchangeRate(baseCurrency, quoteCurrency) {
|
|
|
9
9
|
return parseFloat(data.data.rates[quoteCurrency]);
|
|
10
10
|
}
|
|
11
11
|
export function useExchangeRate({ baseCurrency, quoteCurrency, refreshInterval = 30000 }) {
|
|
12
|
-
const { data: rate = 0, isLoading, error, refetch } = useQuery({
|
|
12
|
+
const { data: rate = 0, isLoading, error, refetch, } = useQuery({
|
|
13
13
|
queryKey: ["exchangeRate", baseCurrency, quoteCurrency],
|
|
14
14
|
queryFn: () => fetchExchangeRate(baseCurrency, quoteCurrency),
|
|
15
15
|
refetchInterval: refreshInterval,
|
|
16
16
|
staleTime: refreshInterval / 2, // Consider data stale after half the refresh interval
|
|
17
17
|
retry: 3,
|
|
18
|
-
retryDelay: attemptIndex => Math.min(1000 * 2 ** attemptIndex, 30000)
|
|
18
|
+
retryDelay: attemptIndex => Math.min(1000 * 2 ** attemptIndex, 30000),
|
|
19
19
|
});
|
|
20
20
|
return {
|
|
21
21
|
rate,
|
|
22
22
|
isLoading,
|
|
23
23
|
error,
|
|
24
|
-
refetch
|
|
24
|
+
refetch,
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
export default useExchangeRate;
|
|
@@ -16,8 +16,8 @@ export function useGetAllTWSigners({ chain, accountAddress, queryOptions }) {
|
|
|
16
16
|
contract: {
|
|
17
17
|
client,
|
|
18
18
|
chain,
|
|
19
|
-
address: accountAddress
|
|
20
|
-
}
|
|
19
|
+
address: accountAddress,
|
|
20
|
+
},
|
|
21
21
|
});
|
|
22
22
|
// Wait half a second for the sync, this is a hack
|
|
23
23
|
await new Promise(resolve => setTimeout(resolve, 500));
|
|
@@ -27,8 +27,8 @@ export function useGetAllTWSigners({ chain, accountAddress, queryOptions }) {
|
|
|
27
27
|
const response = await fetch(`https://partner-session-keys-production.sean-430.workers.dev/?address=${accountAddress}×tamp=${Date.now()}`, {
|
|
28
28
|
method: "GET",
|
|
29
29
|
headers: {
|
|
30
|
-
"Content-Type": "application/json"
|
|
31
|
-
}
|
|
30
|
+
"Content-Type": "application/json",
|
|
31
|
+
},
|
|
32
32
|
});
|
|
33
33
|
if (response.ok) {
|
|
34
34
|
const data = (await response.json());
|
|
@@ -55,9 +55,9 @@ export function useGetAllTWSigners({ chain, accountAddress, queryOptions }) {
|
|
|
55
55
|
metadata,
|
|
56
56
|
partner: {
|
|
57
57
|
id: metadata?.partnerId || signer.signer,
|
|
58
|
-
name: metadata?.partnerInfo?.name || ""
|
|
58
|
+
name: metadata?.partnerInfo?.name || "",
|
|
59
59
|
},
|
|
60
|
-
createdAt: metadata ? new Date(metadata.timestamp).toISOString() : ""
|
|
60
|
+
createdAt: metadata ? new Date(metadata.timestamp).toISOString() : "",
|
|
61
61
|
};
|
|
62
62
|
});
|
|
63
63
|
return result;
|
|
@@ -66,6 +66,6 @@ export function useGetAllTWSigners({ chain, accountAddress, queryOptions }) {
|
|
|
66
66
|
refetchOnMount: true,
|
|
67
67
|
refetchOnWindowFocus: true,
|
|
68
68
|
refetchOnReconnect: true,
|
|
69
|
-
staleTime: 0 // Consider data stale immediately
|
|
69
|
+
staleTime: 0, // Consider data stale immediately
|
|
70
70
|
});
|
|
71
71
|
}
|
|
@@ -9,7 +9,7 @@ async function fetchGeoData() {
|
|
|
9
9
|
return response.json();
|
|
10
10
|
}
|
|
11
11
|
export function useGetGeo() {
|
|
12
|
-
const { data: geoData, isLoading: loading, error } = useQuery({ queryKey: ["useGetGeo"], queryFn: fetchGeoData, retry: 3 });
|
|
12
|
+
const { data: geoData, isLoading: loading, error, } = useQuery({ queryKey: ["useGetGeo"], queryFn: fetchGeoData, retry: 3 });
|
|
13
13
|
if (error) {
|
|
14
14
|
debug("@@useGetGeo error fetching geo data", error);
|
|
15
15
|
}
|