@b3dotfun/sdk 0.0.7-alpha.12 → 0.0.7-alpha.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/anyspend/abis/abi-usdc-base.js +97 -97
- package/dist/cjs/anyspend/abis/erc20-staking.js +51 -51
- package/dist/cjs/anyspend/constants/index.js +10 -10
- package/dist/cjs/anyspend/react/components/AnySpend.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpend.js +20 -20
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +32 -32
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +29 -29
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +4 -4
- package/dist/cjs/anyspend/react/components/AnySpendNFTButton.js +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +17 -17
- package/dist/cjs/anyspend/react/components/AnySpendTournament.js +4 -4
- package/dist/cjs/anyspend/react/components/common/ChainTokenIcon.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/ChainTokenIcon.js +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +9 -9
- package/dist/cjs/anyspend/react/components/common/OrderToken.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderToken.js +4 -4
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmount.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmount.js +2 -2
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +2 -2
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +7 -7
- package/dist/cjs/anyspend/react/components/common/PaymentMethodIcons.js +1 -1
- package/dist/cjs/anyspend/react/components/common/PaymentOneClick.js +3 -3
- package/dist/cjs/anyspend/react/components/common/PaymentStripeWeb2.js +12 -12
- package/dist/cjs/anyspend/react/components/common/TokenBalance.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/common/TokenBalance.js +2 -2
- package/dist/cjs/anyspend/react/components/index.d.ts +1 -0
- package/dist/cjs/anyspend/react/components/index.js +3 -1
- package/dist/cjs/anyspend/react/components/modals/EnterRecipientModal.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/modals/EnterRecipientModal.js +1 -1
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.js +14 -14
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.js +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +10 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +10 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.js +3 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendQuote.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendSendPermitData.js +3 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendTokens.js +3 -3
- package/dist/cjs/anyspend/react/hooks/useCoinbaseOnrampOptions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useGeoOnrampOptions.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useGetGeo.js +1 -1
- package/dist/cjs/anyspend/react/hooks/usePermitData.js +19 -19
- package/dist/cjs/anyspend/react/hooks/useStripeClientSecret.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useStripeSupport.js +2 -2
- package/dist/cjs/anyspend/react/providers/AnyspendProvider.js +3 -3
- package/dist/cjs/anyspend/services/anyspend.d.ts +6 -1
- package/dist/cjs/anyspend/services/anyspend.js +13 -13
- package/dist/cjs/anyspend/types/custom.js +2 -2
- package/dist/cjs/anyspend/types/globalWallet.js +1 -1
- package/dist/cjs/anyspend/types/nft.js +6 -6
- package/dist/cjs/anyspend/types/onramp.d.ts +3 -0
- package/dist/cjs/anyspend/types/onramp.js +2 -1
- package/dist/cjs/anyspend/types/order.d.ts +30 -0
- package/dist/cjs/anyspend/types/order.js +7 -7
- package/dist/cjs/anyspend/types/permit.js +1 -1
- package/dist/cjs/anyspend/types/req-res/createOrder.d.ts +70 -0
- package/dist/cjs/anyspend/types/req-res/createOrder.js +9 -9
- package/dist/cjs/anyspend/types/req-res/getCoinbaseOnrampOptions.js +5 -5
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.d.ts +45 -0
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.js +4 -4
- package/dist/cjs/anyspend/types/req-res/getOrderByCreator.js +2 -2
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.d.ts +35 -0
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.js +1 -1
- package/dist/cjs/anyspend/types/req-res/getQuote.d.ts +26 -0
- package/dist/cjs/anyspend/types/req-res/getQuote.js +10 -8
- package/dist/cjs/anyspend/types/req-res/getTokenList.js +3 -3
- package/dist/cjs/anyspend/types/req-res/sendPermitData.js +2 -2
- package/dist/cjs/anyspend/types/swap.js +2 -2
- package/dist/cjs/anyspend/types/token.js +2 -2
- package/dist/cjs/anyspend/types/tournament.js +4 -4
- package/dist/cjs/anyspend/types/transaction.js +4 -4
- package/dist/cjs/anyspend/utils/chain.js +16 -16
- package/dist/cjs/anyspend/utils/format.js +2 -2
- package/dist/cjs/anyspend/utils/orderPayload.js +6 -6
- package/dist/cjs/anyspend/utils/token.js +10 -10
- package/dist/cjs/global-account/app.js +4 -4
- package/dist/cjs/global-account/app.native.js +4 -4
- package/dist/cjs/global-account/bsmnt.js +4 -4
- package/dist/cjs/global-account/bsmnt.native.js +4 -4
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +1 -1
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +2 -2
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +5 -5
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.d.ts +2 -2
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +4 -4
- package/dist/cjs/global-account/react/components/B3Provider/types.js +1 -1
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.js +5 -5
- package/dist/cjs/global-account/react/components/MintButton/MintButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/MintButton/MintButton.js +5 -5
- package/dist/cjs/global-account/react/components/RelayKitProviderWrapper.js +2 -2
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +1 -1
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissions.js +5 -5
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/RequestPermissions/RequestPermissionsButton.js +2 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +12 -12
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/WalletRow.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.js +9 -9
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +2 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.js +2 -2
- package/dist/cjs/global-account/react/components/Transak/TransakModal.js +4 -4
- package/dist/cjs/global-account/react/components/custom/Button.js +5 -5
- package/dist/cjs/global-account/react/components/custom/Icon.js +1 -1
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.js +1 -1
- package/dist/cjs/global-account/react/components/custom/StaggeredFadeLoader.js +3 -3
- package/dist/cjs/global-account/react/components/index.d.ts +4 -4
- package/dist/cjs/global-account/react/components/magicui/AnimatedLottie.js +1 -1
- package/dist/cjs/global-account/react/components/ui/Loading.js +2 -2
- package/dist/cjs/global-account/react/components/ui/ShinyButton.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/ShinyButton.js +3 -3
- package/dist/cjs/global-account/react/components/ui/TabSystem.js +1 -1
- package/dist/cjs/global-account/react/components/ui/Tabs.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/Tabs.js +1 -1
- package/dist/cjs/global-account/react/components/ui/badge.js +4 -4
- package/dist/cjs/global-account/react/components/ui/button.js +5 -5
- package/dist/cjs/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/dialog.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/glare-card-rounded.js +12 -12
- package/dist/cjs/global-account/react/components/ui/glare-card.js +11 -11
- package/dist/cjs/global-account/react/components/ui/input.js +1 -1
- package/dist/cjs/global-account/react/components/ui/text-loop.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/text-loop.js +2 -2
- package/dist/cjs/global-account/react/components/ui/text-shimmer.js +2 -2
- package/dist/cjs/global-account/react/hooks/useAccountAssets.js +4 -4
- package/dist/cjs/global-account/react/hooks/useAccountWallet.js +4 -4
- package/dist/cjs/global-account/react/hooks/useAddTWSessionKey.d.ts +2 -2
- package/dist/cjs/global-account/react/hooks/useAddTWSessionKey.js +6 -6
- package/dist/cjs/global-account/react/hooks/useAuthentication.js +3 -3
- package/dist/cjs/global-account/react/hooks/useB3BalanceFromAddresses.js +7 -7
- package/dist/cjs/global-account/react/hooks/useB3EnsName.js +5 -5
- package/dist/cjs/global-account/react/hooks/useBestTransactionPath.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useBestTransactionPath.js +10 -10
- package/dist/cjs/global-account/react/hooks/useBsmntProfile.js +1 -1
- package/dist/cjs/global-account/react/hooks/useChainSwitchWithAction.js +3 -3
- package/dist/cjs/global-account/react/hooks/useClaim.js +4 -4
- package/dist/cjs/global-account/react/hooks/useConnect.js +3 -3
- package/dist/cjs/global-account/react/hooks/useExchangeRate.js +3 -3
- package/dist/cjs/global-account/react/hooks/useGetAllTWSigners.js +7 -7
- package/dist/cjs/global-account/react/hooks/useGetGeo.js +1 -1
- package/dist/cjs/global-account/react/hooks/useHandleConnectWithPrivy.js +2 -2
- package/dist/cjs/global-account/react/hooks/useNativeBalance.js +6 -6
- package/dist/cjs/global-account/react/hooks/useOnchainName.js +10 -10
- package/dist/cjs/global-account/react/hooks/useOneBalance.js +2 -2
- package/dist/cjs/global-account/react/hooks/useRemoveSessionKey.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useRemoveSessionKey.js +3 -3
- package/dist/cjs/global-account/react/hooks/useRouter.js +6 -6
- package/dist/cjs/global-account/react/hooks/useSiwe.js +4 -4
- package/dist/cjs/global-account/react/hooks/useTokenBalance.js +6 -6
- package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokenBalancesByChain.js +9 -9
- package/dist/cjs/global-account/react/hooks/useTokenData.js +3 -3
- package/dist/cjs/global-account/react/hooks/useTokenFromUrl.js +10 -10
- package/dist/cjs/global-account/react/hooks/useTokenPrice.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokenPrice.js +6 -6
- package/dist/cjs/global-account/react/hooks/useTokenPriceWithFallback.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokenPriceWithFallback.js +7 -7
- package/dist/cjs/global-account/react/hooks/useTokensFromAddress.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTokensFromAddress.js +2 -2
- package/dist/cjs/global-account/react/hooks/useURLParams.js +1 -1
- package/dist/cjs/global-account/react/stores/index.d.ts +1 -1
- package/dist/cjs/global-account/react/stores/useAuthStore.js +3 -3
- package/dist/cjs/global-account/react/stores/useModalStore.js +3 -3
- package/dist/cjs/global-account/server.js +3 -3
- package/dist/cjs/global-account/types/chain-networks.js +8 -8
- package/dist/cjs/global-account/types/feature-flags.js +1 -1
- package/dist/cjs/shared/constants/chains/b3Chain.js +35 -35
- package/dist/cjs/shared/constants/chains/chainPlatformMap.js +1 -1
- package/dist/cjs/shared/constants/chains/supported.js +1 -1
- package/dist/cjs/shared/constants/index.js +1 -1
- package/dist/cjs/shared/thirdweb/initiateClient.js +2 -2
- package/dist/cjs/shared/thirdweb/openapi-ts.config.js +1 -1
- package/dist/cjs/shared/utils/b3Ens.js +4 -4
- package/dist/cjs/shared/utils/chain-transformers.js +9 -9
- package/dist/cjs/shared/utils/fetchBalances.js +4 -4
- package/dist/cjs/shared/utils/insights.js +28 -28
- package/dist/cjs/shared/utils/ipfs.js +1 -1
- package/dist/cjs/shared/utils/number.js +3 -3
- package/dist/cjs/shared/utils/simplehash.js +22 -22
- package/dist/cjs/shared/utils/thirdweb-insights.js +15 -15
- package/dist/esm/anyspend/abis/abi-usdc-base.js +97 -97
- package/dist/esm/anyspend/abis/erc20-staking.js +51 -51
- package/dist/esm/anyspend/constants/index.js +10 -10
- package/dist/esm/anyspend/react/components/AnySpend.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpend.js +22 -22
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +33 -33
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +2 -2
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +31 -31
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +4 -4
- package/dist/esm/anyspend/react/components/AnySpendNFTButton.js +1 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +18 -18
- package/dist/esm/anyspend/react/components/AnySpendTournament.js +4 -4
- package/dist/esm/anyspend/react/components/common/ChainTokenIcon.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/ChainTokenIcon.js +1 -1
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +12 -12
- package/dist/esm/anyspend/react/components/common/OrderToken.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/OrderToken.js +4 -4
- package/dist/esm/anyspend/react/components/common/OrderTokenAmount.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/OrderTokenAmount.js +2 -2
- package/dist/esm/anyspend/react/components/common/PanelOnramp.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/PanelOnramp.js +2 -2
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +8 -8
- package/dist/esm/anyspend/react/components/common/PaymentMethodIcons.js +1 -1
- package/dist/esm/anyspend/react/components/common/PaymentOneClick.js +3 -3
- package/dist/esm/anyspend/react/components/common/PaymentStripeWeb2.js +12 -12
- package/dist/esm/anyspend/react/components/common/TokenBalance.d.ts +1 -1
- package/dist/esm/anyspend/react/components/common/TokenBalance.js +2 -2
- package/dist/esm/anyspend/react/components/index.d.ts +1 -0
- package/dist/esm/anyspend/react/components/index.js +1 -0
- package/dist/esm/anyspend/react/components/modals/EnterRecipientModal.d.ts +1 -1
- package/dist/esm/anyspend/react/components/modals/EnterRecipientModal.js +1 -1
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +1 -1
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.js +15 -15
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +6 -6
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.js +6 -6
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +10 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +10 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.js +3 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendQuote.js +2 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendSendPermitData.js +3 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendTokens.js +3 -3
- package/dist/esm/anyspend/react/hooks/useCoinbaseOnrampOptions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useGeoOnrampOptions.js +2 -2
- package/dist/esm/anyspend/react/hooks/useGetGeo.js +1 -1
- package/dist/esm/anyspend/react/hooks/usePermitData.js +19 -19
- package/dist/esm/anyspend/react/hooks/useStripeClientSecret.js +2 -2
- package/dist/esm/anyspend/react/hooks/useStripeSupport.js +2 -2
- package/dist/esm/anyspend/react/providers/AnyspendProvider.js +3 -3
- package/dist/esm/anyspend/services/anyspend.d.ts +6 -1
- package/dist/esm/anyspend/services/anyspend.js +14 -14
- package/dist/esm/anyspend/types/custom.js +2 -2
- package/dist/esm/anyspend/types/globalWallet.js +1 -1
- package/dist/esm/anyspend/types/nft.js +6 -6
- package/dist/esm/anyspend/types/onramp.d.ts +3 -0
- package/dist/esm/anyspend/types/onramp.js +2 -1
- package/dist/esm/anyspend/types/order.d.ts +30 -0
- package/dist/esm/anyspend/types/order.js +7 -7
- package/dist/esm/anyspend/types/permit.js +1 -1
- package/dist/esm/anyspend/types/req-res/createOrder.d.ts +70 -0
- package/dist/esm/anyspend/types/req-res/createOrder.js +9 -9
- package/dist/esm/anyspend/types/req-res/getCoinbaseOnrampOptions.js +5 -5
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.d.ts +45 -0
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.js +4 -4
- package/dist/esm/anyspend/types/req-res/getOrderByCreator.js +2 -2
- package/dist/esm/anyspend/types/req-res/getOrderHistory.d.ts +35 -0
- package/dist/esm/anyspend/types/req-res/getOrderHistory.js +1 -1
- package/dist/esm/anyspend/types/req-res/getQuote.d.ts +26 -0
- package/dist/esm/anyspend/types/req-res/getQuote.js +10 -8
- package/dist/esm/anyspend/types/req-res/getTokenList.js +3 -3
- package/dist/esm/anyspend/types/req-res/sendPermitData.js +2 -2
- package/dist/esm/anyspend/types/swap.js +2 -2
- package/dist/esm/anyspend/types/token.js +2 -2
- package/dist/esm/anyspend/types/tournament.js +4 -4
- package/dist/esm/anyspend/types/transaction.js +4 -4
- package/dist/esm/anyspend/utils/chain.js +18 -18
- package/dist/esm/anyspend/utils/format.js +2 -2
- package/dist/esm/anyspend/utils/orderPayload.js +6 -6
- package/dist/esm/anyspend/utils/token.js +10 -10
- package/dist/esm/global-account/app.js +4 -4
- package/dist/esm/global-account/app.native.js +4 -4
- package/dist/esm/global-account/bsmnt.js +4 -4
- package/dist/esm/global-account/bsmnt.native.js +4 -4
- package/dist/esm/global-account/react/components/B3DynamicModal.js +2 -2
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +2 -2
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +5 -5
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.d.ts +2 -2
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +4 -4
- package/dist/esm/global-account/react/components/B3Provider/types.js +1 -1
- package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -1
- package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.js +6 -6
- package/dist/esm/global-account/react/components/MintButton/MintButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/MintButton/MintButton.js +5 -5
- package/dist/esm/global-account/react/components/RelayKitProviderWrapper.js +2 -2
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +1 -1
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissions.js +6 -6
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/RequestPermissions/RequestPermissionsButton.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +13 -13
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +2 -2
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.js +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/components/WalletRow.js +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.js +9 -9
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +3 -3
- package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.js +2 -2
- package/dist/esm/global-account/react/components/Transak/TransakModal.js +4 -4
- package/dist/esm/global-account/react/components/custom/Button.js +5 -5
- package/dist/esm/global-account/react/components/custom/Icon.js +1 -1
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.js +1 -1
- package/dist/esm/global-account/react/components/custom/StaggeredFadeLoader.js +3 -3
- package/dist/esm/global-account/react/components/custom/WalletConnectorIcon.js +1 -1
- package/dist/esm/global-account/react/components/index.d.ts +4 -4
- package/dist/esm/global-account/react/components/index.js +4 -4
- package/dist/esm/global-account/react/components/magicui/AnimatedLottie.js +1 -1
- package/dist/esm/global-account/react/components/ui/Loading.js +2 -2
- package/dist/esm/global-account/react/components/ui/ShinyButton.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/ShinyButton.js +3 -3
- package/dist/esm/global-account/react/components/ui/TabSystem.js +1 -1
- package/dist/esm/global-account/react/components/ui/Tabs.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/Tabs.js +1 -1
- package/dist/esm/global-account/react/components/ui/badge.js +4 -4
- package/dist/esm/global-account/react/components/ui/button.js +5 -5
- package/dist/esm/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/command.js +1 -1
- package/dist/esm/global-account/react/components/ui/dialog.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/dialog.js +1 -1
- package/dist/esm/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/drawer.js +1 -1
- package/dist/esm/global-account/react/components/ui/glare-card-rounded.js +12 -12
- package/dist/esm/global-account/react/components/ui/glare-card.js +11 -11
- package/dist/esm/global-account/react/components/ui/input.js +1 -1
- package/dist/esm/global-account/react/components/ui/text-loop.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/text-loop.js +2 -2
- package/dist/esm/global-account/react/components/ui/text-shimmer.js +2 -2
- package/dist/esm/global-account/react/hooks/useAccountAssets.js +4 -4
- package/dist/esm/global-account/react/hooks/useAccountWallet.js +4 -4
- package/dist/esm/global-account/react/hooks/useAddTWSessionKey.d.ts +2 -2
- package/dist/esm/global-account/react/hooks/useAddTWSessionKey.js +6 -6
- package/dist/esm/global-account/react/hooks/useAuthentication.js +3 -3
- package/dist/esm/global-account/react/hooks/useB3BalanceFromAddresses.js +7 -7
- package/dist/esm/global-account/react/hooks/useB3EnsName.js +5 -5
- package/dist/esm/global-account/react/hooks/useBestTransactionPath.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useBestTransactionPath.js +10 -10
- package/dist/esm/global-account/react/hooks/useBsmntProfile.js +1 -1
- package/dist/esm/global-account/react/hooks/useChainSwitchWithAction.js +3 -3
- package/dist/esm/global-account/react/hooks/useClaim.js +4 -4
- package/dist/esm/global-account/react/hooks/useConnect.js +3 -3
- package/dist/esm/global-account/react/hooks/useExchangeRate.js +3 -3
- package/dist/esm/global-account/react/hooks/useGetAllTWSigners.js +7 -7
- package/dist/esm/global-account/react/hooks/useGetGeo.js +1 -1
- package/dist/esm/global-account/react/hooks/useHandleConnectWithPrivy.js +2 -2
- package/dist/esm/global-account/react/hooks/useNativeBalance.js +6 -6
- package/dist/esm/global-account/react/hooks/useOnchainName.js +10 -10
- package/dist/esm/global-account/react/hooks/useOneBalance.js +2 -2
- package/dist/esm/global-account/react/hooks/useRemoveSessionKey.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useRemoveSessionKey.js +3 -3
- package/dist/esm/global-account/react/hooks/useRouter.js +6 -6
- package/dist/esm/global-account/react/hooks/useSiwe.js +4 -4
- package/dist/esm/global-account/react/hooks/useTokenBalance.js +6 -6
- package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokenBalancesByChain.js +9 -9
- package/dist/esm/global-account/react/hooks/useTokenData.js +3 -3
- package/dist/esm/global-account/react/hooks/useTokenFromUrl.js +10 -10
- package/dist/esm/global-account/react/hooks/useTokenPrice.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokenPrice.js +6 -6
- package/dist/esm/global-account/react/hooks/useTokenPriceWithFallback.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokenPriceWithFallback.js +7 -7
- package/dist/esm/global-account/react/hooks/useTokensFromAddress.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTokensFromAddress.js +2 -2
- package/dist/esm/global-account/react/hooks/useURLParams.js +1 -1
- package/dist/esm/global-account/react/stores/index.d.ts +1 -1
- package/dist/esm/global-account/react/stores/useAuthStore.js +3 -3
- package/dist/esm/global-account/react/stores/useModalStore.js +3 -3
- package/dist/esm/global-account/server.js +3 -3
- package/dist/esm/global-account/types/chain-networks.js +8 -8
- package/dist/esm/global-account/types/feature-flags.js +1 -1
- package/dist/esm/shared/constants/chains/b3Chain.js +35 -35
- package/dist/esm/shared/constants/chains/chainPlatformMap.js +1 -1
- package/dist/esm/shared/constants/chains/supported.js +1 -1
- package/dist/esm/shared/constants/index.js +1 -1
- package/dist/esm/shared/thirdweb/initiateClient.js +2 -2
- package/dist/esm/shared/thirdweb/openapi-ts.config.js +1 -1
- package/dist/esm/shared/utils/b3Ens.js +4 -4
- package/dist/esm/shared/utils/chain-transformers.js +9 -9
- package/dist/esm/shared/utils/fetchBalances.js +4 -4
- package/dist/esm/shared/utils/insights.js +28 -28
- package/dist/esm/shared/utils/ipfs.js +1 -1
- package/dist/esm/shared/utils/number.js +3 -3
- package/dist/esm/shared/utils/simplehash.js +23 -23
- package/dist/esm/shared/utils/thirdweb-insights.js +15 -15
- package/dist/types/anyspend/react/components/AnySpend.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpendBuySpin.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +2 -2
- package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpendStakeB3.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/ChainTokenIcon.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/OrderToken.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/OrderTokenAmount.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/PanelOnrampPayment.d.ts +1 -1
- package/dist/types/anyspend/react/components/common/TokenBalance.d.ts +1 -1
- package/dist/types/anyspend/react/components/index.d.ts +1 -0
- package/dist/types/anyspend/react/components/modals/EnterRecipientModal.d.ts +1 -1
- package/dist/types/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +1 -1
- package/dist/types/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +10 -0
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +10 -0
- package/dist/types/anyspend/services/anyspend.d.ts +6 -1
- package/dist/types/anyspend/types/onramp.d.ts +3 -0
- package/dist/types/anyspend/types/order.d.ts +30 -0
- package/dist/types/anyspend/types/req-res/createOrder.d.ts +70 -0
- package/dist/types/anyspend/types/req-res/getOrderAndTransactions.d.ts +45 -0
- package/dist/types/anyspend/types/req-res/getOrderHistory.d.ts +35 -0
- package/dist/types/anyspend/types/req-res/getQuote.d.ts +26 -0
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +2 -2
- package/dist/types/global-account/react/components/B3Provider/B3Provider.native.d.ts +2 -2
- package/dist/types/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -1
- package/dist/types/global-account/react/components/MintButton/MintButton.d.ts +1 -1
- package/dist/types/global-account/react/components/RequestPermissions/RequestPermissions.d.ts +1 -1
- package/dist/types/global-account/react/components/RequestPermissions/RequestPermissionsButton.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/components/AuthButton.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/components/WalletRow.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/steps/LoginStepCustom.d.ts +1 -1
- package/dist/types/global-account/react/components/index.d.ts +4 -4
- package/dist/types/global-account/react/components/ui/ShinyButton.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/Tabs.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/dialog.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/drawer.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/text-loop.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useAddTWSessionKey.d.ts +2 -2
- package/dist/types/global-account/react/hooks/useBestTransactionPath.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useRemoveSessionKey.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokenBalancesByChain.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokenPrice.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokenPriceWithFallback.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTokensFromAddress.d.ts +1 -1
- package/dist/types/global-account/react/stores/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/anyspend/abis/abi-usdc-base.ts +97 -97
- package/src/anyspend/abis/erc20-staking.ts +51 -51
- package/src/anyspend/constants/index.ts +10 -10
- package/src/anyspend/react/components/AnySpend.tsx +33 -32
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +34 -34
- package/src/anyspend/react/components/AnySpendCustom.tsx +39 -39
- package/src/anyspend/react/components/AnySpendNFT.tsx +4 -4
- package/src/anyspend/react/components/AnySpendNFTButton.tsx +1 -1
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +18 -18
- package/src/anyspend/react/components/AnySpendTournament.tsx +4 -4
- package/src/anyspend/react/components/common/ChainTokenIcon.tsx +1 -1
- package/src/anyspend/react/components/common/OrderDetails.tsx +15 -15
- package/src/anyspend/react/components/common/OrderHistoryItem.tsx +3 -3
- package/src/anyspend/react/components/common/OrderToken.tsx +5 -5
- package/src/anyspend/react/components/common/OrderTokenAmount.tsx +4 -4
- package/src/anyspend/react/components/common/PanelOnramp.tsx +3 -3
- package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +8 -8
- package/src/anyspend/react/components/common/PaymentMethodIcons.tsx +1 -1
- package/src/anyspend/react/components/common/PaymentOneClick.tsx +3 -3
- package/src/anyspend/react/components/common/PaymentStripeWeb2.tsx +14 -14
- package/src/anyspend/react/components/common/TokenBalance.tsx +2 -2
- package/src/anyspend/react/components/index.ts +1 -0
- package/src/anyspend/react/components/modals/EnterRecipientModal.tsx +1 -1
- package/src/anyspend/react/components/webview/WebviewOnrampPayment.tsx +18 -18
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +7 -7
- package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +7 -7
- package/src/anyspend/react/hooks/useAnyspendOrderAndTransactions.ts +3 -3
- package/src/anyspend/react/hooks/useAnyspendOrderHistory.ts +4 -4
- package/src/anyspend/react/hooks/useAnyspendQuote.ts +5 -5
- package/src/anyspend/react/hooks/useAnyspendSendPermitData.ts +3 -3
- package/src/anyspend/react/hooks/useAnyspendTokens.ts +4 -4
- package/src/anyspend/react/hooks/useCoinbaseOnrampOptions.ts +3 -3
- package/src/anyspend/react/hooks/useGeoOnrampOptions.ts +3 -3
- package/src/anyspend/react/hooks/useGetGeo.ts +1 -1
- package/src/anyspend/react/hooks/usePermitData.ts +19 -19
- package/src/anyspend/react/hooks/useStripeClientSecret.ts +3 -3
- package/src/anyspend/react/hooks/useStripeSupport.ts +3 -3
- package/src/anyspend/react/providers/AnyspendProvider.tsx +3 -3
- package/src/anyspend/services/anyspend.ts +23 -23
- package/src/anyspend/types/chain.ts +1 -1
- package/src/anyspend/types/custom.ts +2 -2
- package/src/anyspend/types/globalWallet.ts +1 -1
- package/src/anyspend/types/nft.ts +7 -7
- package/src/anyspend/types/onramp.ts +3 -2
- package/src/anyspend/types/order.ts +9 -9
- package/src/anyspend/types/permit.ts +1 -1
- package/src/anyspend/types/relay.ts +1 -1
- package/src/anyspend/types/req-res/createOrder.ts +9 -9
- package/src/anyspend/types/req-res/getCoinbaseOnrampOptions.ts +5 -5
- package/src/anyspend/types/req-res/getOrderAndTransactions.ts +4 -4
- package/src/anyspend/types/req-res/getOrderByCreator.ts +2 -2
- package/src/anyspend/types/req-res/getOrderHistory.ts +1 -1
- package/src/anyspend/types/req-res/getQuote.ts +10 -8
- package/src/anyspend/types/req-res/getTokenList.ts +4 -4
- package/src/anyspend/types/req-res/sendPermitData.ts +2 -2
- package/src/anyspend/types/swap.ts +2 -2
- package/src/anyspend/types/token.ts +2 -2
- package/src/anyspend/types/tournament.ts +4 -4
- package/src/anyspend/types/transaction.ts +4 -4
- package/src/anyspend/utils/chain.ts +25 -25
- package/src/anyspend/utils/format.ts +2 -2
- package/src/anyspend/utils/orderPayload.ts +6 -6
- package/src/anyspend/utils/token.ts +10 -10
- package/src/global-account/app.native.ts +5 -5
- package/src/global-account/app.ts +5 -5
- package/src/global-account/bsmnt.native.ts +5 -5
- package/src/global-account/bsmnt.ts +5 -5
- package/src/global-account/react/components/B3DynamicModal.tsx +3 -3
- package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +4 -4
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +5 -5
- package/src/global-account/react/components/B3Provider/types.ts +1 -1
- package/src/global-account/react/components/ManageAccount/ManageAccount.tsx +6 -6
- package/src/global-account/react/components/MintButton/MintButton.tsx +5 -5
- package/src/global-account/react/components/RelayKitProviderWrapper.tsx +2 -2
- package/src/global-account/react/components/RequestPermissions/RequestPermissions.tsx +7 -7
- package/src/global-account/react/components/RequestPermissions/RequestPermissionsButton.tsx +2 -2
- package/src/global-account/react/components/SignInWithB3/SignIn.tsx +4 -4
- package/src/global-account/react/components/SignInWithB3/SignInWithB3.tsx +2 -2
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +14 -14
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Privy.tsx +2 -2
- package/src/global-account/react/components/SignInWithB3/components/AuthButton.tsx +1 -1
- package/src/global-account/react/components/SignInWithB3/components/WalletRow.tsx +1 -1
- package/src/global-account/react/components/SignInWithB3/steps/LoginStep.tsx +10 -10
- package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +3 -3
- package/src/global-account/react/components/SignInWithB3/utils/signInUtils.ts +2 -2
- package/src/global-account/react/components/Transak/TransakModal.tsx +4 -4
- package/src/global-account/react/components/custom/Button.tsx +7 -7
- package/src/global-account/react/components/custom/Icon.tsx +1 -1
- package/src/global-account/react/components/custom/ManageAccountButton.tsx +1 -1
- package/src/global-account/react/components/custom/StaggeredFadeLoader.tsx +3 -3
- package/src/global-account/react/components/custom/WalletConnectorIcon.tsx +1 -1
- package/src/global-account/react/components/index.ts +4 -4
- package/src/global-account/react/components/magicui/AnimatedLottie.tsx +5 -5
- package/src/global-account/react/components/ui/Loading.tsx +2 -2
- package/src/global-account/react/components/ui/ShinyButton.tsx +5 -5
- package/src/global-account/react/components/ui/TabSystem.tsx +2 -2
- package/src/global-account/react/components/ui/Tabs.tsx +4 -4
- package/src/global-account/react/components/ui/badge.tsx +5 -5
- package/src/global-account/react/components/ui/button.tsx +7 -7
- package/src/global-account/react/components/ui/command.tsx +5 -5
- package/src/global-account/react/components/ui/dialog.tsx +5 -5
- package/src/global-account/react/components/ui/drawer.tsx +2 -2
- package/src/global-account/react/components/ui/glare-card-rounded.tsx +12 -12
- package/src/global-account/react/components/ui/glare-card.tsx +11 -11
- package/src/global-account/react/components/ui/input.tsx +2 -2
- package/src/global-account/react/components/ui/popover.tsx +1 -1
- package/src/global-account/react/components/ui/scroll-area.tsx +1 -1
- package/src/global-account/react/components/ui/text-loop.tsx +2 -2
- package/src/global-account/react/components/ui/text-shimmer.tsx +3 -3
- package/src/global-account/react/components/ui/tooltip.tsx +1 -1
- package/src/global-account/react/hooks/useAccountAssets.ts +4 -4
- package/src/global-account/react/hooks/useAccountWallet.tsx +5 -5
- package/src/global-account/react/hooks/useAddTWSessionKey.tsx +7 -7
- package/src/global-account/react/hooks/useAuthentication.ts +3 -3
- package/src/global-account/react/hooks/useB3BalanceFromAddresses.ts +9 -9
- package/src/global-account/react/hooks/useB3EnsName.ts +6 -6
- package/src/global-account/react/hooks/useBestTransactionPath.tsx +11 -11
- package/src/global-account/react/hooks/useBsmntProfile.ts +1 -1
- package/src/global-account/react/hooks/useChainSwitchWithAction.ts +4 -4
- package/src/global-account/react/hooks/useClaim.tsx +5 -5
- package/src/global-account/react/hooks/useConnect.tsx +4 -4
- package/src/global-account/react/hooks/useExchangeRate.tsx +3 -3
- package/src/global-account/react/hooks/useGetAllTWSigners.tsx +9 -9
- package/src/global-account/react/hooks/useGetGeo.tsx +1 -1
- package/src/global-account/react/hooks/useHandleConnectWithPrivy.tsx +2 -2
- package/src/global-account/react/hooks/useMediaQuery.tsx +1 -1
- package/src/global-account/react/hooks/useNativeBalance.tsx +7 -7
- package/src/global-account/react/hooks/useOnchainName.tsx +11 -11
- package/src/global-account/react/hooks/useOneBalance.tsx +2 -2
- package/src/global-account/react/hooks/useQueryB3.ts +2 -2
- package/src/global-account/react/hooks/useQueryBSMNT.ts +2 -2
- package/src/global-account/react/hooks/useRemoveSessionKey.tsx +5 -5
- package/src/global-account/react/hooks/useRouter.tsx +6 -6
- package/src/global-account/react/hooks/useSiwe.tsx +4 -4
- package/src/global-account/react/hooks/useTokenBalance.tsx +6 -6
- package/src/global-account/react/hooks/useTokenBalancesByChain.tsx +10 -10
- package/src/global-account/react/hooks/useTokenData.ts +3 -3
- package/src/global-account/react/hooks/useTokenFromUrl.tsx +11 -11
- package/src/global-account/react/hooks/useTokenPrice.tsx +7 -7
- package/src/global-account/react/hooks/useTokenPriceWithFallback.tsx +7 -7
- package/src/global-account/react/hooks/useTokensFromAddress.ts +2 -2
- package/src/global-account/react/hooks/useURLParams.ts +2 -2
- package/src/global-account/react/stores/index.ts +1 -1
- package/src/global-account/react/stores/useAuthStore.ts +3 -3
- package/src/global-account/react/stores/useModalStore.ts +3 -3
- package/src/global-account/server.ts +3 -3
- package/src/global-account/types/chain-networks.ts +10 -10
- package/src/global-account/types/feature-flags.ts +2 -2
- package/src/shared/constants/chains/b3Chain.ts +35 -35
- package/src/shared/constants/chains/chainPlatformMap.ts +1 -1
- package/src/shared/constants/chains/supported.ts +1 -1
- package/src/shared/constants/index.ts +1 -1
- package/src/shared/thirdweb/initiateClient.ts +2 -2
- package/src/shared/thirdweb/openapi-ts.config.ts +1 -1
- package/src/shared/utils/b3Ens.ts +4 -4
- package/src/shared/utils/chain-transformers.ts +9 -9
- package/src/shared/utils/fetchBalances.ts +5 -5
- package/src/shared/utils/fetchBsmntProfile.ts +1 -1
- package/src/shared/utils/insights.ts +31 -31
- package/src/shared/utils/ipfs.ts +1 -1
- package/src/shared/utils/number.ts +5 -5
- package/src/shared/utils/simplehash.ts +28 -28
- package/src/shared/utils/thirdweb-insights.ts +20 -20
|
@@ -22,7 +22,7 @@ const SolIcon_1 = require("./icons/SolIcon");
|
|
|
22
22
|
const USDCIcon_1 = require("./icons/USDCIcon");
|
|
23
23
|
const basePublicClient = (0, viem_1.createPublicClient)({
|
|
24
24
|
chain: chains_1.base,
|
|
25
|
-
transport: (0, viem_1.http)()
|
|
25
|
+
transport: (0, viem_1.http)(),
|
|
26
26
|
});
|
|
27
27
|
const ERC20Staking = "0xbf04200be3cbf371467a539706393c81c470f523";
|
|
28
28
|
function generateEncodedDataForStakingB3(amount, beneficiary) {
|
|
@@ -30,16 +30,16 @@ function generateEncodedDataForStakingB3(amount, beneficiary) {
|
|
|
30
30
|
const encodedData = (0, viem_1.encodeFunctionData)({
|
|
31
31
|
abi: anyspend_1.ABI_ERC20_STAKING,
|
|
32
32
|
functionName: "stake",
|
|
33
|
-
args: [BigInt(amount), beneficiary]
|
|
33
|
+
args: [BigInt(amount), beneficiary],
|
|
34
34
|
});
|
|
35
35
|
return encodedData;
|
|
36
36
|
}
|
|
37
|
-
function AnySpendStakeB3({ isMainnet = true, loadOrder, mode = "modal", recipientAddress, stakeAmount, onSuccess }) {
|
|
37
|
+
function AnySpendStakeB3({ isMainnet = true, loadOrder, mode = "modal", recipientAddress, stakeAmount, onSuccess, }) {
|
|
38
38
|
const hasMounted = (0, react_1.useHasMounted)();
|
|
39
39
|
const { setB3ModalOpen } = (0, react_1.useModalStore)();
|
|
40
40
|
// Fetch B3 token balance
|
|
41
|
-
const { formattedBalance: b3Balance, isLoading: isBalanceLoading, rawBalance: b3RawBalance } = (0, react_1.useTokenBalance)({
|
|
42
|
-
token: anyspend_1.B3_TOKEN
|
|
41
|
+
const { formattedBalance: b3Balance, isLoading: isBalanceLoading, rawBalance: b3RawBalance, } = (0, react_1.useTokenBalance)({
|
|
42
|
+
token: anyspend_1.B3_TOKEN,
|
|
43
43
|
});
|
|
44
44
|
// Wagmi hooks for direct staking
|
|
45
45
|
const { address } = (0, wagmi_1.useAccount)();
|
|
@@ -53,8 +53,8 @@ function AnySpendStakeB3({ isMainnet = true, loadOrder, mode = "modal", recipien
|
|
|
53
53
|
const { isLoading: isTxPending, isSuccess: isTxSuccess } = (0, wagmi_1.useWaitForTransactionReceipt)({
|
|
54
54
|
hash: stakingTxHash,
|
|
55
55
|
query: {
|
|
56
|
-
structuralSharing: false // Disable to avoid BigInt serialization issues
|
|
57
|
-
}
|
|
56
|
+
structuralSharing: false, // Disable to avoid BigInt serialization issues
|
|
57
|
+
},
|
|
58
58
|
});
|
|
59
59
|
// Show success modal when transaction is confirmed
|
|
60
60
|
(0, react_2.useEffect)(() => {
|
|
@@ -154,7 +154,7 @@ function AnySpendStakeB3({ isMainnet = true, loadOrder, mode = "modal", recipien
|
|
|
154
154
|
address: anyspend_1.B3_TOKEN.address,
|
|
155
155
|
abi: viem_1.erc20Abi,
|
|
156
156
|
functionName: "allowance",
|
|
157
|
-
args: [address, ERC20Staking]
|
|
157
|
+
args: [address, ERC20Staking],
|
|
158
158
|
});
|
|
159
159
|
// If allowance is insufficient, request approval
|
|
160
160
|
if (allowance < BigInt(userStakeAmount)) {
|
|
@@ -163,7 +163,7 @@ function AnySpendStakeB3({ isMainnet = true, loadOrder, mode = "modal", recipien
|
|
|
163
163
|
address: anyspend_1.B3_TOKEN.address,
|
|
164
164
|
abi: viem_1.erc20Abi,
|
|
165
165
|
functionName: "approve",
|
|
166
|
-
args: [ERC20Staking, BigInt(userStakeAmount)]
|
|
166
|
+
args: [ERC20Staking, BigInt(userStakeAmount)],
|
|
167
167
|
});
|
|
168
168
|
sonner_1.toast.info("Approval confirmed. Proceeding with stake...");
|
|
169
169
|
}
|
|
@@ -173,7 +173,7 @@ function AnySpendStakeB3({ isMainnet = true, loadOrder, mode = "modal", recipien
|
|
|
173
173
|
address: ERC20Staking,
|
|
174
174
|
abi: anyspend_1.ABI_ERC20_STAKING,
|
|
175
175
|
functionName: "stake",
|
|
176
|
-
args: [BigInt(userStakeAmount), recipientAddress]
|
|
176
|
+
args: [BigInt(userStakeAmount), recipientAddress],
|
|
177
177
|
});
|
|
178
178
|
setStakingTxHash(stakeHash);
|
|
179
179
|
sonner_1.toast.success("Staking transaction submitted!");
|
|
@@ -214,18 +214,18 @@ function AnySpendStakeB3({ isMainnet = true, loadOrder, mode = "modal", recipien
|
|
|
214
214
|
return ((0, jsx_runtime_1.jsx)(react_1.StyleRoot, { children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-b3-react-background flex w-full flex-col items-center", children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-full px-4", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: false, animate: {
|
|
215
215
|
opacity: hasMounted ? 1 : 0,
|
|
216
216
|
y: hasMounted ? 0 : 20,
|
|
217
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
217
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
218
218
|
}, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, className: "relative mx-auto size-48", children: (0, jsx_runtime_1.jsx)("video", { autoPlay: true, muted: true, playsInline: true, className: "size-full", src: "https://cdn.b3.fun/b3-sphere-to-coin.mp4" }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: false, animate: {
|
|
219
219
|
opacity: hasMounted ? 1 : 0,
|
|
220
220
|
y: hasMounted ? 0 : 20,
|
|
221
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
221
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
222
222
|
}, transition: { duration: 0.3, delay: 0.1, ease: "easeInOut" }, children: (0, jsx_runtime_1.jsx)("h2", { className: "font-sf-rounded font-neue-montreal-medium mb-1 text-center text-2xl font-semibold", children: (() => {
|
|
223
223
|
const hasEnoughBalance = b3RawBalance && BigInt(debouncedUserStakeAmount || "0") <= b3RawBalance;
|
|
224
224
|
return hasEnoughBalance || !debouncedAmount ? "Stake B3" : "Swap & Stake B3";
|
|
225
225
|
})() }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: false, animate: {
|
|
226
226
|
opacity: hasMounted ? 1 : 0,
|
|
227
227
|
y: hasMounted ? 0 : 20,
|
|
228
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
228
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
229
229
|
}, transition: { duration: 0.3, delay: 0.2, ease: "easeInOut" }, className: "bg-b3-react-background w-full p-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-2", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)("p", { className: "text-as-primary/70 text-sm font-medium", children: "I want to stake" }), (0, jsx_runtime_1.jsxs)("span", { className: "text-as-primary/50 flex items-center gap-1 text-sm", children: ["Available: ", isBalanceLoading ? (0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "h-3 w-3 animate-spin" }) : `${b3Balance} B3`] })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [(0, jsx_runtime_1.jsx)(react_1.Input, { onFocus: onFocusStakeAmountInput, type: "text", placeholder: "0.00", value: displayAmount, onChange: e => validateAndSetAmount(e.target.value), className: `h-14 px-4 text-lg ${!isAmountValid && displayAmount ? "border-as-red" : "border-b3-react-border"}` }), (0, jsx_runtime_1.jsx)("div", { className: "font-pack absolute right-4 top-1/2 -translate-y-1/2 text-lg font-medium text-blue-500/70", children: "B3" })] }), !isAmountValid && displayAmount && (0, jsx_runtime_1.jsx)("p", { className: "text-as-red mt-2 text-sm", children: validationError }), (0, jsx_runtime_1.jsx)("div", { className: "mt-4", children: (() => {
|
|
230
230
|
const hasEnoughBalance = b3RawBalance && BigInt(debouncedUserStakeAmount || "0") <= b3RawBalance;
|
|
231
231
|
if (!hasEnoughBalance || !debouncedAmount) {
|
|
@@ -240,15 +240,15 @@ function AnySpendStakeB3({ isMainnet = true, loadOrder, mode = "modal", recipien
|
|
|
240
240
|
return ((0, jsx_runtime_1.jsx)(react_1.StyleRoot, { children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-b3-react-background flex w-full flex-col items-center", children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-full p-4", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: false, animate: {
|
|
241
241
|
opacity: hasMounted ? 1 : 0,
|
|
242
242
|
y: hasMounted ? 0 : 20,
|
|
243
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
243
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
244
244
|
}, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, className: "relative mx-auto mb-4 size-[120px]", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 scale-95 rounded-[50%] bg-black/30 blur-md" }), (0, jsx_runtime_1.jsxs)(react_1.GlareCardRounded, { className: "overflow-hidden rounded-full border-none", children: [(0, jsx_runtime_1.jsx)("img", { alt: "b3 coin", loading: "lazy", width: "64", height: "64", decoding: "async", "data-nimg": "1", className: "size-full shrink-0 bg-transparent text-transparent", src: "https://cdn.b3.fun/b3-coin-3d.png" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 rounded-[50%] border border-white/10" })] })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: false, animate: {
|
|
245
245
|
opacity: hasMounted ? 1 : 0,
|
|
246
246
|
y: hasMounted ? 0 : 20,
|
|
247
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
247
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
248
248
|
}, transition: { duration: 0.3, delay: 0.1, ease: "easeInOut" }, children: (0, jsx_runtime_1.jsxs)("h2", { className: "font-sf-rounded mb-1 text-center text-2xl font-semibold", children: ["Staked ", (0, number_1.formatTokenAmount)(BigInt(userStakeAmount), 18), " B3"] }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: false, animate: {
|
|
249
249
|
opacity: hasMounted ? 1 : 0,
|
|
250
250
|
y: hasMounted ? 0 : 20,
|
|
251
|
-
filter: hasMounted ? "blur(0px)" : "blur(10px)"
|
|
251
|
+
filter: hasMounted ? "blur(0px)" : "blur(10px)",
|
|
252
252
|
}, transition: { duration: 0.3, delay: 0.2, ease: "easeInOut" }, className: "bg-b3-react-background w-full p-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-6", children: (0, jsx_runtime_1.jsx)("a", { href: `https://basescan.org/tx/${stakingTxHash}`, target: "_blank", rel: "noopener noreferrer", className: "text-as-primary/70 hover:text-as-primary block break-all text-center font-mono text-sm underline transition-colors", children: "View transaction" }) }), (0, jsx_runtime_1.jsx)(react_1.Button, { onClick: () => {
|
|
253
253
|
setB3ModalOpen(false);
|
|
254
254
|
onSuccess?.();
|
|
@@ -257,6 +257,6 @@ function AnySpendStakeB3({ isMainnet = true, loadOrder, mode = "modal", recipien
|
|
|
257
257
|
const encodedData = generateEncodedDataForStakingB3(userStakeAmount, recipientAddress);
|
|
258
258
|
return ((0, jsx_runtime_1.jsx)(AnySpendCustom_1.AnySpendCustom, { isMainnet: isMainnet, loadOrder: loadOrder, mode: mode, recipientAddress: recipientAddress, orderType: anyspend_1.OrderType.Custom, dstChainId: chains_1.base.id, dstToken: anyspend_1.B3_TOKEN, dstAmount: userStakeAmount, contractAddress: ERC20Staking, encodedData: encodedData, metadata: {
|
|
259
259
|
type: anyspend_1.OrderType.Custom,
|
|
260
|
-
action: "stake B3"
|
|
260
|
+
action: "stake B3",
|
|
261
261
|
}, header: header, onSuccess: onSuccess, showRecipient: true }));
|
|
262
262
|
}
|
|
@@ -8,14 +8,14 @@ const number_1 = require("../../../shared/utils/number");
|
|
|
8
8
|
const framer_motion_1 = require("framer-motion");
|
|
9
9
|
const AnySpendCustom_1 = require("./AnySpendCustom");
|
|
10
10
|
function AnySpendTournament(props) {
|
|
11
|
-
const { isMainnet = true, mode = "modal", action, loadOrder, tournamentChainId, tournamentContractAddress, tournamentMetadata, onSuccess } = props;
|
|
11
|
+
const { isMainnet = true, mode = "modal", action, loadOrder, tournamentChainId, tournamentContractAddress, tournamentMetadata, onSuccess, } = props;
|
|
12
12
|
const dstToken = action === "join" ? props.tournamentEntryToken : props.tournamentFundToken;
|
|
13
13
|
const dstAmount = action === "join" ? props.tournamentEntryFee : props.tournamentFundAmount;
|
|
14
|
-
const header = ({ anyspendPrice, isLoadingAnyspendPrice }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "z-10 mt-[-100px] flex h-[270px] w-full items-end justify-center", children: (0, jsx_runtime_1.jsx)("img", { src: "https://cdn.b3.fun/tournament-play.svg", alt: "Tournament Play", className: "h-[200px] w-[360px] object-cover object-center" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "from-b3-react-background to-as-on-surface-1 mt-[-100px] w-full rounded-t-lg bg-gradient-to-t", children: [(0, jsx_runtime_1.jsx)("div", { className: "h-[100px] w-full" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full flex-col items-center gap-1 p-6 pt-0", children: [(0, jsx_runtime_1.jsxs)("span", { className: "font-sf-rounded text-center text-lg font-semibold", children: [action === "join" ? "Pay entry fee to join " : "Pay to fund ", " ", tournamentMetadata.name] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-2 flex w-fit items-center gap-1", children: anyspendPrice ? ((0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { mode: "wait", children: (0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("text-as-primary group flex items-center text-2xl font-semibold transition-all", {
|
|
15
|
-
"opacity-0": isLoadingAnyspendPrice
|
|
14
|
+
const header = ({ anyspendPrice, isLoadingAnyspendPrice, }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "z-10 mt-[-100px] flex h-[270px] w-full items-end justify-center", children: (0, jsx_runtime_1.jsx)("img", { src: "https://cdn.b3.fun/tournament-play.svg", alt: "Tournament Play", className: "h-[200px] w-[360px] object-cover object-center" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "from-b3-react-background to-as-on-surface-1 mt-[-100px] w-full rounded-t-lg bg-gradient-to-t", children: [(0, jsx_runtime_1.jsx)("div", { className: "h-[100px] w-full" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full flex-col items-center gap-1 p-6 pt-0", children: [(0, jsx_runtime_1.jsxs)("span", { className: "font-sf-rounded text-center text-lg font-semibold", children: [action === "join" ? "Pay entry fee to join " : "Pay to fund ", " ", tournamentMetadata.name] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-2 flex w-fit items-center gap-1", children: anyspendPrice ? ((0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { mode: "wait", children: (0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("text-as-primary group flex items-center text-2xl font-semibold transition-all", {
|
|
15
|
+
"opacity-0": isLoadingAnyspendPrice,
|
|
16
16
|
}), children: [(0, number_1.formatDisplayNumber)(anyspendPrice?.data?.currencyIn?.amountUsd, { style: "currency" }), " (", (0, number_1.formatTokenAmount)(BigInt(dstAmount), dstToken.decimals, 6, true), " ", dstToken.symbol, ")"] }) })) : ((0, jsx_runtime_1.jsx)("div", { className: "h-[32px] w-full" })) })] })] })] }));
|
|
17
17
|
return ((0, jsx_runtime_1.jsx)(AnySpendCustom_1.AnySpendCustom, { isMainnet: isMainnet, loadOrder: loadOrder, mode: mode, recipientAddress: action === "join" ? props.joinFor : undefined, orderType: action === "join" ? anyspend_1.OrderType.JoinTournament : anyspend_1.OrderType.FundTournament, dstChainId: tournamentChainId, dstToken: dstToken, dstAmount: dstAmount, contractAddress: tournamentContractAddress, encodedData: "0x", metadata: {
|
|
18
18
|
type: action === "join" ? anyspend_1.OrderType.JoinTournament : anyspend_1.OrderType.FundTournament,
|
|
19
|
-
tournament: tournamentMetadata
|
|
19
|
+
tournament: tournamentMetadata,
|
|
20
20
|
}, header: header, onSuccess: onSuccess, showRecipient: action === "join" }));
|
|
21
21
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ChainTokenIcon = ChainTokenIcon;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
function ChainTokenIcon({ chainUrl, tokenUrl, className = "" }) {
|
|
5
|
+
function ChainTokenIcon({ chainUrl, tokenUrl, className = "", }) {
|
|
6
6
|
return ((0, jsx_runtime_1.jsxs)("div", { className: `relative ${className}`, children: [(0, jsx_runtime_1.jsx)("img", { src: tokenUrl, alt: "Token", className: "h-full w-full rounded-full" }), (0, jsx_runtime_1.jsx)("div", { className: "bg-as-on-surface-1 border-as-stroke absolute bottom-0 right-0 h-[45%] w-[45%] rounded border", children: (0, jsx_runtime_1.jsx)("img", { src: chainUrl, alt: "Chain", className: "h-full w-full rounded" }) })] }));
|
|
7
7
|
}
|
|
@@ -25,7 +25,7 @@ const chains_1 = require("viem/chains");
|
|
|
25
25
|
const wagmi_1 = require("wagmi");
|
|
26
26
|
const PaymentVendorUI_1 = __importDefault(require("./PaymentVendorUI"));
|
|
27
27
|
// Add this helper function near the top or just above the component
|
|
28
|
-
function getOrderSuccessText({ order, tournament, formattedActualDstAmount, dstToken, recipientName, centerTruncate }) {
|
|
28
|
+
function getOrderSuccessText({ order, tournament, formattedActualDstAmount, dstToken, recipientName, centerTruncate, }) {
|
|
29
29
|
const recipient = recipientName || centerTruncate(order.recipientAddress, 8);
|
|
30
30
|
let actionText = "";
|
|
31
31
|
switch (order.type) {
|
|
@@ -120,7 +120,7 @@ function roundTokenAmount(amount) {
|
|
|
120
120
|
const roundedDecimalPart = digits.join("");
|
|
121
121
|
return `${wholePart}.${roundedDecimalPart}`;
|
|
122
122
|
}
|
|
123
|
-
exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode = "modal", order, depositTxs, relayTx, executeTx, refundTxs, onBack }) {
|
|
123
|
+
exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode = "modal", order, depositTxs, relayTx, executeTx, refundTxs, onBack, }) {
|
|
124
124
|
const router = (0, navigation_1.useRouter)();
|
|
125
125
|
const searchParams = (0, navigation_1.useSearchParams)();
|
|
126
126
|
const setB3ModalOpen = (0, react_1.useModalStore)(state => state.setB3ModalOpen);
|
|
@@ -200,7 +200,7 @@ exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode
|
|
|
200
200
|
account: signer,
|
|
201
201
|
chain: anyspend_1.EVM_CHAINS[order.srcChain].viem,
|
|
202
202
|
to: order.globalAddress,
|
|
203
|
-
value: BigInt(order.srcAmount)
|
|
203
|
+
value: BigInt(order.srcAmount),
|
|
204
204
|
});
|
|
205
205
|
setTxHash(hash);
|
|
206
206
|
}
|
|
@@ -211,7 +211,7 @@ exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode
|
|
|
211
211
|
address: order.srcTokenAddress,
|
|
212
212
|
abi: viem_1.erc20Abi,
|
|
213
213
|
functionName: "transfer",
|
|
214
|
-
args: [order.globalAddress, BigInt(order.srcAmount)]
|
|
214
|
+
args: [order.globalAddress, BigInt(order.srcAmount)],
|
|
215
215
|
});
|
|
216
216
|
setTxHash(hash);
|
|
217
217
|
}
|
|
@@ -296,7 +296,7 @@ exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode
|
|
|
296
296
|
formattedActualDstAmount: formattedActualDstAmount,
|
|
297
297
|
dstToken,
|
|
298
298
|
recipientName,
|
|
299
|
-
centerTruncate: centerTruncate_1.default
|
|
299
|
+
centerTruncate: centerTruncate_1.default,
|
|
300
300
|
}), (0, jsx_runtime_1.jsx)(lucide_react_1.ExternalLink, { className: "ml-2 h-4 w-4" })] }) }) }), order.type === anyspend_1.OrderType.JoinTournament && order.status === anyspend_1.OrderStatus.Executed && ((0, jsx_runtime_1.jsxs)(react_1.ShinyButton, { accentColor: "hsl(var(--as-brand))", textColor: "text-white", className: "flex w-full items-center gap-2", disabled: txLoading || isSwitchingOrExecuting, onClick: () => setB3ModalOpen(false), children: [(0, jsx_runtime_1.jsx)("span", { className: "pl-4", children: "Continue to Tournament" }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })), order.status === anyspend_1.OrderStatus.Executed && ((0, jsx_runtime_1.jsx)("button", { className: "bg-as-on-surface-2 text-as-secondary flex w-full items-center justify-center gap-2 rounded-lg p-2", onClick: mode === "page" ? onBack : () => setB3ModalOpen(false), children: mode === "page" ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Return to Home ", (0, jsx_runtime_1.jsx)(lucide_react_1.Home, { className: "ml-2 h-4 w-4" })] })) : ("Close") }))] }));
|
|
301
301
|
}
|
|
302
302
|
if (relayTx && relayTx.status === "success") {
|
|
@@ -324,7 +324,7 @@ exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode
|
|
|
324
324
|
formattedActualDstAmount,
|
|
325
325
|
dstToken,
|
|
326
326
|
recipientName,
|
|
327
|
-
centerTruncate: centerTruncate_1.default
|
|
327
|
+
centerTruncate: centerTruncate_1.default,
|
|
328
328
|
}), (0, jsx_runtime_1.jsx)(lucide_react_1.ExternalLink, { className: "ml-2 h-4 w-4" })] }) }) }), order.type === anyspend_1.OrderType.JoinTournament && order.status === anyspend_1.OrderStatus.Executed && ((0, jsx_runtime_1.jsxs)(react_1.ShinyButton, { accentColor: "hsl(var(--as-brand))", textColor: "text-white", className: "flex w-full items-center gap-2", disabled: txLoading || isSwitchingOrExecuting, onClick: () => setB3ModalOpen(false), children: [(0, jsx_runtime_1.jsx)("span", { className: "pl-4", children: "Continue to Tournament" }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })), order.status === anyspend_1.OrderStatus.Executed && ((0, jsx_runtime_1.jsx)("button", { className: "bg-as-on-surface-2 text-as-secondary flex w-full items-center justify-center gap-2 rounded-lg p-2", onClick: mode === "page" ? onBack : () => setB3ModalOpen(false), children: mode === "page" ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Return to Home ", (0, jsx_runtime_1.jsx)(lucide_react_1.Home, { className: "ml-2 h-4 w-4" })] })) : ("Close") }))] }));
|
|
329
329
|
}
|
|
330
330
|
// This boolean indicates that user finish payment, and waiting for the deposit to be confirmed. We get this from query params (waitingForDeposit=true)
|
|
@@ -352,7 +352,7 @@ exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode
|
|
|
352
352
|
.share({
|
|
353
353
|
title: "Complete Deposit",
|
|
354
354
|
text: "Complete your deposit on BSMNT.fun",
|
|
355
|
-
url: permalink
|
|
355
|
+
url: permalink,
|
|
356
356
|
})
|
|
357
357
|
.catch(error => console.log("Error sharing:", error));
|
|
358
358
|
}
|
|
@@ -373,9 +373,9 @@ exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode
|
|
|
373
373
|
sonner_1.toast.success("Copied recipient address to clipboard");
|
|
374
374
|
}, children: (0, jsx_runtime_1.jsxs)("div", { className: "text-as-primary flex items-center gap-2", children: [(0, centerTruncate_1.default)(order.recipientAddress, 10), (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { className: "text-as-primary/50 hover:text-as-primary h-4 w-4 cursor-pointer transition-all duration-200" })] }) })] })] })] }) })) : ((0, jsx_runtime_1.jsxs)("div", { className: "flex w-full items-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "divider w-full" }), (0, jsx_runtime_1.jsx)("button", { className: "whitespace-nowrap text-sm", onClick: () => setShowOrderDetails(true), children: "Order Details" }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "text-as-primary mx-1 h-4 min-h-4 w-4 min-w-4" }), (0, jsx_runtime_1.jsx)("div", { className: "divider w-full" })] })), (0, jsx_runtime_1.jsxs)("button", { className: "bg-as-on-surface-2 text-as-secondary flex w-full items-center justify-center gap-2 rounded-lg p-2", onClick: onBack, children: ["Cancel and start over ", (0, jsx_runtime_1.jsx)(lucide_react_1.RefreshCcw, { className: "ml-2 h-4 w-4" })] })] }));
|
|
375
375
|
});
|
|
376
|
-
function TransactionDetails({ title, chainId, tx, isProcessing, delay }) {
|
|
376
|
+
function TransactionDetails({ title, chainId, tx, isProcessing, delay, }) {
|
|
377
377
|
return ((0, jsx_runtime_1.jsxs)("div", { className: "relative flex w-full flex-1 items-center justify-between gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex grow items-center gap-4", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "bg-b3-react-background relative h-10 w-10 rounded-full", children: isProcessing ? ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, scale: 0.3 }, animate: { opacity: 1, scale: 1 }, transition: { duration: 0.5, ease: "easeInOut", delay }, className: "absolute z-10 m-2 flex h-6 w-6 items-center justify-center rounded-full bg-black/70 shadow-lg backdrop-blur-sm", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "text-as-primary h-4 w-4 animate-spin" }) })) : ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, scale: 0.3 }, animate: { opacity: 1, scale: 1 }, transition: { duration: 0.5, ease: "easeOut", delay }, className: "bg-as-brand/70 absolute z-10 m-2 flex h-6 w-6 items-center justify-center rounded-full border border-white/30 shadow-lg shadow-purple-500/30 backdrop-blur-sm", style: {
|
|
378
|
-
boxShadow: "0 0 15px 5px rgba(138, 43, 226, 0.2)"
|
|
378
|
+
boxShadow: "0 0 15px 5px rgba(138, 43, 226, 0.2)",
|
|
379
379
|
}, children: (0, jsx_runtime_1.jsx)(lucide_react_1.CheckIcon, { className: "text-as-primary h-3 w-3" }) })) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { duration: 0.3, ease: "easeInOut", delay }, className: "shrink-0 text-base", children: isProcessing ? ((0, jsx_runtime_1.jsx)(react_1.TextShimmer, { duration: 1, children: title })) : ((0, jsx_runtime_1.jsx)("span", { className: "text-as-primary", children: title })) })] }), (0, jsx_runtime_1.jsx)("div", { className: "flex flex-col gap-1", children: tx ? ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { duration: 0.3, ease: "easeInOut", delay: (delay || 0) + 0.3 }, className: "flex items-center gap-3", children: (0, jsx_runtime_1.jsx)("a", { href: (0, anyspend_1.getExplorerTxUrl)(chainId, tx.txHash), target: "_blank", children: (0, jsx_runtime_1.jsx)("div", { className: "text-as-primary/30 font-mono text-xs", children: (0, centerTruncate_1.default)(tx?.txHash, 6) }) }) })) : null })] }));
|
|
380
380
|
}
|
|
381
381
|
exports.OrderDetailsLoadingView = ((0, jsx_runtime_1.jsxs)("div", { className: "mx-auto flex w-[460px] max-w-full flex-col items-center gap-4", children: [(0, jsx_runtime_1.jsxs)(react_1.Badge, { variant: "default", className: "hover:bg-b3-react-background flex items-center gap-3 border-white/20 bg-white/10 px-4 py-1 text-base transition-colors", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "text-as-primary h-4 w-4 animate-spin" }), (0, jsx_runtime_1.jsx)(react_1.TextShimmer, { duration: 1, className: "font-sf-rounded text-base font-semibold", children: "Loading..." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full flex-1 flex-col", children: [(0, jsx_runtime_1.jsxs)("div", { className: "mb-4 flex flex-col gap-1", children: [(0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "h-4 w-24" }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-2 flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "h-8 w-48" }), (0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "ml-4 h-8 w-32" })] }), (0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "mt-4 h-8 w-24" })] }), (0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "mb-4 h-12 w-full" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full items-center justify-between gap-4", children: [(0, jsx_runtime_1.jsxs)(react_1.Skeleton, { className: "rounded-lg p-6 pb-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "h-[200px] w-[200px]" }), (0, jsx_runtime_1.jsx)("div", { className: "mt-3 flex items-center justify-center gap-2", children: (0, jsx_runtime_1.jsx)("div", { className: "h-5 w-5 rounded-full" }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "flex flex-1 flex-col gap-2", children: [1, 2, 3].map(i => ((0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "h-10 w-full" }, i))) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-b3-react-background mt-8 w-full rounded-lg p-4", children: [(0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "mb-3 h-4 w-48" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-4", children: [(0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "h-10 flex-1" }), (0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "h-10 flex-1" })] })] }), (0, jsx_runtime_1.jsx)(react_1.Skeleton, { className: "h-10 w-full" })] }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Token } from "../../../../anyspend";
|
|
2
|
-
export declare function OrderToken({ context, address, chainId, setChainId, token, setToken, requiredAmount, tokenSelectClassName }: {
|
|
2
|
+
export declare function OrderToken({ context, address, chainId, setChainId, token, setToken, requiredAmount, tokenSelectClassName, }: {
|
|
3
3
|
context: "from" | "to";
|
|
4
4
|
address: string | undefined;
|
|
5
5
|
token: Token;
|
|
@@ -12,13 +12,13 @@ const relay_kit_ui_1 = require("@reservoir0x/relay-kit-ui");
|
|
|
12
12
|
const lucide_react_1 = require("lucide-react");
|
|
13
13
|
const react_2 = require("react");
|
|
14
14
|
const ChainTokenIcon_1 = require("./ChainTokenIcon");
|
|
15
|
-
function OrderToken({ context, address, chainId, setChainId, token, setToken, requiredAmount, tokenSelectClassName }) {
|
|
15
|
+
function OrderToken({ context, address, chainId, setChainId, token, setToken, requiredAmount, tokenSelectClassName, }) {
|
|
16
16
|
const { wallet } = (0, react_1.useAccountWallet)();
|
|
17
17
|
const chainName = (0, react_2.useMemo)(() => (0, simplehash_1.simpleHashChainToChainName)(chainId), [chainId]);
|
|
18
18
|
const { nativeTokens, fungibleTokens } = (0, react_1.useTokenBalancesByChain)({
|
|
19
19
|
address: wallet?.address || "",
|
|
20
20
|
chainsIds: [chainId],
|
|
21
|
-
enabled: !!wallet?.address && !!chainName
|
|
21
|
+
enabled: !!wallet?.address && !!chainName,
|
|
22
22
|
});
|
|
23
23
|
const { formattedBalance, hasEnoughBalance } = (0, react_2.useMemo)(() => {
|
|
24
24
|
// Get balance for the selected token
|
|
@@ -40,7 +40,7 @@ function OrderToken({ context, address, chainId, setChainId, token, setToken, re
|
|
|
40
40
|
const formattedBalance = balance ? (0, number_1.formatTokenAmount)(balance, token.decimals, 6, false) : null;
|
|
41
41
|
return {
|
|
42
42
|
formattedBalance,
|
|
43
|
-
hasEnoughBalance
|
|
43
|
+
hasEnoughBalance,
|
|
44
44
|
};
|
|
45
45
|
}, [chainId, fungibleTokens, nativeTokens, requiredAmount, token, wallet?.address]);
|
|
46
46
|
return ((0, jsx_runtime_1.jsx)(relay_kit_ui_1.TokenSelector, { address: address, chainIdsFilter: Object.values(anyspend_1.ALL_CHAINS).map(chain => chain.id), context: context, fromChainWalletVMSupported: true, isValidAddress: true, lockedChainIds: Object.values(anyspend_1.ALL_CHAINS).map(chain => chain.id), multiWalletSupportEnabled: true, onAnalyticEvent: undefined, popularChainIds: [1, 8453, anyspend_1.RELAY_SOLANA_MAINNET_CHAIN_ID], restrictedToken: undefined, setToken: token => {
|
|
@@ -51,7 +51,7 @@ function OrderToken({ context, address, chainId, setChainId, token, setToken, re
|
|
|
51
51
|
decimals: token.decimals,
|
|
52
52
|
metadata: { logoURI: token.logoURI },
|
|
53
53
|
name: token.name,
|
|
54
|
-
symbol: token.symbol
|
|
54
|
+
symbol: token.symbol,
|
|
55
55
|
});
|
|
56
56
|
}, supportedWalletVMs: ["evm", "svm"], token: undefined, trigger: (0, jsx_runtime_1.jsxs)(react_1.Button, { variant: "outline", role: "combobox", className: (0, utils_1.cn)("bg-b3-react-background border-as-stroke flex h-auto w-fit shrink-0 items-center justify-center gap-2 rounded-xl border-2 px-2 py-1 pr-2 text-center", tokenSelectClassName), children: [token.metadata.logoURI ? ((0, jsx_runtime_1.jsx)(ChainTokenIcon_1.ChainTokenIcon, { chainUrl: anyspend_1.ALL_CHAINS[chainId].logoUrl, tokenUrl: token.metadata.logoURI, className: "h-8 min-h-8 w-8 min-w-8" })) : ((0, jsx_runtime_1.jsx)("div", { className: "h-8 w-8 rounded-full bg-gray-700" })), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-start gap-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-as-primary font-semibold", children: [token.symbol, " on ", anyspend_1.ALL_CHAINS[chainId].name] }), formattedBalance && ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-as-primary/50 text-xs", children: [formattedBalance || "--", " ", token.symbol] }), hasEnoughBalance && (0, jsx_runtime_1.jsx)(lucide_react_1.CheckCircle2, { className: "text-as-brand -mt-0.5 h-4 w-4" })] }))] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronsUpDown, { className: "h-4 w-4 shrink-0 opacity-70" })] }) }, undefined));
|
|
57
57
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Token } from "../../../../anyspend";
|
|
2
|
-
export declare function OrderTokenAmount({ disabled, inputValue, onChangeInput, context, address, chainId, setChainId, token, setToken, hideTokenSelect, canEditAmount, className, innerClassName, amountClassName, tokenSelectClassName }: {
|
|
2
|
+
export declare function OrderTokenAmount({ disabled, inputValue, onChangeInput, context, address, chainId, setChainId, token, setToken, hideTokenSelect, canEditAmount, className, innerClassName, amountClassName, tokenSelectClassName, }: {
|
|
3
3
|
disabled?: boolean;
|
|
4
4
|
inputValue: string;
|
|
5
5
|
onChangeInput: (value: string) => void;
|
|
@@ -11,7 +11,7 @@ const react_2 = require("../../../../global-account/react");
|
|
|
11
11
|
const utils_1 = require("../../../../shared/utils");
|
|
12
12
|
const relay_kit_ui_1 = require("@reservoir0x/relay-kit-ui");
|
|
13
13
|
const ChainTokenIcon_1 = require("./ChainTokenIcon");
|
|
14
|
-
function OrderTokenAmount({ disabled, inputValue, onChangeInput, context, address, chainId, setChainId, token, setToken, hideTokenSelect = false, canEditAmount = true, className, innerClassName, amountClassName, tokenSelectClassName }) {
|
|
14
|
+
function OrderTokenAmount({ disabled, inputValue, onChangeInput, context, address, chainId, setChainId, token, setToken, hideTokenSelect = false, canEditAmount = true, className, innerClassName, amountClassName, tokenSelectClassName, }) {
|
|
15
15
|
// Track previous token to detect changes
|
|
16
16
|
const prevTokenRef = (0, react_1.useRef)(token.address);
|
|
17
17
|
(0, react_1.useEffect)(() => {
|
|
@@ -39,7 +39,7 @@ function OrderTokenAmount({ disabled, inputValue, onChangeInput, context, addres
|
|
|
39
39
|
decimals: newToken.decimals,
|
|
40
40
|
metadata: { logoURI: newToken.logoURI },
|
|
41
41
|
name: newToken.name,
|
|
42
|
-
symbol: newToken.symbol
|
|
42
|
+
symbol: newToken.symbol,
|
|
43
43
|
});
|
|
44
44
|
// If this is the source token, reset the amount immediately
|
|
45
45
|
if (context === "from") {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp }: {
|
|
1
|
+
export declare function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, }: {
|
|
2
2
|
srcAmountOnRamp: string;
|
|
3
3
|
setSrcAmountOnRamp: (amount: string) => void;
|
|
4
4
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,7 +8,7 @@ const framer_motion_1 = require("framer-motion");
|
|
|
8
8
|
const react_2 = require("react");
|
|
9
9
|
const sonner_1 = require("sonner");
|
|
10
10
|
const PaymentOptions_1 = require("./PaymentOptions");
|
|
11
|
-
function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp }) {
|
|
11
|
+
function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, }) {
|
|
12
12
|
// Get geo data for onramp availability
|
|
13
13
|
const { geoData } = (0, react_1.useGetGeo)();
|
|
14
14
|
const { coinbaseOnrampOptions } = (0, anyspend_1.useCoinbaseOnrampOptions)(true, geoData?.country || "US");
|
|
@@ -35,7 +35,7 @@ function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp }) {
|
|
|
35
35
|
: 25000) ? ((0, jsx_runtime_1.jsxs)("p", { className: "label-style -mb-3 mt-3 text-xs text-red-400 dark:bg-transparent", children: ["Maximum amount is $", coinbaseOnrampOptions?.paymentCurrencies?.[0]?.limits?.find(l => l.id === "ACH_BANK_ACCOUNT")?.max ||
|
|
36
36
|
"25,000"] })) : ((0, jsx_runtime_1.jsx)("p", { className: "label-style text-b3-react-foreground/60 -mb-3 mt-3 text-xs dark:bg-transparent", children: "Buy amount in USD" })), (0, jsx_runtime_1.jsxs)("div", { className: "relative inline-flex items-center dark:bg-transparent", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-b3-react-foreground/60 -ms-3 -mt-2 text-2xl font-semibold dark:bg-transparent", children: "$" }), (0, jsx_runtime_1.jsx)(react_1.Input, { ref: amountInputRef, type: "text", value: srcAmountOnRamp, onChange: handleAmountChange, placeholder: "0.00", className: "placeholder:text-b3-react-foreground/60 h-auto min-w-[70px] border-0 bg-transparent py-6 text-center text-4xl font-semibold focus-visible:ring-0 focus-visible:ring-offset-0 dark:bg-transparent", style: {
|
|
37
37
|
width: `${Math.max(50, srcAmountOnRamp.length * 34)}px`,
|
|
38
|
-
minWidth: srcAmountOnRamp ? `auto` : "105px"
|
|
38
|
+
minWidth: srcAmountOnRamp ? `auto` : "105px",
|
|
39
39
|
} }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { mode: "wait", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { animate: { opacity: !srcAmountOnRamp || parseFloat(srcAmountOnRamp) <= 0 ? 1 : 0 }, exit: { opacity: 0 }, transition: { duration: 0.5, ease: "easeInOut" }, className: "border-b3-react-foreground/10 absolute bottom-3 left-1 h-1 w-[90%] rounded-full border-t-2 border-dashed bg-transparent" }) })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-4 gap-4", children: ["5", "10", "25", "100"].map(value => ((0, jsx_runtime_1.jsxs)("button", { onClick: () => handleQuickAmount(value), className: `rounded-lg border px-4 py-3 ${srcAmountOnRamp === value
|
|
40
40
|
? "border-as-brand bg-as-brand/30"
|
|
41
41
|
: "border-as-stroke hover:border-as-brand hover:bg-as-brand/30"} transition-all duration-200`, children: ["$", value] }, value))) })] }));
|
|
@@ -25,5 +25,5 @@ interface PanelOnrampPaymentProps {
|
|
|
25
25
|
recipientEnsName?: string;
|
|
26
26
|
recipientImageUrl?: string;
|
|
27
27
|
}
|
|
28
|
-
export declare function PanelOnrampPayment({ srcAmountOnRamp, recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationTokenAddress, selectedDstChainId, selectedDstToken, anyspendQuote, globalAddress, onOrderCreated, onBack, orderType, nft, tournament, payload, recipientEnsName, recipientImageUrl }: PanelOnrampPaymentProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function PanelOnrampPayment({ srcAmountOnRamp, recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationTokenAddress, selectedDstChainId, selectedDstToken, anyspendQuote, globalAddress, onOrderCreated, onBack, orderType, nft, tournament, payload, recipientEnsName, recipientImageUrl, }: PanelOnrampPaymentProps): import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
export {};
|
|
@@ -15,7 +15,7 @@ const react_2 = require("react");
|
|
|
15
15
|
const sonner_1 = require("sonner");
|
|
16
16
|
function PanelOnrampPayment({ srcAmountOnRamp,
|
|
17
17
|
// recipientName,
|
|
18
|
-
recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationTokenAddress, selectedDstChainId, selectedDstToken, anyspendQuote, globalAddress, onOrderCreated, onBack, orderType, nft, tournament, payload, recipientEnsName, recipientImageUrl }) {
|
|
18
|
+
recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationTokenAddress, selectedDstChainId, selectedDstToken, anyspendQuote, globalAddress, onOrderCreated, onBack, orderType, nft, tournament, payload, recipientEnsName, recipientImageUrl, }) {
|
|
19
19
|
// Use a stable amount for geo onramp options to prevent unnecessary refetches
|
|
20
20
|
const [stableAmountForGeo, setStableAmountForGeo] = (0, react_2.useState)(srcAmountOnRamp);
|
|
21
21
|
const hasInitialized = (0, react_2.useRef)(false);
|
|
@@ -26,7 +26,7 @@ recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationToke
|
|
|
26
26
|
hasInitialized.current = true;
|
|
27
27
|
}
|
|
28
28
|
}, [srcAmountOnRamp]);
|
|
29
|
-
const { geoData, coinbaseOnrampOptions, coinbaseAvailablePaymentMethods, isStripeOnrampSupported, isStripeWeb2Supported, isLoading: isLoadingGeoOnramp } = (0, anyspend_1.useGeoOnrampOptions)(isMainnet, stableAmountForGeo);
|
|
29
|
+
const { geoData, coinbaseOnrampOptions, coinbaseAvailablePaymentMethods, isStripeOnrampSupported, isStripeWeb2Supported, isLoading: isLoadingGeoOnramp, } = (0, anyspend_1.useGeoOnrampOptions)(isMainnet, stableAmountForGeo);
|
|
30
30
|
const { createOrder, isCreatingOrder } = (0, anyspend_1.useAnyspendCreateOnrampOrder)({
|
|
31
31
|
onSuccess: data => {
|
|
32
32
|
const orderId = data.data.id;
|
|
@@ -35,7 +35,7 @@ recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationToke
|
|
|
35
35
|
onError: error => {
|
|
36
36
|
console.error(error);
|
|
37
37
|
sonner_1.toast.error("Failed to create order: " + error.message);
|
|
38
|
-
}
|
|
38
|
+
},
|
|
39
39
|
});
|
|
40
40
|
const handlePaymentMethodClick = async (vendor, paymentMethod) => {
|
|
41
41
|
try {
|
|
@@ -69,7 +69,7 @@ recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationToke
|
|
|
69
69
|
return {
|
|
70
70
|
...selectedDstToken,
|
|
71
71
|
chainId: destinationTokenChainId || selectedDstChainId,
|
|
72
|
-
address: destinationTokenAddress
|
|
72
|
+
address: destinationTokenAddress,
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
return selectedDstToken;
|
|
@@ -86,13 +86,13 @@ recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationToke
|
|
|
86
86
|
paymentMethod: paymentMethod || "",
|
|
87
87
|
country: geoData?.country || "US",
|
|
88
88
|
ipAddress: geoData?.ip,
|
|
89
|
-
redirectUrl: window.location.origin === "https://basement.fun" ? "https://basement.fun/deposit" : window.location.origin
|
|
89
|
+
redirectUrl: window.location.origin === "https://basement.fun" ? "https://basement.fun/deposit" : window.location.origin,
|
|
90
90
|
},
|
|
91
91
|
expectedDstAmount: anyspendQuote?.data?.currencyOut?.amount?.toString() || "0",
|
|
92
92
|
creatorAddress: globalAddress,
|
|
93
93
|
nft,
|
|
94
94
|
tournament,
|
|
95
|
-
payload
|
|
95
|
+
payload,
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
catch (err) {
|
|
@@ -103,7 +103,7 @@ recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationToke
|
|
|
103
103
|
return ((0, jsx_runtime_1.jsxs)("div", { className: "mx-auto flex w-full max-w-[460px] flex-col gap-6", children: [(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("h2", { className: "-mb-3 text-lg font-semibold", children: "Order summary" }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-b3-react-background border-b3-react-border flex flex-col gap-3 rounded-lg border p-4", children: [recipientAddress && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: false, animate: {
|
|
104
104
|
opacity: 1,
|
|
105
105
|
y: 0,
|
|
106
|
-
filter: "blur(0px)"
|
|
106
|
+
filter: "blur(0px)",
|
|
107
107
|
}, transition: { duration: 0.3, delay: 0.2, ease: "easeInOut" }, className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)("p", { className: "text-b3-react-foreground/60", children: orderType === anyspend_1.OrderType.Swap
|
|
108
108
|
? "Recipient"
|
|
109
109
|
: orderType === anyspend_1.OrderType.MintNFT
|
|
@@ -9,7 +9,7 @@ function PaymentMethodIcons() {
|
|
|
9
9
|
{ name: "Mastercard", src: constants_1.PAYMENT_METHOD_ICONS.mastercard },
|
|
10
10
|
{ name: "Amex", src: constants_1.PAYMENT_METHOD_ICONS.amex },
|
|
11
11
|
{ name: "Apple Pay", src: constants_1.PAYMENT_METHOD_ICONS.applePay },
|
|
12
|
-
{ name: "Google Pay", src: constants_1.PAYMENT_METHOD_ICONS.googlePay }
|
|
12
|
+
{ name: "Google Pay", src: constants_1.PAYMENT_METHOD_ICONS.googlePay },
|
|
13
13
|
];
|
|
14
14
|
return ((0, jsx_runtime_1.jsxs)("div", { className: "mt-6 flex w-full flex-col items-center gap-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-primary/30 text-xs", children: "Supported payment methods" }), (0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-3", children: paymentMethods.map(method => ((0, jsx_runtime_1.jsx)("img", { src: method.src, alt: method.name, className: "h-6 opacity-70" }, method.name))) })] }));
|
|
15
15
|
}
|
|
@@ -16,12 +16,12 @@ function PaymentOneClick({ order }) {
|
|
|
16
16
|
const howItWorksSteps = [
|
|
17
17
|
{
|
|
18
18
|
number: 1,
|
|
19
|
-
description: `Click the link above to pay with ${paymentDescription}
|
|
19
|
+
description: `Click the link above to pay with ${paymentDescription}`,
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
number: 2,
|
|
23
|
-
description: `After payment, you'll be redirected back here, where we continue to execute the order
|
|
24
|
-
}
|
|
23
|
+
description: `After payment, you'll be redirected back here, where we continue to execute the order.`,
|
|
24
|
+
},
|
|
25
25
|
];
|
|
26
26
|
return ((0, jsx_runtime_1.jsxs)("div", { className: "relative my-8 flex w-full flex-1 flex-col items-center justify-center", children: [(0, jsx_runtime_1.jsx)("a", { href: order.oneClickBuyUrl || "", target: "_blank", className: "w-4/5", children: (0, jsx_runtime_1.jsx)(react_1.ShinyButton, { accentColor: "hsl(var(--as-brand))", className: "relative w-full py-6", children: (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10 flex items-center justify-center gap-3", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-lg font-medium text-white", children: ["Continue to ", vendorName] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-5 w-5 text-white/90" })] }) }) }), (0, jsx_runtime_1.jsx)(HowItWorks_1.default, { steps: howItWorksSteps })] }));
|
|
27
27
|
}
|
|
@@ -27,7 +27,7 @@ function PaymentStripeWeb2({ isMainnet, order, onPaymentSuccess }) {
|
|
|
27
27
|
}
|
|
28
28
|
return ((0, jsx_runtime_1.jsx)(react_stripe_js_1.Elements, { stripe: stripePromise, options: {
|
|
29
29
|
clientSecret: clientSecret || undefined,
|
|
30
|
-
appearance: { theme: theme === "light" ? "stripe" : "night" }
|
|
30
|
+
appearance: { theme: theme === "light" ? "stripe" : "night" },
|
|
31
31
|
}, children: (0, jsx_runtime_1.jsx)(StripePaymentForm, { order: order, clientSecret: clientSecret, onPaymentSuccess: onPaymentSuccess }) }));
|
|
32
32
|
}
|
|
33
33
|
function StripeLoadingState() {
|
|
@@ -36,7 +36,7 @@ function StripeLoadingState() {
|
|
|
36
36
|
function StripeErrorState({ error }) {
|
|
37
37
|
return ((0, jsx_runtime_1.jsx)("div", { className: "relative my-8 flex w-full flex-1 flex-col items-center justify-center", children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-as-red/10 border-as-red/20 flex w-full items-center gap-3 rounded-2xl border p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-as-red flex h-6 w-6 shrink-0 items-center justify-center rounded-full", children: (0, jsx_runtime_1.jsx)("svg", { className: "h-4 w-4 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "text-as-red text-sm font-medium", children: ["Error: ", error] })] }) }));
|
|
38
38
|
}
|
|
39
|
-
function StripePaymentForm({ order, clientSecret, onPaymentSuccess }) {
|
|
39
|
+
function StripePaymentForm({ order, clientSecret, onPaymentSuccess, }) {
|
|
40
40
|
const stripe = (0, react_stripe_js_1.useStripe)();
|
|
41
41
|
const elements = (0, react_stripe_js_1.useElements)();
|
|
42
42
|
const [loading, setLoading] = (0, react_2.useState)(false);
|
|
@@ -79,7 +79,7 @@ function StripePaymentForm({ order, clientSecret, onPaymentSuccess }) {
|
|
|
79
79
|
console.log("@@stripe-web2-payment:confirming-payment:", JSON.stringify({ orderId: order.id }, null, 2));
|
|
80
80
|
const { error, paymentIntent } = await stripe.confirmPayment({
|
|
81
81
|
elements,
|
|
82
|
-
redirect: "if_required"
|
|
82
|
+
redirect: "if_required",
|
|
83
83
|
});
|
|
84
84
|
if (error) {
|
|
85
85
|
console.error("@@stripe-web2-payment:error:", JSON.stringify(error, null, 2));
|
|
@@ -113,30 +113,30 @@ function StripePaymentForm({ order, clientSecret, onPaymentSuccess }) {
|
|
|
113
113
|
defaultValues: {
|
|
114
114
|
billingDetails: {
|
|
115
115
|
name: "",
|
|
116
|
-
email: ""
|
|
117
|
-
}
|
|
116
|
+
email: "",
|
|
117
|
+
},
|
|
118
118
|
},
|
|
119
119
|
fields: {
|
|
120
|
-
billingDetails: "auto"
|
|
120
|
+
billingDetails: "auto",
|
|
121
121
|
},
|
|
122
122
|
wallets: {
|
|
123
123
|
applePay: "auto",
|
|
124
|
-
googlePay: "auto"
|
|
125
|
-
}
|
|
124
|
+
googlePay: "auto",
|
|
125
|
+
},
|
|
126
126
|
};
|
|
127
127
|
const howItWorksSteps = [
|
|
128
128
|
{
|
|
129
129
|
number: 1,
|
|
130
|
-
description: "Enter your payment details securely using Stripe's encrypted form"
|
|
130
|
+
description: "Enter your payment details securely using Stripe's encrypted form",
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
133
|
number: 2,
|
|
134
|
-
description: "Your payment is processed instantly and securely through our payment partner"
|
|
134
|
+
description: "Your payment is processed instantly and securely through our payment partner",
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
137
|
number: 3,
|
|
138
|
-
description: "After payment confirmation, your order will be processed and completed automatically"
|
|
139
|
-
}
|
|
138
|
+
description: "After payment confirmation, your order will be processed and completed automatically",
|
|
139
|
+
},
|
|
140
140
|
];
|
|
141
141
|
return ((0, jsx_runtime_1.jsxs)("div", { className: "relative my-8 flex w-full flex-1 flex-col items-center justify-center", children: [(0, jsx_runtime_1.jsxs)("form", { onSubmit: handleSubmit, className: "w-full space-y-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-as-on-surface-1 w-full rounded-2xl p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "mb-4 flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-as-brand/20 flex h-8 w-8 shrink-0 items-center justify-center rounded-full", children: (0, jsx_runtime_1.jsx)("svg", { className: "text-as-brand h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" }) }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-primary text-sm font-medium", children: "Secured by Stripe" }), (0, jsx_runtime_1.jsx)("div", { className: "text-as-primary/50 text-xs", children: "End-to-end encrypted payment" })] })] }), (0, jsx_runtime_1.jsxs)("button", { type: "button", onClick: () => setShowHowItWorks(true), className: "text-as-primary/60 hover:text-as-primary flex items-center gap-1 text-xs transition-colors", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.HelpCircle, { className: "h-4 w-4" }), (0, jsx_runtime_1.jsx)("span", { children: "How it works" })] })] }), amount && ((0, jsx_runtime_1.jsxs)("div", { className: "border-as-stroke border-t pt-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-primary/50 mb-3 text-sm", children: "Payment Breakdown" }), (() => {
|
|
142
142
|
const originalAmount = Number(order.srcAmount) / 10 ** anyspend_1.USDC_BASE.decimals;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Token } from "../../../../anyspend";
|
|
2
|
-
export declare function TokenBalance({ token, walletAddress, onChangeInput }: {
|
|
2
|
+
export declare function TokenBalance({ token, walletAddress, onChangeInput, }: {
|
|
3
3
|
token: Token;
|
|
4
4
|
walletAddress: string | undefined;
|
|
5
5
|
onChangeInput: (value: string) => void;
|
|
@@ -4,10 +4,10 @@ exports.TokenBalance = TokenBalance;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("../../../../global-account/react");
|
|
6
6
|
const viem_1 = require("viem");
|
|
7
|
-
function TokenBalance({ token, walletAddress, onChangeInput }) {
|
|
7
|
+
function TokenBalance({ token, walletAddress, onChangeInput, }) {
|
|
8
8
|
const { rawBalance, formattedBalance, isLoading } = (0, react_1.useTokenBalance)({
|
|
9
9
|
token,
|
|
10
|
-
address: walletAddress
|
|
10
|
+
address: walletAddress,
|
|
11
11
|
});
|
|
12
12
|
const handlePercentageClick = (percentage) => {
|
|
13
13
|
if (!rawBalance)
|
|
@@ -5,6 +5,7 @@ export { AnySpendNFT } from "./AnySpendNFT";
|
|
|
5
5
|
export { AnySpendNFTButton } from "./AnySpendNFTButton";
|
|
6
6
|
export { AnySpendStakeB3 } from "./AnySpendStakeB3";
|
|
7
7
|
export { AnySpendTournament } from "./AnySpendTournament";
|
|
8
|
+
export { ChainTokenIcon } from "./common/ChainTokenIcon";
|
|
8
9
|
export { OrderDetails } from "./common/OrderDetails";
|
|
9
10
|
export { OrderHistory } from "./common/OrderHistory";
|
|
10
11
|
export { OrderHistoryItem } from "./common/OrderHistoryItem";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WebviewOnrampPayment = exports.WebviewOnrampOrderStatus = exports.TokenBalance = exports.OrderTokenAmount = exports.OrderToken = exports.OrderStatus = exports.OrderHistoryItem = exports.OrderHistory = exports.OrderDetails = exports.AnySpendTournament = exports.AnySpendStakeB3 = exports.AnySpendNFTButton = exports.AnySpendNFT = exports.AnySpendCustom = exports.AnySpendBuySpin = exports.AnySpend = void 0;
|
|
3
|
+
exports.WebviewOnrampPayment = exports.WebviewOnrampOrderStatus = exports.TokenBalance = exports.OrderTokenAmount = exports.OrderToken = exports.OrderStatus = exports.OrderHistoryItem = exports.OrderHistory = exports.OrderDetails = exports.ChainTokenIcon = exports.AnySpendTournament = exports.AnySpendStakeB3 = exports.AnySpendNFTButton = exports.AnySpendNFT = exports.AnySpendCustom = exports.AnySpendBuySpin = exports.AnySpend = void 0;
|
|
4
4
|
// Components
|
|
5
5
|
var AnySpend_1 = require("./AnySpend");
|
|
6
6
|
Object.defineProperty(exports, "AnySpend", { enumerable: true, get: function () { return AnySpend_1.AnySpend; } });
|
|
@@ -17,6 +17,8 @@ Object.defineProperty(exports, "AnySpendStakeB3", { enumerable: true, get: funct
|
|
|
17
17
|
var AnySpendTournament_1 = require("./AnySpendTournament");
|
|
18
18
|
Object.defineProperty(exports, "AnySpendTournament", { enumerable: true, get: function () { return AnySpendTournament_1.AnySpendTournament; } });
|
|
19
19
|
// Common Components
|
|
20
|
+
var ChainTokenIcon_1 = require("./common/ChainTokenIcon");
|
|
21
|
+
Object.defineProperty(exports, "ChainTokenIcon", { enumerable: true, get: function () { return ChainTokenIcon_1.ChainTokenIcon; } });
|
|
20
22
|
var OrderDetails_1 = require("./common/OrderDetails");
|
|
21
23
|
Object.defineProperty(exports, "OrderDetails", { enumerable: true, get: function () { return OrderDetails_1.OrderDetails; } });
|
|
22
24
|
var OrderHistory_1 = require("./common/OrderHistory");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function EnterRecipientModal({ isOpenPasteRecipientAddress, setIsOpenPasteRecipientAddress, recipientAddress, setRecipientAddress }: {
|
|
1
|
+
export declare function EnterRecipientModal({ isOpenPasteRecipientAddress, setIsOpenPasteRecipientAddress, recipientAddress, setRecipientAddress, }: {
|
|
2
2
|
isOpenPasteRecipientAddress: boolean;
|
|
3
3
|
setIsOpenPasteRecipientAddress: (isOpen: boolean) => void;
|
|
4
4
|
recipientAddress: string | undefined;
|
|
@@ -4,7 +4,7 @@ exports.EnterRecipientModal = EnterRecipientModal;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const react_2 = require("../../../../global-account/react");
|
|
7
|
-
function EnterRecipientModal({ isOpenPasteRecipientAddress, setIsOpenPasteRecipientAddress, recipientAddress, setRecipientAddress }) {
|
|
7
|
+
function EnterRecipientModal({ isOpenPasteRecipientAddress, setIsOpenPasteRecipientAddress, recipientAddress, setRecipientAddress, }) {
|
|
8
8
|
const [modalRecipientAddress, setModalRecipientAddress] = (0, react_1.useState)(recipientAddress || "");
|
|
9
9
|
(0, react_1.useEffect)(() => {
|
|
10
10
|
setModalRecipientAddress(recipientAddress || "");
|
|
@@ -8,5 +8,5 @@ interface WebviewOnrampPaymentProps {
|
|
|
8
8
|
onPaymentSuccess: (orderId: string) => void;
|
|
9
9
|
userId?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare function WebviewOnrampPayment({ srcAmountOnRamp, recipientAddress, destinationToken, anyspendQuote, onPaymentSuccess, userId, partnerId }: WebviewOnrampPaymentProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function WebviewOnrampPayment({ srcAmountOnRamp, recipientAddress, destinationToken, anyspendQuote, onPaymentSuccess, userId, partnerId, }: WebviewOnrampPaymentProps): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|