mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 20:19:25 +00:00
8084f490b5
* CW-490 Use native Coin Freeze * CW-467 Code cleanup * CW-467 Fix native Code * CW-467 Extend Unspend * CW-467 Add isChange * CW-467 Minor Fixes * CW-467 Add isChange to Electrum Unspents * CW-467 Localize Change Tag * CW-467 Fix frozen balance showing on other monero wallets * CW-467 Fix frozen balance showing on other monero wallets
20 lines
660 B
Dart
20 lines
660 B
Dart
import 'package:cw_core/unspent_transaction_output.dart';
|
|
import 'package:cw_monero/api/structs/coins_info_row.dart';
|
|
|
|
class MoneroUnspent extends Unspent {
|
|
MoneroUnspent(
|
|
String address, String hash, String keyImage, int value, bool isFrozen, this.isUnlocked)
|
|
: super(address, hash, value, 0, keyImage) {
|
|
this.isFrozen = isFrozen;
|
|
}
|
|
|
|
factory MoneroUnspent.fromCoinsInfoRow(CoinsInfoRow coinsInfoRow) => MoneroUnspent(
|
|
coinsInfoRow.getAddress(),
|
|
coinsInfoRow.getHash(),
|
|
coinsInfoRow.getKeyImage(),
|
|
coinsInfoRow.amount,
|
|
coinsInfoRow.frozen == 1,
|
|
coinsInfoRow.unlocked == 1);
|
|
|
|
final bool isUnlocked;
|
|
}
|