File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed
Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -38,11 +38,15 @@ class TokenWalletInfo implements IsarId {
3838 // token balance cache
3939 Balance getCachedBalance () {
4040 if (cachedBalanceJsonString == null ) {
41+ final amount = Amount (
42+ rawValue: BigInt .zero,
43+ fractionDigits: tokenFractionDigits,
44+ );
4145 return Balance (
42- total: Amount . zeroWith (fractionDigits : tokenFractionDigits) ,
43- spendable: Amount . zeroWith (fractionDigits : tokenFractionDigits) ,
44- blockedTotal: Amount . zeroWith (fractionDigits : tokenFractionDigits) ,
45- pendingSpendable: Amount . zeroWith (fractionDigits : tokenFractionDigits) ,
46+ total: amount ,
47+ spendable: amount ,
48+ blockedTotal: amount ,
49+ pendingSpendable: amount ,
4650 );
4751 }
4852 return Balance .fromJson (cachedBalanceJsonString! , tokenFractionDigits);
Original file line number Diff line number Diff line change @@ -47,11 +47,15 @@ class WalletSolanaTokenInfo implements IsarId {
4747 // Token balance cache.
4848 Balance getCachedBalance () {
4949 if (cachedBalanceJsonString == null ) {
50+ final amount = Amount (
51+ rawValue: BigInt .zero,
52+ fractionDigits: tokenFractionDigits,
53+ );
5054 return Balance (
51- total: Amount . zeroWith (fractionDigits : tokenFractionDigits) ,
52- spendable: Amount . zeroWith (fractionDigits : tokenFractionDigits) ,
53- blockedTotal: Amount . zeroWith (fractionDigits : tokenFractionDigits) ,
54- pendingSpendable: Amount . zeroWith (fractionDigits : tokenFractionDigits) ,
55+ total: amount ,
56+ spendable: amount ,
57+ blockedTotal: amount ,
58+ pendingSpendable: amount ,
5559 );
5660 }
5761 return Balance .fromJson (cachedBalanceJsonString! , tokenFractionDigits);
You can’t perform that action at this time.
0 commit comments