mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 20:54:33 +00:00
amount fix
This commit is contained in:
parent
bc868a7d38
commit
feabebcce5
1 changed files with 7 additions and 7 deletions
|
@ -333,19 +333,19 @@ class NanoWallet extends CoinServiceAPI with WalletCache, WalletDB, CoinControlI
|
||||||
} else if (typeString == "receive") {
|
} else if (typeString == "receive") {
|
||||||
type = TransactionType.incoming;
|
type = TransactionType.incoming;
|
||||||
}
|
}
|
||||||
var intAmount = int.parse((BigInt.parse(tx["amount"].toString()) ~/ BigInt.from(10).pow(23)).toString());
|
final amount = Amount(
|
||||||
var strAmount = jsonEncode({
|
rawValue: BigInt.parse(tx["amount"].toString()),
|
||||||
"raw": intAmount.toString(),
|
fractionDigits: coin.decimals,
|
||||||
"fractionDigits": 7,
|
);
|
||||||
});
|
|
||||||
var transaction = Transaction(
|
var transaction = Transaction(
|
||||||
walletId: walletId,
|
walletId: walletId,
|
||||||
txid: tx["hash"].toString(),
|
txid: tx["hash"].toString(),
|
||||||
timestamp: int.parse(tx["local_timestamp"].toString()),
|
timestamp: int.parse(tx["local_timestamp"].toString()),
|
||||||
type: type,
|
type: type,
|
||||||
subType: TransactionSubType.none,
|
subType: TransactionSubType.none,
|
||||||
amount: intAmount,
|
amount: 0,
|
||||||
amountString: strAmount,
|
amountString: amount.toJsonString(),
|
||||||
fee: 0,
|
fee: 0,
|
||||||
height: int.parse(tx["height"].toString()),
|
height: int.parse(tx["height"].toString()),
|
||||||
isCancelled: false,
|
isCancelled: false,
|
||||||
|
|
Loading…
Reference in a new issue