mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
Cw 830 coin control getting cleared (#1825)
* init commit * add select all button * localisation all coins * fix isSending and isFrozen state updates * fix: clean up electrum UTXOs * ui fixes * address the review comments[skip ci] * remove onPopInvoked[skip ci] --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
parent
4ca50b5e63
commit
9cd69c4ba3
40 changed files with 402 additions and 125 deletions
|
@ -1,10 +1,11 @@
|
|||
import 'package:cw_core/hive_type_ids.dart';
|
||||
import 'package:cw_core/unspent_comparable_mixin.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
|
||||
part 'unspent_coins_info.g.dart';
|
||||
|
||||
@HiveType(typeId: UnspentCoinsInfo.typeId)
|
||||
class UnspentCoinsInfo extends HiveObject {
|
||||
class UnspentCoinsInfo extends HiveObject with UnspentComparable {
|
||||
UnspentCoinsInfo({
|
||||
required this.walletId,
|
||||
required this.hash,
|
||||
|
|
27
cw_core/lib/unspent_comparable_mixin.dart
Normal file
27
cw_core/lib/unspent_comparable_mixin.dart
Normal file
|
@ -0,0 +1,27 @@
|
|||
mixin UnspentComparable {
|
||||
String get address;
|
||||
|
||||
String get hash;
|
||||
|
||||
int get value;
|
||||
|
||||
int get vout;
|
||||
|
||||
String? get keyImage;
|
||||
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) return true;
|
||||
|
||||
return other is UnspentComparable &&
|
||||
other.hash == hash &&
|
||||
other.address == address &&
|
||||
other.value == value &&
|
||||
other.vout == vout &&
|
||||
other.keyImage == keyImage;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return Object.hash(address, hash, value, vout, keyImage);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
class Unspent {
|
||||
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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue