Skip to content

Commit

Permalink
fix: check balance or spendableBalance and remove solanaResources
Browse files Browse the repository at this point in the history
  • Loading branch information
qperrot committed Dec 27, 2024
1 parent 5e01938 commit db24171
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions libs/coin-framework/src/account/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,7 @@ export const isAccountEmpty = (a: AccountLike): boolean => {
);
}
if (a.type === "Account" && a.currency.family === "solana") {
return (
(a as any).solanaResources &&
(a as any).balance.isZero() &&
(a as any).spendableBalance.isZero()
);
return (a as any).balance.isZero() || (a as any).spendableBalance.isZero();
}
const hasSubAccounts = a.type === "Account" && a.subAccounts && a.subAccounts.length;
return a.operationsCount === 0 && a.balance.isZero() && !hasSubAccounts;
Expand Down

0 comments on commit db24171

Please sign in to comment.