thirdweb 5.32.0 → 5.32.1
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/chains/utils.js +9 -7
- package/dist/cjs/chains/utils.js.map +1 -1
- package/dist/cjs/exports/react.js +3 -0
- package/dist/cjs/exports/react.js.map +1 -1
- package/dist/cjs/exports/wallets/smart.js +3 -1
- package/dist/cjs/exports/wallets/smart.js.map +1 -1
- package/dist/cjs/react/core/hooks/others/useChainQuery.js +104 -33
- package/dist/cjs/react/core/hooks/others/useChainQuery.js.map +1 -1
- package/dist/cjs/react/native/ui/components/ChainIcon.js +2 -3
- package/dist/cjs/react/native/ui/components/ChainIcon.js.map +1 -1
- package/dist/cjs/react/native/ui/connect/ConnectedModal.js +2 -2
- package/dist/cjs/react/native/ui/connect/ConnectedModal.js.map +1 -1
- package/dist/cjs/react/native/ui/connect/SendScreen.js +2 -2
- package/dist/cjs/react/native/ui/connect/SendScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js +6 -5
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/NetworkSelector.js +217 -188
- package/dist/cjs/react/web/ui/ConnectWallet/NetworkSelector.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +2 -4
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js +12 -10
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/SwapDetailsScreen.js +8 -6
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/SwapDetailsScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/TokenInfoRow.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/TokenInfoRow.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/TokenSelector.js +3 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/TokenSelector.js.map +1 -1
- package/dist/cjs/react/web/ui/components/ChainIcon.js +1 -1
- package/dist/cjs/react/web/ui/components/ChainIcon.js.map +1 -1
- package/dist/cjs/react/web/ui/components/ChainName.js +3 -5
- package/dist/cjs/react/web/ui/components/ChainName.js.map +1 -1
- package/dist/cjs/react/web/ui/components/TokenIcon.js +3 -3
- package/dist/cjs/react/web/ui/components/TokenIcon.js.map +1 -1
- package/dist/cjs/react/web/ui/components/token/TokenSymbol.js +3 -3
- package/dist/cjs/react/web/ui/components/token/TokenSymbol.js.map +1 -1
- package/dist/cjs/react/web/wallets/ecosystem/EcosystemWalletFormUI.js +1 -1
- package/dist/cjs/react/web/wallets/ecosystem/EcosystemWalletFormUI.js.map +1 -1
- package/dist/cjs/utils/extensions/drops/get-claim-params.js +3 -2
- package/dist/cjs/utils/extensions/drops/get-claim-params.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wallets/in-app/web/ecosystem.js +3 -14
- package/dist/cjs/wallets/in-app/web/ecosystem.js.map +1 -1
- package/dist/cjs/wallets/smart/index.js +3 -17
- package/dist/cjs/wallets/smart/index.js.map +1 -1
- package/dist/cjs/wallets/smart/lib/bundler.js +1 -1
- package/dist/cjs/wallets/smart/lib/bundler.js.map +1 -1
- package/dist/cjs/wallets/smart/lib/userop.js +63 -8
- package/dist/cjs/wallets/smart/lib/userop.js.map +1 -1
- package/dist/esm/chains/utils.js +9 -7
- package/dist/esm/chains/utils.js.map +1 -1
- package/dist/esm/exports/react.js +1 -0
- package/dist/esm/exports/react.js.map +1 -1
- package/dist/esm/exports/wallets/smart.js +1 -0
- package/dist/esm/exports/wallets/smart.js.map +1 -1
- package/dist/esm/react/core/hooks/others/useChainQuery.js +101 -33
- package/dist/esm/react/core/hooks/others/useChainQuery.js.map +1 -1
- package/dist/esm/react/native/ui/components/ChainIcon.js +3 -4
- package/dist/esm/react/native/ui/components/ChainIcon.js.map +1 -1
- package/dist/esm/react/native/ui/connect/ConnectedModal.js +3 -3
- package/dist/esm/react/native/ui/connect/ConnectedModal.js.map +1 -1
- package/dist/esm/react/native/ui/connect/SendScreen.js +3 -3
- package/dist/esm/react/native/ui/connect/SendScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Details.js +7 -6
- package/dist/esm/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/NetworkSelector.js +219 -191
- package/dist/esm/react/web/ui/ConnectWallet/NetworkSelector.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +3 -5
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js +13 -11
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js +3 -3
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.js +3 -3
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js +3 -3
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js +3 -3
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js +3 -3
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/SwapDetailsScreen.js +9 -7
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/SwapDetailsScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/TokenInfoRow.js +3 -3
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/TokenInfoRow.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/TokenSelector.js +4 -3
- package/dist/esm/react/web/ui/ConnectWallet/screens/TokenSelector.js.map +1 -1
- package/dist/esm/react/web/ui/components/ChainIcon.js +1 -1
- package/dist/esm/react/web/ui/components/ChainIcon.js.map +1 -1
- package/dist/esm/react/web/ui/components/ChainName.js +4 -6
- package/dist/esm/react/web/ui/components/ChainName.js.map +1 -1
- package/dist/esm/react/web/ui/components/TokenIcon.js +4 -4
- package/dist/esm/react/web/ui/components/TokenIcon.js.map +1 -1
- package/dist/esm/react/web/ui/components/token/TokenSymbol.js +4 -4
- package/dist/esm/react/web/ui/components/token/TokenSymbol.js.map +1 -1
- package/dist/esm/react/web/wallets/ecosystem/EcosystemWalletFormUI.js +2 -2
- package/dist/esm/react/web/wallets/ecosystem/EcosystemWalletFormUI.js.map +1 -1
- package/dist/esm/utils/extensions/drops/get-claim-params.js +3 -2
- package/dist/esm/utils/extensions/drops/get-claim-params.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/wallets/in-app/web/ecosystem.js +3 -14
- package/dist/esm/wallets/in-app/web/ecosystem.js.map +1 -1
- package/dist/esm/wallets/smart/index.js +4 -18
- package/dist/esm/wallets/smart/index.js.map +1 -1
- package/dist/esm/wallets/smart/lib/bundler.js +1 -1
- package/dist/esm/wallets/smart/lib/bundler.js.map +1 -1
- package/dist/esm/wallets/smart/lib/userop.js +63 -9
- package/dist/esm/wallets/smart/lib/userop.js.map +1 -1
- package/dist/types/chains/chain-definitions/anvil.d.ts +1 -0
- package/dist/types/chains/chain-definitions/anvil.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/arbitrum-nova.d.ts +1 -0
- package/dist/types/chains/chain-definitions/arbitrum-nova.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/arbitrum-sepolia.d.ts +1 -0
- package/dist/types/chains/chain-definitions/arbitrum-sepolia.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/arbitrum.d.ts +1 -0
- package/dist/types/chains/chain-definitions/arbitrum.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/avalanche-fuji.d.ts +1 -0
- package/dist/types/chains/chain-definitions/avalanche-fuji.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/avalanche.d.ts +1 -0
- package/dist/types/chains/chain-definitions/avalanche.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/base-sepolia.d.ts +1 -0
- package/dist/types/chains/chain-definitions/base-sepolia.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/base.d.ts +1 -0
- package/dist/types/chains/chain-definitions/base.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/bsc-testnet.d.ts +1 -0
- package/dist/types/chains/chain-definitions/bsc-testnet.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/bsc.d.ts +1 -0
- package/dist/types/chains/chain-definitions/bsc.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/ethereum.d.ts +2 -0
- package/dist/types/chains/chain-definitions/ethereum.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/hardhat.d.ts +1 -0
- package/dist/types/chains/chain-definitions/hardhat.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/linea-sepolia.d.ts +1 -0
- package/dist/types/chains/chain-definitions/linea-sepolia.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/linea.d.ts +1 -0
- package/dist/types/chains/chain-definitions/linea.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/optimism-sepolia.d.ts +1 -0
- package/dist/types/chains/chain-definitions/optimism-sepolia.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/optimism.d.ts +1 -0
- package/dist/types/chains/chain-definitions/optimism.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/polygon-amoy.d.ts +1 -0
- package/dist/types/chains/chain-definitions/polygon-amoy.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/polygon-mumbai.d.ts +2 -0
- package/dist/types/chains/chain-definitions/polygon-mumbai.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/polygon.d.ts +1 -0
- package/dist/types/chains/chain-definitions/polygon.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/sepolia.d.ts +1 -0
- package/dist/types/chains/chain-definitions/sepolia.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/zksync-sepolia.d.ts +1 -0
- package/dist/types/chains/chain-definitions/zksync-sepolia.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/zksync.d.ts +1 -0
- package/dist/types/chains/chain-definitions/zksync.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/zora-sepolia.d.ts +1 -0
- package/dist/types/chains/chain-definitions/zora-sepolia.d.ts.map +1 -1
- package/dist/types/chains/chain-definitions/zora.d.ts +1 -0
- package/dist/types/chains/chain-definitions/zora.d.ts.map +1 -1
- package/dist/types/chains/types.d.ts +1 -0
- package/dist/types/chains/types.d.ts.map +1 -1
- package/dist/types/chains/utils.d.ts +1 -0
- package/dist/types/chains/utils.d.ts.map +1 -1
- package/dist/types/exports/react.d.ts +1 -0
- package/dist/types/exports/react.d.ts.map +1 -1
- package/dist/types/exports/wallets/smart.d.ts +1 -0
- package/dist/types/exports/wallets/smart.d.ts.map +1 -1
- package/dist/types/react/core/connectionManager.d.ts +1 -0
- package/dist/types/react/core/connectionManager.d.ts.map +1 -1
- package/dist/types/react/core/hooks/others/useChainQuery.d.ts +24 -10
- package/dist/types/react/core/hooks/others/useChainQuery.d.ts.map +1 -1
- package/dist/types/react/core/hooks/wallets/useActiveWalletChain.d.ts +1 -0
- package/dist/types/react/core/hooks/wallets/useActiveWalletChain.d.ts.map +1 -1
- package/dist/types/react/native/hooks/wallets/useActiveWalletChain.d.ts +1 -0
- package/dist/types/react/native/hooks/wallets/useActiveWalletChain.d.ts.map +1 -1
- package/dist/types/react/native/index.d.ts +1 -0
- package/dist/types/react/native/index.d.ts.map +1 -1
- package/dist/types/react/native/ui/components/ChainIcon.d.ts.map +1 -1
- package/dist/types/react/web/hooks/wallets/useActiveWalletChain.d.ts +1 -0
- package/dist/types/react/web/hooks/wallets/useActiveWalletChain.d.ts.map +1 -1
- package/dist/types/react/web/index.d.ts +1 -0
- package/dist/types/react/web/index.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Details.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/NetworkSelector.d.ts +142 -0
- package/dist/types/react/web/ui/ConnectWallet/NetworkSelector.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.d.ts +4 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.d.ts +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/tx-history/SwapDetailsScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/tx-history/TokenInfoRow.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/TokenSelector.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/ChainIcon.d.ts +1 -2
- package/dist/types/react/web/ui/components/ChainIcon.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/ChainName.d.ts.map +1 -1
- package/dist/types/react/web/wallets/ecosystem/EcosystemWalletFormUI.d.ts.map +1 -1
- package/dist/types/utils/extensions/drops/get-claim-params.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/wallets/in-app/web/ecosystem.d.ts +3 -14
- package/dist/types/wallets/in-app/web/ecosystem.d.ts.map +1 -1
- package/dist/types/wallets/manager/index.d.ts +1 -0
- package/dist/types/wallets/manager/index.d.ts.map +1 -1
- package/dist/types/wallets/smart/index.d.ts.map +1 -1
- package/dist/types/wallets/smart/lib/bundler.d.ts +1 -2
- package/dist/types/wallets/smart/lib/bundler.d.ts.map +1 -1
- package/dist/types/wallets/smart/lib/userop.d.ts +53 -8
- package/dist/types/wallets/smart/lib/userop.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/chains/types.ts +1 -1
- package/src/chains/utils.ts +9 -7
- package/src/exports/react.ts +5 -0
- package/src/exports/wallets/smart.ts +2 -0
- package/src/extensions/erc1155/drop1155.test.ts +7 -0
- package/src/extensions/erc20/drop20.test.ts +55 -0
- package/src/extensions/erc721/drop721.test.ts +28 -0
- package/src/react/core/hooks/others/useChainQuery.ts +116 -35
- package/src/react/native/ui/components/ChainIcon.tsx +3 -4
- package/src/react/native/ui/connect/ConnectedModal.tsx +4 -4
- package/src/react/native/ui/connect/SendScreen.tsx +3 -3
- package/src/react/web/ui/ConnectWallet/Details.tsx +13 -12
- package/src/react/web/ui/ConnectWallet/NetworkSelector.tsx +421 -323
- package/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx +4 -10
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.tsx +17 -15
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.tsx +6 -4
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.tsx +4 -4
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.tsx +4 -4
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.tsx +4 -4
- package/src/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.tsx +3 -3
- package/src/react/web/ui/ConnectWallet/screens/Buy/tx-history/SwapDetailsScreen.tsx +14 -9
- package/src/react/web/ui/ConnectWallet/screens/Buy/tx-history/TokenInfoRow.tsx +3 -4
- package/src/react/web/ui/ConnectWallet/screens/TokenSelector.tsx +10 -6
- package/src/react/web/ui/components/ChainIcon.tsx +2 -3
- package/src/react/web/ui/components/ChainName.tsx +4 -6
- package/src/react/web/ui/components/TokenIcon.tsx +4 -4
- package/src/react/web/ui/components/token/TokenSymbol.tsx +4 -4
- package/src/react/web/wallets/ecosystem/EcosystemWalletFormUI.tsx +6 -10
- package/src/utils/extensions/drops/get-claim-params.ts +4 -2
- package/src/version.ts +1 -1
- package/src/wallets/in-app/web/ecosystem.ts +3 -14
- package/src/wallets/smart/index.ts +7 -24
- package/src/wallets/smart/lib/bundler.ts +6 -5
- package/src/wallets/smart/lib/userop.ts +81 -11
@@ -15,10 +15,7 @@ import {
|
|
15
15
|
spacing,
|
16
16
|
} from "../../../../../core/design-system/index.js";
|
17
17
|
import type { PayUIOptions } from "../../../../../core/hooks/connection/ConnectButtonProps.js";
|
18
|
-
import {
|
19
|
-
useChainQuery,
|
20
|
-
useChainsQuery,
|
21
|
-
} from "../../../../../core/hooks/others/useChainQuery.js";
|
18
|
+
import { useChainName } from "../../../../../core/hooks/others/useChainQuery.js";
|
22
19
|
import { useWalletBalance } from "../../../../../core/hooks/others/useWalletBalance.js";
|
23
20
|
import { useBuyWithCryptoQuote } from "../../../../../core/hooks/pay/useBuyWithCryptoQuote.js";
|
24
21
|
import { useBuyWithFiatQuote } from "../../../../../core/hooks/pay/useBuyWithFiatQuote.js";
|
@@ -159,9 +156,6 @@ function BuyScreenContent(props: BuyScreenContentProps) {
|
|
159
156
|
const account = useActiveAccount();
|
160
157
|
const activeChain = useActiveWalletChain();
|
161
158
|
|
162
|
-
// prefetch chains metadata for destination chains
|
163
|
-
useChainsQuery(supportedDestinations.map((x) => x.chain) || [], 50);
|
164
|
-
|
165
159
|
// screen
|
166
160
|
const {
|
167
161
|
screen,
|
@@ -1162,7 +1156,7 @@ function BuyForTxUI(props: {
|
|
1162
1156
|
buyForTx: BuyForTx;
|
1163
1157
|
client: ThirdwebClient;
|
1164
1158
|
}) {
|
1165
|
-
const
|
1159
|
+
const chainNameQuery = useChainName(props.buyForTx.tx.chain);
|
1166
1160
|
|
1167
1161
|
return (
|
1168
1162
|
<Container>
|
@@ -1192,8 +1186,8 @@ function BuyForTxUI(props: {
|
|
1192
1186
|
/>
|
1193
1187
|
</Container>
|
1194
1188
|
<Spacer y="xxs" />
|
1195
|
-
{
|
1196
|
-
<Text size="sm">
|
1189
|
+
{chainNameQuery.name ? (
|
1190
|
+
<Text size="sm">{chainNameQuery.name}</Text>
|
1197
1191
|
) : (
|
1198
1192
|
<Skeleton height={fontSize.sm} width="50px" />
|
1199
1193
|
)}
|
@@ -17,7 +17,10 @@ import {
|
|
17
17
|
radius,
|
18
18
|
spacing,
|
19
19
|
} from "../../../../../../core/design-system/index.js";
|
20
|
-
import {
|
20
|
+
import {
|
21
|
+
useChainExplorers,
|
22
|
+
useChainName,
|
23
|
+
} from "../../../../../../core/hooks/others/useChainQuery.js";
|
21
24
|
import type { TokenInfo } from "../../../../../../core/utils/defaultTokens.js";
|
22
25
|
import { Spacer } from "../../../../components/Spacer.js";
|
23
26
|
import { Spinner } from "../../../../components/Spinner.js";
|
@@ -151,10 +154,11 @@ export function FiatSteps(props: {
|
|
151
154
|
return tokenInfo;
|
152
155
|
}, [onRampTokenMeta]);
|
153
156
|
|
154
|
-
const
|
155
|
-
const
|
156
|
-
|
157
|
-
const
|
157
|
+
const onRampName = useChainName(onRampChain);
|
158
|
+
const onRampExplorers = useChainExplorers(onRampChain);
|
159
|
+
const toChainName = useChainName(toChain);
|
160
|
+
const toChainExplorers = useChainExplorers(toChain);
|
161
|
+
const destinationName = useChainName(destinationChain);
|
158
162
|
|
159
163
|
const onRampTokenInfo = (
|
160
164
|
<div>
|
@@ -185,9 +189,7 @@ export function FiatSteps(props: {
|
|
185
189
|
/>
|
186
190
|
);
|
187
191
|
|
188
|
-
const onRampChainInfo =
|
189
|
-
<Text size="xs">{onRampChainMetaQuery.data?.name}</Text>
|
190
|
-
);
|
192
|
+
const onRampChainInfo = <Text size="xs">{onRampName.name}</Text>;
|
191
193
|
|
192
194
|
const partialSuccessToTokenInfo =
|
193
195
|
props.status?.status === "CRYPTO_SWAP_FALLBACK" &&
|
@@ -247,16 +249,16 @@ export function FiatSteps(props: {
|
|
247
249
|
textDecoration: "line-through",
|
248
250
|
}}
|
249
251
|
>
|
250
|
-
{
|
252
|
+
{toChainName.name}
|
251
253
|
</Text>{" "}
|
252
254
|
<Text size="xs" inline>
|
253
|
-
{
|
255
|
+
{destinationName.name}
|
254
256
|
</Text>
|
255
257
|
</div>
|
256
258
|
) : null;
|
257
259
|
|
258
260
|
const toTokehChainInfo = partialSuccessToChainInfo || (
|
259
|
-
<Text size="xs">{
|
261
|
+
<Text size="xs">{toChainName.name}</Text>
|
260
262
|
);
|
261
263
|
|
262
264
|
const onRampTxHash =
|
@@ -339,10 +341,10 @@ export function FiatSteps(props: {
|
|
339
341
|
}}
|
340
342
|
state={getStep1State()}
|
341
343
|
explorer={
|
342
|
-
|
344
|
+
onRampExplorers.explorers[0]?.url && onRampTxHash
|
343
345
|
? {
|
344
346
|
label: "View on Explorer",
|
345
|
-
url: `${
|
347
|
+
url: `${onRampExplorers.explorers[0]?.url}/tx/${onRampTxHash}`,
|
346
348
|
}
|
347
349
|
: undefined
|
348
350
|
}
|
@@ -376,10 +378,10 @@ export function FiatSteps(props: {
|
|
376
378
|
}}
|
377
379
|
state={getStep2State()}
|
378
380
|
explorer={
|
379
|
-
|
381
|
+
toChainExplorers.explorers[0]?.url && toTokenTxHash
|
380
382
|
? {
|
381
383
|
label: "View on Explorer",
|
382
|
-
url: `${
|
384
|
+
url: `${toChainExplorers.explorers[0].url}/tx/${toTokenTxHash}`,
|
383
385
|
}
|
384
386
|
: undefined
|
385
387
|
}
|
@@ -6,7 +6,7 @@ import {
|
|
6
6
|
fontSize,
|
7
7
|
iconSize,
|
8
8
|
} from "../../../../../../core/design-system/index.js";
|
9
|
-
import {
|
9
|
+
import { useChainExplorers } from "../../../../../../core/hooks/others/useChainQuery.js";
|
10
10
|
import { Spacer } from "../../../../components/Spacer.js";
|
11
11
|
import { Container, Line } from "../../../../components/basic.js";
|
12
12
|
import { ButtonLink } from "../../../../components/buttons.js";
|
@@ -38,7 +38,9 @@ export function OnRampTxDetailsTable(props: {
|
|
38
38
|
txHash?: string;
|
39
39
|
};
|
40
40
|
}) {
|
41
|
-
const
|
41
|
+
const onRampExplorers = useChainExplorers(
|
42
|
+
getCachedChain(props.token.chainId),
|
43
|
+
);
|
42
44
|
const onrampTxHash = props.statusMeta?.txHash;
|
43
45
|
const currencyMeta = getCurrencyMeta(props.fiat.currencySymbol);
|
44
46
|
|
@@ -113,14 +115,14 @@ export function OnRampTxDetailsTable(props: {
|
|
113
115
|
{lineSpacer}
|
114
116
|
|
115
117
|
{/* Transaction Hash link */}
|
116
|
-
{onrampTxHash &&
|
118
|
+
{onrampTxHash && onRampExplorers.explorers?.[0]?.url && (
|
117
119
|
<>
|
118
120
|
<Spacer y="md" />
|
119
121
|
<ButtonLink
|
120
122
|
fullWidth
|
121
123
|
variant="outline"
|
122
124
|
href={`${
|
123
|
-
|
125
|
+
onRampExplorers.explorers[0].url || ""
|
124
126
|
}/tx/${onrampTxHash}`}
|
125
127
|
target="_blank"
|
126
128
|
gap="xs"
|
@@ -8,7 +8,7 @@ import {
|
|
8
8
|
iconSize,
|
9
9
|
spacing,
|
10
10
|
} from "../../../../../../core/design-system/index.js";
|
11
|
-
import {
|
11
|
+
import { useChainName } from "../../../../../../core/hooks/others/useChainQuery.js";
|
12
12
|
import { Skeleton } from "../../../../components/Skeleton.js";
|
13
13
|
import { Spacer } from "../../../../components/Spacer.js";
|
14
14
|
import { TokenIcon } from "../../../../components/TokenIcon.js";
|
@@ -34,7 +34,7 @@ export function BuyTokenInput(props: {
|
|
34
34
|
freezeAmount?: boolean;
|
35
35
|
freezeChainAndToken?: boolean;
|
36
36
|
}) {
|
37
|
-
const
|
37
|
+
const { name } = useChainName(props.chain);
|
38
38
|
|
39
39
|
const getWidth = () => {
|
40
40
|
let chars = props.value.replace(".", "").length;
|
@@ -160,9 +160,9 @@ export function BuyTokenInput(props: {
|
|
160
160
|
/>
|
161
161
|
|
162
162
|
{/* Network Name */}
|
163
|
-
{
|
163
|
+
{name ? (
|
164
164
|
<Text size="xs" color="secondaryText">
|
165
|
-
{
|
165
|
+
{name}
|
166
166
|
</Text>
|
167
167
|
) : (
|
168
168
|
<Skeleton width="90px" height={fontSize.xs} />
|
@@ -10,7 +10,7 @@ import {
|
|
10
10
|
fontSize,
|
11
11
|
iconSize,
|
12
12
|
} from "../../../../../../core/design-system/index.js";
|
13
|
-
import {
|
13
|
+
import { useChainName } from "../../../../../../core/hooks/others/useChainQuery.js";
|
14
14
|
import { useSendTransactionCore } from "../../../../../../core/hooks/transaction/useSendTransaction.js";
|
15
15
|
import { useActiveWallet } from "../../../../../hooks/wallets/useActiveWallet.js";
|
16
16
|
import { useActiveWalletChain } from "../../../../../hooks/wallets/useActiveWalletChain.js";
|
@@ -259,7 +259,7 @@ function RenderTokenInfo(props: {
|
|
259
259
|
symbol: string;
|
260
260
|
client: ThirdwebClient;
|
261
261
|
}) {
|
262
|
-
const
|
262
|
+
const { name } = useChainName(props.chain);
|
263
263
|
return (
|
264
264
|
<Container
|
265
265
|
flex="column"
|
@@ -280,8 +280,8 @@ function RenderTokenInfo(props: {
|
|
280
280
|
/>
|
281
281
|
</Container>
|
282
282
|
|
283
|
-
{
|
284
|
-
<Text size="sm">{
|
283
|
+
{name ? (
|
284
|
+
<Text size="sm">{name}</Text>
|
285
285
|
) : (
|
286
286
|
<Skeleton width={"100px"} height={fontSize.sm} />
|
287
287
|
)}
|
@@ -8,7 +8,7 @@ import {
|
|
8
8
|
radius,
|
9
9
|
spacing,
|
10
10
|
} from "../../../../../../core/design-system/index.js";
|
11
|
-
import {
|
11
|
+
import { useChainName } from "../../../../../../core/hooks/others/useChainQuery.js";
|
12
12
|
import { useWalletBalance } from "../../../../../../core/hooks/others/useWalletBalance.js";
|
13
13
|
import type { TokenInfo } from "../../../../../../core/utils/defaultTokens.js";
|
14
14
|
import { useActiveAccount } from "../../../../../hooks/wallets/useActiveAccount.js";
|
@@ -37,7 +37,7 @@ export function PayWithCrypto(props: {
|
|
37
37
|
client: ThirdwebClient;
|
38
38
|
freezeChainAndTokenSelection?: boolean;
|
39
39
|
}) {
|
40
|
-
const
|
40
|
+
const { name } = useChainName(props.chain);
|
41
41
|
const activeAccount = useActiveAccount();
|
42
42
|
|
43
43
|
const balanceQuery = useWalletBalance({
|
@@ -89,8 +89,8 @@ export function PayWithCrypto(props: {
|
|
89
89
|
<TokenSymbol token={props.token} chain={props.chain} size="sm" />
|
90
90
|
<ChevronDownIcon width={iconSize.sm} height={iconSize.sm} />
|
91
91
|
</Container>
|
92
|
-
{
|
93
|
-
<Text size="xs"> {
|
92
|
+
{name ? (
|
93
|
+
<Text size="xs"> {name}</Text>
|
94
94
|
) : (
|
95
95
|
<Skeleton width="90px" height={fontSize.xs} />
|
96
96
|
)}
|
@@ -11,7 +11,7 @@ import {
|
|
11
11
|
iconSize,
|
12
12
|
spacing,
|
13
13
|
} from "../../../../../../core/design-system/index.js";
|
14
|
-
import {
|
14
|
+
import { useChainExplorers } from "../../../../../../core/hooks/others/useChainQuery.js";
|
15
15
|
import { useActiveAccount } from "../../../../../hooks/wallets/useActiveAccount.js";
|
16
16
|
import { useActiveWalletChain } from "../../../../../hooks/wallets/useActiveWalletChain.js";
|
17
17
|
import { Skeleton } from "../../../../components/Skeleton.js";
|
@@ -76,7 +76,7 @@ export function BuyTxHistoryList(props: {
|
|
76
76
|
} = useBuyTransactionsToShow(props.client);
|
77
77
|
|
78
78
|
const activeChain = useActiveWalletChain();
|
79
|
-
const
|
79
|
+
const chainExplorers = useChainExplorers(activeChain);
|
80
80
|
const activeAccount = useActiveAccount();
|
81
81
|
|
82
82
|
const noTransactions = txInfosToShow.length === 0;
|
@@ -207,7 +207,7 @@ export function BuyTxHistoryList(props: {
|
|
207
207
|
<ButtonLink
|
208
208
|
fullWidth
|
209
209
|
variant="outline"
|
210
|
-
href={`${
|
210
|
+
href={`${chainExplorers.explorers[0]?.url}/address/${activeAccount?.address}`}
|
211
211
|
target="_blank"
|
212
212
|
as="a"
|
213
213
|
gap="xs"
|
@@ -8,7 +8,10 @@ import {
|
|
8
8
|
iconSize,
|
9
9
|
spacing,
|
10
10
|
} from "../../../../../../core/design-system/index.js";
|
11
|
-
import {
|
11
|
+
import {
|
12
|
+
useChainExplorers,
|
13
|
+
useChainName,
|
14
|
+
} from "../../../../../../core/hooks/others/useChainQuery.js";
|
12
15
|
import { useBuyWithCryptoStatus } from "../../../../../../core/hooks/pay/useBuyWithCryptoStatus.js";
|
13
16
|
import { Spacer } from "../../../../components/Spacer.js";
|
14
17
|
import { Container, Line, ModalHeader } from "../../../../components/basic.js";
|
@@ -166,8 +169,10 @@ export function SwapTxDetailsTable(
|
|
166
169
|
const fromChainId = fromToken.chainId;
|
167
170
|
const toChainId = toToken.chainId;
|
168
171
|
|
169
|
-
const
|
170
|
-
const
|
172
|
+
const fromChainName = useChainName(getCachedChain(fromChainId));
|
173
|
+
const fromChainExplorers = useChainExplorers(getCachedChain(fromChainId));
|
174
|
+
const toChainName = useChainName(getCachedChain(toChainId));
|
175
|
+
const toChainExplorers = useChainExplorers(getCachedChain(toChainId));
|
171
176
|
|
172
177
|
const lineSpacer = (
|
173
178
|
<>
|
@@ -268,11 +273,11 @@ export function SwapTxDetailsTable(
|
|
268
273
|
{lineSpacer}
|
269
274
|
|
270
275
|
{/* source chain Tx hash link */}
|
271
|
-
{
|
276
|
+
{fromChainExplorers.explorers?.[0]?.url && sourceTxHash && (
|
272
277
|
<ButtonLink
|
273
278
|
fullWidth
|
274
279
|
variant="outline"
|
275
|
-
href={`${
|
280
|
+
href={`${fromChainExplorers.explorers[0].url}/tx/${sourceTxHash}`}
|
276
281
|
target="_blank"
|
277
282
|
gap="xs"
|
278
283
|
style={{
|
@@ -280,7 +285,7 @@ export function SwapTxDetailsTable(
|
|
280
285
|
padding: spacing.sm,
|
281
286
|
}}
|
282
287
|
>
|
283
|
-
View on {
|
288
|
+
View on {fromChainName.name} Explorer
|
284
289
|
<ExternalLinkIcon width={iconSize.sm} height={iconSize.sm} />
|
285
290
|
</ButtonLink>
|
286
291
|
)}
|
@@ -288,13 +293,13 @@ export function SwapTxDetailsTable(
|
|
288
293
|
{/* destination chain tx hash link */}
|
289
294
|
{destinationTxHash &&
|
290
295
|
sourceTxHash !== destinationTxHash &&
|
291
|
-
|
296
|
+
toChainExplorers?.explorers?.[0]?.url && (
|
292
297
|
<>
|
293
298
|
<Spacer y="sm" />
|
294
299
|
<ButtonLink
|
295
300
|
fullWidth
|
296
301
|
variant="outline"
|
297
|
-
href={`${
|
302
|
+
href={`${toChainExplorers.explorers[0].url}/tx/${destinationTxHash}`}
|
298
303
|
target="_blank"
|
299
304
|
gap="xs"
|
300
305
|
style={{
|
@@ -302,7 +307,7 @@ export function SwapTxDetailsTable(
|
|
302
307
|
padding: spacing.sm,
|
303
308
|
}}
|
304
309
|
>
|
305
|
-
View on {
|
310
|
+
View on {toChainName.name} Explorer
|
306
311
|
<ExternalLinkIcon width={iconSize.sm} height={iconSize.sm} />
|
307
312
|
</ButtonLink>
|
308
313
|
</>
|
@@ -2,7 +2,7 @@ import { useMemo } from "react";
|
|
2
2
|
import { getCachedChain } from "../../../../../../../chains/utils.js";
|
3
3
|
import type { ThirdwebClient } from "../../../../../../../client/client.js";
|
4
4
|
import { formatNumber } from "../../../../../../../utils/formatNumber.js";
|
5
|
-
import {
|
5
|
+
import { useChainName } from "../../../../../../core/hooks/others/useChainQuery.js";
|
6
6
|
import { Container } from "../../../../components/basic.js";
|
7
7
|
import { Text } from "../../../../components/text.js";
|
8
8
|
import { PayTokenIcon } from "../PayTokenIcon.js";
|
@@ -19,7 +19,7 @@ export function TokenInfoRow(props: {
|
|
19
19
|
() => getCachedChain(props.chainId),
|
20
20
|
[props.chainId],
|
21
21
|
);
|
22
|
-
const
|
22
|
+
const { name } = useChainName(chainObj);
|
23
23
|
|
24
24
|
return (
|
25
25
|
<Container
|
@@ -49,8 +49,7 @@ export function TokenInfoRow(props: {
|
|
49
49
|
{formatNumber(Number(props.tokenAmount), 4)} {props.tokenSymbol}
|
50
50
|
</Text>
|
51
51
|
</Container>
|
52
|
-
|
53
|
-
<Text size="sm">{chainQuery.data?.name}</Text>
|
52
|
+
<Text size="sm">{name}</Text>
|
54
53
|
</Container>
|
55
54
|
</Container>
|
56
55
|
);
|
@@ -12,7 +12,10 @@ import {
|
|
12
12
|
iconSize,
|
13
13
|
spacing,
|
14
14
|
} from "../../../../core/design-system/index.js";
|
15
|
-
import {
|
15
|
+
import {
|
16
|
+
useChainIconUrl,
|
17
|
+
useChainName,
|
18
|
+
} from "../../../../core/hooks/others/useChainQuery.js";
|
16
19
|
import { useTokenInfo } from "../../../../core/hooks/others/useTokenInfo.js";
|
17
20
|
import type { TokenInfo } from "../../../../core/utils/defaultTokens.js";
|
18
21
|
import { useActiveAccount } from "../../../hooks/wallets/useActiveAccount.js";
|
@@ -57,7 +60,9 @@ export function TokenSelector(props: {
|
|
57
60
|
const [screen, setScreen] = useState<"base" | "select-chain">("base");
|
58
61
|
const [input, setInput] = useState("");
|
59
62
|
const chain = props.chain;
|
60
|
-
|
63
|
+
|
64
|
+
const chainNameQuery = useChainName(chain);
|
65
|
+
const chainIconQuery = useChainIconUrl(chain);
|
61
66
|
|
62
67
|
// if input is undefined, it loads the native token
|
63
68
|
// otherwise it loads the token with given address
|
@@ -162,15 +167,14 @@ export function TokenSelector(props: {
|
|
162
167
|
}}
|
163
168
|
>
|
164
169
|
<ChainIcon
|
165
|
-
|
170
|
+
chainIconUrl={chainIconQuery.url}
|
166
171
|
size={iconSize.lg}
|
167
172
|
client={props.client}
|
168
173
|
/>
|
169
174
|
|
170
|
-
{
|
175
|
+
{chainNameQuery.name ? (
|
171
176
|
<Text color="primaryText" size="sm">
|
172
|
-
{
|
173
|
-
{chainQuery.data.name}
|
177
|
+
{chainNameQuery.name}
|
174
178
|
</Text>
|
175
179
|
) : (
|
176
180
|
<Skeleton height={fontSize.md} />
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import type { ChainMetadata } from "../../../../chains/types.js";
|
2
1
|
import type { ThirdwebClient } from "../../../../client/client.js";
|
3
2
|
import { resolveScheme } from "../../../../utils/ipfs.js";
|
4
3
|
import { StyledDiv } from "../design-system/elements.js";
|
@@ -12,7 +11,7 @@ export const fallbackChainIcon =
|
|
12
11
|
* @internal
|
13
12
|
*/
|
14
13
|
export const ChainIcon: React.FC<{
|
15
|
-
|
14
|
+
chainIconUrl?: string;
|
16
15
|
size: string;
|
17
16
|
active?: boolean;
|
18
17
|
className?: string;
|
@@ -20,7 +19,7 @@ export const ChainIcon: React.FC<{
|
|
20
19
|
client: ThirdwebClient;
|
21
20
|
}> = (props) => {
|
22
21
|
const getSrc = () => {
|
23
|
-
const url = props.
|
22
|
+
const url = props.chainIconUrl;
|
24
23
|
if (!url) {
|
25
24
|
return fallbackChainIcon;
|
26
25
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { Chain } from "../../../../chains/types.js";
|
2
2
|
import type { ThirdwebClient } from "../../../../client/client.js";
|
3
3
|
import { fontSize } from "../../../core/design-system/index.js";
|
4
|
-
import {
|
4
|
+
import { useChainName } from "../../../core/hooks/others/useChainQuery.js";
|
5
5
|
import { Skeleton } from "./Skeleton.js";
|
6
6
|
import { Text } from "./text.js";
|
7
7
|
|
@@ -14,14 +14,12 @@ export const ChainName: React.FC<{
|
|
14
14
|
client: ThirdwebClient;
|
15
15
|
short?: boolean;
|
16
16
|
}> = (props) => {
|
17
|
-
const
|
17
|
+
const { name } = useChainName(props.chain);
|
18
18
|
|
19
|
-
if (
|
19
|
+
if (name) {
|
20
20
|
return (
|
21
21
|
<Text size={props.size}>
|
22
|
-
{props.short
|
23
|
-
? shorterChainName(chainQuery.data.name)
|
24
|
-
: chainQuery.data.name}
|
22
|
+
{props.short ? shorterChainName(name) : name}
|
25
23
|
</Text>
|
26
24
|
);
|
27
25
|
}
|
@@ -4,7 +4,7 @@ import type { Chain } from "../../../../chains/types.js";
|
|
4
4
|
import type { ThirdwebClient } from "../../../../client/client.js";
|
5
5
|
import { NATIVE_TOKEN_ADDRESS } from "../../../../constants/addresses.js";
|
6
6
|
import { iconSize } from "../../../core/design-system/index.js";
|
7
|
-
import {
|
7
|
+
import { useChainIconUrl } from "../../../core/hooks/others/useChainQuery.js";
|
8
8
|
import { genericTokenIcon } from "../../../core/utils/socialIcons.js";
|
9
9
|
import {
|
10
10
|
type NativeToken,
|
@@ -28,17 +28,17 @@ export function TokenIcon(props: {
|
|
28
28
|
size: keyof typeof iconSize;
|
29
29
|
client: ThirdwebClient;
|
30
30
|
}) {
|
31
|
-
const
|
31
|
+
const chainIconQuery = useChainIconUrl(props.chain);
|
32
32
|
|
33
33
|
const tokenImage = useMemo(() => {
|
34
34
|
if (
|
35
35
|
isNativeToken(props.token) ||
|
36
36
|
props.token.address === NATIVE_TOKEN_ADDRESS
|
37
37
|
) {
|
38
|
-
return
|
38
|
+
return chainIconQuery.url;
|
39
39
|
}
|
40
40
|
return props.token.icon;
|
41
|
-
}, [props.token,
|
41
|
+
}, [props.token, chainIconQuery.url]);
|
42
42
|
|
43
43
|
return (
|
44
44
|
<Img
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use client";
|
2
2
|
import type { Chain } from "../../../../../chains/types.js";
|
3
3
|
import { type Theme, fontSize } from "../../../../core/design-system/index.js";
|
4
|
-
import {
|
4
|
+
import { useChainSymbol } from "../../../../core/hooks/others/useChainQuery.js";
|
5
5
|
import {
|
6
6
|
type ERC20OrNativeToken,
|
7
7
|
isNativeToken,
|
@@ -47,9 +47,9 @@ function NativeTokenSymbol(props: {
|
|
47
47
|
color?: keyof Theme["colors"];
|
48
48
|
inline?: boolean;
|
49
49
|
}) {
|
50
|
-
const
|
50
|
+
const chainSymbolQuery = useChainSymbol(props.chain);
|
51
51
|
|
52
|
-
if (
|
52
|
+
if (chainSymbolQuery.isLoading) {
|
53
53
|
return <Skeleton width="70px" height={fontSize[props.size]} />;
|
54
54
|
}
|
55
55
|
|
@@ -59,7 +59,7 @@ function NativeTokenSymbol(props: {
|
|
59
59
|
color={props.color || "primaryText"}
|
60
60
|
inline={props.inline}
|
61
61
|
>
|
62
|
-
{
|
62
|
+
{chainSymbolQuery.symbol ?? "ETH"}
|
63
63
|
</Text>
|
64
64
|
);
|
65
65
|
}
|
@@ -54,16 +54,12 @@ export function EcosystemWalletFormUIScreen(props: EcosystemWalletFormUIProps) {
|
|
54
54
|
minHeight: "250px",
|
55
55
|
}}
|
56
56
|
>
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
/>
|
64
|
-
<Spacer y="lg" />
|
65
|
-
</>
|
66
|
-
) : null}
|
57
|
+
<EcosystemWalletHeader
|
58
|
+
client={props.client}
|
59
|
+
onBack={isCompact ? onBack : undefined}
|
60
|
+
wallet={props.wallet}
|
61
|
+
/>
|
62
|
+
<Spacer y="lg" />
|
67
63
|
|
68
64
|
<Container
|
69
65
|
expand
|
@@ -59,6 +59,8 @@ export async function getClaimParams(options: GetClaimParamsOptions) {
|
|
59
59
|
});
|
60
60
|
})();
|
61
61
|
|
62
|
+
const tokenDecimals = options.type === "erc20" ? options.tokenDecimals : 0; // nfts have no decimals
|
63
|
+
|
62
64
|
// compute the allowListProof in an iife
|
63
65
|
const allowlistProof = await (async () => {
|
64
66
|
// early exit if no merkle root is set
|
@@ -79,7 +81,7 @@ export async function getClaimParams(options: GetClaimParamsOptions) {
|
|
79
81
|
contract: options.contract,
|
80
82
|
claimer: options.from || options.to, // receiver and claimer can be different, always prioritize the claimer for allowlists
|
81
83
|
merkleRoot: cc.merkleRoot,
|
82
|
-
tokenDecimals
|
84
|
+
tokenDecimals,
|
83
85
|
});
|
84
86
|
// if no proof is found, we'll try the empty proof
|
85
87
|
if (!allowListProof) {
|
@@ -116,7 +118,7 @@ export async function getClaimParams(options: GetClaimParamsOptions) {
|
|
116
118
|
data: "0x" as Hex,
|
117
119
|
overrides: {
|
118
120
|
value: isNativeTokenAddress(currency)
|
119
|
-
? pricePerToken *
|
121
|
+
? (pricePerToken * options.quantity) / BigInt(10 ** tokenDecimals)
|
120
122
|
: 0n,
|
121
123
|
},
|
122
124
|
};
|
package/src/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = "5.32.
|
1
|
+
export const version = "5.32.1";
|
@@ -23,23 +23,12 @@ import { createEcosystemWallet } from "../core/wallet/ecosystem-core.js";
|
|
23
23
|
* });
|
24
24
|
* ```
|
25
25
|
*
|
26
|
-
*
|
26
|
+
* Connect to a restricted ecosystem wallet with your designated partner ID
|
27
|
+
* @note The parnter ID will be provided to you by the ecosystem with which you're integrating.
|
27
28
|
* ```ts
|
28
29
|
* import { ecosystemWallet } from "thirdweb/wallets";
|
29
30
|
* const wallet = ecosystemWallet("ecosystem.hooli", {
|
30
|
-
*
|
31
|
-
* chain: sepolia,
|
32
|
-
* sponsorGas: true,
|
33
|
-
* },
|
34
|
-
* });
|
35
|
-
* ```
|
36
|
-
*
|
37
|
-
* Connect to a restricted ecosystem wallet with your designated integrator ID
|
38
|
-
* @note The integrator ID will be provided to you by the ecosystem with which you're integrating.
|
39
|
-
* ```ts
|
40
|
-
* import { ecosystemWallet } from "thirdweb/wallets";
|
41
|
-
* const wallet = ecosystemWallet("ecosystem.hooli", {
|
42
|
-
* integratorId: "..."
|
31
|
+
* partnerId: "..."
|
43
32
|
* });
|
44
33
|
* ```
|
45
34
|
* @wallet
|