mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-03 12:24:19 +01:00
Changed monero dependencies path for android. Changed scripts for generation of secrets.
This commit is contained in:
+9
-3
@@ -104,6 +104,7 @@ import 'package:cake_wallet/store/templates/send_template_store.dart';
|
||||
import 'package:cake_wallet/store/templates/exchange_template_store.dart';
|
||||
import 'package:cake_wallet/entities/template.dart';
|
||||
import 'package:cake_wallet/exchange/exchange_template.dart';
|
||||
import 'package:cake_wallet/.secrets.g.dart' as secrets;
|
||||
|
||||
final getIt = GetIt.instance;
|
||||
|
||||
@@ -134,10 +135,14 @@ Future setup(
|
||||
|
||||
if (!_isSetupFinished) {
|
||||
getIt.registerSingletonAsync<SharedPreferences>(
|
||||
() => SharedPreferences.getInstance());
|
||||
() => SharedPreferences.getInstance());
|
||||
}
|
||||
|
||||
final settingsStore = await SettingsStoreBase.load(nodeSource: _nodeSource);
|
||||
final isBitcoinBuyEnabled = (secrets.wyreSecretKey?.isNotEmpty ?? false) &&
|
||||
(secrets.wyreApiKey?.isNotEmpty ?? false) &&
|
||||
(secrets.wyreAccountId?.isNotEmpty ?? false);
|
||||
final settingsStore = await SettingsStoreBase.load(
|
||||
nodeSource: _nodeSource, isBitcoinBuyEnabled: isBitcoinBuyEnabled);
|
||||
|
||||
if (_isSetupFinished) {
|
||||
return;
|
||||
@@ -219,7 +224,8 @@ Future setup(
|
||||
appStore: getIt.get<AppStore>(),
|
||||
tradesStore: getIt.get<TradesStore>(),
|
||||
tradeFilterStore: getIt.get<TradeFilterStore>(),
|
||||
transactionFilterStore: getIt.get<TransactionFilterStore>()));
|
||||
transactionFilterStore: getIt.get<TransactionFilterStore>(),
|
||||
settingsStore: settingsStore));
|
||||
|
||||
getIt.registerFactory<AuthService>(() => AuthService(
|
||||
secureStorage: getIt.get<FlutterSecureStorage>(),
|
||||
|
||||
@@ -25,7 +25,7 @@ class ChangeNowExchangeProvider extends ExchangeProvider {
|
||||
.toList());
|
||||
|
||||
static const apiUri = 'https://changenow.io/api/v1';
|
||||
static const apiKey = secrets.change_now_api_key;
|
||||
static const apiKey = secrets.changeNowApiKey;
|
||||
static const _exchangeAmountUriSufix = '/exchange-amount/';
|
||||
static const _transactionsUriSufix = '/transactions/';
|
||||
static const _minAmountUriSufix = '/min-amount/';
|
||||
|
||||
@@ -38,6 +38,7 @@ abstract class SettingsStoreBase with Store {
|
||||
@required Map<WalletType, Node> nodes,
|
||||
@required TransactionPriority initialBitcoinTransactionPriority,
|
||||
@required TransactionPriority initialMoneroTransactionPriority,
|
||||
@required this.isBitcoinBuyEnabled,
|
||||
this.actionlistDisplayMode}) {
|
||||
fiatCurrency = initialFiatCurrency;
|
||||
balanceDisplayMode = initialBalanceDisplayMode;
|
||||
@@ -144,8 +145,11 @@ abstract class SettingsStoreBase with Store {
|
||||
|
||||
Node getCurrentNode(WalletType walletType) => nodes[walletType];
|
||||
|
||||
bool isBitcoinBuyEnabled;
|
||||
|
||||
static Future<SettingsStore> load(
|
||||
{@required Box<Node> nodeSource,
|
||||
@required bool isBitcoinBuyEnabled,
|
||||
FiatCurrency initialFiatCurrency = FiatCurrency.usd,
|
||||
MoneroTransactionPriority initialMoneroTransactionPriority =
|
||||
MoneroTransactionPriority.slow,
|
||||
@@ -212,6 +216,7 @@ abstract class SettingsStoreBase with Store {
|
||||
WalletType.bitcoin: bitcoinElectrumServer
|
||||
},
|
||||
appVersion: packageInfo.version,
|
||||
isBitcoinBuyEnabled: isBitcoinBuyEnabled,
|
||||
initialFiatCurrency: currentFiatCurrency,
|
||||
initialBalanceDisplayMode: currentBalanceDisplayMode,
|
||||
initialSaveRecipientAddress: shouldSaveRecipientAddress,
|
||||
|
||||
@@ -13,6 +13,7 @@ import 'package:cake_wallet/entities/transaction_direction.dart';
|
||||
import 'package:cake_wallet/entities/transaction_info.dart';
|
||||
import 'package:cake_wallet/exchange/exchange_provider_description.dart';
|
||||
import 'package:cake_wallet/exchange/trade.dart';
|
||||
import 'package:cake_wallet/store/settings_store.dart';
|
||||
import 'package:cake_wallet/utils/mobx.dart';
|
||||
import 'package:cake_wallet/view_model/dashboard/balance_view_model.dart';
|
||||
import 'package:cake_wallet/view_model/dashboard/filter_item.dart';
|
||||
@@ -41,7 +42,8 @@ abstract class DashboardViewModelBase with Store {
|
||||
this.appStore,
|
||||
this.tradesStore,
|
||||
this.tradeFilterStore,
|
||||
this.transactionFilterStore}) {
|
||||
this.transactionFilterStore,
|
||||
this.settingsStore}) {
|
||||
filterItems = {
|
||||
S.current.transactions: [
|
||||
FilterItem(
|
||||
@@ -193,6 +195,8 @@ abstract class DashboardViewModelBase with Store {
|
||||
|
||||
AppStore appStore;
|
||||
|
||||
SettingsStore settingsStore;
|
||||
|
||||
TradesStore tradesStore;
|
||||
|
||||
TradeFilterStore tradeFilterStore;
|
||||
@@ -201,6 +205,8 @@ abstract class DashboardViewModelBase with Store {
|
||||
|
||||
Map<String, List<FilterItem>> filterItems;
|
||||
|
||||
bool get isBuyEnabled => settingsStore.isBitcoinBuyEnabled;
|
||||
|
||||
ReactionDisposer _reaction;
|
||||
|
||||
ReactionDisposer _onMoneroAccountChangeReaction;
|
||||
|
||||
@@ -188,6 +188,8 @@ abstract class SettingsViewModelBase with Store {
|
||||
@computed
|
||||
ThemeBase get theme => _settingsStore.currentTheme;
|
||||
|
||||
bool get isBitcoinBuyEnabled => _settingsStore.isBitcoinBuyEnabled;
|
||||
|
||||
final Map<String, String> itemHeaders;
|
||||
List<List<SettingsListItem>> sections;
|
||||
final SettingsStore _settingsStore;
|
||||
|
||||
Reference in New Issue
Block a user