diff --git a/apps/dashboard/src/app/nebula-app/(app)/components/Swap/SwapCards.tsx b/apps/dashboard/src/app/nebula-app/(app)/components/Swap/SwapCards.tsx index 58763fc55aa..4ecc0972f3c 100644 --- a/apps/dashboard/src/app/nebula-app/(app)/components/Swap/SwapCards.tsx +++ b/apps/dashboard/src/app/nebula-app/(app)/components/Swap/SwapCards.tsx @@ -2,8 +2,10 @@ import { TransactionButton } from "components/buttons/TransactionButton"; import { useV5DashboardChain } from "lib/v5-adapter"; import { ArrowRightLeftIcon, CheckIcon } from "lucide-react"; import { + NATIVE_TOKEN_ADDRESS, type PreparedTransaction, type ThirdwebClient, + getAddress, prepareTransaction, toTokens, } from "thirdweb"; @@ -39,6 +41,9 @@ export function SwapTransactionCardLayout(props: { const { swapData } = props; const txChain = useV5DashboardChain(swapData.transaction.chainId); + const isSellingNativeToken = + getAddress(swapData.from.address) === getAddress(NATIVE_TOKEN_ADDRESS); + return (
@@ -102,6 +107,12 @@ export function SwapTransactionCardLayout(props: { client: props.client, data: swapData.transaction.data, to: swapData.transaction.to, + erc20Value: isSellingNativeToken + ? undefined + : { + amountWei: BigInt(swapData.from.amount), + tokenAddress: swapData.from.address, + }, }); props.sendTx(tx);