Generic Fixes (#1122)
* Fix Hive issue * Disable RobinHood for Nano * Validate context is still mounted [skip ci] * Disable Exolix for new exchanges Remove duplicate ethereum case * add nano/banano to manifest/info.plist * fix qr code issues for nano * Add Nano-wallet to restore form qr Add iOS keychain accessibility config * support app links for ethereum and nano [skip ci] * catch exceptions from gas price and estimated gas * Add bitcoin cash to app links Fix restore from QR for bitcoin cash * Fixate bottom buttons for create/restore wallet in wallet list page --------- Co-authored-by: fosse <matt.cfosse@gmail.com>
Omar Hatem committed
Oct 13, 2023 at 14:49 UTC
426ac99e34334e25c29c25325b74fa21ef1a4c2e
15 files changed
+270
-183
android/app/src/main/AndroidManifestBase.xml
+9
@@ -52,6 +52,15 @@
52
<data android:scheme="litecoin" />
53
<data android:scheme="litecoin-wallet" />
54
<data android:scheme="litecoin_wallet" />
55
+ <data android:scheme="ethereum" />
56
+ <data android:scheme="ethereum-wallet" />
57
+ <data android:scheme="ethereum_wallet" />
58
+ <data android:scheme="nano" />
59
+ <data android:scheme="nano-wallet" />
60
+ <data android:scheme="nano_wallet" />
61
+ <data android:scheme="bitcoincash" />
62
+ <data android:scheme="bitcoincash-wallet" />
63
+ <data android:scheme="bitcoincash_wallet" />
64
</intent-filter>
65
</activity>
66
<meta-data
cw_ethereum/lib/ethereum_client.dart
+12
-4
@@ -42,13 +42,21 @@ class EthereumClient {
42
await _client!.getBalance(address);
43
44
Future<int> getGasUnitPrice() async {
45
- final gasPrice = await _client!.getGasPrice();
46
- return gasPrice.getInWei.toInt();
45
+ try {
46
+ final gasPrice = await _client!.getGasPrice();
47
+ return gasPrice.getInWei.toInt();
48
+ } catch (_) {
49
+ return 0;
50
+ }
51
}
52
53
Future<int> getEstimatedGas() async {
50
- final estimatedGas = await _client!.estimateGas();
51
- return estimatedGas.toInt();
54
+ try {
55
+ final estimatedGas = await _client!.estimateGas();
56
+ return estimatedGas.toInt();
57
+ } catch (_) {
58
+ return 0;
59
+ }
60
}
61
62
Future<PendingEthereumTransaction> signTransaction({
ios/Runner/InfoBase.plist
+60
@@ -100,6 +100,66 @@
100
<string>litecoin-wallet</string>
101
</array>
102
</dict>
103
+ <dict>
104
+ <key>CFBundleTypeRole</key>
105
+ <string>Editor</string>
106
+ <key>CFBundleURLName</key>
107
+ <string>ethereum</string>
108
+ <key>CFBundleURLSchemes</key>
109
+ <array>
110
+ <string>ethereum</string>
111
+ </array>
112
+ </dict>
113
+ <dict>
114
+ <key>CFBundleTypeRole</key>
115
+ <string>Viewer</string>
116
+ <key>CFBundleURLName</key>
117
+ <string>ethereum-wallet</string>
118
+ <key>CFBundleURLSchemes</key>
119
+ <array>
120
+ <string>ethereum-wallet</string>
121
+ </array>
122
+ </dict>
123
+ <dict>
124
+ <key>CFBundleTypeRole</key>
125
+ <string>Editor</string>
126
+ <key>CFBundleURLName</key>
127
+ <string>nano</string>
128
+ <key>CFBundleURLSchemes</key>
129
+ <array>
130
+ <string>nano</string>
131
+ </array>
132
+ </dict>
133
+ <dict>
134
+ <key>CFBundleTypeRole</key>
135
+ <string>Viewer</string>
136
+ <key>CFBundleURLName</key>
137
+ <string>nano-wallet</string>
138
+ <key>CFBundleURLSchemes</key>
139
+ <array>
140
+ <string>nano-wallet</string>
141
+ </array>
142
+ </dict>
143
+ <dict>
144
+ <key>CFBundleTypeRole</key>
145
+ <string>Editor</string>
146
+ <key>CFBundleURLName</key>
147
+ <string>bitcoincash</string>
148
+ <key>CFBundleURLSchemes</key>
149
+ <array>
150
+ <string>bitcoincash</string>
151
+ </array>
152
+ </dict>
153
+ <dict>
154
+ <key>CFBundleTypeRole</key>
155
+ <string>Viewer</string>
156
+ <key>CFBundleURLName</key>
157
+ <string>bitcoincash-wallet</string>
158
+ <key>CFBundleURLSchemes</key>
159
+ <array>
160
+ <string>bitcoincash-wallet</string>
161
+ </array>
162
+ </dict>
163
</array>
164
<key>CFBundleVersion</key>
165
<string>$(CURRENT_PROJECT_VERSION)</string>
lib/entities/main_actions.dart
+2
-2
@@ -53,8 +53,6 @@ class MainActions {
53
case WalletType.litecoin:
54
case WalletType.ethereum:
55
case WalletType.bitcoinCash:
56
- case WalletType.nano:
57
- case WalletType.banano:
56
switch (defaultBuyProvider) {
57
case BuyProviderType.AskEachTime:
58
Navigator.pushNamed(context, Routes.buy);
@@ -67,6 +65,8 @@ class MainActions {
65
break;
66
}
67
break;
68
+ case WalletType.nano:
69
+ case WalletType.banano:
70
case WalletType.monero:
71
await getIt.get<OnRamperBuyProvider>().launchProvider(context);
72
break;
lib/main.dart
+7
-4
@@ -97,10 +97,10 @@ Future<void> initializeAppConfigs() async {
97
CakeHive.registerAdapter(WalletInfoAdapter());
98
}
99
100
- if (!Hive.isAdapterRegistered(DERIVATION_TYPE_TYPE_ID)) {
100
+ if (!CakeHive.isAdapterRegistered(DERIVATION_TYPE_TYPE_ID)) {
101
CakeHive.registerAdapter(DerivationTypeAdapter());
102
}
103
-
103
+
104
if (!CakeHive.isAdapterRegistered(WALLET_TYPE_TYPE_ID)) {
105
CakeHive.registerAdapter(WalletTypeAdapter());
106
}
@@ -125,14 +125,17 @@ Future<void> initializeAppConfigs() async {
125
CakeHive.registerAdapter(AnonpayInvoiceInfoAdapter());
126
}
127
128
- final secureStorage = FlutterSecureStorage();
128
+ final secureStorage = FlutterSecureStorage(
129
+ iOptions: IOSOptions(accessibility: KeychainAccessibility.first_unlock),
130
+ );
131
final transactionDescriptionsBoxKey =
132
await getEncryptionKey(secureStorage: secureStorage, forKey: TransactionDescription.boxKey);
133
final tradesBoxKey = await getEncryptionKey(secureStorage: secureStorage, forKey: Trade.boxKey);
134
final ordersBoxKey = await getEncryptionKey(secureStorage: secureStorage, forKey: Order.boxKey);
135
final contacts = await CakeHive.openBox<Contact>(Contact.boxName);
136
final nodes = await CakeHive.openBox<Node>(Node.boxName);
135
- final powNodes = await CakeHive.openBox<Node>(Node.boxName + "pow");// must be different from Node.boxName
137
+ final powNodes =
138
+ await CakeHive.openBox<Node>(Node.boxName + "pow"); // must be different from Node.boxName
139
final transactionDescriptions = await CakeHive.openBox<TransactionDescription>(
140
TransactionDescription.boxName,
141
encryptionKey: transactionDescriptionsBoxKey);
lib/src/screens/dashboard/edit_token_page.dart
+3
-1
@@ -194,7 +194,9 @@ class _EditTokenPageBodyState extends State<EditTokenPageBody> {
194
contractAddress: _contractAddressController.text,
195
decimal: int.parse(_tokenDecimalController.text),
196
));
197
- Navigator.pop(context);
197
+ if (context.mounted) {
198
+ Navigator.pop(context);
199
+ }
200
}
201
},
202
text: S.of(context).save,
lib/src/screens/exchange_trade/exchange_trade_page.dart
+3
-5
@@ -5,7 +5,6 @@ import 'package:cake_wallet/utils/request_review_handler.dart';
5
import 'package:mobx/mobx.dart';
6
import 'package:flutter_mobx/flutter_mobx.dart';
7
import 'package:flutter/material.dart';
8
-import 'package:flutter/cupertino.dart';
8
import 'package:flutter/services.dart';
9
import 'package:cake_wallet/generated/i18n.dart';
10
import 'package:cake_wallet/core/execution_state.dart';
@@ -26,16 +25,15 @@ import 'package:cake_wallet/themes/extensions/transaction_trade_theme.dart';
25
26
void showInformation(
27
ExchangeTradeViewModel exchangeTradeViewModel, BuildContext context) {
29
- final fetchingLabel = S.current.fetching;
28
final trade = exchangeTradeViewModel.trade;
29
final walletName = exchangeTradeViewModel.wallet.name;
30
31
final information = exchangeTradeViewModel.isSendable
32
? S.current.exchange_result_confirm(
35
- trade.amount ?? fetchingLabel, trade.from.toString(), walletName) +
33
+ trade.amount, trade.from.toString(), walletName) +
34
exchangeTradeViewModel.extraInfo
35
: S.current.exchange_result_description(
38
- trade.amount ?? fetchingLabel, trade.from.toString()) +
36
+ trade.amount, trade.from.toString()) +
37
exchangeTradeViewModel.extraInfo;
38
39
showPopUp<void>(
@@ -177,7 +175,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
175
),
176
itemBuilder: (context, index) {
177
final item = widget.exchangeTradeViewModel.items[index];
180
- final value = item.data ?? fetchingLabel;
178
+ final value = item.data;
179
180
final content = ListRow(
181
title: item.title,
lib/src/screens/wallet_list/wallet_list_page.dart
+160
-152
@@ -13,7 +13,6 @@ import 'package:cw_core/wallet_type.dart';
13
import 'package:cake_wallet/view_model/wallet_list/wallet_list_view_model.dart';
14
import 'package:cake_wallet/src/widgets/primary_button.dart';
15
import 'package:cake_wallet/src/screens/base_page.dart';
16
-import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
16
import 'package:cake_wallet/wallet_type_utils.dart';
17
import 'package:cake_wallet/themes/extensions/wallet_list_theme.dart';
18
@@ -65,169 +64,178 @@ class WalletListBodyState extends State<WalletListBody> {
64
65
return Container(
66
padding: EdgeInsets.only(top: 16),
68
- child: ScrollableWithBottomSection(
69
- contentPadding: EdgeInsets.only(bottom: 20),
70
- content: Container(
71
- child: Observer(
72
- builder: (_) => ListView.separated(
73
- shrinkWrap: true,
74
- physics: const NeverScrollableScrollPhysics(),
75
- separatorBuilder: (_, index) =>
76
- Divider(color: Theme.of(context).colorScheme.background, height: 32),
77
- itemCount: widget.walletListViewModel.wallets.length,
78
- itemBuilder: (__, index) {
79
- final wallet = widget.walletListViewModel.wallets[index];
80
- final currentColor = wallet.isCurrent
81
- ? Theme.of(context)
82
- .extension<WalletListTheme>()!
83
- .createNewWalletButtonBackgroundColor
84
- : Theme.of(context).colorScheme.background;
85
- final row = GestureDetector(
86
- onTap: () => wallet.isCurrent ? null : _loadWallet(wallet),
87
- child: Container(
88
- height: tileHeight,
89
- width: double.infinity,
90
- child: Row(
91
- children: <Widget>[
92
- Container(
93
- height: tileHeight,
94
- width: 4,
95
- decoration: BoxDecoration(
96
- borderRadius: BorderRadius.only(
97
- topRight: Radius.circular(4), bottomRight: Radius.circular(4)),
98
- color: currentColor),
99
- ),
100
- Expanded(
101
- child: Container(
102
- height: tileHeight,
103
- padding: EdgeInsets.only(left: 20, right: 20),
104
- color: Theme.of(context).colorScheme.background,
105
- alignment: Alignment.centerLeft,
106
- child: Row(
107
- crossAxisAlignment: CrossAxisAlignment.center,
108
- children: <Widget>[
109
- wallet.isEnabled ? _imageFor(type: wallet.type) : nonWalletTypeIcon,
110
- SizedBox(width: 10),
111
- Flexible(
112
- child: Text(
113
- wallet.name,
114
- maxLines: null,
115
- softWrap: true,
116
- style: TextStyle(
117
- fontSize: 22,
118
- fontWeight: FontWeight.w500,
119
- color:
120
- Theme.of(context).extension<CakeTextTheme>()!.titleColor,
67
+ child: Column(
68
+ children: [
69
+ Expanded(
70
+ child: Container(
71
+ child: Observer(
72
+ builder: (_) => ListView.separated(
73
+ physics: const BouncingScrollPhysics(),
74
+ separatorBuilder: (_, index) =>
75
+ Divider(color: Theme.of(context).colorScheme.background, height: 32),
76
+ itemCount: widget.walletListViewModel.wallets.length,
77
+ itemBuilder: (__, index) {
78
+ final wallet = widget.walletListViewModel.wallets[index];
79
+ final currentColor = wallet.isCurrent
80
+ ? Theme.of(context)
81
+ .extension<WalletListTheme>()!
82
+ .createNewWalletButtonBackgroundColor
83
+ : Theme.of(context).colorScheme.background;
84
+ final row = GestureDetector(
85
+ onTap: () => wallet.isCurrent ? null : _loadWallet(wallet),
86
+ child: Container(
87
+ height: tileHeight,
88
+ width: double.infinity,
89
+ child: Row(
90
+ children: <Widget>[
91
+ Container(
92
+ height: tileHeight,
93
+ width: 4,
94
+ decoration: BoxDecoration(
95
+ borderRadius: BorderRadius.only(
96
+ topRight: Radius.circular(4),
97
+ bottomRight: Radius.circular(4)),
98
+ color: currentColor),
99
+ ),
100
+ Expanded(
101
+ child: Container(
102
+ height: tileHeight,
103
+ padding: EdgeInsets.only(left: 20, right: 20),
104
+ color: Theme.of(context).colorScheme.background,
105
+ alignment: Alignment.centerLeft,
106
+ child: Row(
107
+ crossAxisAlignment: CrossAxisAlignment.center,
108
+ children: <Widget>[
109
+ wallet.isEnabled
110
+ ? _imageFor(type: wallet.type)
111
+ : nonWalletTypeIcon,
112
+ SizedBox(width: 10),
113
+ Flexible(
114
+ child: Text(
115
+ wallet.name,
116
+ maxLines: null,
117
+ softWrap: true,
118
+ style: TextStyle(
119
+ fontSize: 22,
120
+ fontWeight: FontWeight.w500,
121
+ color: Theme.of(context)
122
+ .extension<CakeTextTheme>()!
123
+ .titleColor,
124
+ ),
125
+ ),
126
),
122
- ),
127
+ ],
128
),
124
- ],
129
+ ),
130
),
126
- ),
131
+ ],
132
),
128
- ],
129
- ),
130
- ),
131
- );
133
+ ),
134
+ );
135
133
- return wallet.isCurrent
134
- ? row
135
- : Row(
136
- children: [
137
- Expanded(child: row),
138
- GestureDetector(
139
- onTap: () => Navigator.of(context).pushNamed(Routes.walletEdit,
140
- arguments: [widget.walletListViewModel, wallet]),
141
- child: Container(
142
- padding: EdgeInsets.only(right: 20),
143
- child: Center(
136
+ return wallet.isCurrent
137
+ ? row
138
+ : Row(
139
+ children: [
140
+ Expanded(child: row),
141
+ GestureDetector(
142
+ onTap: () => Navigator.of(context).pushNamed(Routes.walletEdit,
143
+ arguments: [widget.walletListViewModel, wallet]),
144
child: Container(
145
- height: 40,
146
- width: 44,
147
- padding: EdgeInsets.all(10),
148
- decoration: BoxDecoration(
149
- shape: BoxShape.circle,
150
- color: Theme.of(context)
151
- .extension<ReceivePageTheme>()!
152
- .iconsBackgroundColor,
153
- ),
154
- child: Icon(
155
- Icons.edit,
156
- size: 14,
157
- color:
158
- Theme.of(context).extension<ReceivePageTheme>()!.iconsColor,
145
+ padding: EdgeInsets.only(right: 20),
146
+ child: Center(
147
+ child: Container(
148
+ height: 40,
149
+ width: 44,
150
+ padding: EdgeInsets.all(10),
151
+ decoration: BoxDecoration(
152
+ shape: BoxShape.circle,
153
+ color: Theme.of(context)
154
+ .extension<ReceivePageTheme>()!
155
+ .iconsBackgroundColor,
156
+ ),
157
+ child: Icon(
158
+ Icons.edit,
159
+ size: 14,
160
+ color: Theme.of(context)
161
+ .extension<ReceivePageTheme>()!
162
+ .iconsColor,
163
+ ),
164
+ ),
165
),
166
),
167
),
162
- ),
163
- ),
164
- ],
165
- );
166
- },
168
+ ],
169
+ );
170
+ },
171
+ ),
172
+ ),
173
),
174
),
169
- ),
170
- bottomSectionPadding: EdgeInsets.only(bottom: 24, right: 24, left: 24),
171
- bottomSection: Column(
172
- children: <Widget>[
173
- PrimaryImageButton(
174
- onPressed: () {
175
- //TODO(David): Find a way to optimize this
176
- if (isSingleCoin) {
177
- if (widget.walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets) {
178
- widget.authService.authenticateAction(
179
- context,
180
- route: Routes.newWallet,
181
- arguments: widget.walletListViewModel.currentWalletType,
182
- conditionToDetermineIfToUse2FA:
183
- widget.walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets,
184
- );
185
- } else {
186
- Navigator.of(context).pushNamed(
187
- Routes.newWallet,
188
- arguments: widget.walletListViewModel.currentWalletType,
189
- );
190
- }
191
- } else {
192
- if (widget.walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets) {
193
- widget.authService.authenticateAction(
194
- context,
195
- route: Routes.newWalletType,
196
- conditionToDetermineIfToUse2FA:
197
- widget.walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets,
198
- );
199
- } else {
200
- Navigator.of(context).pushNamed(Routes.newWalletType);
201
- }
202
- }
203
- },
204
- image: newWalletImage,
205
- text: S.of(context).wallet_list_create_new_wallet,
206
- color: Theme.of(context).primaryColor,
207
- textColor: Colors.white,
175
+ Padding(
176
+ padding: const EdgeInsets.all(24),
177
+ child: Column(
178
+ children: <Widget>[
179
+ PrimaryImageButton(
180
+ onPressed: () {
181
+ //TODO(David): Find a way to optimize this
182
+ if (isSingleCoin) {
183
+ if (widget.walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets) {
184
+ widget.authService.authenticateAction(
185
+ context,
186
+ route: Routes.newWallet,
187
+ arguments: widget.walletListViewModel.currentWalletType,
188
+ conditionToDetermineIfToUse2FA:
189
+ widget.walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets,
190
+ );
191
+ } else {
192
+ Navigator.of(context).pushNamed(
193
+ Routes.newWallet,
194
+ arguments: widget.walletListViewModel.currentWalletType,
195
+ );
196
+ }
197
+ } else {
198
+ if (widget.walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets) {
199
+ widget.authService.authenticateAction(
200
+ context,
201
+ route: Routes.newWalletType,
202
+ conditionToDetermineIfToUse2FA:
203
+ widget.walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets,
204
+ );
205
+ } else {
206
+ Navigator.of(context).pushNamed(Routes.newWalletType);
207
+ }
208
+ }
209
+ },
210
+ image: newWalletImage,
211
+ text: S.of(context).wallet_list_create_new_wallet,
212
+ color: Theme.of(context).primaryColor,
213
+ textColor: Colors.white,
214
+ ),
215
+ SizedBox(height: 10.0),
216
+ PrimaryImageButton(
217
+ onPressed: () {
218
+ if (widget.walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets) {
219
+ widget.authService.authenticateAction(
220
+ context,
221
+ route: Routes.restoreOptions,
222
+ arguments: false,
223
+ conditionToDetermineIfToUse2FA:
224
+ widget.walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets,
225
+ );
226
+ } else {
227
+ Navigator.of(context).pushNamed(Routes.restoreOptions, arguments: false);
228
+ }
229
+ },
230
+ image: restoreWalletImage,
231
+ text: S.of(context).wallet_list_restore_wallet,
232
+ color: Theme.of(context).cardColor,
233
+ textColor: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor,
234
+ )
235
+ ],
236
),
209
- SizedBox(height: 10.0),
210
- PrimaryImageButton(
211
- onPressed: () {
212
- if (widget.walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets) {
213
- widget.authService.authenticateAction(
214
- context,
215
- route: Routes.restoreOptions,
216
- arguments: false,
217
- conditionToDetermineIfToUse2FA:
218
- widget.walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets,
219
- );
220
- } else {
221
- Navigator.of(context).pushNamed(Routes.restoreOptions, arguments: false);
222
- }
223
- },
224
- image: restoreWalletImage,
225
- text: S.of(context).wallet_list_restore_wallet,
226
- color: Theme.of(context).cardColor,
227
- textColor: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor,
228
- )
229
- ],
230
- ),
237
+ ),
238
+ ],
239
),
240
);
241
}
lib/utils/exception_handler.dart
+1
-1
@@ -161,7 +161,7 @@ class ExceptionHandler {
161
"Handshake error in client",
162
"Error while launching http",
163
"OS Error: Network is unreachable",
164
- "ClientException: Write failed, uri=https:",
164
+ "ClientException: Write failed, uri=http",
165
];
166
167
static Future<void> _addDeviceInfo(File file) async {
lib/utils/feature_flag.dart
+1
@@ -1,3 +1,4 @@
1
class FeatureFlag {
2
static const bool isCakePayEnabled = false;
3
+ static const bool isExolixEnabled = false;
4
}
\ No newline at end of file
lib/utils/payment_request.dart
+6
-4
@@ -17,10 +17,12 @@ class PaymentRequest {
17
}
18
19
if (nano != null) {
20
- if (address.contains("nano")) {
21
- amount = nanoUtil!.getRawAsUsableString(amount, nanoUtil!.rawPerNano);
22
- } else if (address.contains("ban")) {
23
- amount = nanoUtil!.getRawAsUsableString(amount, nanoUtil!.rawPerBanano);
20
+ if (amount.isNotEmpty) {
21
+ if (address.contains("nano")) {
22
+ amount = nanoUtil!.getRawAsUsableString(amount, nanoUtil!.rawPerNano);
23
+ } else if (address.contains("ban")) {
24
+ amount = nanoUtil!.getRawAsUsableString(amount, nanoUtil!.rawPerBanano);
25
+ }
26
}
27
}
28
lib/view_model/dashboard/transaction_list_item.dart
-7
@@ -97,13 +97,6 @@ class TransactionListItem extends ActionListItem with Keyable {
97
nano!.getTransactionAmountRaw(transaction).toString(), nanoUtil!.rawPerNano)),
98
price: price);
99
break;
100
- case WalletType.ethereum:
101
- final asset = ethereum!.assetOfTransaction(balanceViewModel.wallet, transaction);
102
- final price = balanceViewModel.fiatConvertationStore.prices[asset];
103
- amount = calculateFiatAmountRaw(
104
- cryptoAmount: ethereum!.formatterEthereumAmountToDouble(transaction: transaction),
105
- price: price);
106
- break;
100
default:
101
break;
102
}
lib/view_model/exchange/exchange_view_model.dart
+2
-1
@@ -16,6 +16,7 @@ import 'package:cake_wallet/exchange/simpleswap/simpleswap_exchange_provider.dar
16
import 'package:cake_wallet/exchange/simpleswap/simpleswap_request.dart';
17
import 'package:cake_wallet/exchange/trocador/trocador_exchange_provider.dart';
18
import 'package:cake_wallet/exchange/trocador/trocador_request.dart';
19
+import 'package:cake_wallet/utils/feature_flag.dart';
20
import 'package:cake_wallet/view_model/contact_list/contact_list_view_model.dart';
21
import 'package:cw_core/transaction_priority.dart';
22
import 'package:cake_wallet/store/app_store.dart';
@@ -154,7 +155,7 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with
155
SideShiftExchangeProvider(),
156
SimpleSwapExchangeProvider(),
157
TrocadorExchangeProvider(useTorOnly: _useTorOnly),
157
- ExolixExchangeProvider(),
158
+ if (FeatureFlag.isExolixEnabled) ExolixExchangeProvider(),
159
];
160
161
@observable
lib/view_model/restore/wallet_restore_from_qr_code.dart
+3
-1
@@ -73,10 +73,12 @@ class WalletRestoreFromQRCode {
73
case 'litecoin-wallet':
74
return WalletType.litecoin;
75
case 'bitcoincash':
76
- case 'bitcoinCash-wallet':
76
+ case 'bitcoincash-wallet':
77
return WalletType.bitcoinCash;
78
+ case 'ethereum':
79
case 'ethereum-wallet':
80
return WalletType.ethereum;
81
+ case 'nano':
82
case 'nano-wallet':
83
return WalletType.nano;
84
default:
lib/view_model/wallet_keys_view_model.dart
+1
-1
@@ -148,7 +148,7 @@ abstract class WalletKeysViewModelBase with Store {
148
case WalletType.ethereum:
149
return 'ethereum-wallet';
150
case WalletType.bitcoinCash:
151
- return 'bitcoinCash-wallet';
151
+ return 'bitcoincash-wallet';
152
case WalletType.nano:
153
return 'nano-wallet';
154
case WalletType.banano: