mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-10 12:54:38 +00:00
restoring original versions
This commit is contained in:
parent
b585da56ef
commit
ba2dde7564
4 changed files with 52 additions and 118 deletions
|
@ -5,50 +5,51 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: async
|
name: async
|
||||||
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
|
url: "https://pub.dartlang.org"
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.11.0"
|
version: "2.5.0"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: boolean_selector
|
name: boolean_selector
|
||||||
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
url: "https://pub.dartlang.org"
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.1.0"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: characters
|
name: characters
|
||||||
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
|
url: "https://pub.dartlang.org"
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.1.0"
|
||||||
|
charcode:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: charcode
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.2.0"
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: clock
|
name: clock
|
||||||
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
|
url: "https://pub.dartlang.org"
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.1"
|
version: "1.1.0"
|
||||||
collection:
|
collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
|
url: "https://pub.dartlang.org"
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.17.1"
|
version: "1.15.0"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
|
url: "https://pub.dartlang.org"
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.1"
|
version: "1.2.0"
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
|
@ -59,46 +60,27 @@ packages:
|
||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
js:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: js
|
|
||||||
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.6.7"
|
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
|
url: "https://pub.dartlang.org"
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.15"
|
version: "0.12.10"
|
||||||
material_color_utilities:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: material_color_utilities
|
|
||||||
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.2.0"
|
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
|
url: "https://pub.dartlang.org"
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.1"
|
version: "1.3.0"
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
|
url: "https://pub.dartlang.org"
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.3"
|
version: "1.8.0"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
|
@ -108,58 +90,58 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_span
|
name: source_span
|
||||||
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
|
url: "https://pub.dartlang.org"
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.1"
|
version: "1.8.0"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
|
url: "https://pub.dartlang.org"
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.11.0"
|
version: "1.10.0"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
|
url: "https://pub.dartlang.org"
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.1.0"
|
||||||
string_scanner:
|
string_scanner:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: string_scanner
|
name: string_scanner
|
||||||
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
url: "https://pub.dartlang.org"
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.1.0"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: term_glyph
|
name: term_glyph
|
||||||
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
url: "https://pub.dartlang.org"
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.1"
|
version: "1.2.0"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
|
url: "https://pub.dartlang.org"
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.5.1"
|
version: "0.2.19"
|
||||||
|
typed_data:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: typed_data
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.0"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
url: "https://pub.dartlang.org"
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.4"
|
version: "2.1.0"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.0.0-0 <4.0.0"
|
dart: ">=2.12.0-0.0 <3.0.0"
|
||||||
flutter: ">=1.20.0"
|
flutter: ">=1.20.0"
|
||||||
|
|
|
@ -48,7 +48,7 @@ class TextValidator extends Validator<String> {
|
||||||
|
|
||||||
final valueMatched = match(value);
|
final valueMatched = match(value);
|
||||||
final valueValidated = useAdditionalValidation != null
|
final valueValidated = useAdditionalValidation != null
|
||||||
? useAdditionalValidation!(value) && valueMatched
|
? useAdditionalValidation!(value) || valueMatched
|
||||||
: valueMatched;
|
: valueMatched;
|
||||||
|
|
||||||
return valueValidated;
|
return valueValidated;
|
||||||
|
|
|
@ -8,7 +8,6 @@ class CWHavenAccountList extends HavenAccountList {
|
||||||
@override
|
@override
|
||||||
@computed
|
@computed
|
||||||
ObservableList<Account> get accounts {
|
ObservableList<Account> get accounts {
|
||||||
debugPrint("CWHavenAccountList get accounts");
|
|
||||||
final havenWallet = _wallet as HavenWallet;
|
final havenWallet = _wallet as HavenWallet;
|
||||||
final accounts = havenWallet.walletAddresses.accountList.accounts
|
final accounts = havenWallet.walletAddresses.accountList.accounts
|
||||||
.map((acc) => Account(id: acc.id, label: acc.label))
|
.map((acc) => Account(id: acc.id, label: acc.label))
|
||||||
|
@ -18,21 +17,18 @@ class CWHavenAccountList extends HavenAccountList {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void update(Object wallet) {
|
void update(Object wallet) {
|
||||||
debugPrint("CWHavenAccountList update $wallet");
|
|
||||||
final havenWallet = wallet as HavenWallet;
|
final havenWallet = wallet as HavenWallet;
|
||||||
havenWallet.walletAddresses.accountList.update();
|
havenWallet.walletAddresses.accountList.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void refresh(Object wallet) {
|
void refresh(Object wallet) {
|
||||||
debugPrint("CWHavenAccountList refresh $wallet");
|
|
||||||
final havenWallet = wallet as HavenWallet;
|
final havenWallet = wallet as HavenWallet;
|
||||||
havenWallet.walletAddresses.accountList.refresh();
|
havenWallet.walletAddresses.accountList.refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<Account> getAll(Object wallet) {
|
List<Account> getAll(Object wallet) {
|
||||||
debugPrint("CWHavenAccountList getAll $wallet");
|
|
||||||
final havenWallet = wallet as HavenWallet;
|
final havenWallet = wallet as HavenWallet;
|
||||||
return havenWallet.walletAddresses.accountList
|
return havenWallet.walletAddresses.accountList
|
||||||
.getAll()
|
.getAll()
|
||||||
|
@ -42,7 +38,6 @@ class CWHavenAccountList extends HavenAccountList {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> addAccount(Object wallet, {required String label}) async {
|
Future<void> addAccount(Object wallet, {required String label}) async {
|
||||||
debugPrint("CWHavenAccountList addAccount $wallet $label");
|
|
||||||
final havenWallet = wallet as HavenWallet;
|
final havenWallet = wallet as HavenWallet;
|
||||||
await havenWallet.walletAddresses.accountList.addAccount(label: label);
|
await havenWallet.walletAddresses.accountList.addAccount(label: label);
|
||||||
}
|
}
|
||||||
|
@ -50,7 +45,6 @@ class CWHavenAccountList extends HavenAccountList {
|
||||||
@override
|
@override
|
||||||
Future<void> setLabelAccount(Object wallet,
|
Future<void> setLabelAccount(Object wallet,
|
||||||
{required int accountIndex, required String label}) async {
|
{required int accountIndex, required String label}) async {
|
||||||
debugPrint("CWHavenAccountList setLabelAccount $wallet $accountIndex $label");
|
|
||||||
final havenWallet = wallet as HavenWallet;
|
final havenWallet = wallet as HavenWallet;
|
||||||
await havenWallet.walletAddresses.accountList
|
await havenWallet.walletAddresses.accountList
|
||||||
.setLabelAccount(accountIndex: accountIndex, label: label);
|
.setLabelAccount(accountIndex: accountIndex, label: label);
|
||||||
|
@ -65,7 +59,6 @@ class CWHavenSubaddressList extends MoneroSubaddressList {
|
||||||
@override
|
@override
|
||||||
@computed
|
@computed
|
||||||
ObservableList<Subaddress> get subaddresses {
|
ObservableList<Subaddress> get subaddresses {
|
||||||
debugPrint("CWHavenSubaddressList get subaddresses");
|
|
||||||
final havenWallet = _wallet as HavenWallet;
|
final havenWallet = _wallet as HavenWallet;
|
||||||
final subAddresses = havenWallet.walletAddresses.subaddressList.subaddresses
|
final subAddresses = havenWallet.walletAddresses.subaddressList.subaddresses
|
||||||
.map((sub) => Subaddress(id: sub.id, address: sub.address, label: sub.label))
|
.map((sub) => Subaddress(id: sub.id, address: sub.address, label: sub.label))
|
||||||
|
@ -75,21 +68,18 @@ class CWHavenSubaddressList extends MoneroSubaddressList {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void update(Object wallet, {required int accountIndex}) {
|
void update(Object wallet, {required int accountIndex}) {
|
||||||
debugPrint("CWHavenSubaddressList update $wallet $accountIndex");
|
|
||||||
final havenWallet = wallet as HavenWallet;
|
final havenWallet = wallet as HavenWallet;
|
||||||
havenWallet.walletAddresses.subaddressList.update(accountIndex: accountIndex);
|
havenWallet.walletAddresses.subaddressList.update(accountIndex: accountIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void refresh(Object wallet, {required int accountIndex}) {
|
void refresh(Object wallet, {required int accountIndex}) {
|
||||||
debugPrint("CWHavenSubaddressList refresh $wallet $accountIndex");
|
|
||||||
final havenWallet = wallet as HavenWallet;
|
final havenWallet = wallet as HavenWallet;
|
||||||
havenWallet.walletAddresses.subaddressList.refresh(accountIndex: accountIndex);
|
havenWallet.walletAddresses.subaddressList.refresh(accountIndex: accountIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<Subaddress> getAll(Object wallet) {
|
List<Subaddress> getAll(Object wallet) {
|
||||||
debugPrint("CWHavenSubaddressList getAll $wallet");
|
|
||||||
final havenWallet = wallet as HavenWallet;
|
final havenWallet = wallet as HavenWallet;
|
||||||
return havenWallet.walletAddresses.subaddressList
|
return havenWallet.walletAddresses.subaddressList
|
||||||
.getAll()
|
.getAll()
|
||||||
|
@ -100,7 +90,6 @@ class CWHavenSubaddressList extends MoneroSubaddressList {
|
||||||
@override
|
@override
|
||||||
Future<void> addSubaddress(Object wallet,
|
Future<void> addSubaddress(Object wallet,
|
||||||
{required int accountIndex, required String label}) async {
|
{required int accountIndex, required String label}) async {
|
||||||
debugPrint("CWHavenSubaddressList addSubaddress $wallet $accountIndex $label");
|
|
||||||
final havenWallet = wallet as HavenWallet;
|
final havenWallet = wallet as HavenWallet;
|
||||||
await havenWallet.walletAddresses.subaddressList
|
await havenWallet.walletAddresses.subaddressList
|
||||||
.addSubaddress(accountIndex: accountIndex, label: label);
|
.addSubaddress(accountIndex: accountIndex, label: label);
|
||||||
|
@ -109,7 +98,6 @@ class CWHavenSubaddressList extends MoneroSubaddressList {
|
||||||
@override
|
@override
|
||||||
Future<void> setLabelSubaddress(Object wallet,
|
Future<void> setLabelSubaddress(Object wallet,
|
||||||
{required int accountIndex, required int addressIndex, required String label}) async {
|
{required int accountIndex, required int addressIndex, required String label}) async {
|
||||||
debugPrint("CWHavenSubaddressList setLabelSubaddress $wallet $accountIndex $addressIndex $label");
|
|
||||||
final havenWallet = wallet as HavenWallet;
|
final havenWallet = wallet as HavenWallet;
|
||||||
await havenWallet.walletAddresses.subaddressList
|
await havenWallet.walletAddresses.subaddressList
|
||||||
.setLabelSubaddress(accountIndex: accountIndex, addressIndex: addressIndex, label: label);
|
.setLabelSubaddress(accountIndex: accountIndex, addressIndex: addressIndex, label: label);
|
||||||
|
@ -124,7 +112,6 @@ class CWHavenWalletDetails extends HavenWalletDetails {
|
||||||
@computed
|
@computed
|
||||||
@override
|
@override
|
||||||
Account get account {
|
Account get account {
|
||||||
debugPrint("CWHavenWalletDetails get account");
|
|
||||||
final havenWallet = _wallet as HavenWallet;
|
final havenWallet = _wallet as HavenWallet;
|
||||||
final acc = havenWallet.walletAddresses.account as monero_account.Account;
|
final acc = havenWallet.walletAddresses.account as monero_account.Account;
|
||||||
return Account(id: acc.id, label: acc.label);
|
return Account(id: acc.id, label: acc.label);
|
||||||
|
@ -133,7 +120,6 @@ class CWHavenWalletDetails extends HavenWalletDetails {
|
||||||
@computed
|
@computed
|
||||||
@override
|
@override
|
||||||
HavenBalance get balance {
|
HavenBalance get balance {
|
||||||
debugPrint("CWHavenWalletDetails get balance");
|
|
||||||
final havenWallet = _wallet as HavenWallet;
|
final havenWallet = _wallet as HavenWallet;
|
||||||
final balance = havenWallet.balance;
|
final balance = havenWallet.balance;
|
||||||
throw Exception('Unimplemented');
|
throw Exception('Unimplemented');
|
||||||
|
@ -146,62 +132,48 @@ class CWHavenWalletDetails extends HavenWalletDetails {
|
||||||
class CWHaven extends Haven {
|
class CWHaven extends Haven {
|
||||||
@override
|
@override
|
||||||
HavenAccountList getAccountList(Object wallet) {
|
HavenAccountList getAccountList(Object wallet) {
|
||||||
debugPrint("CWHaven getAccountList $wallet");
|
|
||||||
return CWHavenAccountList(wallet);
|
return CWHavenAccountList(wallet);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
MoneroSubaddressList getSubaddressList(Object wallet) {
|
MoneroSubaddressList getSubaddressList(Object wallet) {
|
||||||
debugPrint("CWHaven getSubaddressList $wallet");
|
|
||||||
return CWHavenSubaddressList(wallet);
|
return CWHavenSubaddressList(wallet);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TransactionHistoryBase getTransactionHistory(Object wallet) {
|
TransactionHistoryBase getTransactionHistory(Object wallet) {
|
||||||
debugPrint("CWHaven getTransactionHistory $wallet");
|
|
||||||
final havenWallet = wallet as HavenWallet;
|
final havenWallet = wallet as HavenWallet;
|
||||||
return havenWallet.transactionHistory;
|
return havenWallet.transactionHistory;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
HavenWalletDetails getMoneroWalletDetails(Object wallet) {
|
HavenWalletDetails getMoneroWalletDetails(Object wallet) {
|
||||||
debugPrint("CWHaven getMoneroWalletDetails $wallet");
|
|
||||||
return CWHavenWalletDetails(wallet);
|
return CWHavenWalletDetails(wallet);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int getHeightByDate({required DateTime date}) {
|
int getHeightByDate({required DateTime date}) => getHavenHeightByDate(date: date);
|
||||||
debugPrint("CWHaven getHeightByDate $date");
|
|
||||||
return getHavenHeightByDate(date: date);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<int> getCurrentHeight() {
|
Future<int> getCurrentHeight() => getHavenCurrentHeight();
|
||||||
debugPrint("CWHaven getCurrentHeight");
|
|
||||||
return getHavenCurrentHeight();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TransactionPriority getDefaultTransactionPriority() {
|
TransactionPriority getDefaultTransactionPriority() {
|
||||||
debugPrint("CWHaven getDefaultTransactionPriority");
|
|
||||||
return MoneroTransactionPriority.automatic;
|
return MoneroTransactionPriority.automatic;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TransactionPriority deserializeMoneroTransactionPriority({required int raw}) {
|
TransactionPriority deserializeMoneroTransactionPriority({required int raw}) {
|
||||||
debugPrint("CWHaven deserializeMoneroTransactionPriority $raw");
|
|
||||||
return MoneroTransactionPriority.deserialize(raw: raw);
|
return MoneroTransactionPriority.deserialize(raw: raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<TransactionPriority> getTransactionPriorities() {
|
List<TransactionPriority> getTransactionPriorities() {
|
||||||
debugPrint("CWHaven getTransactionPriorities");
|
|
||||||
return MoneroTransactionPriority.all;
|
return MoneroTransactionPriority.all;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<String> getMoneroWordList(String language) {
|
List<String> getMoneroWordList(String language) {
|
||||||
debugPrint("CWHaven getMoneroWordList $language");
|
|
||||||
switch (language.toLowerCase()) {
|
switch (language.toLowerCase()) {
|
||||||
case 'english':
|
case 'english':
|
||||||
return EnglishMnemonics.words;
|
return EnglishMnemonics.words;
|
||||||
|
@ -237,7 +209,6 @@ class CWHaven extends Haven {
|
||||||
required String password,
|
required String password,
|
||||||
required String language,
|
required String language,
|
||||||
required int height}) {
|
required int height}) {
|
||||||
debugPrint("CWHaven createHavenRestoreWalletFromKeysCredentials $name $spendKey $viewKey $address $password $language $height");
|
|
||||||
return HavenRestoreWalletFromKeysCredentials(
|
return HavenRestoreWalletFromKeysCredentials(
|
||||||
name: name,
|
name: name,
|
||||||
spendKey: spendKey,
|
spendKey: spendKey,
|
||||||
|
@ -254,7 +225,6 @@ class CWHaven extends Haven {
|
||||||
required String password,
|
required String password,
|
||||||
required int height,
|
required int height,
|
||||||
required String mnemonic}) {
|
required String mnemonic}) {
|
||||||
debugPrint("CWHaven createHavenRestoreWalletFromSeedCredentials $name $password $height $mnemonic");
|
|
||||||
return HavenRestoreWalletFromSeedCredentials(
|
return HavenRestoreWalletFromSeedCredentials(
|
||||||
name: name, password: password, height: height, mnemonic: mnemonic);
|
name: name, password: password, height: height, mnemonic: mnemonic);
|
||||||
}
|
}
|
||||||
|
@ -262,13 +232,11 @@ class CWHaven extends Haven {
|
||||||
@override
|
@override
|
||||||
WalletCredentials createHavenNewWalletCredentials(
|
WalletCredentials createHavenNewWalletCredentials(
|
||||||
{required String name, required String language, String? password}) {
|
{required String name, required String language, String? password}) {
|
||||||
debugPrint("CWHaven createHavenNewWalletCredentials $name $language $password");
|
|
||||||
return HavenNewWalletCredentials(name: name, password: password, language: language);
|
return HavenNewWalletCredentials(name: name, password: password, language: language);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Map<String, String> getKeys(Object wallet) {
|
Map<String, String> getKeys(Object wallet) {
|
||||||
debugPrint("CWHaven getKeys $wallet");
|
|
||||||
final havenWallet = wallet as HavenWallet;
|
final havenWallet = wallet as HavenWallet;
|
||||||
final keys = havenWallet.keys;
|
final keys = havenWallet.keys;
|
||||||
return <String, String>{
|
return <String, String>{
|
||||||
|
@ -284,7 +252,6 @@ class CWHaven extends Haven {
|
||||||
{required List<Output> outputs,
|
{required List<Output> outputs,
|
||||||
required TransactionPriority priority,
|
required TransactionPriority priority,
|
||||||
required String assetType}) {
|
required String assetType}) {
|
||||||
debugPrint("CWHaven createHavenTransactionCreationCredentials $outputs $priority $assetType");
|
|
||||||
return HavenTransactionCreationCredentials(
|
return HavenTransactionCreationCredentials(
|
||||||
outputs: outputs
|
outputs: outputs
|
||||||
.map((out) => OutputInfo(
|
.map((out) => OutputInfo(
|
||||||
|
@ -303,25 +270,21 @@ class CWHaven extends Haven {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String formatterMoneroAmountToString({required int amount}) {
|
String formatterMoneroAmountToString({required int amount}) {
|
||||||
debugPrint("CWHaven formatterMoneroAmountToString $amount");
|
|
||||||
return moneroAmountToString(amount: amount);
|
return moneroAmountToString(amount: amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
double formatterMoneroAmountToDouble({required int amount}) {
|
double formatterMoneroAmountToDouble({required int amount}) {
|
||||||
debugPrint("CWHaven formatterMoneroAmountToDouble $amount");
|
|
||||||
return moneroAmountToDouble(amount: amount);
|
return moneroAmountToDouble(amount: amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int formatterMoneroParseAmount({required String amount}) {
|
int formatterMoneroParseAmount({required String amount}) {
|
||||||
debugPrint("CWHaven formatterMoneroParseAmount $amount");
|
|
||||||
return moneroParseAmount(amount: amount);
|
return moneroParseAmount(amount: amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Account getCurrentAccount(Object wallet) {
|
Account getCurrentAccount(Object wallet) {
|
||||||
debugPrint("CWHaven getCurrentAccount $wallet");
|
|
||||||
final havenWallet = wallet as HavenWallet;
|
final havenWallet = wallet as HavenWallet;
|
||||||
final acc = havenWallet.walletAddresses.account as monero_account.Account;
|
final acc = havenWallet.walletAddresses.account as monero_account.Account;
|
||||||
return Account(id: acc.id, label: acc.label);
|
return Account(id: acc.id, label: acc.label);
|
||||||
|
@ -329,49 +292,40 @@ class CWHaven extends Haven {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void setCurrentAccount(Object wallet, int id, String label) {
|
void setCurrentAccount(Object wallet, int id, String label) {
|
||||||
debugPrint("CWHaven setCurrentAccount $wallet $id $label");
|
|
||||||
final havenWallet = wallet as HavenWallet;
|
final havenWallet = wallet as HavenWallet;
|
||||||
havenWallet.walletAddresses.account = monero_account.Account(id: id, label: label);
|
havenWallet.walletAddresses.account = monero_account.Account(id: id, label: label);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onStartup() {
|
void onStartup() {
|
||||||
debugPrint("CWHaven onStartup");
|
|
||||||
monero_wallet_api.onStartup();
|
monero_wallet_api.onStartup();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int getTransactionInfoAccountId(TransactionInfo tx) {
|
int getTransactionInfoAccountId(TransactionInfo tx) {
|
||||||
debugPrint("CWHaven getTransactionInfoAccountId $tx");
|
|
||||||
final havenTransactionInfo = tx as HavenTransactionInfo;
|
final havenTransactionInfo = tx as HavenTransactionInfo;
|
||||||
return havenTransactionInfo.accountIndex;
|
return havenTransactionInfo.accountIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
WalletService createHavenWalletService(Box<WalletInfo> walletInfoSource) {
|
WalletService createHavenWalletService(Box<WalletInfo> walletInfoSource) {
|
||||||
debugPrint("CWHaven createHavenWalletService $walletInfoSource");
|
|
||||||
return HavenWalletService(walletInfoSource);
|
return HavenWalletService(walletInfoSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String getTransactionAddress(Object wallet, int accountIndex, int addressIndex) {
|
String getTransactionAddress(Object wallet, int accountIndex, int addressIndex) {
|
||||||
debugPrint("CWHaven getTransactionAddress $wallet $accountIndex $addressIndex");
|
|
||||||
final havenWallet = wallet as HavenWallet;
|
final havenWallet = wallet as HavenWallet;
|
||||||
return havenWallet.getTransactionAddress(accountIndex, addressIndex);
|
return havenWallet.getTransactionAddress(accountIndex, addressIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
CryptoCurrency assetOfTransaction(TransactionInfo tx) {
|
CryptoCurrency assetOfTransaction(TransactionInfo tx) {
|
||||||
debugPrint("CWHaven assetOfTransaction $tx");
|
|
||||||
final transaction = tx as HavenTransactionInfo;
|
final transaction = tx as HavenTransactionInfo;
|
||||||
final asset = CryptoCurrency.fromString(transaction.assetType);
|
final asset = CryptoCurrency.fromString(transaction.assetType);
|
||||||
return asset;
|
return asset;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<AssetRate> getAssetRate() {
|
List<AssetRate> getAssetRate() =>
|
||||||
final result = getRate().map((rate) => AssetRate(rate.getAssetType(), rate.getRate())).toList();
|
getRate().map((rate) => AssetRate(rate.getAssetType(), rate.getRate())).toList();
|
||||||
debugPrint("CWHaven getAssetRate: ${result.map((e) => '{${e.asset}: ${e.rate}}').join(" ")}");
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,8 +211,6 @@ class WalletRestorePage extends BasePage {
|
||||||
final seedWords =
|
final seedWords =
|
||||||
walletRestoreFromSeedFormKey.currentState!.seedWidgetStateKey.currentState!.text.split(' ');
|
walletRestoreFromSeedFormKey.currentState!.seedWidgetStateKey.currentState!.text.split(' ');
|
||||||
|
|
||||||
if (walletRestoreViewModel.type == WalletType.zano) return true;
|
|
||||||
|
|
||||||
if ((walletRestoreViewModel.type == WalletType.monero ||
|
if ((walletRestoreViewModel.type == WalletType.monero ||
|
||||||
walletRestoreViewModel.type == WalletType.haven) &&
|
walletRestoreViewModel.type == WalletType.haven) &&
|
||||||
seedWords.length != WalletRestoreViewModelBase.moneroSeedMnemonicLength) {
|
seedWords.length != WalletRestoreViewModelBase.moneroSeedMnemonicLength) {
|
||||||
|
|
Loading…
Reference in a new issue