Skip to content

Commit

Permalink
sendzrc20
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Oct 29, 2023
1 parent 60b14b7 commit 314487c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions helpers/sendZRC20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ export const sendZRC20 = async (
} else if (destination === "zeta_testnet") {
const TSSAddress = getAddress("tss", network as any);
const zrc20 = foreignCoinsFiltered.find(
(coin: any) =>
coin.symbol.toLocaleLowerCase() === token.toLocaleLowerCase()
(coin: any) => coin.symbol.toLowerCase() === token.toLowerCase()
);
if (zrc20.coin_type.toLocaleLowerCase() === "erc20") {
if (zrc20 === undefined) {
Expand All @@ -59,7 +58,6 @@ export const sendZRC20 = async (
signer
);
const balance = await erc20TokenContract.balanceOf(signer.address);
console.log(ethers.utils.formatEther(balance));
if (balance.lt(value)) {
throw new Error("Insufficient token balance.");
}
Expand Down
1 change: 1 addition & 0 deletions tasks/sendZRC20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ export const sendZRC20Task = task(
)
.addParam("amount", "Amount of ZRC-20 to send")
.addParam("destination", "Destination chain")
.addParam("recipient", "Recipient address")
.addParam("token", "Token to send (geth, usdc, etc)");

0 comments on commit 314487c

Please sign in to comment.