mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-12 05:44:56 +00:00
Move monero related out from haven
This commit is contained in:
parent
37f8823a2f
commit
cf6eeae055
30 changed files with 73 additions and 75 deletions
|
@ -1,5 +1,3 @@
|
||||||
import 'package:cw_monero/api/structs/account_row.dart';
|
|
||||||
|
|
||||||
class Account {
|
class Account {
|
||||||
Account({this.id, this.label});
|
Account({this.id, this.label});
|
||||||
|
|
||||||
|
@ -7,10 +5,6 @@ class Account {
|
||||||
: this.id = map['id'] == null ? 0 : int.parse(map['id'] as String),
|
: this.id = map['id'] == null ? 0 : int.parse(map['id'] as String),
|
||||||
this.label = (map['label'] ?? '') as String;
|
this.label = (map['label'] ?? '') as String;
|
||||||
|
|
||||||
Account.fromRow(AccountRow row)
|
|
||||||
: this.id = row.getId(),
|
|
||||||
this.label = row.getLabel();
|
|
||||||
|
|
||||||
final int id;
|
final int id;
|
||||||
final String label;
|
final String label;
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
import 'package:cw_core/balance.dart';
|
import 'package:cw_core/balance.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:cw_monero/monero_amount_format.dart';
|
import 'package:cw_core/monero_amount_format.dart';
|
||||||
|
|
||||||
class MoneroBalance extends Balance {
|
class MoneroBalance extends Balance {
|
||||||
MoneroBalance({@required this.fullBalance, @required this.unlockedBalance})
|
MoneroBalance({@required this.fullBalance, @required this.unlockedBalance})
|
12
cw_core/lib/subaddress.dart
Normal file
12
cw_core/lib/subaddress.dart
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
class Subaddress {
|
||||||
|
Subaddress({this.id, this.address, this.label});
|
||||||
|
|
||||||
|
Subaddress.fromMap(Map map)
|
||||||
|
: this.id = map['id'] == null ? 0 : int.parse(map['id'] as String),
|
||||||
|
this.address = (map['address'] ?? '') as String,
|
||||||
|
this.label = (map['label'] ?? '') as String;
|
||||||
|
|
||||||
|
final int id;
|
||||||
|
final String address;
|
||||||
|
final String label;
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
import 'package:cw_monero/account.dart';
|
import 'package:cw_core/account.dart';
|
||||||
import 'package:cw_core/account_list.dart';
|
import 'package:cw_core/account_list.dart';
|
||||||
import 'package:cw_haven/api/account_list.dart' as account_list;
|
import 'package:cw_haven/api/account_list.dart' as account_list;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:cw_core/crypto_currency.dart';
|
import 'package:cw_core/crypto_currency.dart';
|
||||||
import 'package:cw_monero/monero_balance.dart';
|
import 'package:cw_core/monero_balance.dart';
|
||||||
import 'package:cw_haven/api/balance_list.dart';
|
import 'package:cw_haven/api/balance_list.dart';
|
||||||
import 'package:cw_haven/api/structs/haven_balance_row.dart';
|
import 'package:cw_haven/api/structs/haven_balance_row.dart';
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import 'package:cw_haven/api/structs/subaddress_row.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
import 'package:cw_haven/api/subaddress_list.dart' as subaddress_list;
|
import 'package:cw_haven/api/subaddress_list.dart' as subaddress_list;
|
||||||
import 'package:cw_monero/subaddress.dart';
|
import 'package:cw_core/subaddress.dart';
|
||||||
|
|
||||||
part 'haven_subaddress_list.g.dart';
|
part 'haven_subaddress_list.g.dart';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import 'package:cw_monero/monero_transaction_priority.dart';
|
import 'package:cw_core/monero_transaction_priority.dart';
|
||||||
import 'package:cw_core/output_info.dart';
|
import 'package:cw_core/output_info.dart';
|
||||||
|
|
||||||
class HavenTransactionCreationCredentials {
|
class HavenTransactionCreationCredentials {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:cw_core/transaction_info.dart';
|
import 'package:cw_core/transaction_info.dart';
|
||||||
import 'package:cw_monero/monero_amount_format.dart';
|
import 'package:cw_core/monero_amount_format.dart';
|
||||||
import 'package:cw_haven/api/structs/transaction_info_row.dart';
|
import 'package:cw_haven/api/structs/transaction_info_row.dart';
|
||||||
import 'package:cw_core/parseBoolFromString.dart';
|
import 'package:cw_core/parseBoolFromString.dart';
|
||||||
import 'package:cw_core/transaction_direction.dart';
|
import 'package:cw_core/transaction_direction.dart';
|
||||||
|
|
|
@ -2,11 +2,11 @@ import 'dart:async';
|
||||||
import 'package:cw_core/crypto_currency.dart';
|
import 'package:cw_core/crypto_currency.dart';
|
||||||
import 'package:cw_core/transaction_priority.dart';
|
import 'package:cw_core/transaction_priority.dart';
|
||||||
import 'package:cw_haven/haven_transaction_creation_credentials.dart';
|
import 'package:cw_haven/haven_transaction_creation_credentials.dart';
|
||||||
import 'package:cw_monero/monero_amount_format.dart';
|
import 'package:cw_core/monero_amount_format.dart';
|
||||||
import 'package:cw_monero/monero_transaction_creation_exception.dart';
|
import 'package:cw_haven/haven_transaction_creation_exception.dart';
|
||||||
import 'package:cw_haven/haven_transaction_info.dart';
|
import 'package:cw_haven/haven_transaction_info.dart';
|
||||||
import 'package:cw_haven/haven_wallet_addresses.dart';
|
import 'package:cw_haven/haven_wallet_addresses.dart';
|
||||||
import 'package:cw_monero/monero_wallet_utils.dart';
|
import 'package:cw_core/monero_wallet_utils.dart';
|
||||||
import 'package:cw_haven/api/structs/pending_transaction.dart';
|
import 'package:cw_haven/api/structs/pending_transaction.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
|
@ -17,16 +17,16 @@ import 'package:cw_haven/api/wallet.dart' as haven_wallet;
|
||||||
import 'package:cw_haven/api/transaction_history.dart' as transaction_history;
|
import 'package:cw_haven/api/transaction_history.dart' as transaction_history;
|
||||||
import 'package:cw_haven/api/monero_output.dart';
|
import 'package:cw_haven/api/monero_output.dart';
|
||||||
import 'package:cw_haven/pending_haven_transaction.dart';
|
import 'package:cw_haven/pending_haven_transaction.dart';
|
||||||
import 'package:cw_monero/monero_wallet_keys.dart';
|
import 'package:cw_core/monero_wallet_keys.dart';
|
||||||
import 'package:cw_monero/monero_balance.dart';
|
import 'package:cw_core/monero_balance.dart';
|
||||||
import 'package:cw_haven/haven_transaction_history.dart';
|
import 'package:cw_haven/haven_transaction_history.dart';
|
||||||
import 'package:cw_monero/account.dart';
|
import 'package:cw_core/account.dart';
|
||||||
import 'package:cw_core/pending_transaction.dart';
|
import 'package:cw_core/pending_transaction.dart';
|
||||||
import 'package:cw_core/wallet_base.dart';
|
import 'package:cw_core/wallet_base.dart';
|
||||||
import 'package:cw_core/sync_status.dart';
|
import 'package:cw_core/sync_status.dart';
|
||||||
import 'package:cw_core/wallet_info.dart';
|
import 'package:cw_core/wallet_info.dart';
|
||||||
import 'package:cw_core/node.dart';
|
import 'package:cw_core/node.dart';
|
||||||
import 'package:cw_monero/monero_transaction_priority.dart';
|
import 'package:cw_core/monero_transaction_priority.dart';
|
||||||
import 'package:cw_haven/haven_balance.dart';
|
import 'package:cw_haven/haven_balance.dart';
|
||||||
|
|
||||||
part 'haven_wallet.g.dart';
|
part 'haven_wallet.g.dart';
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import 'package:cw_core/wallet_addresses_with_account.dart';
|
import 'package:cw_core/wallet_addresses_with_account.dart';
|
||||||
import 'package:cw_core/wallet_info.dart';
|
import 'package:cw_core/wallet_info.dart';
|
||||||
import 'package:cw_monero/account.dart';
|
import 'package:cw_core/account.dart';
|
||||||
import 'package:cw_haven/haven_account_list.dart';
|
import 'package:cw_haven/haven_account_list.dart';
|
||||||
import 'package:cw_haven/haven_subaddress_list.dart';
|
import 'package:cw_haven/haven_subaddress_list.dart';
|
||||||
import 'package:cw_monero/subaddress.dart';
|
import 'package:cw_core/subaddress.dart';
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
|
|
||||||
part 'haven_wallet_addresses.g.dart';
|
part 'haven_wallet_addresses.g.dart';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:cw_core/wallet_base.dart';
|
import 'package:cw_core/wallet_base.dart';
|
||||||
import 'package:cw_monero/monero_wallet_utils.dart';
|
import 'package:cw_core/monero_wallet_utils.dart';
|
||||||
import 'package:hive/hive.dart';
|
import 'package:hive/hive.dart';
|
||||||
import 'package:cw_haven/api/wallet_manager.dart' as haven_wallet_manager;
|
import 'package:cw_haven/api/wallet_manager.dart' as haven_wallet_manager;
|
||||||
import 'package:cw_haven/api/wallet.dart' as haven_wallet;
|
import 'package:cw_haven/api/wallet.dart' as haven_wallet;
|
||||||
|
|
8
cw_haven/lib/monero_transaction_creation_exception.dart
Normal file
8
cw_haven/lib/monero_transaction_creation_exception.dart
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
class HavenTransactionCreationException implements Exception {
|
||||||
|
HavenTransactionCreationException(this.message);
|
||||||
|
|
||||||
|
final String message;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => message;
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
//import 'package:cake_wallet/store/dashboard/fiat_conversion_store.dart';
|
//import 'package:cake_wallet/store/dashboard/fiat_conversion_store.dart';
|
||||||
import 'package:cw_core/crypto_currency.dart';
|
import 'package:cw_core/crypto_currency.dart';
|
||||||
import 'package:cw_monero/monero_amount_format.dart';
|
import 'package:cw_core/monero_amount_format.dart';
|
||||||
import 'package:cw_haven/balance_list.dart';
|
import 'package:cw_haven/balance_list.dart';
|
||||||
|
|
||||||
//Future<void> updateHavenRate(FiatConversionStore fiatConversionStore) async {
|
//Future<void> updateHavenRate(FiatConversionStore fiatConversionStore) async {
|
||||||
|
|
|
@ -20,8 +20,6 @@ dependencies:
|
||||||
intl: ^0.17.0
|
intl: ^0.17.0
|
||||||
cw_core:
|
cw_core:
|
||||||
path: ../cw_core
|
path: ../cw_core
|
||||||
cw_monero:
|
|
||||||
path: ../cw_monero
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
import 'package:cw_monero/account.dart';
|
import 'package:cw_core/account.dart';
|
||||||
import 'package:cw_monero/api/account_list.dart' as account_list;
|
import 'package:cw_monero/api/account_list.dart' as account_list;
|
||||||
|
|
||||||
part 'monero_account_list.g.dart';
|
part 'monero_account_list.g.dart';
|
||||||
|
@ -44,7 +44,9 @@ abstract class MoneroAccountListBase with Store {
|
||||||
|
|
||||||
List<Account> getAll() => account_list
|
List<Account> getAll() => account_list
|
||||||
.getAllAccount()
|
.getAllAccount()
|
||||||
.map((accountRow) => Account.fromRow(accountRow))
|
.map((accountRow) => Account(
|
||||||
|
id: accountRow.getId(),
|
||||||
|
label: row.getLabel()))
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
Future addAccount({String label}) async {
|
Future addAccount({String label}) async {
|
||||||
|
|
|
@ -2,7 +2,7 @@ import 'package:cw_monero/api/structs/subaddress_row.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
import 'package:cw_monero/api/subaddress_list.dart' as subaddress_list;
|
import 'package:cw_monero/api/subaddress_list.dart' as subaddress_list;
|
||||||
import 'package:cw_monero/subaddress.dart';
|
import 'package:cw_core/subaddress.dart';
|
||||||
|
|
||||||
part 'monero_subaddress_list.g.dart';
|
part 'monero_subaddress_list.g.dart';
|
||||||
|
|
||||||
|
@ -49,7 +49,13 @@ abstract class MoneroSubaddressListBase with Store {
|
||||||
}
|
}
|
||||||
|
|
||||||
return subaddresses
|
return subaddresses
|
||||||
.map((subaddressRow) => Subaddress.fromRow(subaddressRow))
|
.map((subaddressRow) => Subaddress(
|
||||||
|
id: subaddressRow.getId(),
|
||||||
|
address: subaddressRow.getAddress(),
|
||||||
|
label: subaddressRow.getId() == 0 &&
|
||||||
|
subaddressRow.getLabel().toLowerCase() == 'Primary account'.toLowerCase()
|
||||||
|
? 'Primary address'
|
||||||
|
: subaddressRow.getLabel()))
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import 'package:cw_monero/monero_transaction_priority.dart';
|
import 'package:cw_core/monero_transaction_priority.dart';
|
||||||
import 'package:cw_core/output_info.dart';
|
import 'package:cw_core/output_info.dart';
|
||||||
|
|
||||||
class MoneroTransactionCreationCredentials {
|
class MoneroTransactionCreationCredentials {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:cw_core/transaction_info.dart';
|
import 'package:cw_core/transaction_info.dart';
|
||||||
import 'package:cw_monero/monero_amount_format.dart';
|
import 'package:cw_core/monero_amount_format.dart';
|
||||||
import 'package:cw_monero/api/structs/transaction_info_row.dart';
|
import 'package:cw_monero/api/structs/transaction_info_row.dart';
|
||||||
import 'package:cw_core/parseBoolFromString.dart';
|
import 'package:cw_core/parseBoolFromString.dart';
|
||||||
import 'package:cw_core/transaction_direction.dart';
|
import 'package:cw_core/transaction_direction.dart';
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:cw_core/transaction_priority.dart';
|
import 'package:cw_core/transaction_priority.dart';
|
||||||
import 'package:cw_monero/monero_amount_format.dart';
|
import 'package:cw_core/monero_amount_format.dart';
|
||||||
import 'package:cw_monero/monero_transaction_creation_exception.dart';
|
import 'package:cw_monero/monero_transaction_creation_exception.dart';
|
||||||
import 'package:cw_monero/monero_transaction_info.dart';
|
import 'package:cw_monero/monero_transaction_info.dart';
|
||||||
import 'package:cw_monero/monero_wallet_addresses.dart';
|
import 'package:cw_monero/monero_wallet_addresses.dart';
|
||||||
import 'package:cw_monero/monero_wallet_utils.dart';
|
import 'package:cw_core/monero_wallet_utils.dart';
|
||||||
import 'package:cw_monero/api/structs/pending_transaction.dart';
|
import 'package:cw_monero/api/structs/pending_transaction.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
|
@ -16,16 +16,16 @@ import 'package:cw_monero/api/transaction_history.dart' as transaction_history;
|
||||||
import 'package:cw_monero/api/monero_output.dart';
|
import 'package:cw_monero/api/monero_output.dart';
|
||||||
import 'package:cw_monero/monero_transaction_creation_credentials.dart';
|
import 'package:cw_monero/monero_transaction_creation_credentials.dart';
|
||||||
import 'package:cw_monero/pending_monero_transaction.dart';
|
import 'package:cw_monero/pending_monero_transaction.dart';
|
||||||
import 'package:cw_monero/monero_wallet_keys.dart';
|
import 'package:cw_core/monero_wallet_keys.dart';
|
||||||
import 'package:cw_monero/monero_balance.dart';
|
import 'package:cw_core/monero_balance.dart';
|
||||||
import 'package:cw_monero/monero_transaction_history.dart';
|
import 'package:cw_monero/monero_transaction_history.dart';
|
||||||
import 'package:cw_monero/account.dart';
|
import 'package:cw_core/account.dart';
|
||||||
import 'package:cw_core/pending_transaction.dart';
|
import 'package:cw_core/pending_transaction.dart';
|
||||||
import 'package:cw_core/wallet_base.dart';
|
import 'package:cw_core/wallet_base.dart';
|
||||||
import 'package:cw_core/sync_status.dart';
|
import 'package:cw_core/sync_status.dart';
|
||||||
import 'package:cw_core/wallet_info.dart';
|
import 'package:cw_core/wallet_info.dart';
|
||||||
import 'package:cw_core/node.dart';
|
import 'package:cw_core/node.dart';
|
||||||
import 'package:cw_monero/monero_transaction_priority.dart';
|
import 'package:cw_core/monero_transaction_priority.dart';
|
||||||
import 'package:cw_core/crypto_currency.dart';
|
import 'package:cw_core/crypto_currency.dart';
|
||||||
|
|
||||||
part 'monero_wallet.g.dart';
|
part 'monero_wallet.g.dart';
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import 'package:cw_core/wallet_addresses.dart';
|
import 'package:cw_core/wallet_addresses.dart';
|
||||||
import 'package:cw_core/wallet_info.dart';
|
import 'package:cw_core/wallet_info.dart';
|
||||||
import 'package:cw_monero/account.dart';
|
import 'package:cw_core/account.dart';
|
||||||
import 'package:cw_monero/monero_account_list.dart';
|
import 'package:cw_monero/monero_account_list.dart';
|
||||||
import 'package:cw_monero/monero_subaddress_list.dart';
|
import 'package:cw_monero/monero_subaddress_list.dart';
|
||||||
import 'package:cw_monero/subaddress.dart';
|
import 'package:cw_core/subaddress.dart';
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
|
|
||||||
part 'monero_wallet_addresses.g.dart';
|
part 'monero_wallet_addresses.g.dart';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:cw_core/wallet_base.dart';
|
import 'package:cw_core/wallet_base.dart';
|
||||||
import 'package:cw_monero/monero_wallet_utils.dart';
|
import 'package:cw_core/monero_wallet_utils.dart';
|
||||||
import 'package:hive/hive.dart';
|
import 'package:hive/hive.dart';
|
||||||
import 'package:cw_monero/api/wallet_manager.dart' as monero_wallet_manager;
|
import 'package:cw_monero/api/wallet_manager.dart' as monero_wallet_manager;
|
||||||
import 'package:cw_monero/api/wallet.dart' as monero_wallet;
|
import 'package:cw_monero/api/wallet.dart' as monero_wallet;
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
import 'package:cw_monero/api/structs/subaddress_row.dart';
|
|
||||||
|
|
||||||
class Subaddress {
|
|
||||||
Subaddress({this.id, this.address, this.label});
|
|
||||||
|
|
||||||
Subaddress.fromMap(Map map)
|
|
||||||
: this.id = map['id'] == null ? 0 : int.parse(map['id'] as String),
|
|
||||||
this.address = (map['address'] ?? '') as String,
|
|
||||||
this.label = (map['label'] ?? '') as String;
|
|
||||||
|
|
||||||
Subaddress.fromRow(SubaddressRow row)
|
|
||||||
: this.id = row.getId(),
|
|
||||||
this.address = row.getAddress(),
|
|
||||||
this.label = row.getId() == 0 &&
|
|
||||||
row.getLabel().toLowerCase() == 'Primary account'.toLowerCase()
|
|
||||||
? 'Primary address'
|
|
||||||
: row.getLabel();
|
|
||||||
|
|
||||||
final int id;
|
|
||||||
final String address;
|
|
||||||
final String label;
|
|
||||||
}
|
|
|
@ -1,6 +1,6 @@
|
||||||
import 'package:cake_wallet/store/dashboard/fiat_conversion_store.dart';
|
import 'package:cake_wallet/store/dashboard/fiat_conversion_store.dart';
|
||||||
import 'package:cw_core/crypto_currency.dart';
|
import 'package:cw_core/crypto_currency.dart';
|
||||||
import 'package:cw_monero/monero_amount_format.dart';
|
import 'package:cw_core/monero_amount_format.dart';
|
||||||
import 'package:cw_haven/api/balance_list.dart';
|
import 'package:cw_haven/api/balance_list.dart';
|
||||||
|
|
||||||
Future<void> updateHavenRate(FiatConversionStore fiatConversionStore) async {
|
Future<void> updateHavenRate(FiatConversionStore fiatConversionStore) async {
|
||||||
|
|
|
@ -11,13 +11,13 @@ import 'package:cake_wallet/view_model/send/output.dart';
|
||||||
import 'package:cw_core/wallet_service.dart';
|
import 'package:cw_core/wallet_service.dart';
|
||||||
import 'package:hive/hive.dart';
|
import 'package:hive/hive.dart';
|
||||||
import 'package:cw_monero/get_height_by_date.dart';
|
import 'package:cw_monero/get_height_by_date.dart';
|
||||||
import 'package:cw_monero/monero_amount_format.dart';
|
import 'package:cw_core/monero_amount_format.dart';
|
||||||
import 'package:cw_monero/monero_transaction_priority.dart';
|
import 'package:cw_core/monero_transaction_priority.dart';
|
||||||
import 'package:cw_haven/haven_wallet_service.dart';
|
import 'package:cw_haven/haven_wallet_service.dart';
|
||||||
import 'package:cw_haven/haven_wallet.dart';
|
import 'package:cw_haven/haven_wallet.dart';
|
||||||
import 'package:cw_haven/haven_transaction_info.dart';
|
import 'package:cw_haven/haven_transaction_info.dart';
|
||||||
import 'package:cw_haven/haven_transaction_history.dart';
|
import 'package:cw_haven/haven_transaction_history.dart';
|
||||||
import 'package:cw_monero/account.dart' as monero_account;
|
import 'package:cw_core/account.dart' as monero_account;
|
||||||
import 'package:cw_haven/api/wallet.dart' as monero_wallet_api;
|
import 'package:cw_haven/api/wallet.dart' as monero_wallet_api;
|
||||||
import 'package:cw_monero/mnemonics/english.dart';
|
import 'package:cw_monero/mnemonics/english.dart';
|
||||||
import 'package:cw_monero/mnemonics/chinese_simplified.dart';
|
import 'package:cw_monero/mnemonics/chinese_simplified.dart';
|
||||||
|
|
|
@ -14,7 +14,7 @@ for arch in "aarch" "aarch64" "i686" "x86_64"
|
||||||
do
|
do
|
||||||
FLAGS=""
|
FLAGS=""
|
||||||
PREFIX=${WORKDIR}/prefix_${arch}
|
PREFIX=${WORKDIR}/prefix_${arch}
|
||||||
DEST_LIB_DIR=${PREFIX}/lib/monero
|
DEST_LIB_DIR=${PREFIX}/lib/haven
|
||||||
DEST_INCLUDE_DIR=${PREFIX}/include
|
DEST_INCLUDE_DIR=${PREFIX}/include
|
||||||
export CMAKE_INCLUDE_PATH="${PREFIX}/include"
|
export CMAKE_INCLUDE_PATH="${PREFIX}/include"
|
||||||
export CMAKE_LIBRARY_PATH="${PREFIX}/lib"
|
export CMAKE_LIBRARY_PATH="${PREFIX}/lib"
|
||||||
|
|
|
@ -126,14 +126,14 @@ import 'package:cw_core/wallet_service.dart';
|
||||||
import 'package:hive/hive.dart';""";
|
import 'package:hive/hive.dart';""";
|
||||||
const moneroCWHeaders = """
|
const moneroCWHeaders = """
|
||||||
import 'package:cw_monero/get_height_by_date.dart';
|
import 'package:cw_monero/get_height_by_date.dart';
|
||||||
import 'package:cw_monero/monero_amount_format.dart';
|
import 'package:cw_core/monero_amount_format.dart';
|
||||||
import 'package:cw_monero/monero_transaction_priority.dart';
|
import 'package:cw_core/monero_transaction_priority.dart';
|
||||||
import 'package:cw_monero/monero_wallet_service.dart';
|
import 'package:cw_monero/monero_wallet_service.dart';
|
||||||
import 'package:cw_monero/monero_wallet.dart';
|
import 'package:cw_monero/monero_wallet.dart';
|
||||||
import 'package:cw_monero/monero_transaction_info.dart';
|
import 'package:cw_monero/monero_transaction_info.dart';
|
||||||
import 'package:cw_monero/monero_transaction_history.dart';
|
import 'package:cw_monero/monero_transaction_history.dart';
|
||||||
import 'package:cw_monero/monero_transaction_creation_credentials.dart';
|
import 'package:cw_monero/monero_transaction_creation_credentials.dart';
|
||||||
import 'package:cw_monero/account.dart' as monero_account;
|
import 'package:cw_core/account.dart' as monero_account;
|
||||||
import 'package:cw_monero/api/wallet.dart' as monero_wallet_api;
|
import 'package:cw_monero/api/wallet.dart' as monero_wallet_api;
|
||||||
import 'package:cw_monero/mnemonics/english.dart';
|
import 'package:cw_monero/mnemonics/english.dart';
|
||||||
import 'package:cw_monero/mnemonics/chinese_simplified.dart';
|
import 'package:cw_monero/mnemonics/chinese_simplified.dart';
|
||||||
|
@ -290,13 +290,13 @@ import 'package:cw_core/wallet_service.dart';
|
||||||
import 'package:hive/hive.dart';""";
|
import 'package:hive/hive.dart';""";
|
||||||
const havenCWHeaders = """
|
const havenCWHeaders = """
|
||||||
import 'package:cw_monero/get_height_by_date.dart';
|
import 'package:cw_monero/get_height_by_date.dart';
|
||||||
import 'package:cw_monero/monero_amount_format.dart';
|
import 'package:cw_core/monero_amount_format.dart';
|
||||||
import 'package:cw_monero/monero_transaction_priority.dart';
|
import 'package:cw_core/monero_transaction_priority.dart';
|
||||||
import 'package:cw_haven/haven_wallet_service.dart';
|
import 'package:cw_haven/haven_wallet_service.dart';
|
||||||
import 'package:cw_haven/haven_wallet.dart';
|
import 'package:cw_haven/haven_wallet.dart';
|
||||||
import 'package:cw_haven/haven_transaction_info.dart';
|
import 'package:cw_haven/haven_transaction_info.dart';
|
||||||
import 'package:cw_haven/haven_transaction_history.dart';
|
import 'package:cw_haven/haven_transaction_history.dart';
|
||||||
import 'package:cw_monero/account.dart' as monero_account;
|
import 'package:cw_core/account.dart' as monero_account;
|
||||||
import 'package:cw_haven/api/wallet.dart' as monero_wallet_api;
|
import 'package:cw_haven/api/wallet.dart' as monero_wallet_api;
|
||||||
import 'package:cw_monero/mnemonics/english.dart';
|
import 'package:cw_monero/mnemonics/english.dart';
|
||||||
import 'package:cw_monero/mnemonics/chinese_simplified.dart';
|
import 'package:cw_monero/mnemonics/chinese_simplified.dart';
|
||||||
|
@ -473,7 +473,7 @@ Future<void> generatePubspec({bool hasMonero, bool hasBitcoin, bool hasHaven}) a
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasHaven) {
|
if (hasHaven) {
|
||||||
output += '\n$cwSharedExternal\n$cwHaven\n$cwMonero';
|
output += '\n$cwSharedExternal\n$cwHaven';
|
||||||
}
|
}
|
||||||
|
|
||||||
final outputLines = output.split('\n');
|
final outputLines = output.split('\n');
|
||||||
|
|
Loading…
Reference in a new issue