mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-31 19:39:06 +00:00
refactor: show only lovelaces
This commit is contained in:
parent
e3d040b9b8
commit
02dc5c9416
1 changed files with 5 additions and 3 deletions
|
@ -476,13 +476,13 @@ class CardanoWallet extends Bip39Wallet<Cardano> {
|
|||
if (txType == isar.TransactionType.incoming) {
|
||||
receiverAddr = currentAddr;
|
||||
for (final output in utxoInfo.outputs) {
|
||||
if (output.address == currentAddr) {
|
||||
if (output.address == currentAddr && output.amount.first.unit == "lovelace") {
|
||||
amount += int.parse(output.amount.first.quantity);
|
||||
}
|
||||
}
|
||||
} else if (txType == isar.TransactionType.outgoing) {
|
||||
for (final output in utxoInfo.outputs) {
|
||||
if (output.address != currentAddr) {
|
||||
if (output.address != currentAddr && output.amount.first.unit == "lovelace") {
|
||||
receiverAddr = output.address;
|
||||
amount += int.parse(output.amount.first.quantity);
|
||||
}
|
||||
|
@ -490,7 +490,9 @@ class CardanoWallet extends Bip39Wallet<Cardano> {
|
|||
} else if (txType == isar.TransactionType.sentToSelf) {
|
||||
receiverAddr = currentAddr;
|
||||
for (final output in utxoInfo.outputs) {
|
||||
amount += int.parse(output.amount.first.quantity);
|
||||
if (output.amount.first.unit == "lovelace") {
|
||||
amount += int.parse(output.amount.first.quantity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue