@b3dotfun/sdk 0.0.8 → 0.0.9-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/cjs/anyspend/abis/bondKit.d.ts +35 -0
- package/dist/cjs/anyspend/abis/bondKit.js +29 -0
- package/dist/cjs/anyspend/constants/index.d.ts +16 -5
- package/dist/cjs/anyspend/constants/index.js +3 -4
- package/dist/cjs/anyspend/index.d.ts +2 -7
- package/dist/cjs/anyspend/index.js +2 -8
- package/dist/cjs/anyspend/index.native.d.ts +2 -3
- package/dist/cjs/anyspend/index.native.js +2 -4
- package/dist/cjs/anyspend/react/components/AnySpend.js +12 -12
- package/dist/cjs/anyspend/react/components/AnySpendBondKit.d.ts +2 -0
- package/dist/cjs/anyspend/react/components/AnySpendBondKit.js +209 -0
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +3 -10
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +5 -4
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +49 -49
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendTournament.d.ts +5 -5
- package/dist/cjs/anyspend/react/components/AnySpendTournament.js +2 -3
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.js +10 -8
- package/dist/cjs/anyspend/react/components/{AnySpendNFTButton.d.ts → common/AnySpendNFTButton.d.ts} +2 -2
- package/dist/cjs/anyspend/react/components/{AnySpendNFTButton.js → common/AnySpendNFTButton.js} +2 -2
- package/dist/cjs/anyspend/react/components/common/OrderDetails.d.ts +6 -6
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +45 -47
- package/dist/cjs/anyspend/react/components/common/OrderHistoryItem.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/common/OrderHistoryItem.js +10 -12
- package/dist/cjs/anyspend/react/components/common/OrderStatus.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/common/OrderStatus.js +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderToken.d.ts +3 -3
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmount.d.ts +3 -3
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.d.ts +6 -5
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +8 -9
- package/dist/cjs/anyspend/react/components/common/PaymentOneClick.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/common/PaymentStripeWeb2.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/common/PaymentVendorUI.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/common/PaymentVendorUI.js +1 -2
- package/dist/cjs/anyspend/react/components/common/TokenBalance.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/index.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/index.js +5 -3
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampOrderStatus.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampOrderStatus.js +9 -9
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +3 -2
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.js +3 -4
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +2 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +6 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +12 -644
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +21 -6
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +72 -434
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.js +3 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendQuote.d.ts +7 -15
- package/dist/cjs/anyspend/react/hooks/useAnyspendQuote.js +4 -21
- package/dist/cjs/anyspend/react/hooks/useAnyspendTokens.d.ts +4 -4
- package/dist/cjs/anyspend/react/hooks/useCoinbaseOnrampOptions.d.ts +38 -27
- package/dist/cjs/anyspend/react/hooks/useCoinbaseOnrampOptions.js +1 -1
- package/dist/cjs/anyspend/react/hooks/useGeoOnrampOptions.d.ts +16 -13
- package/dist/cjs/anyspend/react/hooks/useSigMint.d.ts +7 -7
- package/dist/cjs/anyspend/services/anyspend.d.ts +10 -321
- package/dist/cjs/anyspend/services/anyspend.js +7 -11
- package/dist/cjs/anyspend/types/api.d.ts +1731 -0
- package/dist/cjs/anyspend/types/api.js +6 -0
- package/dist/cjs/anyspend/types/api_req_res.d.ts +10 -0
- package/dist/cjs/anyspend/types/chain.d.ts +3 -3
- package/dist/cjs/anyspend/types/signatureMint.js +2 -0
- package/dist/cjs/anyspend/utils/chain.d.ts +4 -3
- package/dist/cjs/anyspend/utils/chain.js +14 -14
- package/dist/cjs/anyspend/utils/format.d.ts +2 -2
- package/dist/cjs/anyspend/utils/format.js +13 -14
- package/dist/cjs/anyspend/utils/orderPayload.d.ts +29 -29
- package/dist/cjs/anyspend/utils/orderPayload.js +12 -13
- package/dist/cjs/anyspend/utils/token.d.ts +6 -6
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +4 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +1 -1
- package/dist/cjs/global-account/react/components/ui/TabSystem.d.ts +2 -2
- package/dist/cjs/global-account/react/components/ui/TabSystem.js +5 -5
- package/dist/cjs/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useAccountWallet.js +1 -1
- package/dist/cjs/global-account/react/hooks/useBestTransactionPath.d.ts +2 -2
- package/dist/cjs/global-account/react/hooks/useOnchainName.js +2 -2
- package/dist/cjs/global-account/react/hooks/useTokenBalance.d.ts +2 -2
- package/dist/cjs/global-account/react/hooks/useTokenFromUrl.d.ts +5 -5
- package/dist/cjs/global-account/react/hooks/useTokenFromUrl.js +1 -1
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +32 -9
- package/dist/cjs/shared/constants/chains/supported.d.ts +2 -2
- package/dist/cjs/shared/thirdweb/generated/@tanstack/react-query.gen.d.ts +249 -249
- package/dist/cjs/shared/utils/payment.utils.d.ts +3 -3
- package/dist/cjs/shared/utils/payment.utils.js +6 -7
- package/dist/esm/anyspend/abis/bondKit.d.ts +35 -0
- package/dist/esm/anyspend/abis/bondKit.js +26 -0
- package/dist/esm/anyspend/constants/index.d.ts +16 -5
- package/dist/esm/anyspend/constants/index.js +3 -4
- package/dist/esm/anyspend/index.d.ts +2 -7
- package/dist/esm/anyspend/index.js +2 -8
- package/dist/esm/anyspend/index.native.d.ts +2 -3
- package/dist/esm/anyspend/index.native.js +2 -4
- package/dist/esm/anyspend/react/components/AnySpend.js +13 -13
- package/dist/esm/anyspend/react/components/AnySpendBondKit.d.ts +2 -0
- package/dist/esm/anyspend/react/components/AnySpendBondKit.js +206 -0
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +4 -11
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +5 -4
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +49 -49
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +2 -2
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +3 -3
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +3 -3
- package/dist/esm/anyspend/react/components/AnySpendTournament.d.ts +5 -5
- package/dist/esm/anyspend/react/components/AnySpendTournament.js +2 -3
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.js +10 -8
- package/dist/esm/anyspend/react/components/{AnySpendNFTButton.d.ts → common/AnySpendNFTButton.d.ts} +2 -2
- package/dist/esm/anyspend/react/components/{AnySpendNFTButton.js → common/AnySpendNFTButton.js} +2 -2
- package/dist/esm/anyspend/react/components/common/OrderDetails.d.ts +6 -6
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +46 -48
- package/dist/esm/anyspend/react/components/common/OrderHistoryItem.d.ts +2 -2
- package/dist/esm/anyspend/react/components/common/OrderHistoryItem.js +11 -13
- package/dist/esm/anyspend/react/components/common/OrderStatus.d.ts +2 -2
- package/dist/esm/anyspend/react/components/common/OrderStatus.js +2 -2
- package/dist/esm/anyspend/react/components/common/OrderToken.d.ts +3 -3
- package/dist/esm/anyspend/react/components/common/OrderTokenAmount.d.ts +3 -3
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.d.ts +6 -5
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +8 -9
- package/dist/esm/anyspend/react/components/common/PaymentOneClick.d.ts +2 -2
- package/dist/esm/anyspend/react/components/common/PaymentStripeWeb2.d.ts +2 -2
- package/dist/esm/anyspend/react/components/common/PaymentVendorUI.d.ts +2 -2
- package/dist/esm/anyspend/react/components/common/PaymentVendorUI.js +1 -2
- package/dist/esm/anyspend/react/components/common/TokenBalance.d.ts +2 -2
- package/dist/esm/anyspend/react/components/index.d.ts +2 -1
- package/dist/esm/anyspend/react/components/index.js +2 -1
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampOrderStatus.d.ts +2 -2
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampOrderStatus.js +10 -10
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +3 -2
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.js +4 -5
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +2 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +6 -6
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +12 -644
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +21 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +72 -434
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.js +3 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendQuote.d.ts +7 -15
- package/dist/esm/anyspend/react/hooks/useAnyspendQuote.js +4 -21
- package/dist/esm/anyspend/react/hooks/useAnyspendTokens.d.ts +4 -4
- package/dist/esm/anyspend/react/hooks/useCoinbaseOnrampOptions.d.ts +38 -27
- package/dist/esm/anyspend/react/hooks/useCoinbaseOnrampOptions.js +1 -1
- package/dist/esm/anyspend/react/hooks/useGeoOnrampOptions.d.ts +16 -13
- package/dist/esm/anyspend/react/hooks/useSigMint.d.ts +7 -7
- package/dist/esm/anyspend/services/anyspend.d.ts +10 -321
- package/dist/esm/anyspend/services/anyspend.js +7 -11
- package/dist/esm/anyspend/types/api.d.ts +1731 -0
- package/dist/esm/anyspend/types/api.js +5 -0
- package/dist/esm/anyspend/types/api_req_res.d.ts +10 -0
- package/dist/esm/anyspend/types/chain.d.ts +3 -3
- package/dist/esm/anyspend/types/signatureMint.js +1 -0
- package/dist/esm/anyspend/utils/chain.d.ts +4 -3
- package/dist/esm/anyspend/utils/chain.js +1 -1
- package/dist/esm/anyspend/utils/format.d.ts +2 -2
- package/dist/esm/anyspend/utils/format.js +13 -14
- package/dist/esm/anyspend/utils/orderPayload.d.ts +29 -29
- package/dist/esm/anyspend/utils/orderPayload.js +12 -13
- package/dist/esm/anyspend/utils/token.d.ts +6 -6
- package/dist/esm/global-account/react/components/B3DynamicModal.js +5 -1
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +1 -1
- package/dist/esm/global-account/react/components/ui/TabSystem.d.ts +2 -2
- package/dist/esm/global-account/react/components/ui/TabSystem.js +4 -4
- package/dist/esm/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useAccountWallet.js +1 -1
- package/dist/esm/global-account/react/hooks/useBestTransactionPath.d.ts +2 -2
- package/dist/esm/global-account/react/hooks/useOnchainName.js +2 -2
- package/dist/esm/global-account/react/hooks/useTokenBalance.d.ts +2 -2
- package/dist/esm/global-account/react/hooks/useTokenFromUrl.d.ts +5 -5
- package/dist/esm/global-account/react/hooks/useTokenFromUrl.js +1 -1
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +32 -9
- package/dist/esm/shared/constants/chains/supported.d.ts +2 -2
- package/dist/esm/shared/thirdweb/generated/@tanstack/react-query.gen.d.ts +249 -249
- package/dist/esm/shared/utils/payment.utils.d.ts +3 -3
- package/dist/esm/shared/utils/payment.utils.js +6 -7
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/abis/bondKit.d.ts +35 -0
- package/dist/types/anyspend/constants/index.d.ts +16 -5
- package/dist/types/anyspend/index.d.ts +2 -7
- package/dist/types/anyspend/index.native.d.ts +2 -3
- package/dist/types/anyspend/react/components/AnySpendBondKit.d.ts +2 -0
- package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +5 -4
- package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +2 -2
- package/dist/types/anyspend/react/components/AnySpendTournament.d.ts +5 -5
- package/dist/types/anyspend/react/components/AnyspendSignatureMint.d.ts +1 -1
- package/dist/types/anyspend/react/components/{AnySpendNFTButton.d.ts → common/AnySpendNFTButton.d.ts} +2 -2
- package/dist/types/anyspend/react/components/common/OrderDetails.d.ts +6 -6
- package/dist/types/anyspend/react/components/common/OrderHistoryItem.d.ts +2 -2
- package/dist/types/anyspend/react/components/common/OrderStatus.d.ts +2 -2
- package/dist/types/anyspend/react/components/common/OrderToken.d.ts +3 -3
- package/dist/types/anyspend/react/components/common/OrderTokenAmount.d.ts +3 -3
- package/dist/types/anyspend/react/components/common/PanelOnrampPayment.d.ts +6 -5
- package/dist/types/anyspend/react/components/common/PaymentOneClick.d.ts +2 -2
- package/dist/types/anyspend/react/components/common/PaymentStripeWeb2.d.ts +2 -2
- package/dist/types/anyspend/react/components/common/PaymentVendorUI.d.ts +2 -2
- package/dist/types/anyspend/react/components/common/TokenBalance.d.ts +2 -2
- package/dist/types/anyspend/react/components/index.d.ts +2 -1
- package/dist/types/anyspend/react/components/webview/WebviewOnrampOrderStatus.d.ts +2 -2
- package/dist/types/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +3 -2
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +2 -2
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +6 -6
- package/dist/types/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +12 -644
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +72 -434
- package/dist/types/anyspend/react/hooks/useAnyspendQuote.d.ts +7 -15
- package/dist/types/anyspend/react/hooks/useAnyspendTokens.d.ts +4 -4
- package/dist/types/anyspend/react/hooks/useCoinbaseOnrampOptions.d.ts +38 -27
- package/dist/types/anyspend/react/hooks/useGeoOnrampOptions.d.ts +16 -13
- package/dist/types/anyspend/react/hooks/useSigMint.d.ts +7 -7
- package/dist/types/anyspend/services/anyspend.d.ts +10 -321
- package/dist/types/anyspend/types/api.d.ts +1731 -0
- package/dist/types/anyspend/types/api_req_res.d.ts +10 -0
- package/dist/types/anyspend/types/chain.d.ts +3 -3
- package/dist/types/anyspend/utils/chain.d.ts +4 -3
- package/dist/types/anyspend/utils/format.d.ts +2 -2
- package/dist/types/anyspend/utils/orderPayload.d.ts +29 -29
- package/dist/types/anyspend/utils/token.d.ts +6 -6
- package/dist/types/global-account/react/components/ui/TabSystem.d.ts +2 -2
- package/dist/types/global-account/react/components/ui/command.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useBestTransactionPath.d.ts +2 -2
- package/dist/types/global-account/react/hooks/useTokenBalance.d.ts +2 -2
- package/dist/types/global-account/react/hooks/useTokenFromUrl.d.ts +5 -5
- package/dist/types/global-account/react/stores/useModalStore.d.ts +32 -9
- package/dist/types/shared/constants/chains/supported.d.ts +2 -2
- package/dist/types/shared/thirdweb/generated/@tanstack/react-query.gen.d.ts +249 -249
- package/dist/types/shared/utils/payment.utils.d.ts +3 -3
- package/package.json +3 -1
- package/src/anyspend/README.md +33 -32
- package/src/anyspend/abis/bondKit.ts +26 -0
- package/src/anyspend/constants/index.ts +7 -7
- package/src/anyspend/index.native.ts +2 -5
- package/src/anyspend/index.ts +2 -9
- package/src/anyspend/react/components/AnySpend.tsx +19 -17
- package/src/anyspend/react/components/AnySpendBondKit.tsx +378 -0
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +4 -12
- package/src/anyspend/react/components/AnySpendCustom.tsx +100 -112
- package/src/anyspend/react/components/AnySpendNFT.tsx +7 -6
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +3 -3
- package/src/anyspend/react/components/AnySpendTournament.tsx +8 -7
- package/src/anyspend/react/components/AnyspendSignatureMint.tsx +22 -13
- package/src/anyspend/react/components/{AnySpendNFTButton.tsx → common/AnySpendNFTButton.tsx} +2 -2
- package/src/anyspend/react/components/common/OrderDetails.tsx +58 -70
- package/src/anyspend/react/components/common/OrderHistoryItem.tsx +13 -14
- package/src/anyspend/react/components/common/OrderStatus.tsx +4 -3
- package/src/anyspend/react/components/common/OrderToken.tsx +4 -3
- package/src/anyspend/react/components/common/OrderTokenAmount.tsx +4 -3
- package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +19 -15
- package/src/anyspend/react/components/common/PaymentOneClick.tsx +2 -2
- package/src/anyspend/react/components/common/PaymentStripeWeb2.tsx +4 -3
- package/src/anyspend/react/components/common/PaymentVendorUI.tsx +3 -3
- package/src/anyspend/react/components/common/TokenBalance.tsx +2 -2
- package/src/anyspend/react/components/index.ts +2 -1
- package/src/anyspend/react/components/webview/WebviewOnrampOrderStatus.tsx +12 -11
- package/src/anyspend/react/components/webview/WebviewOnrampPayment.tsx +15 -16
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +2 -2
- package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +6 -6
- package/src/anyspend/react/hooks/useAnyspendOrderAndTransactions.ts +27 -5
- package/src/anyspend/react/hooks/useAnyspendOrderHistory.ts +10 -6
- package/src/anyspend/react/hooks/useAnyspendQuote.ts +15 -18
- package/src/anyspend/react/hooks/useCoinbaseOnrampOptions.ts +1 -1
- package/src/anyspend/react/hooks/useSigMint.tsx +1 -1
- package/src/anyspend/services/anyspend.ts +38 -30
- package/src/anyspend/types/api.ts +1756 -0
- package/src/anyspend/types/api_req_res.ts +16 -0
- package/src/anyspend/types/chain.ts +3 -3
- package/src/anyspend/utils/chain.ts +4 -3
- package/src/anyspend/utils/format.ts +17 -15
- package/src/anyspend/utils/orderPayload.ts +20 -20
- package/src/anyspend/utils/token.ts +6 -6
- package/src/global-account/react/components/B3DynamicModal.tsx +6 -1
- package/src/global-account/react/components/SignInWithB3/SignIn.tsx +1 -1
- package/src/global-account/react/components/StyleRoot.tsx +1 -0
- package/src/global-account/react/components/ui/TabSystem.tsx +36 -33
- package/src/global-account/react/hooks/useAccountWallet.tsx +1 -1
- package/src/global-account/react/hooks/useBestTransactionPath.tsx +3 -2
- package/src/global-account/react/hooks/useOnchainName.tsx +2 -2
- package/src/global-account/react/hooks/useTokenBalance.tsx +3 -2
- package/src/global-account/react/hooks/useTokenFromUrl.tsx +10 -4
- package/src/global-account/react/stores/useModalStore.ts +34 -9
- package/src/shared/utils/payment.utils.ts +9 -9
- package/dist/cjs/anyspend/types/custom.d.ts +0 -130
- package/dist/cjs/anyspend/types/custom.js +0 -19
- package/dist/cjs/anyspend/types/globalWallet.d.ts +0 -18
- package/dist/cjs/anyspend/types/globalWallet.js +0 -10
- package/dist/cjs/anyspend/types/index.d.ts +0 -13
- package/dist/cjs/anyspend/types/index.js +0 -29
- package/dist/cjs/anyspend/types/metadata.d.ts +0 -26
- package/dist/cjs/anyspend/types/metadata.js +0 -16
- package/dist/cjs/anyspend/types/nft.d.ts +0 -274
- package/dist/cjs/anyspend/types/nft.js +0 -38
- package/dist/cjs/anyspend/types/onramp.d.ts +0 -28
- package/dist/cjs/anyspend/types/onramp.js +0 -18
- package/dist/cjs/anyspend/types/order.d.ts +0 -1629
- package/dist/cjs/anyspend/types/order.js +0 -81
- package/dist/cjs/anyspend/types/relay.d.ts +0 -10
- package/dist/cjs/anyspend/types/relay.js +0 -12
- package/dist/cjs/anyspend/types/req-res/createOrder.d.ts +0 -4026
- package/dist/cjs/anyspend/types/req-res/createOrder.js +0 -61
- package/dist/cjs/anyspend/types/req-res/getCoinbaseOnrampOptions.d.ts +0 -120
- package/dist/cjs/anyspend/types/req-res/getCoinbaseOnrampOptions.js +0 -31
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.d.ts +0 -2922
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.js +0 -23
- package/dist/cjs/anyspend/types/req-res/getOrderByCreator.d.ts +0 -28
- package/dist/cjs/anyspend/types/req-res/getOrderByCreator.js +0 -11
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.d.ts +0 -2117
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.js +0 -11
- package/dist/cjs/anyspend/types/req-res/getQuote.d.ts +0 -290
- package/dist/cjs/anyspend/types/req-res/getQuote.js +0 -51
- package/dist/cjs/anyspend/types/req-res/getTokenList.d.ts +0 -63
- package/dist/cjs/anyspend/types/req-res/getTokenList.js +0 -18
- package/dist/cjs/anyspend/types/req-res/index.d.ts +0 -7
- package/dist/cjs/anyspend/types/req-res/index.js +0 -23
- package/dist/cjs/anyspend/types/req-res/stripe.d.ts +0 -0
- package/dist/cjs/anyspend/types/req-res/stripe.js +0 -1
- package/dist/cjs/anyspend/types/swap.d.ts +0 -119
- package/dist/cjs/anyspend/types/swap.js +0 -13
- package/dist/cjs/anyspend/types/token.d.ts +0 -34
- package/dist/cjs/anyspend/types/token.js +0 -14
- package/dist/cjs/anyspend/types/tournament.d.ts +0 -174
- package/dist/cjs/anyspend/types/tournament.js +0 -24
- package/dist/cjs/anyspend/types/transaction.d.ts +0 -84
- package/dist/cjs/anyspend/types/transaction.js +0 -34
- package/dist/esm/anyspend/types/custom.d.ts +0 -130
- package/dist/esm/anyspend/types/custom.js +0 -13
- package/dist/esm/anyspend/types/globalWallet.d.ts +0 -18
- package/dist/esm/anyspend/types/globalWallet.js +0 -7
- package/dist/esm/anyspend/types/index.d.ts +0 -13
- package/dist/esm/anyspend/types/index.js +0 -13
- package/dist/esm/anyspend/types/metadata.d.ts +0 -26
- package/dist/esm/anyspend/types/metadata.js +0 -11
- package/dist/esm/anyspend/types/nft.d.ts +0 -274
- package/dist/esm/anyspend/types/nft.js +0 -35
- package/dist/esm/anyspend/types/onramp.d.ts +0 -28
- package/dist/esm/anyspend/types/onramp.js +0 -15
- package/dist/esm/anyspend/types/order.d.ts +0 -1629
- package/dist/esm/anyspend/types/order.js +0 -78
- package/dist/esm/anyspend/types/relay.d.ts +0 -10
- package/dist/esm/anyspend/types/relay.js +0 -9
- package/dist/esm/anyspend/types/req-res/createOrder.d.ts +0 -4026
- package/dist/esm/anyspend/types/req-res/createOrder.js +0 -58
- package/dist/esm/anyspend/types/req-res/getCoinbaseOnrampOptions.d.ts +0 -120
- package/dist/esm/anyspend/types/req-res/getCoinbaseOnrampOptions.js +0 -28
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.d.ts +0 -2922
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.js +0 -20
- package/dist/esm/anyspend/types/req-res/getOrderByCreator.d.ts +0 -28
- package/dist/esm/anyspend/types/req-res/getOrderByCreator.js +0 -8
- package/dist/esm/anyspend/types/req-res/getOrderHistory.d.ts +0 -2117
- package/dist/esm/anyspend/types/req-res/getOrderHistory.js +0 -8
- package/dist/esm/anyspend/types/req-res/getQuote.d.ts +0 -290
- package/dist/esm/anyspend/types/req-res/getQuote.js +0 -48
- package/dist/esm/anyspend/types/req-res/getTokenList.d.ts +0 -63
- package/dist/esm/anyspend/types/req-res/getTokenList.js +0 -15
- package/dist/esm/anyspend/types/req-res/index.d.ts +0 -7
- package/dist/esm/anyspend/types/req-res/index.js +0 -7
- package/dist/esm/anyspend/types/req-res/stripe.d.ts +0 -0
- package/dist/esm/anyspend/types/req-res/stripe.js +0 -1
- package/dist/esm/anyspend/types/swap.d.ts +0 -119
- package/dist/esm/anyspend/types/swap.js +0 -10
- package/dist/esm/anyspend/types/token.d.ts +0 -34
- package/dist/esm/anyspend/types/token.js +0 -11
- package/dist/esm/anyspend/types/tournament.d.ts +0 -174
- package/dist/esm/anyspend/types/tournament.js +0 -21
- package/dist/esm/anyspend/types/transaction.d.ts +0 -84
- package/dist/esm/anyspend/types/transaction.js +0 -31
- package/dist/types/anyspend/types/custom.d.ts +0 -130
- package/dist/types/anyspend/types/globalWallet.d.ts +0 -18
- package/dist/types/anyspend/types/index.d.ts +0 -13
- package/dist/types/anyspend/types/metadata.d.ts +0 -26
- package/dist/types/anyspend/types/nft.d.ts +0 -274
- package/dist/types/anyspend/types/onramp.d.ts +0 -28
- package/dist/types/anyspend/types/order.d.ts +0 -1629
- package/dist/types/anyspend/types/relay.d.ts +0 -10
- package/dist/types/anyspend/types/req-res/createOrder.d.ts +0 -4026
- package/dist/types/anyspend/types/req-res/getCoinbaseOnrampOptions.d.ts +0 -120
- package/dist/types/anyspend/types/req-res/getOrderAndTransactions.d.ts +0 -2922
- package/dist/types/anyspend/types/req-res/getOrderByCreator.d.ts +0 -28
- package/dist/types/anyspend/types/req-res/getOrderHistory.d.ts +0 -2117
- package/dist/types/anyspend/types/req-res/getQuote.d.ts +0 -290
- package/dist/types/anyspend/types/req-res/getTokenList.d.ts +0 -63
- package/dist/types/anyspend/types/req-res/index.d.ts +0 -7
- package/dist/types/anyspend/types/req-res/stripe.d.ts +0 -0
- package/dist/types/anyspend/types/swap.d.ts +0 -119
- package/dist/types/anyspend/types/token.d.ts +0 -34
- package/dist/types/anyspend/types/tournament.d.ts +0 -174
- package/dist/types/anyspend/types/transaction.d.ts +0 -84
- package/src/anyspend/types/custom.ts +0 -17
- package/src/anyspend/types/globalWallet.ts +0 -9
- package/src/anyspend/types/index.ts +0 -14
- package/src/anyspend/types/metadata.ts +0 -41
- package/src/anyspend/types/nft.ts +0 -53
- package/src/anyspend/types/onramp.ts +0 -16
- package/src/anyspend/types/order.ts +0 -88
- package/src/anyspend/types/relay.ts +0 -13
- package/src/anyspend/types/req-res/createOrder.ts +0 -67
- package/src/anyspend/types/req-res/getCoinbaseOnrampOptions.ts +0 -34
- package/src/anyspend/types/req-res/getOrderAndTransactions.ts +0 -23
- package/src/anyspend/types/req-res/getOrderByCreator.ts +0 -9
- package/src/anyspend/types/req-res/getOrderHistory.ts +0 -9
- package/src/anyspend/types/req-res/getQuote.ts +0 -65
- package/src/anyspend/types/req-res/getTokenList.ts +0 -18
- package/src/anyspend/types/req-res/index.ts +0 -7
- package/src/anyspend/types/req-res/stripe.ts +0 -0
- package/src/anyspend/types/swap.ts +0 -12
- package/src/anyspend/types/token.ts +0 -13
- package/src/anyspend/types/tournament.ts +0 -26
- package/src/anyspend/types/transaction.ts +0 -39
- /package/dist/cjs/anyspend/abis/{abi-usdc-base.d.ts → abiUsdcBase.d.ts} +0 -0
- /package/dist/cjs/anyspend/abis/{abi-usdc-base.js → abiUsdcBase.js} +0 -0
- /package/dist/cjs/anyspend/abis/{erc20-staking.d.ts → erc20Staking.d.ts} +0 -0
- /package/dist/cjs/anyspend/abis/{erc20-staking.js → erc20Staking.js} +0 -0
- /package/dist/cjs/anyspend/abis/{signature-minting.d.ts → signatureMinting.d.ts} +0 -0
- /package/dist/cjs/anyspend/abis/{signature-minting.js → signatureMinting.js} +0 -0
- /package/dist/cjs/anyspend/types/{signature-mint.js → api_req_res.js} +0 -0
- /package/dist/cjs/anyspend/types/{signature-mint.d.ts → signatureMint.d.ts} +0 -0
- /package/dist/esm/anyspend/abis/{abi-usdc-base.d.ts → abiUsdcBase.d.ts} +0 -0
- /package/dist/esm/anyspend/abis/{abi-usdc-base.js → abiUsdcBase.js} +0 -0
- /package/dist/esm/anyspend/abis/{erc20-staking.d.ts → erc20Staking.d.ts} +0 -0
- /package/dist/esm/anyspend/abis/{erc20-staking.js → erc20Staking.js} +0 -0
- /package/dist/esm/anyspend/abis/{signature-minting.d.ts → signatureMinting.d.ts} +0 -0
- /package/dist/esm/anyspend/abis/{signature-minting.js → signatureMinting.js} +0 -0
- /package/dist/esm/anyspend/types/{signature-mint.js → api_req_res.js} +0 -0
- /package/dist/esm/anyspend/types/{signature-mint.d.ts → signatureMint.d.ts} +0 -0
- /package/dist/types/anyspend/abis/{abi-usdc-base.d.ts → abiUsdcBase.d.ts} +0 -0
- /package/dist/types/anyspend/abis/{erc20-staking.d.ts → erc20Staking.d.ts} +0 -0
- /package/dist/types/anyspend/abis/{signature-minting.d.ts → signatureMinting.d.ts} +0 -0
- /package/dist/types/anyspend/types/{signature-mint.d.ts → signatureMint.d.ts} +0 -0
- /package/src/anyspend/abis/{abi-usdc-base.ts → abiUsdcBase.ts} +0 -0
- /package/src/anyspend/abis/{erc20-staking.ts → erc20Staking.ts} +0 -0
- /package/src/anyspend/abis/{signature-minting.ts → signatureMinting.ts} +0 -0
- /package/src/anyspend/types/{signature-mint.ts → signatureMint.ts} +0 -0
|
@@ -29,19 +29,19 @@ function getOrderSuccessText({ order, tournament, formattedActualDstAmount, dstT
|
|
|
29
29
|
const recipient = recipientName || centerTruncate(order.recipientAddress, 8);
|
|
30
30
|
let actionText = "";
|
|
31
31
|
switch (order.type) {
|
|
32
|
-
case
|
|
32
|
+
case "swap":
|
|
33
33
|
actionText = `sent ${formattedActualDstAmount || "--"} ${dstToken.symbol}`;
|
|
34
34
|
return `Successfully ${actionText} to ${recipient}`;
|
|
35
|
-
case
|
|
35
|
+
case "mint_nft":
|
|
36
36
|
actionText = `minted ${order.metadata.nft.name}`;
|
|
37
37
|
return `Successfully ${actionText} to ${recipient}`;
|
|
38
|
-
case
|
|
38
|
+
case "join_tournament":
|
|
39
39
|
actionText = `joined ${tournament?.name}`;
|
|
40
40
|
return `Successfully ${actionText} for ${recipient}`;
|
|
41
|
-
case
|
|
41
|
+
case "fund_tournament":
|
|
42
42
|
actionText = `funded ${tournament?.name}`;
|
|
43
43
|
return `Successfully ${actionText}`;
|
|
44
|
-
case
|
|
44
|
+
case "custom":
|
|
45
45
|
actionText = order.metadata.action || `executed contract`;
|
|
46
46
|
return `Successfully ${actionText}`;
|
|
47
47
|
default:
|
|
@@ -124,12 +124,10 @@ exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode
|
|
|
124
124
|
const router = (0, hooks_1.useRouter)();
|
|
125
125
|
const searchParams = (0, hooks_1.useSearchParams)();
|
|
126
126
|
const setB3ModalOpen = (0, react_1.useModalStore)(state => state.setB3ModalOpen);
|
|
127
|
-
const srcToken =
|
|
128
|
-
const dstToken =
|
|
129
|
-
const nft = order.type ===
|
|
130
|
-
const tournament = order.type ===
|
|
131
|
-
? anyspend_1.zTournament.parse(order.metadata.tournament)
|
|
132
|
-
: undefined;
|
|
127
|
+
const srcToken = order.metadata.srcToken;
|
|
128
|
+
const dstToken = order.metadata.dstToken;
|
|
129
|
+
const nft = order.type === "mint_nft" ? order.metadata.nft : undefined;
|
|
130
|
+
const tournament = order.type === "join_tournament" || order.type === "fund_tournament" ? order.metadata.tournament : undefined;
|
|
133
131
|
const { name: recipientName } = (0, react_1.useOnchainName)(order.recipientAddress);
|
|
134
132
|
const account = (0, react_1.useAccountWallet)();
|
|
135
133
|
const { data: walletClient } = (0, wagmi_1.useWalletClient)();
|
|
@@ -217,17 +215,17 @@ exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode
|
|
|
217
215
|
if (!srcToken || !dstToken) {
|
|
218
216
|
return (0, jsx_runtime_1.jsx)("div", { children: "Loading..." });
|
|
219
217
|
}
|
|
220
|
-
const expectedDstAmount = order.type ===
|
|
221
|
-
order.type ===
|
|
222
|
-
order.type ===
|
|
223
|
-
order.type ===
|
|
218
|
+
const expectedDstAmount = order.type === "mint_nft" ||
|
|
219
|
+
order.type === "join_tournament" ||
|
|
220
|
+
order.type === "fund_tournament" ||
|
|
221
|
+
order.type === "custom"
|
|
224
222
|
? "0"
|
|
225
223
|
: order.payload.expectedDstAmount.toString();
|
|
226
224
|
const formattedExpectedDstAmount = (0, number_1.formatTokenAmount)(BigInt(expectedDstAmount), dstToken.decimals);
|
|
227
|
-
const actualDstAmount = order.type ===
|
|
228
|
-
order.type ===
|
|
229
|
-
order.type ===
|
|
230
|
-
order.type ===
|
|
225
|
+
const actualDstAmount = order.type === "mint_nft" ||
|
|
226
|
+
order.type === "join_tournament" ||
|
|
227
|
+
order.type === "fund_tournament" ||
|
|
228
|
+
order.type === "custom"
|
|
231
229
|
? undefined
|
|
232
230
|
: order.payload.actualDstAmount;
|
|
233
231
|
const formattedActualDstAmount = actualDstAmount
|
|
@@ -253,7 +251,7 @@ exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode
|
|
|
253
251
|
};
|
|
254
252
|
if (refundTxs) {
|
|
255
253
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative mt-4 flex w-full flex-col gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-b3-react-background absolute bottom-2 left-4 top-2 z-[5] w-2", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "from-as-brand/50 absolute left-[2px] top-0 z-10 w-[3px] bg-gradient-to-b from-20% via-purple-500/50 via-80% to-transparent", initial: { height: "0%" }, animate: { height: "100%" }, transition: { duration: 1.5, ease: "easeInOut" } }) }), depositTxs
|
|
256
|
-
? depositTxs.map(dTx => ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.onrampMetadata?.vendor ===
|
|
254
|
+
? depositTxs.map(dTx => ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.onrampMetadata?.vendor === "stripe-web2"
|
|
257
255
|
? `Received payment`
|
|
258
256
|
: `Received ${(0, number_1.formatTokenAmount)(BigInt(dTx.amount), srcToken.decimals)} ${srcToken.symbol}`, chainId: order.srcChain, tx: dTx, isProcessing: false }, dTx.txHash)))
|
|
259
257
|
: null, refundTxs
|
|
@@ -262,16 +260,16 @@ exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode
|
|
|
262
260
|
}
|
|
263
261
|
if (executeTx) {
|
|
264
262
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative mt-4 flex w-full flex-col gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-b3-react-background absolute bottom-2 left-4 top-2 z-[5] w-2", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "from-as-brand/50 absolute left-[2px] top-0 z-10 w-[3px] bg-gradient-to-b from-20% via-purple-500/50 via-80% to-transparent", initial: { height: "0%" }, animate: { height: "100%" }, transition: { duration: 1.5, ease: "easeInOut" } }) }), depositTxs
|
|
265
|
-
? depositTxs.map(dTxs => ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.onrampMetadata?.vendor ===
|
|
263
|
+
? depositTxs.map(dTxs => ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.onrampMetadata?.vendor === "stripe-web2"
|
|
266
264
|
? `Received payment`
|
|
267
265
|
: `Received ${(0, number_1.formatTokenAmount)(BigInt(dTxs.amount), srcToken.decimals)} ${srcToken.symbol}`, chainId: order.srcChain, tx: dTxs, isProcessing: false }, dTxs.txHash)))
|
|
268
|
-
: null, (0, jsx_runtime_1.jsx)(TransactionDetails, { title: "Processed Transaction", chainId: order.srcChain, tx: relayTx, delay: 0.5, isProcessing: false }), (0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.type ===
|
|
266
|
+
: null, (0, jsx_runtime_1.jsx)(TransactionDetails, { title: "Processed Transaction", chainId: order.srcChain, tx: relayTx, delay: 0.5, isProcessing: false }), (0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.type === "swap"
|
|
269
267
|
? "Processed Swap"
|
|
270
|
-
: order.type ===
|
|
268
|
+
: order.type === "mint_nft"
|
|
271
269
|
? "Minted NFT"
|
|
272
|
-
: order.type ===
|
|
270
|
+
: order.type === "join_tournament"
|
|
273
271
|
? "Joined Tournament"
|
|
274
|
-
: order.type ===
|
|
272
|
+
: order.type === "fund_tournament"
|
|
275
273
|
? "Funded Tournament"
|
|
276
274
|
: "Processed Order", chainId: order.dstChain, tx: executeTx, isProcessing: false, delay: 1 })] }), (0, jsx_runtime_1.jsx)("div", { className: "flex w-full flex-col gap-8", children: (0, jsx_runtime_1.jsx)(react_1.Button, { variant: "link", asChild: true, children: (0, jsx_runtime_1.jsxs)("a", { href: (0, anyspend_1.getExplorerTxUrl)(order.dstChain, executeTx.txHash), target: "_blank", className: "text-as-primary/70 hover:text-as-primary", style: { whiteSpace: "normal" }, children: [getOrderSuccessText({
|
|
277
275
|
order,
|
|
@@ -280,28 +278,28 @@ exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode
|
|
|
280
278
|
dstToken,
|
|
281
279
|
recipientName,
|
|
282
280
|
centerTruncate: centerTruncate_1.default,
|
|
283
|
-
}), (0, jsx_runtime_1.jsx)(lucide_react_1.ExternalLink, { className: "ml-2 h-4 w-4" })] }) }) }), order.type ===
|
|
281
|
+
}), (0, jsx_runtime_1.jsx)(lucide_react_1.ExternalLink, { className: "ml-2 h-4 w-4" })] }) }) }), order.type === "join_tournament" && order.status === "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: handleCloseModal, 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 === "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" ? handleBack : handleCloseModal, 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") }))] }));
|
|
284
282
|
}
|
|
285
283
|
if (relayTx && relayTx.status === "success") {
|
|
286
284
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative mt-4 flex w-full flex-col gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-b3-react-background absolute bottom-2 left-4 top-2 z-[5] w-2", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "from-as-brand/50 absolute left-[2px] top-0 z-10 w-[3px] bg-gradient-to-b from-20% via-purple-500/50 via-80% to-transparent", initial: { height: "0%" }, animate: { height: "100%" }, transition: { duration: 1.5, ease: "easeInOut" } }) }), depositTxs
|
|
287
|
-
? depositTxs.map(dTxs => ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.onrampMetadata?.vendor ===
|
|
285
|
+
? depositTxs.map(dTxs => ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.onrampMetadata?.vendor === "stripe-web2"
|
|
288
286
|
? `Received payment`
|
|
289
287
|
: `Received ${(0, number_1.formatTokenAmount)(BigInt(dTxs.amount), srcToken.decimals)} ${srcToken.symbol}`, chainId: order.srcChain, tx: dTxs, isProcessing: false }, dTxs.txHash)))
|
|
290
|
-
: null, order.srcChain === order.dstChain ? ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.type ===
|
|
288
|
+
: null, order.srcChain === order.dstChain ? ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.type === "swap"
|
|
291
289
|
? "Processed Swap"
|
|
292
|
-
: order.type ===
|
|
290
|
+
: order.type === "mint_nft"
|
|
293
291
|
? "Minted NFT"
|
|
294
|
-
: order.type ===
|
|
292
|
+
: order.type === "join_tournament"
|
|
295
293
|
? "Joined Tournament"
|
|
296
|
-
: order.type ===
|
|
294
|
+
: order.type === "fund_tournament"
|
|
297
295
|
? "Funded Tournament"
|
|
298
|
-
: "Processed Transaction", chainId: order.srcChain, isProcessing: false, tx: relayTx, delay: 0.5 })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TransactionDetails, { title: "Processed Transaction", chainId: order.srcChain, isProcessing: false, tx: relayTx, delay: 0.5 }), (0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.type ===
|
|
296
|
+
: "Processed Transaction", chainId: order.srcChain, isProcessing: false, tx: relayTx, delay: 0.5 })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TransactionDetails, { title: "Processed Transaction", chainId: order.srcChain, isProcessing: false, tx: relayTx, delay: 0.5 }), (0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.type === "swap"
|
|
299
297
|
? "Processing Swap"
|
|
300
|
-
: order.type ===
|
|
298
|
+
: order.type === "mint_nft"
|
|
301
299
|
? "Minting NFT"
|
|
302
|
-
: order.type ===
|
|
300
|
+
: order.type === "join_tournament"
|
|
303
301
|
? "Joining Tournament"
|
|
304
|
-
: order.type ===
|
|
302
|
+
: order.type === "fund_tournament"
|
|
305
303
|
? "Funding Tournament"
|
|
306
304
|
: "Processing Bridge", chainId: order.dstChain, isProcessing: true, tx: executeTx, delay: 1 })] }))] }), (0, jsx_runtime_1.jsx)("div", { className: "flex w-full flex-col gap-8", children: (0, jsx_runtime_1.jsx)(react_1.Button, { variant: "link", asChild: true, children: (0, jsx_runtime_1.jsxs)("a", { href: (0, anyspend_1.getExplorerTxUrl)(order.dstChain, relayTx.txHash), target: "_blank", className: "text-as-primary/70 hover:text-as-primary", style: { whiteSpace: "normal" }, children: [getOrderSuccessText({
|
|
307
305
|
order,
|
|
@@ -310,22 +308,22 @@ exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode
|
|
|
310
308
|
dstToken,
|
|
311
309
|
recipientName,
|
|
312
310
|
centerTruncate: centerTruncate_1.default,
|
|
313
|
-
}), (0, jsx_runtime_1.jsx)(lucide_react_1.ExternalLink, { className: "ml-2 h-4 w-4" })] }) }) }), order.type ===
|
|
311
|
+
}), (0, jsx_runtime_1.jsx)(lucide_react_1.ExternalLink, { className: "ml-2 h-4 w-4" })] }) }) }), order.type === "join_tournament" && order.status === "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: handleCloseModal, 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 === "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" ? handleBack : handleCloseModal, 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") }))] }));
|
|
314
312
|
}
|
|
315
313
|
// This boolean indicates that user finish payment, and waiting for the deposit to be confirmed. We get this from query params (waitingForDeposit=true)
|
|
316
314
|
const waitingForDeposit = new URLSearchParams(window.location.search).get("waitingForDeposit") === "true";
|
|
317
315
|
if (depositTxs?.length || waitingForDeposit) {
|
|
318
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", { className: "relative mt-4 flex w-full flex-col gap-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-b3-react-background absolute bottom-2 left-4 top-2 z-[5] w-2", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "from-as-brand/50 absolute left-[2px] top-0 z-10 w-[3px] bg-gradient-to-b from-20% via-purple-500/50 via-80% to-transparent", initial: { height: "0%" }, animate: { height: "100%" }, transition: { duration: 1, ease: "easeInOut" } }) }), (depositTxs || []).map((dTxs, index) => ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.onrampMetadata?.vendor ===
|
|
316
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", { className: "relative mt-4 flex w-full flex-col gap-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-b3-react-background absolute bottom-2 left-4 top-2 z-[5] w-2", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "from-as-brand/50 absolute left-[2px] top-0 z-10 w-[3px] bg-gradient-to-b from-20% via-purple-500/50 via-80% to-transparent", initial: { height: "0%" }, animate: { height: "100%" }, transition: { duration: 1, ease: "easeInOut" } }) }), (depositTxs || []).map((dTxs, index) => ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.onrampMetadata?.vendor === "stripe-web2"
|
|
319
317
|
? `Received payment`
|
|
320
|
-
: `Received ${(0, number_1.formatTokenAmount)(BigInt(dTxs.amount), srcToken.decimals)} ${srcToken.symbol}`, chainId: order.srcChain, tx: dTxs, isProcessing: index < (depositTxs || []).length - 1 ? false : !depositEnoughAmount }, dTxs.txHash))), statusDisplay === "failure" ? ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: statusText, chainId: order.srcChain, tx: null, isProcessing: false, delay: 0.5 })) : depositEnoughAmount ? ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.type ===
|
|
318
|
+
: `Received ${(0, number_1.formatTokenAmount)(BigInt(dTxs.amount), srcToken.decimals)} ${srcToken.symbol}`, chainId: order.srcChain, tx: dTxs, isProcessing: index < (depositTxs || []).length - 1 ? false : !depositEnoughAmount }, dTxs.txHash))), statusDisplay === "failure" ? ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: statusText, chainId: order.srcChain, tx: null, isProcessing: false, delay: 0.5 })) : depositEnoughAmount ? ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.type === "swap"
|
|
321
319
|
? "Processing Swap"
|
|
322
|
-
: order.type ===
|
|
320
|
+
: order.type === "mint_nft"
|
|
323
321
|
? "Minting NFT"
|
|
324
|
-
: order.type ===
|
|
322
|
+
: order.type === "join_tournament"
|
|
325
323
|
? "Joining Tournament"
|
|
326
|
-
: order.type ===
|
|
324
|
+
: order.type === "fund_tournament"
|
|
327
325
|
? "Funding Tournament"
|
|
328
|
-
: "Processing Transaction", chainId: order.srcChain, tx: null, isProcessing: true, delay: 0.5 })) : ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.onrampMetadata?.vendor ===
|
|
326
|
+
: "Processing Transaction", chainId: order.srcChain, tx: null, isProcessing: true, delay: 0.5 })) : ((0, jsx_runtime_1.jsx)(TransactionDetails, { title: order.onrampMetadata?.vendor === "stripe-web2"
|
|
329
327
|
? `Waiting for payment`
|
|
330
328
|
: `Waiting for deposit ${formattedDepositDeficit} ${srcToken.symbol}`, chainId: order.srcChain, tx: null, isProcessing: true, delay: 0.5 }))] }) }));
|
|
331
329
|
}
|
|
@@ -348,17 +346,17 @@ exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode
|
|
|
348
346
|
else {
|
|
349
347
|
sonner_1.toast.error("Web Share API is not supported on this browser");
|
|
350
348
|
}
|
|
351
|
-
}, children: ["Send Link ", (0, jsx_runtime_1.jsx)(lucide_react_1.SquareArrowOutUpRight, { className: "ml-2 h-3 w-3" })] })] })] })] })), (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full items-center justify-center gap-1 text-sm", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-primary/30", children: "Time remaining:" }), (0, jsx_runtime_1.jsx)("div", { className: "text-as-primary", children: depositEnoughAmount ? ("Received") : order.status ===
|
|
349
|
+
}, children: ["Send Link ", (0, jsx_runtime_1.jsx)(lucide_react_1.SquareArrowOutUpRight, { className: "ml-2 h-3 w-3" })] })] })] })] })), (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full items-center justify-center gap-1 text-sm", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-primary/30", children: "Time remaining:" }), (0, jsx_runtime_1.jsx)("div", { className: "text-as-primary", children: depositEnoughAmount ? ("Received") : order.status === "expired" ? ("Expired") : ((0, jsx_runtime_1.jsx)(react_timeago_1.default, { date: new Date(order.expiredAt), live: true })) })] }), showOrderDetails ? ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "w-full", initial: { opacity: 0, y: 20, filter: "blur(10px)" }, animate: { opacity: 1, y: 0, filter: "blur(0px)" }, transition: { duration: 0.3, delay: 0, ease: "easeInOut" }, children: (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full flex-col items-center gap-3 whitespace-nowrap py-2 text-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex w-full items-center justify-between gap-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-primary/30", children: order.type === "swap" || order.type === "mint_nft"
|
|
352
350
|
? "Expected to receive"
|
|
353
|
-
: order.type ===
|
|
351
|
+
: order.type === "join_tournament"
|
|
354
352
|
? "Join tournament"
|
|
355
|
-
: order.type ===
|
|
353
|
+
: order.type === "fund_tournament"
|
|
356
354
|
? "Fund tournament"
|
|
357
|
-
: order.type ===
|
|
355
|
+
: order.type === "custom"
|
|
358
356
|
? order.metadata.action
|
|
359
357
|
? (0, anyspend_1.capitalizeFirstLetter)(order.metadata.action)
|
|
360
358
|
: "Contract execution"
|
|
361
|
-
: "" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-end gap-2", children: [order.type ===
|
|
359
|
+
: "" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-end gap-2", children: [order.type === "swap" ? (`~${formattedExpectedDstAmount} ${dstToken.symbol}`) : order.type === "mint_nft" ? ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("img", { src: nft?.imageUrl, alt: nft?.name || "NFT", className: "h-5 w-5" }), (0, jsx_runtime_1.jsx)("div", { children: nft?.name || "NFT" })] })) : order.type === "join_tournament" || order.type === "fund_tournament" ? ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("img", { src: tournament?.imageUrl, alt: tournament?.name || "Tournament", className: "h-5 w-5" }), (0, jsx_runtime_1.jsx)("div", { children: tournament?.name || "Tournament" })] })) : null, (0, jsx_runtime_1.jsxs)("div", { className: "text-as-primary/50 flex items-center gap-2", children: [(0, jsx_runtime_1.jsxs)("span", { children: ["on ", order.dstChain !== chains_1.b3.id && (0, anyspend_1.getChainName)(order.dstChain)] }), (0, jsx_runtime_1.jsx)("img", { src: anyspend_1.ALL_CHAINS[order.dstChain].logoUrl, alt: (0, anyspend_1.getChainName)(order.dstChain), className: (0, utils_1.cn)("h-3", order.dstChain !== chains_1.b3.id && "w-3 rounded-full", order.dstChain === chains_1.b3.id && "h-4") })] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "divider w-full" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full justify-between gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-primary/30", children: "Order ID" }), (0, jsx_runtime_1.jsx)("div", { className: "text-as-primary overflow-hidden text-ellipsis whitespace-nowrap", children: order.id })] }), (0, jsx_runtime_1.jsx)("div", { className: "divider w-full" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full justify-between gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-primary/30", children: "Recipient" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-end gap-1", children: [recipientName && (0, jsx_runtime_1.jsx)("div", { className: "text-as-primary font-semibold", children: recipientName }), (0, jsx_runtime_1.jsx)(react_1.CopyToClipboard, { text: order.recipientAddress, onCopy: () => {
|
|
362
360
|
sonner_1.toast.success("Copied recipient address to clipboard");
|
|
363
361
|
}, 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: handleBack, children: ["Cancel and start over ", (0, jsx_runtime_1.jsx)(lucide_react_1.RefreshCcw, { className: "ml-2 h-4 w-4" })] })] }));
|
|
364
362
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { components } from "../../../../anyspend/types/api";
|
|
2
2
|
interface OrderHistoryItemProps {
|
|
3
|
-
order: Order;
|
|
3
|
+
order: components["schemas"]["Order"];
|
|
4
4
|
onSelectOrder?: (orderId: string) => void;
|
|
5
5
|
mode: "modal" | "page";
|
|
6
6
|
}
|
|
@@ -13,21 +13,19 @@ const lucide_react_1 = require("lucide-react");
|
|
|
13
13
|
const react_timeago_1 = __importDefault(require("react-timeago"));
|
|
14
14
|
const chains_1 = require("viem/chains");
|
|
15
15
|
function OrderHistoryItem({ order, onSelectOrder, mode }) {
|
|
16
|
-
const nft = order.type ===
|
|
17
|
-
const tournament = order.type ===
|
|
18
|
-
? order.metadata.tournament
|
|
19
|
-
: undefined;
|
|
16
|
+
const nft = order.type === "mint_nft" ? order.metadata.nft : undefined;
|
|
17
|
+
const tournament = order.type === "join_tournament" || order.type === "fund_tournament" ? order.metadata.tournament : undefined;
|
|
20
18
|
const dstToken = order.metadata.dstToken;
|
|
21
|
-
const actualDstAmount = order.type ===
|
|
22
|
-
order.type ===
|
|
23
|
-
order.type ===
|
|
24
|
-
order.type ===
|
|
19
|
+
const actualDstAmount = order.type === "mint_nft" ||
|
|
20
|
+
order.type === "join_tournament" ||
|
|
21
|
+
order.type === "fund_tournament" ||
|
|
22
|
+
order.type === "custom"
|
|
25
23
|
? undefined
|
|
26
24
|
: order.payload.actualDstAmount;
|
|
27
|
-
const expectedDstAmount = order.type ===
|
|
28
|
-
order.type ===
|
|
29
|
-
order.type ===
|
|
30
|
-
order.type ===
|
|
25
|
+
const expectedDstAmount = order.type === "mint_nft" ||
|
|
26
|
+
order.type === "join_tournament" ||
|
|
27
|
+
order.type === "fund_tournament" ||
|
|
28
|
+
order.type === "custom"
|
|
31
29
|
? undefined
|
|
32
30
|
: order.payload.expectedDstAmount;
|
|
33
31
|
const { text: orderStatusText, status: orderDisplayStatus } = (0, anyspend_1.getStatusDisplay)(order);
|
|
@@ -7,7 +7,7 @@ const react_1 = require("../../../../global-account/react");
|
|
|
7
7
|
const lucide_react_1 = require("lucide-react");
|
|
8
8
|
const react_2 = require("react");
|
|
9
9
|
exports.OrderStatus = (0, react_2.memo)(function OrderStatus({ order }) {
|
|
10
|
-
const isComplete = order.status ===
|
|
10
|
+
const isComplete = order.status === "executed";
|
|
11
11
|
const { text, status: displayStatus } = (0, anyspend_1.getStatusDisplay)(order);
|
|
12
12
|
return ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center gap-2", children: isComplete ? ((0, jsx_runtime_1.jsxs)(react_1.Badge, { variant: "outline", className: "flex items-center gap-3 border-green-500/50 bg-green-500/20 px-4 py-1 text-base transition-colors", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Check, { className: "h-6 w-6 text-green-500" }), (0, jsx_runtime_1.jsx)("span", { className: "font-medium", children: text })] })) : displayStatus === "failure" ? ((0, jsx_runtime_1.jsx)(react_1.Badge, { variant: "destructive", className: "border-red-400/50 bg-red-400/20 px-4 py-1 text-base", children: (0, jsx_runtime_1.jsx)("div", { className: "font-sf-rounded text-base font-semibold text-red-400/50", children: text }) })) : ((0, jsx_runtime_1.jsxs)(react_1.Badge, { variant: "default", className: "border-as-stroke/20 bg-as-primary/10 flex items-center gap-3 px-4 py-1 text-base transition-colors", children: [displayStatus === "processing" && (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: text })] })) }));
|
|
13
13
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { components } from "../../../../anyspend/types/api";
|
|
2
2
|
export declare function OrderToken({ context, address, chainId, setChainId, token, setToken, requiredAmount, tokenSelectClassName, }: {
|
|
3
3
|
context: "from" | "to";
|
|
4
4
|
address: string | undefined;
|
|
5
|
-
token: Token;
|
|
6
|
-
setToken: (token: Token) => void;
|
|
5
|
+
token: components["schemas"]["Token"];
|
|
6
|
+
setToken: (token: components["schemas"]["Token"]) => void;
|
|
7
7
|
chainId: number;
|
|
8
8
|
setChainId: (chainId: number) => void;
|
|
9
9
|
requiredAmount: bigint | undefined;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { components } from "../../../../anyspend/types/api";
|
|
2
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;
|
|
6
6
|
context: "from" | "to";
|
|
7
7
|
address: string | undefined;
|
|
8
|
-
token: Token;
|
|
9
|
-
setToken: (token: Token) => void;
|
|
8
|
+
token: components["schemas"]["Token"];
|
|
9
|
+
setToken: (token: components["schemas"]["Token"]) => void;
|
|
10
10
|
chainId: number;
|
|
11
11
|
setChainId: (chainId: number) => void;
|
|
12
12
|
hideTokenSelect?: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { components } from "../../../../anyspend/types/api";
|
|
2
|
+
import { GetQuoteResponse } from "../../../../anyspend/types/api_req_res";
|
|
2
3
|
interface PanelOnrampPaymentProps {
|
|
3
4
|
srcAmountOnRamp: string;
|
|
4
5
|
recipientName?: string;
|
|
@@ -8,16 +9,16 @@ interface PanelOnrampPaymentProps {
|
|
|
8
9
|
destinationTokenChainId?: number;
|
|
9
10
|
destinationTokenAddress?: string;
|
|
10
11
|
selectedDstChainId: number;
|
|
11
|
-
selectedDstToken: Token;
|
|
12
|
+
selectedDstToken: components["schemas"]["Token"];
|
|
12
13
|
anyspendQuote: GetQuoteResponse | undefined;
|
|
13
14
|
globalAddress?: string;
|
|
14
15
|
onOrderCreated: (orderId: string) => void;
|
|
15
16
|
onBack: () => void;
|
|
16
|
-
orderType:
|
|
17
|
-
nft?:
|
|
17
|
+
orderType: components["schemas"]["Order"]["type"];
|
|
18
|
+
nft?: components["schemas"]["NFT"] & {
|
|
18
19
|
price: string;
|
|
19
20
|
};
|
|
20
|
-
tournament?: Tournament & {
|
|
21
|
+
tournament?: components["schemas"]["Tournament"] & {
|
|
21
22
|
contractAddress: string;
|
|
22
23
|
entryPriceOrFundAmount: string;
|
|
23
24
|
};
|
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.PanelOnrampPayment = PanelOnrampPayment;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const anyspend_1 = require("../../../../anyspend");
|
|
9
8
|
const react_1 = require("../../../../anyspend/react");
|
|
10
9
|
const react_2 = require("../../../../global-account/react");
|
|
11
10
|
const centerTruncate_1 = __importDefault(require("../../../../shared/utils/centerTruncate"));
|
|
@@ -48,15 +47,15 @@ recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationToke
|
|
|
48
47
|
sonner_1.toast.error("Please enter a valid amount");
|
|
49
48
|
return;
|
|
50
49
|
}
|
|
51
|
-
if (vendor ===
|
|
50
|
+
if (vendor === "coinbase" && !coinbaseOnrampOptions) {
|
|
52
51
|
sonner_1.toast.error("Onramp options not available");
|
|
53
52
|
return;
|
|
54
53
|
}
|
|
55
|
-
if (vendor ===
|
|
54
|
+
if (vendor === "stripe" && !isStripeOnrampSupported) {
|
|
56
55
|
sonner_1.toast.error("Stripe onramp not available");
|
|
57
56
|
return;
|
|
58
57
|
}
|
|
59
|
-
if (vendor ===
|
|
58
|
+
if (vendor === "stripe-web2" && !isStripeWeb2Supported) {
|
|
60
59
|
sonner_1.toast.error("Stripe credit card not available");
|
|
61
60
|
return;
|
|
62
61
|
}
|
|
@@ -105,11 +104,11 @@ recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationToke
|
|
|
105
104
|
opacity: 1,
|
|
106
105
|
y: 0,
|
|
107
106
|
filter: "blur(0px)",
|
|
108
|
-
}, 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 ===
|
|
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 === "swap"
|
|
109
108
|
? "Recipient"
|
|
110
|
-
: orderType ===
|
|
109
|
+
: orderType === "mint_nft"
|
|
111
110
|
? "Receive NFT at"
|
|
112
|
-
: orderType ===
|
|
111
|
+
: orderType === "join_tournament"
|
|
113
112
|
? "Join for"
|
|
114
113
|
: "Recipient" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [recipientImageUrl && ((0, jsx_runtime_1.jsx)("img", { src: recipientImageUrl, alt: recipientImageUrl, className: "bg-b3-react-foreground size-7 rounded-full object-cover opacity-100" })), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-end gap-1", children: [recipientEnsName && (0, jsx_runtime_1.jsxs)("span", { className: "text-b3-react-foreground/80", children: ["@", recipientEnsName] }), (0, jsx_runtime_1.jsx)("span", { className: "text-b3-react-foreground/80", children: (0, centerTruncate_1.default)(recipientAddress) })] })] })] })), (0, jsx_runtime_1.jsx)("div", { className: "border-b3-react-border border-t pt-3", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)("p", { className: "text-b3-react-foreground font-semibold", children: "Amount" }), (0, jsx_runtime_1.jsxs)("p", { className: "text-b3-react-foreground hover:text-b3-react-foreground/80 cursor-pointer text-xl font-semibold transition-colors", onClick: onBack, children: ["$", parseFloat(srcAmountOnRamp).toFixed(2)] })] }) })] })] }), isCreatingOrder ? ((0, jsx_runtime_1.jsxs)("div", { className: "bg-b3-react-background border-b3-react-border flex items-center justify-center gap-3 rounded-lg border p-6", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "h-4 w-4 animate-spin" }), (0, jsx_runtime_1.jsx)("span", { className: "text-as-primary/70", children: "Creating onramp order..." })] })) : isLoadingGeoOnramp ? ((0, jsx_runtime_1.jsxs)("div", { className: "bg-b3-react-background border-b3-react-border flex items-center justify-center gap-3 rounded-lg border p-6", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "h-4 w-4 animate-spin" }), (0, jsx_runtime_1.jsx)("span", { className: "text-as-primary/70", children: "Loading payment options..." })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "mb-3 flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-lg font-semibold", children: "Payment method" }), (0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-1", children: coinbaseAvailablePaymentMethods.length > 0 &&
|
|
115
114
|
(() => {
|
|
@@ -120,6 +119,6 @@ recipientAddress, isMainnet, isBuyMode, destinationTokenChainId, destinationToke
|
|
|
120
119
|
})() })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-3", children: [coinbaseAvailablePaymentMethods.length > 0 &&
|
|
121
120
|
(() => {
|
|
122
121
|
const method = coinbaseAvailablePaymentMethods[0];
|
|
123
|
-
return ((0, jsx_runtime_1.jsxs)("button", { onClick: () => handlePaymentMethodClick(
|
|
124
|
-
})(), isStripeWeb2Supported && ((0, jsx_runtime_1.jsxs)("button", { onClick: () => handlePaymentMethodClick(
|
|
122
|
+
return ((0, jsx_runtime_1.jsxs)("button", { onClick: () => handlePaymentMethodClick("coinbase", method.id), disabled: isCreatingOrder, className: "bg-b3-react-background border-b3-react-border hover:border-as-brand disabled:hover:border-b3-react-border group flex w-full items-center justify-between gap-4 rounded-xl border p-5 transition-all duration-200 hover:shadow-md disabled:cursor-not-allowed disabled:opacity-50", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-blue-50", children: (0, jsx_runtime_1.jsx)("img", { src: "https://cdn.b3.fun/coinbase-wordmark-blue.svg", alt: "Coinbase", className: "h-6" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-start text-left", children: [(0, jsx_runtime_1.jsx)("h4", { className: "text-b3-react-foreground text-lg font-semibold", children: "Coinbase Pay" }), (0, jsx_runtime_1.jsxs)("p", { className: "text-b3-react-foreground/60 text-sm", children: [method.id === "CARD" && "Debit card, bank account, or Coinbase Account", method.id === "FIAT_WALLET" && "Pay with your Coinbase account balance", method.id === "APPLE_PAY" && "Quick payment with Apple Pay", method.id === "ACH_BANK_ACCOUNT" && "Direct bank account transfer"] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-1 flex items-center gap-1", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs font-medium text-green-600", children: "Free" }) })] })] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "text-b3-react-foreground/40 group-hover:text-b3-react-foreground/60 h-5 w-5 transition-colors" })] }));
|
|
123
|
+
})(), isStripeWeb2Supported && ((0, jsx_runtime_1.jsxs)("button", { onClick: () => handlePaymentMethodClick("stripe-web2"), className: "bg-b3-react-background border-b3-react-border hover:border-as-brand group flex w-full items-center justify-between gap-4 rounded-xl border p-5 transition-all duration-200 hover:shadow-md", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-purple-50", children: (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/stripe/stripe.github.io/455f506a628dc3f6c505e3001db45a64e29e9fc3/images/stripe-logo.svg", alt: "Stripe", className: "h-5" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-start text-left", children: [(0, jsx_runtime_1.jsx)("h4", { className: "text-b3-react-foreground text-lg font-semibold", children: "Stripe" }), (0, jsx_runtime_1.jsx)("p", { className: "text-b3-react-foreground/60 text-sm", children: "Credit or debit card payment" }), (0, jsx_runtime_1.jsx)("div", { className: "mt-1 flex items-center gap-1", children: (0, jsx_runtime_1.jsx)("span", { className: "text-xs font-medium text-orange-600", children: "Fee Applied" }) })] })] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "text-b3-react-foreground/40 group-hover:text-b3-react-foreground/60 h-5 w-5 transition-colors" })] })), (0, jsx_runtime_1.jsxs)(react_2.Button, { variant: "link", onClick: onBack, className: "text-b3-react-foreground/70 hover:text-b3-react-foreground/90 mt-2 w-full", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ChevronLeft, { className: "mr-2 h-4 w-4" }), "Back"] })] })] }))] }));
|
|
125
124
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { components } from "../../../../anyspend/types/api";
|
|
2
2
|
interface PaymentOneClickProps {
|
|
3
|
-
order: Order;
|
|
3
|
+
order: components["schemas"]["Order"];
|
|
4
4
|
dstTokenSymbol: string;
|
|
5
5
|
}
|
|
6
6
|
export default function PaymentOneClick({ order }: PaymentOneClickProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { components } from "../../../../anyspend/types/api";
|
|
2
2
|
interface PaymentStripeWeb2Props {
|
|
3
3
|
isMainnet: boolean;
|
|
4
|
-
order: Order;
|
|
4
|
+
order: components["schemas"]["Order"];
|
|
5
5
|
onPaymentSuccess?: (paymentIntent: any) => void;
|
|
6
6
|
}
|
|
7
7
|
export default function PaymentStripeWeb2({ isMainnet, order, onPaymentSuccess }: PaymentStripeWeb2Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { components } from "../../../../anyspend/types/api";
|
|
2
2
|
interface PaymentVendorUIProps {
|
|
3
3
|
isMainnet: boolean;
|
|
4
|
-
order: Order;
|
|
4
|
+
order: components["schemas"]["Order"];
|
|
5
5
|
dstTokenSymbol: string;
|
|
6
6
|
}
|
|
7
7
|
export default function PaymentVendorUI({ isMainnet, order, dstTokenSymbol }: PaymentVendorUIProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = PaymentVendorUI;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const anyspend_1 = require("../../../../anyspend");
|
|
9
8
|
const PaymentOneClick_1 = __importDefault(require("./PaymentOneClick"));
|
|
10
9
|
const PaymentStripeWeb2_1 = __importDefault(require("./PaymentStripeWeb2"));
|
|
11
10
|
function PaymentVendorUI({ isMainnet, order, dstTokenSymbol }) {
|
|
@@ -15,7 +14,7 @@ function PaymentVendorUI({ isMainnet, order, dstTokenSymbol }) {
|
|
|
15
14
|
return (0, jsx_runtime_1.jsx)(PaymentOneClick_1.default, { order: order, dstTokenSymbol: dstTokenSymbol });
|
|
16
15
|
}
|
|
17
16
|
// Handle Stripe Web2 payment flow
|
|
18
|
-
if (vendor ===
|
|
17
|
+
if (vendor === "stripe-web2") {
|
|
19
18
|
return (0, jsx_runtime_1.jsx)(PaymentStripeWeb2_1.default, { isMainnet: isMainnet, order: order });
|
|
20
19
|
}
|
|
21
20
|
// Return null for unsupported vendors
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { components } from "../../../../anyspend/types/api";
|
|
2
2
|
export declare function TokenBalance({ token, walletAddress, onChangeInput, }: {
|
|
3
|
-
token: Token;
|
|
3
|
+
token: components["schemas"]["Token"];
|
|
4
4
|
walletAddress: string | undefined;
|
|
5
5
|
onChangeInput: (value: string) => void;
|
|
6
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export { AnySpend } from "./AnySpend";
|
|
2
|
+
export { AnySpendBondKit } from "./AnySpendBondKit";
|
|
2
3
|
export { AnySpendBuySpin } from "./AnySpendBuySpin";
|
|
3
4
|
export { AnySpendCustom } from "./AnySpendCustom";
|
|
4
5
|
export { AnySpendNFT } from "./AnySpendNFT";
|
|
5
|
-
export { AnySpendNFTButton } from "./AnySpendNFTButton";
|
|
6
6
|
export { AnyspendSignatureMint } from "./AnyspendSignatureMint";
|
|
7
7
|
export { AnySpendStakeB3 } from "./AnySpendStakeB3";
|
|
8
8
|
export { AnySpendTournament } from "./AnySpendTournament";
|
|
9
|
+
export { AnySpendNFTButton } from "./common/AnySpendNFTButton";
|
|
9
10
|
export { ChainTokenIcon } from "./common/ChainTokenIcon";
|
|
10
11
|
export { OrderDetails } from "./common/OrderDetails";
|
|
11
12
|
export { OrderHistory } from "./common/OrderHistory";
|
|
@@ -1,23 +1,25 @@
|
|
|
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.ChainTokenIcon = exports.
|
|
3
|
+
exports.WebviewOnrampPayment = exports.WebviewOnrampOrderStatus = exports.TokenBalance = exports.OrderTokenAmount = exports.OrderToken = exports.OrderStatus = exports.OrderHistoryItem = exports.OrderHistory = exports.OrderDetails = exports.ChainTokenIcon = exports.AnySpendNFTButton = exports.AnySpendTournament = exports.AnySpendStakeB3 = exports.AnyspendSignatureMint = exports.AnySpendNFT = exports.AnySpendCustom = exports.AnySpendBuySpin = exports.AnySpendBondKit = 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; } });
|
|
7
|
+
var AnySpendBondKit_1 = require("./AnySpendBondKit");
|
|
8
|
+
Object.defineProperty(exports, "AnySpendBondKit", { enumerable: true, get: function () { return AnySpendBondKit_1.AnySpendBondKit; } });
|
|
7
9
|
var AnySpendBuySpin_1 = require("./AnySpendBuySpin");
|
|
8
10
|
Object.defineProperty(exports, "AnySpendBuySpin", { enumerable: true, get: function () { return AnySpendBuySpin_1.AnySpendBuySpin; } });
|
|
9
11
|
var AnySpendCustom_1 = require("./AnySpendCustom");
|
|
10
12
|
Object.defineProperty(exports, "AnySpendCustom", { enumerable: true, get: function () { return AnySpendCustom_1.AnySpendCustom; } });
|
|
11
13
|
var AnySpendNFT_1 = require("./AnySpendNFT");
|
|
12
14
|
Object.defineProperty(exports, "AnySpendNFT", { enumerable: true, get: function () { return AnySpendNFT_1.AnySpendNFT; } });
|
|
13
|
-
var AnySpendNFTButton_1 = require("./AnySpendNFTButton");
|
|
14
|
-
Object.defineProperty(exports, "AnySpendNFTButton", { enumerable: true, get: function () { return AnySpendNFTButton_1.AnySpendNFTButton; } });
|
|
15
15
|
var AnyspendSignatureMint_1 = require("./AnyspendSignatureMint");
|
|
16
16
|
Object.defineProperty(exports, "AnyspendSignatureMint", { enumerable: true, get: function () { return AnyspendSignatureMint_1.AnyspendSignatureMint; } });
|
|
17
17
|
var AnySpendStakeB3_1 = require("./AnySpendStakeB3");
|
|
18
18
|
Object.defineProperty(exports, "AnySpendStakeB3", { enumerable: true, get: function () { return AnySpendStakeB3_1.AnySpendStakeB3; } });
|
|
19
19
|
var AnySpendTournament_1 = require("./AnySpendTournament");
|
|
20
20
|
Object.defineProperty(exports, "AnySpendTournament", { enumerable: true, get: function () { return AnySpendTournament_1.AnySpendTournament; } });
|
|
21
|
+
var AnySpendNFTButton_1 = require("./common/AnySpendNFTButton");
|
|
22
|
+
Object.defineProperty(exports, "AnySpendNFTButton", { enumerable: true, get: function () { return AnySpendNFTButton_1.AnySpendNFTButton; } });
|
|
21
23
|
// Common Components
|
|
22
24
|
var ChainTokenIcon_1 = require("./common/ChainTokenIcon");
|
|
23
25
|
Object.defineProperty(exports, "ChainTokenIcon", { enumerable: true, get: function () { return ChainTokenIcon_1.ChainTokenIcon; } });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { components } from "../../../../anyspend/types/api";
|
|
2
2
|
interface WebviewOnrampOrderStatusProps {
|
|
3
|
-
order: Order;
|
|
3
|
+
order: components["schemas"]["Order"];
|
|
4
4
|
}
|
|
5
5
|
export declare function WebviewOnrampOrderStatus({ order }: WebviewOnrampOrderStatusProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -13,17 +13,17 @@ const sonner_1 = require("sonner");
|
|
|
13
13
|
const viem_1 = require("viem");
|
|
14
14
|
function WebviewOnrampOrderStatus({ order }) {
|
|
15
15
|
console.log(order.status);
|
|
16
|
-
const isPending = order.status ===
|
|
17
|
-
order.status ===
|
|
18
|
-
order.status ===
|
|
19
|
-
order.status ===
|
|
20
|
-
const isExecuted = order.status ===
|
|
21
|
-
const isFailed = order.status ===
|
|
22
|
-
const isRefunded = order.status ===
|
|
16
|
+
const isPending = order.status === "waiting_stripe_payment" ||
|
|
17
|
+
order.status === "scanning_deposit_transaction" ||
|
|
18
|
+
order.status === "sending_token_from_vault" ||
|
|
19
|
+
order.status === "relay";
|
|
20
|
+
const isExecuted = order.status === "executed";
|
|
21
|
+
const isFailed = order.status === "failure";
|
|
22
|
+
const isRefunded = order.status === "refunded";
|
|
23
23
|
// Get token metadata
|
|
24
24
|
const { data: tokenMetadata } = (0, react_1.useTokenData)(order.metadata.dstToken.chainId, order.metadata.dstToken.address);
|
|
25
25
|
// Only show expected amount for swap orders
|
|
26
|
-
const expectedAmount = order.type ===
|
|
26
|
+
const expectedAmount = order.type === "swap"
|
|
27
27
|
? Number((0, viem_1.formatUnits)(BigInt(order.payload.expectedDstAmount), order.metadata.dstToken.decimals)).toFixed(2)
|
|
28
28
|
: null;
|
|
29
29
|
// Use token metadata logo if available
|
|
@@ -32,5 +32,5 @@ function WebviewOnrampOrderStatus({ order }) {
|
|
|
32
32
|
navigator.clipboard.writeText(text);
|
|
33
33
|
sonner_1.toast.success(`${label} copied to clipboard`);
|
|
34
34
|
};
|
|
35
|
-
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.jsx)("div", { className: "flex justify-center", children: (0, jsx_runtime_1.jsxs)(react_1.Badge, { variant: "default", className: "flex items-center gap-3 px-4 py-2 text-base", children: [isPending && (0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "h-4 w-4 animate-spin" }), isExecuted && (0, jsx_runtime_1.jsx)(lucide_react_1.CheckIcon, { className: "h-4 w-4 text-green-500" }), isFailed && (0, jsx_runtime_1.jsx)(lucide_react_1.ExternalLink, { className: "h-4 w-4 text-red-500" }), (0, jsx_runtime_1.jsxs)("span", { children: [isPending && "Processing Payment...", isExecuted && "Payment Complete", isFailed && "Payment Failed", isRefunded && "Payment Refunded"] })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "overflow-hidden rounded-xl bg-white", children: (0, jsx_runtime_1.jsxs)("div", { className: "px-6 py-4", children: [(0, jsx_runtime_1.jsx)("h2", { className: "mb-4 text-lg font-semibold", children: "Order Summary" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col divide-y", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between py-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-gray-600", children: "Amount Paid" }), (0, jsx_runtime_1.jsxs)("span", { className: "text-lg font-semibold", children: ["$", Number((0, viem_1.formatUnits)(BigInt(order.srcAmount), order.metadata.srcToken.decimals)).toFixed(2)] })] }), order.type ===
|
|
35
|
+
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.jsx)("div", { className: "flex justify-center", children: (0, jsx_runtime_1.jsxs)(react_1.Badge, { variant: "default", className: "flex items-center gap-3 px-4 py-2 text-base", children: [isPending && (0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "h-4 w-4 animate-spin" }), isExecuted && (0, jsx_runtime_1.jsx)(lucide_react_1.CheckIcon, { className: "h-4 w-4 text-green-500" }), isFailed && (0, jsx_runtime_1.jsx)(lucide_react_1.ExternalLink, { className: "h-4 w-4 text-red-500" }), (0, jsx_runtime_1.jsxs)("span", { children: [isPending && "Processing Payment...", isExecuted && "Payment Complete", isFailed && "Payment Failed", isRefunded && "Payment Refunded"] })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "overflow-hidden rounded-xl bg-white", children: (0, jsx_runtime_1.jsxs)("div", { className: "px-6 py-4", children: [(0, jsx_runtime_1.jsx)("h2", { className: "mb-4 text-lg font-semibold", children: "Order Summary" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col divide-y", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between py-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-gray-600", children: "Amount Paid" }), (0, jsx_runtime_1.jsxs)("span", { className: "text-lg font-semibold", children: ["$", Number((0, viem_1.formatUnits)(BigInt(order.srcAmount), order.metadata.srcToken.decimals)).toFixed(2)] })] }), order.type === "swap" && expectedAmount && ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between py-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-gray-600", children: "Est Token Amount" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [tokenLogoUrl && ((0, jsx_runtime_1.jsx)("img", { src: tokenLogoUrl, alt: order.metadata.dstToken.symbol, className: "h-5 w-5 rounded-full" })), (0, jsx_runtime_1.jsxs)("span", { className: "font-medium", children: [expectedAmount, " ", order.metadata.dstToken.symbol] })] })] })), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between py-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-gray-600", children: "Network" }), (0, jsx_runtime_1.jsx)("span", { className: "font-medium", children: (0, anyspend_1.getChainName)(order.dstChain) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between py-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-gray-600", children: "Recipient" }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => handleCopy(order.recipientAddress, "Recipient address"), className: "flex items-center gap-2 font-medium transition-colors hover:text-blue-600", children: [(0, centerTruncate_1.default)(order.recipientAddress, 8), (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { className: "h-4 w-4" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between py-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-gray-600", children: "Order ID" }), (0, jsx_runtime_1.jsxs)("button", { onClick: () => handleCopy(order.id, "Order ID"), className: "flex items-center gap-2 font-medium transition-colors hover:text-blue-600", children: [(0, centerTruncate_1.default)(order.id, 8), (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { className: "h-4 w-4" })] })] })] })] }) })] }));
|
|
36
36
|
}
|