@b3dotfun/sdk 0.0.7-alpha.27 → 0.0.7-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/anyspend/abis/abi-usdc-base.js +97 -97
- package/dist/cjs/anyspend/abis/erc20-staking.js +51 -51
- package/dist/cjs/anyspend/constants/index.js +10 -13
- package/dist/cjs/anyspend/index.d.ts +2 -4
- 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 +68 -69
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +66 -68
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +4 -4
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +101 -158
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +2 -3
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +5 -7
- package/dist/cjs/anyspend/react/components/AnySpendNFTButton.js +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +20 -21
- package/dist/cjs/anyspend/react/components/AnySpendTournament.js +4 -7
- package/dist/cjs/anyspend/react/components/common/ChainTokenIcon.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/ChainTokenIcon.js +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +62 -51
- 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 +14 -15
- 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 +25 -26
- package/dist/cjs/anyspend/react/components/common/TokenBalance.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/TokenBalance.js +2 -2
- package/dist/cjs/anyspend/react/components/index.d.ts +0 -2
- package/dist/cjs/anyspend/react/components/index.js +1 -5
- 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 +1 -0
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.js +25 -26
- package/dist/cjs/anyspend/react/hooks/index.d.ts +2 -1
- package/dist/cjs/anyspend/react/hooks/index.js +2 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +18 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +0 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.js +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +70 -14
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +70 -14
- 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/useAnyspendSendPermitData.d.ts +16 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendSendPermitData.js +39 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendTokens.js +3 -3
- package/dist/cjs/anyspend/react/hooks/useCoinbaseOnrampOptions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useGeoOnrampOptions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useGetGeo.js +1 -1
- package/dist/cjs/anyspend/react/hooks/usePermitData.d.ts +92 -0
- package/dist/cjs/anyspend/react/hooks/usePermitData.js +158 -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 +6 -7
- package/dist/cjs/anyspend/services/anyspend.d.ts +40 -9
- package/dist/cjs/anyspend/services/anyspend.js +24 -11
- 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/nft.d.ts +0 -7
- package/dist/cjs/anyspend/types/nft.js +6 -8
- package/dist/cjs/anyspend/types/onramp.d.ts +0 -3
- package/dist/cjs/anyspend/types/onramp.js +1 -2
- package/dist/cjs/anyspend/types/order.d.ts +200 -40
- package/dist/cjs/anyspend/types/order.js +12 -7
- package/dist/cjs/anyspend/types/permit.d.ts +21 -0
- package/dist/cjs/anyspend/types/permit.js +11 -0
- package/dist/cjs/anyspend/types/req-res/createOrder.d.ts +235 -98
- package/dist/cjs/anyspend/types/req-res/createOrder.js +9 -9
- package/dist/cjs/anyspend/types/req-res/getCoinbaseOnrampOptions.js +5 -5
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.d.ts +305 -63
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.js +4 -4
- package/dist/cjs/anyspend/types/req-res/getOrderByCreator.js +2 -2
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.d.ts +235 -49
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.js +1 -1
- package/dist/cjs/anyspend/types/req-res/getQuote.d.ts +0 -37
- package/dist/cjs/anyspend/types/req-res/getQuote.js +9 -14
- package/dist/cjs/anyspend/types/req-res/getTokenList.js +3 -3
- package/dist/cjs/anyspend/types/req-res/index.d.ts +1 -0
- package/dist/cjs/anyspend/types/req-res/index.js +1 -0
- package/dist/cjs/anyspend/types/req-res/sendPermitData.d.ts +66 -0
- package/dist/cjs/anyspend/types/req-res/sendPermitData.js +11 -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 +6 -2
- package/dist/cjs/anyspend/utils/orderPayload.d.ts +3 -3
- package/dist/cjs/anyspend/utils/orderPayload.js +8 -22
- package/dist/cjs/anyspend/utils/token.js +10 -10
- package/dist/cjs/global-account/app.js +4 -4
- package/dist/cjs/global-account/app.native.js +4 -4
- package/dist/cjs/global-account/bsmnt.js +4 -4
- package/dist/cjs/global-account/bsmnt.native.js +4 -4
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +3 -13
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +3 -3
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +16 -17
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.d.ts +2 -2
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +4 -4
- package/dist/cjs/global-account/react/components/B3Provider/types.js +1 -1
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.js +5 -5
- package/dist/cjs/global-account/react/components/MintButton/MintButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/MintButton/MintButton.js +5 -5
- package/dist/cjs/global-account/react/components/RelayKitProviderWrapper.js +2 -2
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +1 -1
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.js +5 -5
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissionsButton.js +2 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +2 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.js +17 -12
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +12 -12
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/WalletRow.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.js +9 -9
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +2 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.js +2 -2
- package/dist/cjs/global-account/react/components/StyleRoot.js +1 -0
- package/dist/cjs/global-account/react/components/Transak/TransakModal.js +4 -4
- package/dist/cjs/global-account/react/components/custom/Button.js +5 -5
- package/dist/cjs/global-account/react/components/custom/StaggeredFadeLoader.js +3 -3
- package/dist/cjs/global-account/react/components/index.d.ts +4 -4
- package/dist/cjs/global-account/react/components/magicui/AnimatedLottie.js +1 -1
- package/dist/cjs/global-account/react/components/ui/Loading.js +2 -2
- package/dist/cjs/global-account/react/components/ui/ShinyButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/ShinyButton.js +3 -3
- package/dist/cjs/global-account/react/components/ui/TabSystem.js +1 -1
- package/dist/cjs/global-account/react/components/ui/Tabs.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/Tabs.js +1 -1
- package/dist/cjs/global-account/react/components/ui/badge.js +4 -4
- package/dist/cjs/global-account/react/components/ui/button.js +5 -5
- package/dist/cjs/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/dialog.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/glare-card-rounded.js +12 -12
- package/dist/cjs/global-account/react/components/ui/glare-card.js +11 -11
- package/dist/cjs/global-account/react/components/ui/input.js +1 -1
- package/dist/cjs/global-account/react/components/ui/text-loop.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/text-loop.js +2 -2
- package/dist/cjs/global-account/react/components/ui/text-shimmer.js +2 -2
- package/dist/cjs/global-account/react/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 +4 -8
- package/dist/cjs/global-account/react/hooks/useB3EnsName.js +23 -32
- package/dist/cjs/global-account/react/hooks/useBestTransactionPath.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useBestTransactionPath.js +10 -10
- package/dist/cjs/global-account/react/hooks/useBsmntProfile.js +1 -1
- package/dist/cjs/global-account/react/hooks/useChainSwitchWithAction.js +3 -3
- package/dist/cjs/global-account/react/hooks/useClaim.js +4 -4
- package/dist/cjs/global-account/react/hooks/useConnect.js +3 -3
- package/dist/cjs/global-account/react/hooks/useExchangeRate.js +3 -3
- package/dist/cjs/global-account/react/hooks/useGetAllTWSigners.js +7 -7
- package/dist/cjs/global-account/react/hooks/useGetGeo.js +1 -1
- package/dist/cjs/global-account/react/hooks/useHandleConnectWithPrivy.js +2 -2
- package/dist/cjs/global-account/react/hooks/useNativeBalance.js +6 -6
- package/dist/cjs/global-account/react/hooks/useOnchainName.js +10 -10
- package/dist/cjs/global-account/react/hooks/useOneBalance.js +2 -2
- package/dist/cjs/global-account/react/hooks/useRemoveSessionKey.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useRemoveSessionKey.js +3 -3
- package/dist/cjs/global-account/react/hooks/useRouter.js +6 -6
- package/dist/cjs/global-account/react/hooks/useSiwe.js +4 -4
- package/dist/cjs/global-account/react/hooks/useTokenBalance.js +6 -6
- package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.js +9 -9
- package/dist/cjs/global-account/react/hooks/useTokenData.js +3 -3
- package/dist/cjs/global-account/react/hooks/useTokenFromUrl.js +14 -14
- package/dist/cjs/global-account/react/hooks/useTokenPrice.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokenPrice.js +6 -6
- package/dist/cjs/global-account/react/hooks/useTokenPriceWithFallback.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokenPriceWithFallback.js +7 -7
- package/dist/cjs/global-account/react/hooks/useTokensFromAddress.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokensFromAddress.js +2 -2
- package/dist/cjs/global-account/react/hooks/useURLParams.js +1 -1
- package/dist/cjs/global-account/react/stores/index.d.ts +1 -1
- package/dist/cjs/global-account/react/stores/useAuthStore.js +3 -3
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +1 -18
- package/dist/cjs/global-account/react/stores/useModalStore.js +3 -3
- package/dist/cjs/global-account/server.js +3 -3
- package/dist/cjs/global-account/types/chain-networks.js +8 -8
- package/dist/cjs/global-account/types/feature-flags.js +1 -1
- package/dist/cjs/shared/constants/chains/b3Chain.js +35 -35
- package/dist/cjs/shared/constants/chains/chainPlatformMap.js +1 -1
- package/dist/cjs/shared/constants/chains/supported.js +1 -1
- package/dist/cjs/shared/constants/index.d.ts +0 -1
- package/dist/cjs/shared/constants/index.js +2 -3
- package/dist/cjs/shared/thirdweb/initiateClient.js +2 -2
- package/dist/cjs/shared/thirdweb/openapi-ts.config.js +1 -1
- package/dist/cjs/shared/utils/b3Ens.js +4 -4
- package/dist/cjs/shared/utils/chain-transformers.js +9 -9
- package/dist/cjs/shared/utils/fetchBalances.js +4 -4
- package/dist/cjs/shared/utils/index.d.ts +0 -9
- package/dist/cjs/shared/utils/index.js +0 -17
- package/dist/cjs/shared/utils/insights.js +28 -28
- package/dist/cjs/shared/utils/ipfs.js +1 -1
- package/dist/cjs/shared/utils/number.js +3 -3
- package/dist/cjs/shared/utils/simplehash.js +22 -22
- package/dist/cjs/shared/utils/thirdweb-insights.js +15 -15
- package/dist/esm/anyspend/abis/abi-usdc-base.js +97 -97
- package/dist/esm/anyspend/abis/erc20-staking.js +51 -51
- package/dist/esm/anyspend/constants/index.js +10 -13
- package/dist/esm/anyspend/index.d.ts +2 -4
- 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 +22 -23
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +39 -41
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +4 -4
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +81 -138
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +2 -3
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +5 -7
- package/dist/esm/anyspend/react/components/AnySpendNFTButton.js +1 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +21 -22
- package/dist/esm/anyspend/react/components/AnySpendTournament.js +4 -7
- package/dist/esm/anyspend/react/components/common/ChainTokenIcon.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/ChainTokenIcon.js +1 -1
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +63 -52
- 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 +8 -9
- 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 +13 -14
- package/dist/esm/anyspend/react/components/common/TokenBalance.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/TokenBalance.js +2 -2
- package/dist/esm/anyspend/react/components/index.d.ts +0 -2
- package/dist/esm/anyspend/react/components/index.js +0 -2
- 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 +1 -0
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +1 -1
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.js +15 -16
- package/dist/esm/anyspend/react/hooks/index.d.ts +2 -1
- package/dist/esm/anyspend/react/hooks/index.js +2 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +18 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +6 -6
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +0 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.js +7 -7
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +70 -14
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +70 -14
- 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/useAnyspendSendPermitData.d.ts +16 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendSendPermitData.js +36 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendTokens.js +3 -3
- package/dist/esm/anyspend/react/hooks/useCoinbaseOnrampOptions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useGeoOnrampOptions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useGetGeo.js +1 -1
- package/dist/esm/anyspend/react/hooks/usePermitData.d.ts +92 -0
- package/dist/esm/anyspend/react/hooks/usePermitData.js +154 -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 +4 -5
- package/dist/esm/anyspend/services/anyspend.d.ts +40 -9
- package/dist/esm/anyspend/services/anyspend.js +25 -12
- 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/nft.d.ts +0 -7
- package/dist/esm/anyspend/types/nft.js +6 -8
- package/dist/esm/anyspend/types/onramp.d.ts +0 -3
- package/dist/esm/anyspend/types/onramp.js +1 -2
- package/dist/esm/anyspend/types/order.d.ts +200 -40
- package/dist/esm/anyspend/types/order.js +12 -7
- package/dist/esm/anyspend/types/permit.d.ts +21 -0
- package/dist/esm/anyspend/types/permit.js +8 -0
- package/dist/esm/anyspend/types/req-res/createOrder.d.ts +235 -98
- package/dist/esm/anyspend/types/req-res/createOrder.js +9 -9
- package/dist/esm/anyspend/types/req-res/getCoinbaseOnrampOptions.js +5 -5
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.d.ts +305 -63
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.js +4 -4
- package/dist/esm/anyspend/types/req-res/getOrderByCreator.js +2 -2
- package/dist/esm/anyspend/types/req-res/getOrderHistory.d.ts +235 -49
- package/dist/esm/anyspend/types/req-res/getOrderHistory.js +1 -1
- package/dist/esm/anyspend/types/req-res/getQuote.d.ts +0 -37
- package/dist/esm/anyspend/types/req-res/getQuote.js +9 -14
- package/dist/esm/anyspend/types/req-res/getTokenList.js +3 -3
- package/dist/esm/anyspend/types/req-res/index.d.ts +1 -0
- package/dist/esm/anyspend/types/req-res/index.js +1 -0
- package/dist/esm/anyspend/types/req-res/sendPermitData.d.ts +66 -0
- package/dist/esm/anyspend/types/req-res/sendPermitData.js +8 -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 +6 -2
- package/dist/esm/anyspend/utils/orderPayload.d.ts +3 -3
- package/dist/esm/anyspend/utils/orderPayload.js +9 -23
- package/dist/esm/anyspend/utils/token.js +10 -10
- package/dist/esm/global-account/app.js +4 -4
- package/dist/esm/global-account/app.native.js +4 -4
- package/dist/esm/global-account/bsmnt.js +4 -4
- package/dist/esm/global-account/bsmnt.native.js +4 -4
- package/dist/esm/global-account/react/components/B3DynamicModal.js +4 -14
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +3 -3
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +7 -8
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.d.ts +2 -2
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +4 -4
- package/dist/esm/global-account/react/components/B3Provider/types.js +1 -1
- package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -1
- package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.js +6 -6
- package/dist/esm/global-account/react/components/MintButton/MintButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/MintButton/MintButton.js +5 -5
- package/dist/esm/global-account/react/components/RelayKitProviderWrapper.js +2 -2
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +1 -1
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissions.js +6 -6
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissionsButton.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +2 -1
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.js +13 -8
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +13 -13
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.js +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/WalletRow.js +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.js +9 -9
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +3 -3
- package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.js +2 -2
- package/dist/esm/global-account/react/components/StyleRoot.js +1 -0
- package/dist/esm/global-account/react/components/Transak/TransakModal.js +4 -4
- package/dist/esm/global-account/react/components/custom/Button.js +5 -5
- package/dist/esm/global-account/react/components/custom/StaggeredFadeLoader.js +3 -3
- package/dist/esm/global-account/react/components/custom/WalletConnectorIcon.js +1 -1
- package/dist/esm/global-account/react/components/index.d.ts +4 -4
- package/dist/esm/global-account/react/components/index.js +4 -4
- package/dist/esm/global-account/react/components/magicui/AnimatedLottie.js +1 -1
- package/dist/esm/global-account/react/components/ui/Loading.js +2 -2
- package/dist/esm/global-account/react/components/ui/ShinyButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/ShinyButton.js +3 -3
- package/dist/esm/global-account/react/components/ui/TabSystem.js +1 -1
- package/dist/esm/global-account/react/components/ui/Tabs.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/Tabs.js +1 -1
- package/dist/esm/global-account/react/components/ui/badge.js +4 -4
- package/dist/esm/global-account/react/components/ui/button.js +5 -5
- package/dist/esm/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/command.js +1 -1
- package/dist/esm/global-account/react/components/ui/dialog.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/dialog.js +1 -1
- package/dist/esm/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/drawer.js +1 -1
- package/dist/esm/global-account/react/components/ui/glare-card-rounded.js +12 -12
- package/dist/esm/global-account/react/components/ui/glare-card.js +11 -11
- package/dist/esm/global-account/react/components/ui/input.js +1 -1
- package/dist/esm/global-account/react/components/ui/text-loop.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/text-loop.js +2 -2
- package/dist/esm/global-account/react/components/ui/text-shimmer.js +2 -2
- package/dist/esm/global-account/react/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 +4 -8
- package/dist/esm/global-account/react/hooks/useB3EnsName.js +22 -34
- package/dist/esm/global-account/react/hooks/useBestTransactionPath.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useBestTransactionPath.js +10 -10
- package/dist/esm/global-account/react/hooks/useBsmntProfile.js +1 -1
- package/dist/esm/global-account/react/hooks/useChainSwitchWithAction.js +3 -3
- package/dist/esm/global-account/react/hooks/useClaim.js +4 -4
- package/dist/esm/global-account/react/hooks/useConnect.js +3 -3
- package/dist/esm/global-account/react/hooks/useExchangeRate.js +3 -3
- package/dist/esm/global-account/react/hooks/useGetAllTWSigners.js +7 -7
- package/dist/esm/global-account/react/hooks/useGetGeo.js +1 -1
- package/dist/esm/global-account/react/hooks/useHandleConnectWithPrivy.js +2 -2
- package/dist/esm/global-account/react/hooks/useNativeBalance.js +6 -6
- package/dist/esm/global-account/react/hooks/useOnchainName.js +10 -10
- package/dist/esm/global-account/react/hooks/useOneBalance.js +2 -2
- package/dist/esm/global-account/react/hooks/useRemoveSessionKey.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useRemoveSessionKey.js +3 -3
- package/dist/esm/global-account/react/hooks/useRouter.js +6 -6
- package/dist/esm/global-account/react/hooks/useSiwe.js +4 -4
- package/dist/esm/global-account/react/hooks/useTokenBalance.js +6 -6
- package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.js +9 -9
- package/dist/esm/global-account/react/hooks/useTokenData.js +3 -3
- package/dist/esm/global-account/react/hooks/useTokenFromUrl.js +13 -13
- package/dist/esm/global-account/react/hooks/useTokenPrice.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokenPrice.js +6 -6
- package/dist/esm/global-account/react/hooks/useTokenPriceWithFallback.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokenPriceWithFallback.js +7 -7
- package/dist/esm/global-account/react/hooks/useTokensFromAddress.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokensFromAddress.js +2 -2
- package/dist/esm/global-account/react/hooks/useURLParams.js +1 -1
- package/dist/esm/global-account/react/stores/index.d.ts +1 -1
- package/dist/esm/global-account/react/stores/useAuthStore.js +3 -3
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +1 -18
- package/dist/esm/global-account/react/stores/useModalStore.js +3 -3
- package/dist/esm/global-account/server.js +3 -3
- package/dist/esm/global-account/types/chain-networks.js +8 -8
- package/dist/esm/global-account/types/feature-flags.js +1 -1
- package/dist/esm/shared/constants/chains/b3Chain.js +35 -35
- package/dist/esm/shared/constants/chains/chainPlatformMap.js +1 -1
- package/dist/esm/shared/constants/chains/supported.js +1 -1
- package/dist/esm/shared/constants/index.d.ts +0 -1
- package/dist/esm/shared/constants/index.js +1 -2
- package/dist/esm/shared/thirdweb/initiateClient.js +2 -2
- package/dist/esm/shared/thirdweb/openapi-ts.config.js +1 -1
- package/dist/esm/shared/utils/b3Ens.js +4 -4
- package/dist/esm/shared/utils/chain-transformers.js +9 -9
- package/dist/esm/shared/utils/fetchBalances.js +4 -4
- package/dist/esm/shared/utils/index.d.ts +0 -9
- package/dist/esm/shared/utils/index.js +0 -15
- package/dist/esm/shared/utils/insights.js +28 -28
- package/dist/esm/shared/utils/ipfs.js +1 -1
- package/dist/esm/shared/utils/number.js +3 -3
- package/dist/esm/shared/utils/simplehash.js +23 -23
- package/dist/esm/shared/utils/thirdweb-insights.js +15 -15
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/index.d.ts +2 -4
- package/dist/types/anyspend/react/components/AnySpend.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +4 -4
- package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +2 -3
- package/dist/types/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/ChainTokenIcon.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/OrderToken.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/OrderTokenAmount.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/PanelOnrampPayment.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/TokenBalance.d.ts +1 -1
- package/dist/types/anyspend/react/components/index.d.ts +0 -2
- 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 +2 -1
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +18 -3
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +0 -1
- package/dist/types/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +70 -14
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +70 -14
- package/dist/types/anyspend/react/hooks/useAnyspendSendPermitData.d.ts +16 -0
- package/dist/types/anyspend/react/hooks/usePermitData.d.ts +92 -0
- package/dist/types/anyspend/services/anyspend.d.ts +40 -9
- package/dist/types/anyspend/types/index.d.ts +1 -1
- package/dist/types/anyspend/types/nft.d.ts +0 -7
- package/dist/types/anyspend/types/onramp.d.ts +0 -3
- package/dist/types/anyspend/types/order.d.ts +200 -40
- package/dist/types/anyspend/types/permit.d.ts +21 -0
- package/dist/types/anyspend/types/req-res/createOrder.d.ts +235 -98
- package/dist/types/anyspend/types/req-res/getOrderAndTransactions.d.ts +305 -63
- package/dist/types/anyspend/types/req-res/getOrderHistory.d.ts +235 -49
- package/dist/types/anyspend/types/req-res/getQuote.d.ts +0 -37
- package/dist/types/anyspend/types/req-res/index.d.ts +1 -0
- package/dist/types/anyspend/types/req-res/sendPermitData.d.ts +66 -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/SignInWithB3.d.ts +2 -1
- package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/types/global-account/react/components/index.d.ts +4 -4
- package/dist/types/global-account/react/components/ui/ShinyButton.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/Tabs.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/dialog.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/text-loop.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useAddTWSessionKey.d.ts +2 -2
- package/dist/types/global-account/react/hooks/useB3EnsName.d.ts +4 -8
- package/dist/types/global-account/react/hooks/useBestTransactionPath.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useRemoveSessionKey.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokenBalancesByChain.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokenPrice.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokenPriceWithFallback.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokensFromAddress.d.ts +1 -1
- package/dist/types/global-account/react/stores/index.d.ts +1 -1
- package/dist/types/global-account/react/stores/useModalStore.d.ts +1 -18
- package/dist/types/shared/constants/index.d.ts +0 -1
- package/dist/types/shared/utils/index.d.ts +0 -9
- package/package.json +4 -17
- package/src/anyspend/abis/abi-usdc-base.ts +97 -97
- package/src/anyspend/abis/erc20-staking.ts +51 -51
- package/src/anyspend/constants/index.ts +11 -13
- package/src/anyspend/index.ts +6 -4
- package/src/anyspend/react/components/AnySpend.tsx +39 -44
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +41 -46
- package/src/anyspend/react/components/AnySpendCustom.tsx +89 -214
- package/src/anyspend/react/components/AnySpendNFT.tsx +6 -11
- package/src/anyspend/react/components/AnySpendNFTButton.tsx +1 -1
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +22 -23
- package/src/anyspend/react/components/AnySpendTournament.tsx +4 -7
- package/src/anyspend/react/components/common/ChainTokenIcon.tsx +1 -1
- package/src/anyspend/react/components/common/OrderDetails.tsx +76 -74
- 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 +17 -9
- 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 +15 -16
- package/src/anyspend/react/components/common/TokenBalance.tsx +2 -2
- package/src/anyspend/react/components/index.ts +0 -2
- package/src/anyspend/react/components/modals/EnterRecipientModal.tsx +2 -2
- package/src/anyspend/react/components/webview/WebviewOnrampOrderStatus.tsx +1 -0
- package/src/anyspend/react/components/webview/WebviewOnrampPayment.tsx +20 -18
- package/src/anyspend/react/hooks/index.ts +2 -1
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +20 -10
- package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +8 -9
- package/src/anyspend/react/hooks/useAnyspendOrderAndTransactions.ts +3 -3
- package/src/anyspend/react/hooks/useAnyspendOrderHistory.ts +4 -4
- package/src/anyspend/react/hooks/useAnyspendQuote.ts +6 -6
- package/src/anyspend/react/hooks/useAnyspendSendPermitData.ts +38 -0
- package/src/anyspend/react/hooks/useAnyspendTokens.ts +4 -4
- package/src/anyspend/react/hooks/useCoinbaseOnrampOptions.ts +3 -3
- package/src/anyspend/react/hooks/useGeoOnrampOptions.ts +3 -3
- package/src/anyspend/react/hooks/useGetGeo.ts +1 -1
- package/src/anyspend/react/hooks/usePermitData.ts +183 -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 +4 -9
- package/src/anyspend/services/anyspend.ts +39 -21
- 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/nft.ts +7 -10
- package/src/anyspend/types/onramp.ts +2 -3
- package/src/anyspend/types/order.ts +16 -9
- package/src/anyspend/types/permit.ts +10 -0
- package/src/anyspend/types/relay.ts +1 -1
- package/src/anyspend/types/req-res/createOrder.ts +9 -9
- package/src/anyspend/types/req-res/getCoinbaseOnrampOptions.ts +5 -5
- package/src/anyspend/types/req-res/getOrderAndTransactions.ts +4 -4
- package/src/anyspend/types/req-res/getOrderByCreator.ts +2 -2
- package/src/anyspend/types/req-res/getOrderHistory.ts +1 -1
- package/src/anyspend/types/req-res/getQuote.ts +9 -14
- package/src/anyspend/types/req-res/getTokenList.ts +4 -4
- package/src/anyspend/types/req-res/index.ts +1 -0
- package/src/anyspend/types/req-res/sendPermitData.ts +10 -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 +7 -2
- package/src/anyspend/utils/orderPayload.ts +9 -21
- package/src/anyspend/utils/token.ts +10 -10
- package/src/global-account/app.native.ts +5 -5
- package/src/global-account/app.ts +5 -5
- package/src/global-account/bsmnt.native.ts +5 -5
- package/src/global-account/bsmnt.ts +5 -5
- package/src/global-account/react/components/B3DynamicModal.tsx +6 -15
- package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +4 -4
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +20 -22
- package/src/global-account/react/components/B3Provider/types.ts +1 -1
- package/src/global-account/react/components/ManageAccount/ManageAccount.tsx +6 -6
- package/src/global-account/react/components/MintButton/MintButton.tsx +5 -5
- package/src/global-account/react/components/RelayKitProviderWrapper.tsx +2 -2
- package/src/global-account/react/components/RequestPermissions/RequestPermissions.tsx +7 -7
- package/src/global-account/react/components/RequestPermissions/RequestPermissionsButton.tsx +2 -2
- package/src/global-account/react/components/SignInWithB3/SignInWithB3.tsx +28 -16
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +14 -14
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Privy.tsx +2 -2
- package/src/global-account/react/components/SignInWithB3/components/AuthButton.tsx +1 -1
- package/src/global-account/react/components/SignInWithB3/components/WalletRow.tsx +1 -1
- package/src/global-account/react/components/SignInWithB3/steps/LoginStep.tsx +10 -10
- package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +3 -3
- package/src/global-account/react/components/SignInWithB3/utils/signInUtils.ts +2 -2
- package/src/global-account/react/components/StyleRoot.tsx +1 -0
- package/src/global-account/react/components/Transak/TransakModal.tsx +4 -4
- package/src/global-account/react/components/custom/Button.tsx +7 -7
- package/src/global-account/react/components/custom/StaggeredFadeLoader.tsx +3 -3
- package/src/global-account/react/components/custom/WalletConnectorIcon.tsx +1 -1
- package/src/global-account/react/components/index.ts +4 -4
- package/src/global-account/react/components/magicui/AnimatedLottie.tsx +5 -5
- package/src/global-account/react/components/ui/Loading.tsx +2 -2
- package/src/global-account/react/components/ui/ShinyButton.tsx +5 -5
- package/src/global-account/react/components/ui/TabSystem.tsx +2 -2
- package/src/global-account/react/components/ui/Tabs.tsx +4 -4
- package/src/global-account/react/components/ui/badge.tsx +5 -5
- package/src/global-account/react/components/ui/button.tsx +7 -7
- package/src/global-account/react/components/ui/command.tsx +5 -5
- package/src/global-account/react/components/ui/dialog.tsx +5 -5
- package/src/global-account/react/components/ui/drawer.tsx +2 -2
- package/src/global-account/react/components/ui/glare-card-rounded.tsx +12 -12
- package/src/global-account/react/components/ui/glare-card.tsx +11 -11
- package/src/global-account/react/components/ui/input.tsx +2 -2
- package/src/global-account/react/components/ui/popover.tsx +1 -1
- package/src/global-account/react/components/ui/scroll-area.tsx +1 -1
- package/src/global-account/react/components/ui/text-loop.tsx +2 -2
- package/src/global-account/react/components/ui/text-shimmer.tsx +3 -3
- package/src/global-account/react/components/ui/tooltip.tsx +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 +31 -43
- package/src/global-account/react/hooks/useBestTransactionPath.tsx +11 -11
- package/src/global-account/react/hooks/useBsmntProfile.ts +1 -1
- package/src/global-account/react/hooks/useChainSwitchWithAction.ts +4 -4
- package/src/global-account/react/hooks/useClaim.tsx +5 -5
- package/src/global-account/react/hooks/useConnect.tsx +4 -4
- package/src/global-account/react/hooks/useExchangeRate.tsx +3 -3
- package/src/global-account/react/hooks/useGetAllTWSigners.tsx +9 -9
- package/src/global-account/react/hooks/useGetGeo.tsx +1 -1
- package/src/global-account/react/hooks/useHandleConnectWithPrivy.tsx +2 -2
- package/src/global-account/react/hooks/useMediaQuery.tsx +1 -1
- package/src/global-account/react/hooks/useNativeBalance.tsx +7 -7
- package/src/global-account/react/hooks/useOnchainName.tsx +11 -11
- package/src/global-account/react/hooks/useOneBalance.tsx +2 -2
- package/src/global-account/react/hooks/useQueryB3.ts +2 -2
- package/src/global-account/react/hooks/useQueryBSMNT.ts +2 -2
- package/src/global-account/react/hooks/useRemoveSessionKey.tsx +5 -5
- package/src/global-account/react/hooks/useRouter.tsx +6 -6
- package/src/global-account/react/hooks/useSiwe.tsx +4 -4
- package/src/global-account/react/hooks/useTokenBalance.tsx +6 -6
- package/src/global-account/react/hooks/useTokenBalancesByChain.tsx +10 -10
- package/src/global-account/react/hooks/useTokenData.ts +3 -3
- package/src/global-account/react/hooks/useTokenFromUrl.tsx +14 -14
- package/src/global-account/react/hooks/useTokenPrice.tsx +7 -7
- package/src/global-account/react/hooks/useTokenPriceWithFallback.tsx +7 -7
- package/src/global-account/react/hooks/useTokensFromAddress.ts +2 -2
- package/src/global-account/react/hooks/useURLParams.ts +2 -2
- package/src/global-account/react/stores/index.ts +1 -1
- package/src/global-account/react/stores/useAuthStore.ts +3 -3
- package/src/global-account/react/stores/useModalStore.ts +4 -23
- package/src/global-account/server.ts +3 -3
- package/src/global-account/types/chain-networks.ts +10 -10
- package/src/global-account/types/feature-flags.ts +2 -2
- package/src/shared/constants/chains/b3Chain.ts +35 -35
- package/src/shared/constants/chains/chainPlatformMap.ts +1 -1
- package/src/shared/constants/chains/supported.ts +1 -1
- package/src/shared/constants/index.ts +1 -3
- package/src/shared/thirdweb/initiateClient.ts +2 -2
- package/src/shared/thirdweb/openapi-ts.config.ts +1 -1
- package/src/shared/utils/b3Ens.ts +4 -4
- package/src/shared/utils/chain-transformers.ts +9 -9
- package/src/shared/utils/fetchBalances.ts +5 -5
- package/src/shared/utils/fetchBsmntProfile.ts +1 -1
- package/src/shared/utils/index.ts +0 -16
- package/src/shared/utils/insights.ts +31 -31
- package/src/shared/utils/ipfs.ts +1 -1
- package/src/shared/utils/number.ts +5 -5
- package/src/shared/utils/simplehash.ts +28 -28
- package/src/shared/utils/thirdweb-insights.ts +20 -20
- package/src/styles/index.css +2 -5
- package/dist/cjs/anyspend/abis/signature-minting.d.ts +0 -79
- package/dist/cjs/anyspend/abis/signature-minting.js +0 -45
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.d.ts +0 -8
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.js +0 -77
- package/dist/cjs/anyspend/react/components/common/Warning.d.ts +0 -3
- package/dist/cjs/anyspend/react/components/common/Warning.js +0 -7
- package/dist/cjs/anyspend/react/hooks/useSigMint.d.ts +0 -140
- package/dist/cjs/anyspend/react/hooks/useSigMint.js +0 -39
- package/dist/cjs/anyspend/types/metadata.d.ts +0 -26
- package/dist/cjs/anyspend/types/metadata.js +0 -16
- package/dist/cjs/anyspend/types/signature-mint.d.ts +0 -69
- package/dist/cjs/anyspend/types/signature-mint.js +0 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.d.ts +0 -14
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +0 -50
- package/dist/cjs/global-account/react/components/custom/Icon.d.ts +0 -7
- package/dist/cjs/global-account/react/components/custom/Icon.js +0 -52
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.d.ts +0 -4
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.js +0 -20
- package/dist/cjs/shared/react/hooks/index.d.ts +0 -1
- package/dist/cjs/shared/react/hooks/index.js +0 -17
- package/dist/cjs/shared/react/hooks/useNavigation.d.ts +0 -17
- package/dist/cjs/shared/react/hooks/useNavigation.js +0 -57
- package/dist/cjs/shared/react/index.d.ts +0 -1
- package/dist/cjs/shared/react/index.js +0 -17
- package/dist/esm/anyspend/abis/signature-minting.d.ts +0 -79
- package/dist/esm/anyspend/abis/signature-minting.js +0 -42
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.d.ts +0 -8
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.js +0 -71
- package/dist/esm/anyspend/react/components/common/Warning.d.ts +0 -3
- package/dist/esm/anyspend/react/components/common/Warning.js +0 -4
- package/dist/esm/anyspend/react/hooks/useSigMint.d.ts +0 -140
- package/dist/esm/anyspend/react/hooks/useSigMint.js +0 -33
- package/dist/esm/anyspend/types/metadata.d.ts +0 -26
- package/dist/esm/anyspend/types/metadata.js +0 -11
- package/dist/esm/anyspend/types/signature-mint.d.ts +0 -69
- package/dist/esm/anyspend/types/signature-mint.js +0 -1
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.d.ts +0 -14
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +0 -44
- package/dist/esm/global-account/react/components/custom/Icon.d.ts +0 -7
- package/dist/esm/global-account/react/components/custom/Icon.js +0 -50
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.d.ts +0 -4
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.js +0 -17
- package/dist/esm/shared/react/hooks/index.d.ts +0 -1
- package/dist/esm/shared/react/hooks/index.js +0 -1
- package/dist/esm/shared/react/hooks/useNavigation.d.ts +0 -17
- package/dist/esm/shared/react/hooks/useNavigation.js +0 -52
- package/dist/esm/shared/react/index.d.ts +0 -1
- package/dist/esm/shared/react/index.js +0 -1
- package/dist/types/anyspend/abis/signature-minting.d.ts +0 -79
- package/dist/types/anyspend/react/components/AnyspendSignatureMint.d.ts +0 -8
- package/dist/types/anyspend/react/components/common/Warning.d.ts +0 -3
- package/dist/types/anyspend/react/hooks/useSigMint.d.ts +0 -140
- package/dist/types/anyspend/types/metadata.d.ts +0 -26
- package/dist/types/anyspend/types/signature-mint.d.ts +0 -69
- package/dist/types/global-account/react/components/SignInWithB3/SignIn.d.ts +0 -14
- package/dist/types/global-account/react/components/custom/Icon.d.ts +0 -7
- package/dist/types/global-account/react/components/custom/ManageAccountButton.d.ts +0 -4
- package/dist/types/shared/react/hooks/index.d.ts +0 -1
- package/dist/types/shared/react/hooks/useNavigation.d.ts +0 -17
- package/dist/types/shared/react/index.d.ts +0 -1
- package/src/anyspend/abis/signature-minting.ts +0 -43
- package/src/anyspend/react/components/AnyspendSignatureMint.tsx +0 -147
- package/src/anyspend/react/components/common/Warning.tsx +0 -7
- package/src/anyspend/react/hooks/useSigMint.tsx +0 -55
- package/src/anyspend/types/metadata.ts +0 -41
- package/src/anyspend/types/signature-mint.ts +0 -77
- package/src/global-account/react/components/SignInWithB3/SignIn.tsx +0 -190
- package/src/global-account/react/components/custom/Icon.tsx +0 -102
- package/src/global-account/react/components/custom/ManageAccountButton.tsx +0 -33
- package/src/shared/react/hooks/index.ts +0 -1
- package/src/shared/react/hooks/useNavigation.ts +0 -61
- package/src/shared/react/index.ts +0 -1
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { ABI_ERC20_STAKING, B3_TOKEN, OrderType } from "@b3dotfun/sdk/anyspend";
|
|
2
|
+
import { EthIcon } from "./icons/EthIcon";
|
|
3
|
+
import { SolIcon } from "./icons/SolIcon";
|
|
4
|
+
import { UsdcIcon } from "./icons/USDCIcon";
|
|
2
5
|
import {
|
|
3
6
|
Button,
|
|
4
7
|
GlareCardRounded,
|
|
5
8
|
Input,
|
|
6
|
-
StyleRoot,
|
|
7
9
|
TextLoop,
|
|
8
|
-
useChainSwitchWithAction,
|
|
9
10
|
useHasMounted,
|
|
10
11
|
useModalStore,
|
|
12
|
+
useChainSwitchWithAction,
|
|
11
13
|
useTokenBalance,
|
|
14
|
+
StyleRoot
|
|
12
15
|
} from "@b3dotfun/sdk/global-account/react";
|
|
13
16
|
import { formatTokenAmount } from "@b3dotfun/sdk/shared/utils/number";
|
|
14
17
|
import { motion } from "framer-motion";
|
|
@@ -20,13 +23,10 @@ import { createPublicClient, encodeFunctionData, erc20Abi, http } from "viem";
|
|
|
20
23
|
import { base } from "viem/chains";
|
|
21
24
|
import { useAccount, useWaitForTransactionReceipt, useWriteContract } from "wagmi";
|
|
22
25
|
import { AnySpendCustom } from "./AnySpendCustom";
|
|
23
|
-
import { EthIcon } from "./icons/EthIcon";
|
|
24
|
-
import { SolIcon } from "./icons/SolIcon";
|
|
25
|
-
import { UsdcIcon } from "./icons/USDCIcon";
|
|
26
26
|
|
|
27
27
|
const basePublicClient = createPublicClient({
|
|
28
28
|
chain: base,
|
|
29
|
-
transport: http()
|
|
29
|
+
transport: http()
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
const ERC20Staking = "0xbf04200be3cbf371467a539706393c81c470f523";
|
|
@@ -36,7 +36,7 @@ function generateEncodedDataForStakingB3(amount: string, beneficiary: string): s
|
|
|
36
36
|
const encodedData = encodeFunctionData({
|
|
37
37
|
abi: ABI_ERC20_STAKING,
|
|
38
38
|
functionName: "stake",
|
|
39
|
-
args: [BigInt(amount), beneficiary]
|
|
39
|
+
args: [BigInt(amount), beneficiary]
|
|
40
40
|
});
|
|
41
41
|
return encodedData;
|
|
42
42
|
}
|
|
@@ -47,7 +47,7 @@ export function AnySpendStakeB3({
|
|
|
47
47
|
mode = "modal",
|
|
48
48
|
recipientAddress,
|
|
49
49
|
stakeAmount,
|
|
50
|
-
onSuccess
|
|
50
|
+
onSuccess
|
|
51
51
|
}: {
|
|
52
52
|
isMainnet?: boolean;
|
|
53
53
|
loadOrder?: string;
|
|
@@ -63,9 +63,9 @@ export function AnySpendStakeB3({
|
|
|
63
63
|
const {
|
|
64
64
|
formattedBalance: b3Balance,
|
|
65
65
|
isLoading: isBalanceLoading,
|
|
66
|
-
rawBalance: b3RawBalance
|
|
66
|
+
rawBalance: b3RawBalance
|
|
67
67
|
} = useTokenBalance({
|
|
68
|
-
token: B3_TOKEN
|
|
68
|
+
token: B3_TOKEN
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
// Wagmi hooks for direct staking
|
|
@@ -82,8 +82,8 @@ export function AnySpendStakeB3({
|
|
|
82
82
|
const { isLoading: isTxPending, isSuccess: isTxSuccess } = useWaitForTransactionReceipt({
|
|
83
83
|
hash: stakingTxHash as `0x${string}`,
|
|
84
84
|
query: {
|
|
85
|
-
structuralSharing: false
|
|
86
|
-
}
|
|
85
|
+
structuralSharing: false // Disable to avoid BigInt serialization issues
|
|
86
|
+
}
|
|
87
87
|
});
|
|
88
88
|
|
|
89
89
|
// Show success modal when transaction is confirmed
|
|
@@ -197,7 +197,7 @@ export function AnySpendStakeB3({
|
|
|
197
197
|
address: B3_TOKEN.address as `0x${string}`,
|
|
198
198
|
abi: erc20Abi,
|
|
199
199
|
functionName: "allowance",
|
|
200
|
-
args: [address, ERC20Staking as `0x${string}`]
|
|
200
|
+
args: [address, ERC20Staking as `0x${string}`]
|
|
201
201
|
});
|
|
202
202
|
|
|
203
203
|
// If allowance is insufficient, request approval
|
|
@@ -208,7 +208,7 @@ export function AnySpendStakeB3({
|
|
|
208
208
|
address: B3_TOKEN.address as `0x${string}`,
|
|
209
209
|
abi: erc20Abi,
|
|
210
210
|
functionName: "approve",
|
|
211
|
-
args: [ERC20Staking as `0x${string}`, BigInt(userStakeAmount)]
|
|
211
|
+
args: [ERC20Staking as `0x${string}`, BigInt(userStakeAmount)]
|
|
212
212
|
});
|
|
213
213
|
|
|
214
214
|
toast.info("Approval confirmed. Proceeding with stake...");
|
|
@@ -220,7 +220,7 @@ export function AnySpendStakeB3({
|
|
|
220
220
|
address: ERC20Staking as `0x${string}`,
|
|
221
221
|
abi: ABI_ERC20_STAKING,
|
|
222
222
|
functionName: "stake",
|
|
223
|
-
args: [BigInt(userStakeAmount), recipientAddress as `0x${string}`]
|
|
223
|
+
args: [BigInt(userStakeAmount), recipientAddress as `0x${string}`]
|
|
224
224
|
});
|
|
225
225
|
|
|
226
226
|
setStakingTxHash(stakeHash);
|
|
@@ -285,7 +285,7 @@ export function AnySpendStakeB3({
|
|
|
285
285
|
animate={{
|
|
286
286
|
opacity: hasMounted ? 1 : 0,
|
|
287
287
|
y: hasMounted ? 0 : 20,
|
|
288
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
288
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
289
289
|
}}
|
|
290
290
|
transition={{ duration: 0.3, delay: 0, ease: "easeInOut" }}
|
|
291
291
|
className="relative mx-auto size-48"
|
|
@@ -297,7 +297,7 @@ export function AnySpendStakeB3({
|
|
|
297
297
|
animate={{
|
|
298
298
|
opacity: hasMounted ? 1 : 0,
|
|
299
299
|
y: hasMounted ? 0 : 20,
|
|
300
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
300
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
301
301
|
}}
|
|
302
302
|
transition={{ duration: 0.3, delay: 0.1, ease: "easeInOut" }}
|
|
303
303
|
>
|
|
@@ -315,7 +315,7 @@ export function AnySpendStakeB3({
|
|
|
315
315
|
animate={{
|
|
316
316
|
opacity: hasMounted ? 1 : 0,
|
|
317
317
|
y: hasMounted ? 0 : 20,
|
|
318
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
318
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
319
319
|
}}
|
|
320
320
|
transition={{ duration: 0.3, delay: 0.2, ease: "easeInOut" }}
|
|
321
321
|
className="bg-b3-react-background w-full p-6"
|
|
@@ -397,7 +397,7 @@ export function AnySpendStakeB3({
|
|
|
397
397
|
animate={{
|
|
398
398
|
opacity: hasMounted ? 1 : 0,
|
|
399
399
|
y: hasMounted ? 0 : 20,
|
|
400
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
400
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
401
401
|
}}
|
|
402
402
|
transition={{ duration: 0.3, delay: 0, ease: "easeInOut" }}
|
|
403
403
|
className="relative mx-auto mb-4 size-[120px]"
|
|
@@ -422,7 +422,7 @@ export function AnySpendStakeB3({
|
|
|
422
422
|
animate={{
|
|
423
423
|
opacity: hasMounted ? 1 : 0,
|
|
424
424
|
y: hasMounted ? 0 : 20,
|
|
425
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
425
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
426
426
|
}}
|
|
427
427
|
transition={{ duration: 0.3, delay: 0.1, ease: "easeInOut" }}
|
|
428
428
|
>
|
|
@@ -437,7 +437,7 @@ export function AnySpendStakeB3({
|
|
|
437
437
|
animate={{
|
|
438
438
|
opacity: hasMounted ? 1 : 0,
|
|
439
439
|
y: hasMounted ? 0 : 20,
|
|
440
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
440
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
441
441
|
}}
|
|
442
442
|
transition={{ duration: 0.3, delay: 0.2, ease: "easeInOut" }}
|
|
443
443
|
className="bg-b3-react-background w-full p-6"
|
|
@@ -483,8 +483,7 @@ export function AnySpendStakeB3({
|
|
|
483
483
|
contractAddress={ERC20Staking}
|
|
484
484
|
encodedData={encodedData}
|
|
485
485
|
metadata={{
|
|
486
|
-
|
|
487
|
-
action: "stake B3",
|
|
486
|
+
action: "stake B3"
|
|
488
487
|
}}
|
|
489
488
|
header={header}
|
|
490
489
|
onSuccess={onSuccess}
|
|
@@ -40,7 +40,7 @@ export function AnySpendTournament(props: AnySpendTournamentProps) {
|
|
|
40
40
|
tournamentChainId,
|
|
41
41
|
tournamentContractAddress,
|
|
42
42
|
tournamentMetadata,
|
|
43
|
-
onSuccess
|
|
43
|
+
onSuccess
|
|
44
44
|
} = props;
|
|
45
45
|
|
|
46
46
|
const dstToken = action === "join" ? props.tournamentEntryToken : props.tournamentFundToken;
|
|
@@ -48,7 +48,7 @@ export function AnySpendTournament(props: AnySpendTournamentProps) {
|
|
|
48
48
|
|
|
49
49
|
const header = ({
|
|
50
50
|
anyspendPrice,
|
|
51
|
-
isLoadingAnyspendPrice
|
|
51
|
+
isLoadingAnyspendPrice
|
|
52
52
|
}: {
|
|
53
53
|
anyspendPrice: GetQuoteResponse | undefined;
|
|
54
54
|
isLoadingAnyspendPrice: boolean;
|
|
@@ -72,7 +72,7 @@ export function AnySpendTournament(props: AnySpendTournamentProps) {
|
|
|
72
72
|
<AnimatePresence mode="wait">
|
|
73
73
|
<div
|
|
74
74
|
className={cn("text-as-primary group flex items-center text-2xl font-semibold transition-all", {
|
|
75
|
-
"opacity-0": isLoadingAnyspendPrice
|
|
75
|
+
"opacity-0": isLoadingAnyspendPrice
|
|
76
76
|
})}
|
|
77
77
|
>
|
|
78
78
|
{formatDisplayNumber(anyspendPrice?.data?.currencyIn?.amountUsd, { style: "currency" })} (
|
|
@@ -100,10 +100,7 @@ export function AnySpendTournament(props: AnySpendTournamentProps) {
|
|
|
100
100
|
dstAmount={dstAmount}
|
|
101
101
|
contractAddress={tournamentContractAddress}
|
|
102
102
|
encodedData="0x"
|
|
103
|
-
metadata={{
|
|
104
|
-
type: action === "join" ? OrderType.JoinTournament : OrderType.FundTournament,
|
|
105
|
-
tournament: tournamentMetadata,
|
|
106
|
-
}}
|
|
103
|
+
metadata={{ tournament: tournamentMetadata }}
|
|
107
104
|
header={header}
|
|
108
105
|
onSuccess={onSuccess}
|
|
109
106
|
showRecipient={action === "join"}
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
getPaymentUrl,
|
|
13
13
|
getStatusDisplay,
|
|
14
14
|
isNativeToken,
|
|
15
|
-
OnrampVendor,
|
|
16
15
|
Order,
|
|
17
16
|
OrderStatus,
|
|
18
17
|
OrderType,
|
|
@@ -21,22 +20,21 @@ import {
|
|
|
21
20
|
RelayTransaction,
|
|
22
21
|
zNft,
|
|
23
22
|
zToken,
|
|
24
|
-
zTournament
|
|
23
|
+
zTournament
|
|
25
24
|
} from "@b3dotfun/sdk/anyspend";
|
|
26
25
|
import {
|
|
27
|
-
Badge,
|
|
28
|
-
Button,
|
|
29
26
|
CopyToClipboard,
|
|
27
|
+
Badge,
|
|
30
28
|
ShinyButton,
|
|
31
29
|
Skeleton,
|
|
32
30
|
TextLoop,
|
|
33
31
|
TextShimmer,
|
|
32
|
+
Button,
|
|
34
33
|
useAccountWallet,
|
|
35
34
|
useChainSwitchWithAction,
|
|
36
|
-
useModalStore,
|
|
37
35
|
useOnchainName,
|
|
36
|
+
useModalStore
|
|
38
37
|
} from "@b3dotfun/sdk/global-account/react";
|
|
39
|
-
import { useRouter, useSearchParams } from "@b3dotfun/sdk/shared/react/hooks";
|
|
40
38
|
import { cn } from "@b3dotfun/sdk/shared/utils";
|
|
41
39
|
import centerTruncate from "@b3dotfun/sdk/shared/utils/centerTruncate";
|
|
42
40
|
import { formatTokenAmount } from "@b3dotfun/sdk/shared/utils/number";
|
|
@@ -52,8 +50,9 @@ import {
|
|
|
52
50
|
Home,
|
|
53
51
|
Loader2,
|
|
54
52
|
RefreshCcw,
|
|
55
|
-
SquareArrowOutUpRight
|
|
53
|
+
SquareArrowOutUpRight
|
|
56
54
|
} from "lucide-react";
|
|
55
|
+
import { useRouter, useSearchParams } from "next/navigation";
|
|
57
56
|
import { QRCodeSVG } from "qrcode.react";
|
|
58
57
|
import { memo, useCallback, useEffect, useMemo, useState } from "react";
|
|
59
58
|
import TimeAgo from "react-timeago";
|
|
@@ -82,7 +81,7 @@ function getOrderSuccessText({
|
|
|
82
81
|
formattedActualDstAmount,
|
|
83
82
|
dstToken,
|
|
84
83
|
recipientName,
|
|
85
|
-
centerTruncate
|
|
84
|
+
centerTruncate
|
|
86
85
|
}: {
|
|
87
86
|
order: Order;
|
|
88
87
|
tournament?: any;
|
|
@@ -208,7 +207,7 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
208
207
|
relayTx,
|
|
209
208
|
executeTx,
|
|
210
209
|
refundTxs,
|
|
211
|
-
onBack
|
|
210
|
+
onBack
|
|
212
211
|
}: OrderDetailsProps) {
|
|
213
212
|
const router = useRouter();
|
|
214
213
|
const searchParams = useSearchParams();
|
|
@@ -233,6 +232,23 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
233
232
|
|
|
234
233
|
const { switchChainAndExecute, isSwitchingOrExecuting } = useChainSwitchWithAction();
|
|
235
234
|
|
|
235
|
+
// const { permitData, isCheckingPermit } = usePermitData({
|
|
236
|
+
// chainId: order.srcChain,
|
|
237
|
+
// tokenAddress: order.srcTokenAddress as Hex,
|
|
238
|
+
// ownerAddress: account?.address && isAddress(account.address) ? getAddress(account.address) : undefined,
|
|
239
|
+
// amount: BigInt(order.srcAmount)
|
|
240
|
+
// });
|
|
241
|
+
|
|
242
|
+
// const { sendPermitData } = useAnyspendSendPermitData({
|
|
243
|
+
// onSuccess: _data => {
|
|
244
|
+
// toast.info("Sent permit data successfully");
|
|
245
|
+
// },
|
|
246
|
+
// onError: error => {
|
|
247
|
+
// console.error(error);
|
|
248
|
+
// toast.error("Failed to send permit data: " + error.message);
|
|
249
|
+
// }
|
|
250
|
+
// });
|
|
251
|
+
|
|
236
252
|
const { colorMode } = useColorMode();
|
|
237
253
|
|
|
238
254
|
const roundedUpSrcAmount = useMemo(() => {
|
|
@@ -255,6 +271,35 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
255
271
|
|
|
256
272
|
console.log("Processing transaction on chain:", currentWalletClient.chain.id);
|
|
257
273
|
|
|
274
|
+
// Process transaction
|
|
275
|
+
// if (permitData?.data && account.address) {
|
|
276
|
+
// const signature = await currentWalletClient.signTypedData({
|
|
277
|
+
// domain: permitData.data.domain,
|
|
278
|
+
// types: permitData.data.types,
|
|
279
|
+
// primaryType: "Permit",
|
|
280
|
+
// message: permitData.data.messageToSign
|
|
281
|
+
// });
|
|
282
|
+
|
|
283
|
+
// // Split signature into v, r, s components
|
|
284
|
+
// const r = signature.slice(0, 66);
|
|
285
|
+
// const s = "0x" + signature.slice(66, 130);
|
|
286
|
+
// const v = parseInt(signature.slice(130, 132), 16);
|
|
287
|
+
|
|
288
|
+
// sendPermitData({
|
|
289
|
+
// isMainnet: true,
|
|
290
|
+
// orderId: order.id,
|
|
291
|
+
// permitData: {
|
|
292
|
+
// deadline: Number(permitData.data.messageToSign.deadline),
|
|
293
|
+
// ownerAddress: account.address,
|
|
294
|
+
// r,
|
|
295
|
+
// s,
|
|
296
|
+
// v
|
|
297
|
+
// }
|
|
298
|
+
// });
|
|
299
|
+
|
|
300
|
+
// return;
|
|
301
|
+
// }
|
|
302
|
+
|
|
258
303
|
const signer = currentWalletClient.account!;
|
|
259
304
|
|
|
260
305
|
// Send transaction
|
|
@@ -263,7 +308,7 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
263
308
|
account: signer,
|
|
264
309
|
chain: EVM_CHAINS[order.srcChain].viem,
|
|
265
310
|
to: order.globalAddress as `0x${string}`,
|
|
266
|
-
value: BigInt(order.srcAmount)
|
|
311
|
+
value: BigInt(order.srcAmount)
|
|
267
312
|
});
|
|
268
313
|
setTxHash(hash);
|
|
269
314
|
} else {
|
|
@@ -273,12 +318,12 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
273
318
|
address: order.srcTokenAddress as `0x${string}`,
|
|
274
319
|
abi: erc20Abi,
|
|
275
320
|
functionName: "transfer",
|
|
276
|
-
args: [order.globalAddress as Address, BigInt(order.srcAmount)]
|
|
321
|
+
args: [order.globalAddress as Address, BigInt(order.srcAmount)]
|
|
277
322
|
});
|
|
278
323
|
setTxHash(hash);
|
|
279
324
|
}
|
|
280
325
|
},
|
|
281
|
-
[order]
|
|
326
|
+
[order]
|
|
282
327
|
);
|
|
283
328
|
|
|
284
329
|
// Main payment handler that triggers chain switch and payment
|
|
@@ -289,34 +334,11 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
289
334
|
|
|
290
335
|
// When waitingForDeposit is true, we show a message to the user to wait for the deposit to be processed.
|
|
291
336
|
const setWaitingForDeposit = useCallback(() => {
|
|
292
|
-
const params = new URLSearchParams(searchParams
|
|
337
|
+
const params = new URLSearchParams(searchParams);
|
|
293
338
|
params.set("waitingForDeposit", "true");
|
|
294
339
|
router.push(`?${params}`);
|
|
295
340
|
}, [router, searchParams]);
|
|
296
341
|
|
|
297
|
-
// Clean up URL parameters before closing modal or navigating back
|
|
298
|
-
const cleanupUrlParams = useCallback(() => {
|
|
299
|
-
const params = new URLSearchParams(searchParams.toString());
|
|
300
|
-
params.delete("waitingForDeposit");
|
|
301
|
-
params.delete("orderId");
|
|
302
|
-
|
|
303
|
-
// Only update URL if params were actually removed
|
|
304
|
-
if (params.toString() !== searchParams.toString()) {
|
|
305
|
-
router.push(`?${params}`);
|
|
306
|
-
}
|
|
307
|
-
}, [router, searchParams]);
|
|
308
|
-
|
|
309
|
-
// Helper functions that clean up URL params before executing actions
|
|
310
|
-
const handleCloseModal = useCallback(() => {
|
|
311
|
-
cleanupUrlParams();
|
|
312
|
-
setB3ModalOpen(false);
|
|
313
|
-
}, [cleanupUrlParams, setB3ModalOpen]);
|
|
314
|
-
|
|
315
|
-
const handleBack = useCallback(() => {
|
|
316
|
-
cleanupUrlParams();
|
|
317
|
-
onBack?.();
|
|
318
|
-
}, [cleanupUrlParams, onBack]);
|
|
319
|
-
|
|
320
342
|
useEffect(() => {
|
|
321
343
|
if (txSuccess) {
|
|
322
344
|
toast.success("Transaction successful! We are processing your order.", { duration: 10000 });
|
|
@@ -391,11 +413,7 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
391
413
|
? depositTxs.map(dTx => (
|
|
392
414
|
<TransactionDetails
|
|
393
415
|
key={dTx.txHash}
|
|
394
|
-
title={
|
|
395
|
-
order.onrampMetadata?.vendor === OnrampVendor.StripeWeb2
|
|
396
|
-
? `Received payment`
|
|
397
|
-
: `Received ${formatTokenAmount(BigInt(dTx.amount), srcToken.decimals)} ${srcToken.symbol}`
|
|
398
|
-
}
|
|
416
|
+
title={`Received ${formatTokenAmount(BigInt(dTx.amount), srcToken.decimals)} ${srcToken.symbol}`}
|
|
399
417
|
chainId={order.srcChain}
|
|
400
418
|
tx={dTx}
|
|
401
419
|
isProcessing={false}
|
|
@@ -423,7 +441,7 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
423
441
|
)}
|
|
424
442
|
<button
|
|
425
443
|
className="bg-as-on-surface-2 text-as-secondary flex w-full items-center justify-center gap-2 rounded-lg p-2"
|
|
426
|
-
onClick={mode === "page" ?
|
|
444
|
+
onClick={mode === "page" ? onBack : () => setB3ModalOpen(false)}
|
|
427
445
|
>
|
|
428
446
|
{mode === "page" ? (
|
|
429
447
|
<>
|
|
@@ -453,11 +471,7 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
453
471
|
? depositTxs.map(dTxs => (
|
|
454
472
|
<TransactionDetails
|
|
455
473
|
key={dTxs.txHash}
|
|
456
|
-
title={
|
|
457
|
-
order.onrampMetadata?.vendor === OnrampVendor.StripeWeb2
|
|
458
|
-
? `Received payment`
|
|
459
|
-
: `Received ${formatTokenAmount(BigInt(dTxs.amount), srcToken.decimals)} ${srcToken.symbol}`
|
|
460
|
-
}
|
|
474
|
+
title={`Received ${formatTokenAmount(BigInt(dTxs.amount), srcToken.decimals)} ${srcToken.symbol}`}
|
|
461
475
|
chainId={order.srcChain}
|
|
462
476
|
tx={dTxs}
|
|
463
477
|
isProcessing={false}
|
|
@@ -503,7 +517,7 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
503
517
|
formattedActualDstAmount: formattedActualDstAmount,
|
|
504
518
|
dstToken,
|
|
505
519
|
recipientName,
|
|
506
|
-
centerTruncate
|
|
520
|
+
centerTruncate
|
|
507
521
|
})}
|
|
508
522
|
<ExternalLink className="ml-2 h-4 w-4" />
|
|
509
523
|
</a>
|
|
@@ -516,7 +530,7 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
516
530
|
textColor="text-white"
|
|
517
531
|
className="flex w-full items-center gap-2"
|
|
518
532
|
disabled={txLoading || isSwitchingOrExecuting}
|
|
519
|
-
onClick={
|
|
533
|
+
onClick={() => setB3ModalOpen(false)}
|
|
520
534
|
>
|
|
521
535
|
<span className="pl-4">Continue to Tournament</span>
|
|
522
536
|
<ChevronRight className="h-4 w-4" />
|
|
@@ -526,7 +540,7 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
526
540
|
{order.status === OrderStatus.Executed && (
|
|
527
541
|
<button
|
|
528
542
|
className="bg-as-on-surface-2 text-as-secondary flex w-full items-center justify-center gap-2 rounded-lg p-2"
|
|
529
|
-
onClick={mode === "page" ?
|
|
543
|
+
onClick={mode === "page" ? onBack : () => setB3ModalOpen(false)}
|
|
530
544
|
>
|
|
531
545
|
{mode === "page" ? (
|
|
532
546
|
<>
|
|
@@ -557,11 +571,7 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
557
571
|
? depositTxs.map(dTxs => (
|
|
558
572
|
<TransactionDetails
|
|
559
573
|
key={dTxs.txHash}
|
|
560
|
-
title={
|
|
561
|
-
order.onrampMetadata?.vendor === OnrampVendor.StripeWeb2
|
|
562
|
-
? `Received payment`
|
|
563
|
-
: `Received ${formatTokenAmount(BigInt(dTxs.amount), srcToken.decimals)} ${srcToken.symbol}`
|
|
564
|
-
}
|
|
574
|
+
title={`Received ${formatTokenAmount(BigInt(dTxs.amount), srcToken.decimals)} ${srcToken.symbol}`}
|
|
565
575
|
chainId={order.srcChain}
|
|
566
576
|
tx={dTxs}
|
|
567
577
|
isProcessing={false}
|
|
@@ -631,7 +641,7 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
631
641
|
formattedActualDstAmount,
|
|
632
642
|
dstToken,
|
|
633
643
|
recipientName,
|
|
634
|
-
centerTruncate
|
|
644
|
+
centerTruncate
|
|
635
645
|
})}
|
|
636
646
|
<ExternalLink className="ml-2 h-4 w-4" />
|
|
637
647
|
</a>
|
|
@@ -644,7 +654,7 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
644
654
|
textColor="text-white"
|
|
645
655
|
className="flex w-full items-center gap-2"
|
|
646
656
|
disabled={txLoading || isSwitchingOrExecuting}
|
|
647
|
-
onClick={
|
|
657
|
+
onClick={() => setB3ModalOpen(false)}
|
|
648
658
|
>
|
|
649
659
|
<span className="pl-4">Continue to Tournament</span>
|
|
650
660
|
<ChevronRight className="h-4 w-4" />
|
|
@@ -654,7 +664,7 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
654
664
|
{order.status === OrderStatus.Executed && (
|
|
655
665
|
<button
|
|
656
666
|
className="bg-as-on-surface-2 text-as-secondary flex w-full items-center justify-center gap-2 rounded-lg p-2"
|
|
657
|
-
onClick={mode === "page" ?
|
|
667
|
+
onClick={mode === "page" ? onBack : () => setB3ModalOpen(false)}
|
|
658
668
|
>
|
|
659
669
|
{mode === "page" ? (
|
|
660
670
|
<>
|
|
@@ -686,11 +696,7 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
686
696
|
{(depositTxs || []).map((dTxs, index) => (
|
|
687
697
|
<TransactionDetails
|
|
688
698
|
key={dTxs.txHash}
|
|
689
|
-
title={
|
|
690
|
-
order.onrampMetadata?.vendor === OnrampVendor.StripeWeb2
|
|
691
|
-
? `Received payment`
|
|
692
|
-
: `Received ${formatTokenAmount(BigInt(dTxs.amount), srcToken.decimals)} ${srcToken.symbol}`
|
|
693
|
-
}
|
|
699
|
+
title={`Received ${formatTokenAmount(BigInt(dTxs.amount), srcToken.decimals)} ${srcToken.symbol}`}
|
|
694
700
|
chainId={order.srcChain}
|
|
695
701
|
tx={dTxs}
|
|
696
702
|
isProcessing={index < (depositTxs || []).length - 1 ? false : !depositEnoughAmount}
|
|
@@ -724,11 +730,7 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
724
730
|
/>
|
|
725
731
|
) : (
|
|
726
732
|
<TransactionDetails
|
|
727
|
-
title={
|
|
728
|
-
order.onrampMetadata?.vendor === OnrampVendor.StripeWeb2
|
|
729
|
-
? `Waiting for payment`
|
|
730
|
-
: `Waiting for deposit ${formattedDepositDeficit} ${srcToken.symbol}`
|
|
731
|
-
}
|
|
733
|
+
title={`Waiting for deposit ${formattedDepositDeficit} ${srcToken.symbol}`}
|
|
732
734
|
chainId={order.srcChain}
|
|
733
735
|
tx={null}
|
|
734
736
|
isProcessing={true}
|
|
@@ -861,7 +863,7 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
861
863
|
value={getPaymentUrl(
|
|
862
864
|
order.globalAddress,
|
|
863
865
|
BigInt(order.srcAmount),
|
|
864
|
-
order.srcTokenAddress === RELAY_ETH_ADDRESS ? "ETH" : order.srcTokenAddress
|
|
866
|
+
order.srcTokenAddress === RELAY_ETH_ADDRESS ? "ETH" : order.srcTokenAddress
|
|
865
867
|
)}
|
|
866
868
|
className="max-w-[200px]"
|
|
867
869
|
/>
|
|
@@ -930,7 +932,7 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
930
932
|
.share({
|
|
931
933
|
title: "Complete Deposit",
|
|
932
934
|
text: "Complete your deposit on BSMNT.fun",
|
|
933
|
-
url: permalink
|
|
935
|
+
url: permalink
|
|
934
936
|
})
|
|
935
937
|
.catch(error => console.log("Error sharing:", error));
|
|
936
938
|
} else {
|
|
@@ -1004,7 +1006,7 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
1004
1006
|
className={cn(
|
|
1005
1007
|
"h-3",
|
|
1006
1008
|
order.dstChain !== b3.id && "w-3 rounded-full",
|
|
1007
|
-
order.dstChain === b3.id && "h-4"
|
|
1009
|
+
order.dstChain === b3.id && "h-4"
|
|
1008
1010
|
)}
|
|
1009
1011
|
/>
|
|
1010
1012
|
</div>
|
|
@@ -1052,7 +1054,7 @@ export const OrderDetails = memo(function OrderDetails({
|
|
|
1052
1054
|
|
|
1053
1055
|
<button
|
|
1054
1056
|
className="bg-as-on-surface-2 text-as-secondary flex w-full items-center justify-center gap-2 rounded-lg p-2"
|
|
1055
|
-
onClick={
|
|
1057
|
+
onClick={onBack}
|
|
1056
1058
|
>
|
|
1057
1059
|
Cancel and start over <RefreshCcw className="ml-2 h-4 w-4" />
|
|
1058
1060
|
</button>
|
|
@@ -1067,7 +1069,7 @@ function TransactionDetails({
|
|
|
1067
1069
|
chainId,
|
|
1068
1070
|
tx,
|
|
1069
1071
|
isProcessing,
|
|
1070
|
-
delay
|
|
1072
|
+
delay
|
|
1071
1073
|
}: {
|
|
1072
1074
|
title: string;
|
|
1073
1075
|
chainId: number;
|
|
@@ -1095,7 +1097,7 @@ function TransactionDetails({
|
|
|
1095
1097
|
transition={{ duration: 0.5, ease: "easeOut", delay }}
|
|
1096
1098
|
className="bg-as-brand/70 absolute z-10 m-2 flex h-6 w-6 items-center justify-center rounded-full border border-white/30 shadow-lg shadow-purple-500/30 backdrop-blur-sm"
|
|
1097
1099
|
style={{
|
|
1098
|
-
boxShadow: "0 0 15px 5px rgba(138, 43, 226, 0.2)"
|
|
1100
|
+
boxShadow: "0 0 15px 5px rgba(138, 43, 226, 0.2)"
|
|
1099
1101
|
}}
|
|
1100
1102
|
>
|
|
1101
1103
|
<CheckIcon className="text-as-primary h-3 w-3" />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { useAnyspendOrderHistory } from "@b3dotfun/sdk/anyspend
|
|
3
|
+
import { useAnyspendOrderHistory } from "@b3dotfun/sdk/anyspend";
|
|
4
4
|
import { Button, Skeleton, useAccountWallet } from "@b3dotfun/sdk/global-account/react";
|
|
5
5
|
import { ArrowLeft, RefreshCcw } from "lucide-react";
|
|
6
6
|
import { OrderHistoryItem } from "./OrderHistoryItem";
|
|
@@ -43,7 +43,7 @@ export function OrderHistoryItem({ order, onSelectOrder, mode }: OrderHistoryIte
|
|
|
43
43
|
key={`anyspend-${order.id}`}
|
|
44
44
|
className={cn(
|
|
45
45
|
"bg-as-light-brand/20 rounded-lg border p-4",
|
|
46
|
-
onSelectOrder && "hover:bg-as-light-brand/30 hover:border-as-brand cursor-pointer transition-colors"
|
|
46
|
+
onSelectOrder && "hover:bg-as-light-brand/30 hover:border-as-brand cursor-pointer transition-colors"
|
|
47
47
|
)}
|
|
48
48
|
onClick={() => onSelectOrder?.(order.id)}
|
|
49
49
|
>
|
|
@@ -53,7 +53,7 @@ export function OrderHistoryItem({ order, onSelectOrder, mode }: OrderHistoryIte
|
|
|
53
53
|
"px-3 py-1 text-xs",
|
|
54
54
|
orderDisplayStatus === "processing" && "bg-yellow-500/10 text-yellow-500",
|
|
55
55
|
orderDisplayStatus === "success" && "bg-green-500/10 text-green-500",
|
|
56
|
-
orderDisplayStatus === "failure" && "bg-red-500/10 text-red-500"
|
|
56
|
+
orderDisplayStatus === "failure" && "bg-red-500/10 text-red-500"
|
|
57
57
|
)}
|
|
58
58
|
>
|
|
59
59
|
{orderStatusText}
|
|
@@ -160,7 +160,7 @@ export function OrderHistoryItem({ order, onSelectOrder, mode }: OrderHistoryIte
|
|
|
160
160
|
: expectedDstAmount
|
|
161
161
|
? BigInt(expectedDstAmount)
|
|
162
162
|
: BigInt(0),
|
|
163
|
-
dstToken.decimals
|
|
163
|
+
dstToken.decimals
|
|
164
164
|
)}{" "}
|
|
165
165
|
{dstToken.symbol}
|
|
166
166
|
</div>
|
|
@@ -18,7 +18,7 @@ export function OrderToken({
|
|
|
18
18
|
token,
|
|
19
19
|
setToken,
|
|
20
20
|
requiredAmount,
|
|
21
|
-
tokenSelectClassName
|
|
21
|
+
tokenSelectClassName
|
|
22
22
|
}: {
|
|
23
23
|
context: "from" | "to";
|
|
24
24
|
address: string | undefined;
|
|
@@ -36,7 +36,7 @@ export function OrderToken({
|
|
|
36
36
|
const { nativeTokens, fungibleTokens } = useTokenBalancesByChain({
|
|
37
37
|
address: wallet?.address || "",
|
|
38
38
|
chainsIds: [chainId],
|
|
39
|
-
enabled: !!wallet?.address && !!chainName
|
|
39
|
+
enabled: !!wallet?.address && !!chainName
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
const { formattedBalance, hasEnoughBalance } = useMemo(() => {
|
|
@@ -61,7 +61,7 @@ export function OrderToken({
|
|
|
61
61
|
|
|
62
62
|
return {
|
|
63
63
|
formattedBalance,
|
|
64
|
-
hasEnoughBalance
|
|
64
|
+
hasEnoughBalance
|
|
65
65
|
};
|
|
66
66
|
}, [chainId, fungibleTokens, nativeTokens, requiredAmount, token, wallet?.address]);
|
|
67
67
|
|
|
@@ -86,7 +86,7 @@ export function OrderToken({
|
|
|
86
86
|
decimals: token.decimals,
|
|
87
87
|
metadata: { logoURI: token.logoURI },
|
|
88
88
|
name: token.name,
|
|
89
|
-
symbol: token.symbol
|
|
89
|
+
symbol: token.symbol
|
|
90
90
|
});
|
|
91
91
|
}}
|
|
92
92
|
supportedWalletVMs={["evm", "svm"]}
|
|
@@ -97,7 +97,7 @@ export function OrderToken({
|
|
|
97
97
|
role="combobox"
|
|
98
98
|
className={cn(
|
|
99
99
|
"bg-b3-react-background border-as-stroke flex h-auto w-fit shrink-0 items-center justify-center gap-2 rounded-xl border-2 px-2 py-1 pr-2 text-center",
|
|
100
|
-
tokenSelectClassName
|
|
100
|
+
tokenSelectClassName
|
|
101
101
|
)}
|
|
102
102
|
>
|
|
103
103
|
{token.metadata.logoURI ? (
|
|
@@ -25,7 +25,7 @@ export function OrderTokenAmount({
|
|
|
25
25
|
className,
|
|
26
26
|
innerClassName,
|
|
27
27
|
amountClassName,
|
|
28
|
-
tokenSelectClassName
|
|
28
|
+
tokenSelectClassName
|
|
29
29
|
}: {
|
|
30
30
|
disabled?: boolean;
|
|
31
31
|
inputValue: string;
|
|
@@ -76,7 +76,7 @@ export function OrderTokenAmount({
|
|
|
76
76
|
decimals: newToken.decimals,
|
|
77
77
|
metadata: { logoURI: newToken.logoURI },
|
|
78
78
|
name: newToken.name,
|
|
79
|
-
symbol: newToken.symbol
|
|
79
|
+
symbol: newToken.symbol
|
|
80
80
|
});
|
|
81
81
|
|
|
82
82
|
// If this is the source token, reset the amount immediately
|
|
@@ -109,7 +109,7 @@ export function OrderTokenAmount({
|
|
|
109
109
|
spellCheck="false"
|
|
110
110
|
className={cn(
|
|
111
111
|
"placeholder:text-as-primary/70 disabled:text-as-primary/70 text-as-primary w-full bg-transparent text-4xl font-semibold leading-[42px] outline-none sm:text-[30px]",
|
|
112
|
-
amountClassName
|
|
112
|
+
amountClassName
|
|
113
113
|
)}
|
|
114
114
|
pattern="^[0-9]*[.,]?[0-9]*$"
|
|
115
115
|
disabled={disabled}
|
|
@@ -141,7 +141,7 @@ export function OrderTokenAmount({
|
|
|
141
141
|
role="combobox"
|
|
142
142
|
className={cn(
|
|
143
143
|
"bg-b3-react-background border-as-stroke flex h-auto w-fit shrink-0 items-center justify-center gap-2 rounded-xl border-2 px-2 py-1 pr-2 text-center",
|
|
144
|
-
tokenSelectClassName
|
|
144
|
+
tokenSelectClassName
|
|
145
145
|
)}
|
|
146
146
|
>
|
|
147
147
|
{token.metadata.logoURI ? (
|