mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-18 18:21:08 +00:00
64 lines
1.6 KiB
Dart
64 lines
1.6 KiB
Dart
/*
|
|
* This file is part of Stack Wallet.
|
|
*
|
|
* Copyright (c) 2023 Cypher Stack
|
|
* All Rights Reserved.
|
|
* The code is distributed under GPLv3 license, see LICENSE file for details.
|
|
* Generated by Cypher Stack on 2023-05-26
|
|
*
|
|
*/
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
|
import 'package:stackwallet/utilities/enums/stack_restoring_status.dart';
|
|
import 'package:stackwallet/wallets/wallet/wallet.dart';
|
|
|
|
class WalletRestoreState extends ChangeNotifier {
|
|
final String walletId;
|
|
final String walletName;
|
|
final Coin coin;
|
|
late StackRestoringStatus _restoringStatus;
|
|
Wallet? wallet;
|
|
String? address;
|
|
String? mnemonic;
|
|
String? mnemonicPassphrase;
|
|
int? height;
|
|
|
|
StackRestoringStatus get restoringState => _restoringStatus;
|
|
set restoringState(StackRestoringStatus restoringStatus) {
|
|
_restoringStatus = restoringStatus;
|
|
notifyListeners();
|
|
}
|
|
|
|
WalletRestoreState({
|
|
required this.walletId,
|
|
required this.walletName,
|
|
required this.coin,
|
|
required StackRestoringStatus restoringStatus,
|
|
this.wallet,
|
|
this.address,
|
|
this.mnemonic,
|
|
this.mnemonicPassphrase,
|
|
this.height,
|
|
}) {
|
|
_restoringStatus = restoringStatus;
|
|
}
|
|
|
|
WalletRestoreState copyWith({
|
|
StackRestoringStatus? restoringStatus,
|
|
String? address,
|
|
int? height,
|
|
}) {
|
|
return WalletRestoreState(
|
|
walletId: walletId,
|
|
walletName: walletName,
|
|
coin: coin,
|
|
restoringStatus: restoringStatus ?? _restoringStatus,
|
|
wallet: wallet,
|
|
address: this.address,
|
|
mnemonic: mnemonic,
|
|
mnemonicPassphrase: mnemonicPassphrase,
|
|
height: this.height,
|
|
);
|
|
}
|
|
}
|