Skip to content
This repository was archived by the owner on Jan 2, 2024. It is now read-only.

Commit 30297d4

Browse files
committed
Added filter to ensure asset selection gets assets that are actually held by the account
1 parent 7168484 commit 30297d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

minter/scripts/transfer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const transfer = async () => {
6262
if (assetIds.length === 0) {
6363
const account = await client.accountInformation(senderAccount.addr).do()
6464
const assets = account['assets']
65-
assetIds.push(...assets.map((a: any) => a['asset-id']))
65+
assetIds.push(...assets.filter((a: any) => a.amount > 0).map((a: any) => a['asset-id']))
6666
}
6767

6868
const assets = await Promise.all(

0 commit comments

Comments
 (0)