do not put a tempTx for particl due to miss matching txids

This commit is contained in:
julian 2024-01-16 19:18:01 -06:00
parent 33e0059ea9
commit c29e1f0307

View file

@ -444,22 +444,24 @@ class ParticlWallet extends Bip39HDWallet
return txData.copyWith(
raw: hexString,
vSize: vSize,
tempTx: TransactionV2(
walletId: walletId,
blockHash: null,
hash: builtTx.getId(),
txid: builtTx.getId(),
height: null,
timestamp: DateTime.timestamp().millisecondsSinceEpoch ~/ 1000,
inputs: List.unmodifiable(tempInputs),
outputs: List.unmodifiable(tempOutputs),
version: version,
type: tempOutputs.map((e) => e.walletOwns).fold(true, (p, e) => p &= e)
? TransactionType.sentToSelf
: TransactionType.outgoing,
subType: TransactionSubType.none,
otherData: null,
),
tempTx: null,
// builtTx.getId() requires an isParticl flag as well but the lib does not support that yet
// tempTx: TransactionV2(
// walletId: walletId,
// blockHash: null,
// hash: builtTx.getId(),
// txid: builtTx.getId(),
// height: null,
// timestamp: DateTime.timestamp().millisecondsSinceEpoch ~/ 1000,
// inputs: List.unmodifiable(tempInputs),
// outputs: List.unmodifiable(tempOutputs),
// version: version,
// type: tempOutputs.map((e) => e.walletOwns).fold(true, (p, e) => p &= e)
// ? TransactionType.sentToSelf
// : TransactionType.outgoing,
// subType: TransactionSubType.none,
// otherData: null,
// ),
);
}