mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 03:49:22 +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;
|
||||
|
||||
final type = nonWalletAddressFoundInOutputs
|
||||
? 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
|
||||
? totalOutputValue
|
||||
|
@ -3569,7 +3579,7 @@ class FiroWallet extends CoinServiceAPI
|
|||
|
||||
final tx = isar_models.Transaction(
|
||||
walletId: walletId,
|
||||
txid: txObject["txid"] as String,
|
||||
txid: txid,
|
||||
timestamp: txObject["blocktime"] as int? ??
|
||||
(DateTime.now().millisecondsSinceEpoch ~/ 1000),
|
||||
type: type,
|
||||
|
|
Loading…
Reference in a new issue