Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add error handling
Browse files Browse the repository at this point in the history
wei1769 committed Dec 12, 2022
1 parent f36f2d5 commit bf77a1e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/whirlpools/infos.ts
Original file line number Diff line number Diff line change
@@ -68,6 +68,7 @@ infos = class InstanceWhirlpools {
let allUserTokenMintSet = new Map<string, BN>();
(await connection.getTokenAccountsByOwner(userKey, { programId: TOKEN_PROGRAM_ID })).value.forEach((info) => {
let rawAccount = AccountLayout.decode(info.account.data);
if (rawAccount.amount.toString() == "0") return false;
allUserTokenMintSet.set(rawAccount.mint.toString(), new BN(rawAccount.amount.toString()));
});
const sizeFilter: DataSizeFilter = {

0 comments on commit bf77a1e

Please sign in to comment.