diff --git a/src/components/asset-select.tsx b/src/components/asset-select.tsx index 5bff412..a99fd01 100644 --- a/src/components/asset-select.tsx +++ b/src/components/asset-select.tsx @@ -21,7 +21,7 @@ export default function AssetSelect({ value, options, disabled, onChange = () => } disabled={disabled} sameWidth - labelClassName="flex items-center gap-middle shrink-0 w-32 justify-between bg-component h-full border-radius px-1 hover:opacity-80 transition-[transform,color] disabled:translate-y-0 disabled:opacity-100 disabled:cursor-not-allowed" + labelClassName="flex items-center gap-middle shrink-0 w-32 justify-between bg-component h-full rounded-r-2xl px-1 hover:opacity-80 transition-[transform,color] disabled:translate-y-0 disabled:opacity-100 disabled:cursor-not-allowed" childClassName="flex flex-col py-small bg-component border-primary border border-radius gap-[1px]" > {options?.length ? ( diff --git a/src/components/balance-input.tsx b/src/components/balance-input.tsx index 0fcad8f..9c4ea7e 100644 --- a/src/components/balance-input.tsx +++ b/src/components/balance-input.tsx @@ -4,7 +4,7 @@ import { BN, BN_ZERO, bnToBn } from "@polkadot/util"; import AssetSelect from "./asset-select"; import { ChangeEventHandler, useCallback, useEffect, useMemo, useRef, useState } from "react"; import { formatBalance } from "@/utils"; -import { parseUnits } from "viem"; +import { formatUnits, parseUnits } from "viem"; import { InputAlert } from "./input-alert"; interface Value { @@ -19,7 +19,7 @@ interface Props { placeholder?: string; balance?: BN; cross?: Cross; - asset?: Asset; + asset: Asset; assetSupply?: BN; assetLimit?: BN; assetOptions?: Asset[]; @@ -119,7 +119,35 @@ export default function BalanceInput({ value={value?.input} onChange={handleInputChange} /> - {asset ? : null} +
+ + +
{/* Alert */} {requireLimit ? ( diff --git a/src/config/chains/darwinia-chain.ts b/src/config/chains/darwinia-chain.ts index d140aee..bf565f7 100644 --- a/src/config/chains/darwinia-chain.ts +++ b/src/config/chains/darwinia-chain.ts @@ -66,6 +66,7 @@ export const darwiniaChain: ChainConfig = { ], wallets: [WalletID.RAINBOW, WalletID.TALISMAN], addressType: "evm", + hasAssetLimit: true, /** * Substrate