Line data Source code
1 : import 'package:walletkit_dart/walletkit_dart.dart';
2 :
3 : class ElectrumTransactionInfo {
4 : final int height;
5 : final String hash;
6 :
7 9 : const ElectrumTransactionInfo(
8 : this.height,
9 : this.hash,
10 : );
11 :
12 9 : factory ElectrumTransactionInfo.fromJson(Map<String, dynamic> json) {
13 27 : return ElectrumTransactionInfo(json['height'], json['tx_hash']);
14 : }
15 :
16 7 : @override
17 : bool operator ==(Object other) =>
18 49 : other is ElectrumTransactionInfo && other.runtimeType == runtimeType && other.hash == hash;
19 :
20 9 : @override
21 18 : int get hashCode => hash.hashCode;
22 :
23 0 : NotAvaialableUTXOTransaction getNotAvailableUTXOTransaction(CoinEntity token) {
24 0 : return NotAvaialableUTXOTransaction(hash, height, token);
25 : }
26 : }
|