mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 20:54:33 +00:00
token balance json serialization fix
This commit is contained in:
parent
387e2d8403
commit
1305b9f37c
1 changed files with 4 additions and 29 deletions
|
@ -16,38 +16,13 @@ class TokenBalance extends Balance {
|
||||||
|
|
||||||
final String contractAddress;
|
final String contractAddress;
|
||||||
|
|
||||||
// @override
|
|
||||||
// Decimal getTotal({bool includeBlocked = false}) =>
|
|
||||||
// Format.satoshisToEthTokenAmount(
|
|
||||||
// includeBlocked ? total : total - blockedTotal,
|
|
||||||
// decimalPlaces,
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
// @override
|
|
||||||
// Decimal getSpendable() => Format.satoshisToEthTokenAmount(
|
|
||||||
// spendable,
|
|
||||||
// decimalPlaces,
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
// @override
|
|
||||||
// Decimal getPending() => Format.satoshisToEthTokenAmount(
|
|
||||||
// pendingSpendable,
|
|
||||||
// decimalPlaces,
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
// @override
|
|
||||||
// Decimal getBlocked() => Format.satoshisToEthTokenAmount(
|
|
||||||
// blockedTotal,
|
|
||||||
// decimalPlaces,
|
|
||||||
// );
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toJsonIgnoreCoin() => jsonEncode({
|
String toJsonIgnoreCoin() => jsonEncode({
|
||||||
"contractAddress": contractAddress,
|
"contractAddress": contractAddress,
|
||||||
"total": total,
|
"total": total.toJsonString(),
|
||||||
"spendable": spendable,
|
"spendable": spendable.toJsonString(),
|
||||||
"blockedTotal": blockedTotal,
|
"blockedTotal": blockedTotal.toJsonString(),
|
||||||
"pendingSpendable": pendingSpendable,
|
"pendingSpendable": pendingSpendable.toJsonString(),
|
||||||
});
|
});
|
||||||
|
|
||||||
factory TokenBalance.fromJson(
|
factory TokenBalance.fromJson(
|
||||||
|
|
Loading…
Reference in a new issue