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;
|
||||
|
||||
// @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
|
||||
String toJsonIgnoreCoin() => jsonEncode({
|
||||
"contractAddress": contractAddress,
|
||||
"total": total,
|
||||
"spendable": spendable,
|
||||
"blockedTotal": blockedTotal,
|
||||
"pendingSpendable": pendingSpendable,
|
||||
"total": total.toJsonString(),
|
||||
"spendable": spendable.toJsonString(),
|
||||
"blockedTotal": blockedTotal.toJsonString(),
|
||||
"pendingSpendable": pendingSpendable.toJsonString(),
|
||||
});
|
||||
|
||||
factory TokenBalance.fromJson(
|
||||
|
|
Loading…
Reference in a new issue