mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
show sent to self jmint transactions correctly
This commit is contained in:
parent
57839c2d18
commit
7b8f26206e
1 changed files with 12 additions and 2 deletions
|
@ -3538,11 +3538,21 @@ class FiroWallet extends CoinServiceAPI
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
final txid = txObject["txid"] as String;
|
||||||
|
|
||||||
const subType = isar_models.TransactionSubType.join;
|
const subType = isar_models.TransactionSubType.join;
|
||||||
|
|
||||||
final type = nonWalletAddressFoundInOutputs
|
final type = nonWalletAddressFoundInOutputs
|
||||||
? isar_models.TransactionType.outgoing
|
? isar_models.TransactionType.outgoing
|
||||||
: isar_models.TransactionType.incoming;
|
: (await db.isar.lelantusCoins
|
||||||
|
.where()
|
||||||
|
.walletIdEqualTo(walletId)
|
||||||
|
.filter()
|
||||||
|
.txidEqualTo(txid)
|
||||||
|
.findFirst()) ==
|
||||||
|
null
|
||||||
|
? isar_models.TransactionType.incoming
|
||||||
|
: isar_models.TransactionType.sentToSelf;
|
||||||
|
|
||||||
final amount = nonWalletAddressFoundInOutputs
|
final amount = nonWalletAddressFoundInOutputs
|
||||||
? totalOutputValue
|
? totalOutputValue
|
||||||
|
@ -3569,7 +3579,7 @@ class FiroWallet extends CoinServiceAPI
|
||||||
|
|
||||||
final tx = isar_models.Transaction(
|
final tx = isar_models.Transaction(
|
||||||
walletId: walletId,
|
walletId: walletId,
|
||||||
txid: txObject["txid"] as String,
|
txid: txid,
|
||||||
timestamp: txObject["blocktime"] as int? ??
|
timestamp: txObject["blocktime"] as int? ??
|
||||||
(DateTime.now().millisecondsSinceEpoch ~/ 1000),
|
(DateTime.now().millisecondsSinceEpoch ~/ 1000),
|
||||||
type: type,
|
type: type,
|
||||||
|
|
Loading…
Reference in a new issue