Skip to content

Commit 83da6bb

Browse files
committed
fix: Handle token price update for zero balance tokens
1 parent 95d2adb commit 83da6bb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

logic/lib/src/domain/repositories/wallet/pricing.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ class PricingRepository {
6767
for (int i = 0; i < tokens.length; i++) {
6868
final currentToken = tokens[i];
6969
// The price of a token with 0 balance is zero
70-
if (currentToken.balance == 0.0) continue;
70+
if (currentToken.balance == 0.0) {
71+
tokens[i] = currentToken.copyWith(balancePrice: 0.0);
72+
continue;
73+
}
7174
if (currentToken.address != null) {
7275
try {
7376
// First if will handle in case the token is the XSD token

0 commit comments

Comments
 (0)