diff --git a/apps/frontend/next-app/app/component/examples/Transfers.tsx b/apps/frontend/next-app/app/component/examples/Transfers.tsx index 3b662ac..c73d88a 100644 --- a/apps/frontend/next-app/app/component/examples/Transfers.tsx +++ b/apps/frontend/next-app/app/component/examples/Transfers.tsx @@ -33,15 +33,15 @@ const Transfers: React.FC = ({ dappAddress }: IProps) => { const signer = useEthersSigner() const provider = signer?.provider const [dappRelayedAddress, setDappRelayedAddress] = useState(false) - const [erc20Amount, setErc20Amount] = useState(0); + const [erc20Amount, setErc20Amount] = useState(""); const [erc20Token, setErc20Token] = useState(""); - const [erc721Id, setErc721Id] = useState(0); + const [erc721Id, setErc721Id] = useState(""); const [erc721, setErc721] = useState(""); - const [etherAmount, setEtherAmount] = useState(0); + const [etherAmount, setEtherAmount] = useState(""); const [erc1155, setErc1155] = useState(""); - const [erc1155Id, setErc1155Id] = useState(); - const [erc1155Amount, setErc1155Amount] = useState(); + const [erc1155Id, setErc1155Id] = useState(""); + const [erc1155Amount, setErc1155Amount] = useState(""); const [erc1155Ids, setErc1155Ids] = useState([]); const [erc1155Amounts, setErc1155Amounts] = useState([]); const [erc1155IdsStr, setErc1155IdsStr] = useState("[]"); @@ -61,10 +61,10 @@ const Transfers: React.FC = ({ dappAddress }: IProps) => { } const addTo1155Batch = () => { const newIds = erc1155Ids; - newIds.push(erc1155Id!); + newIds.push(Number(erc1155Id!)); setErc1155Ids(newIds); const newAmounts = erc1155Amounts; - newAmounts.push(erc1155Amount!); + newAmounts.push(Number(erc1155Amount!)); setErc1155Amounts(newAmounts); setErc1155IdsStr("["+erc1155Ids.join(',')+"]"); setErc1155AmountsStr("["+erc1155Amounts.join(',')+"]"); @@ -124,7 +124,7 @@ const clear1155Batch = () => { type="number" variant="outline" placeholder="Enter amount" - onChange={(e) => setEtherAmount(Number(e.target.value))} + onChange={(e) => setEtherAmount(e.target.value)} value={etherAmount} />