Files
hash-wallet/cw_core/lib/unspent_transaction_output.dart
cyanandGitHub fd16a099ea fix: incorrect balance in send card (#2158)
* fix: incorrect balance in send card

* fix: ensure that all unique Unspent are used in calculation
2025-04-04 12:56:07 +02:00

30 lines
800 B
Dart

import 'package:cw_core/unspent_comparable_mixin.dart';
class Unspent with UnspentComparable {
Unspent(this.address, this.hash, this.value, this.vout, this.keyImage)
: isSending = true,
isFrozen = false,
isChange = false,
note = '';
final String address;
final String hash;
final int value;
final int vout;
final String? keyImage;
bool isChange;
bool isSending;
bool isFrozen;
int? confirmations;
String note;
bool get isP2wpkh =>
address.startsWith('bc') || address.startsWith('tb') || address.startsWith('ltc');
@override
String toString() {
return 'Unspent(address: $address, hash: $hash, value: $value, vout: $vout, keyImage: $keyImage, isSending: $isSending, isFrozen: $isFrozen, isChange: $isChange, note: $note)';
}
}