Fixes.
M committed
Oct 29, 2020 at 12:49 UTC
b8e435ea8e9a214804e18e7c436abab7fa948d67
14 files changed
+251
-120
cw_monero/ios/Classes/monero_api.cpp
+20
-10
@@ -87,7 +87,7 @@ extern "C"
87
88
void updated()
89
{
90
- m_need_to_refresh = true;
90
+ m_new_transaction = true;
91
}
92
93
void refreshed()
@@ -472,7 +472,9 @@ extern "C"
472
return false;
473
}
474
475
- m_listener->m_new_transaction = true;
475
+ if (m_listener != nullptr) {
476
+ m_listener->m_new_transaction = true;
477
+ }
478
479
pendingTransaction = PendingTransactionRaw(transaction);
480
return true;
@@ -485,7 +487,7 @@ extern "C"
487
if (!committed)
488
{
489
error = Utf8Box(strdup(transaction->transaction->errorString().c_str()));
488
- } else {
490
+ } else if (m_listener != nullptr) {
491
m_listener->m_new_transaction = true;
492
}
493
@@ -508,9 +510,13 @@ extern "C"
510
}
511
512
uint64_t height = m_listener->height();
511
- uint64_t node_height = get_node_height_or_update(height);
513
+// uint64_t node_height = get_node_height_or_update(height);
514
+//
515
+// if (height <= 1 || node_height <= 0) {
516
+// return 0;
517
+// }
518
513
- if (height <= 1 || node_height <= 0) {
519
+ if (height <= 1) {
520
return 0;
521
}
522
@@ -529,10 +535,14 @@ extern "C"
535
}
536
537
bool should_refresh = m_listener->isNeedToRefresh();
532
- uint64_t node_height = get_node_height_or_update(m_last_known_wallet_height);
533
-
534
- if (should_refresh || (node_height - m_last_known_wallet_height < MONERO_BLOCK_SIZE))
535
- {
538
+// uint64_t node_height = get_node_height_or_update(m_last_known_wallet_height);
539
+//
540
+// if (should_refresh || (node_height - m_last_known_wallet_height < MONERO_BLOCK_SIZE))
541
+// {
542
+// m_listener->resetNeedToRefresh();
543
+// }
544
+
545
+ if (should_refresh) {
546
m_listener->resetNeedToRefresh();
547
}
548
@@ -561,7 +571,7 @@ extern "C"
571
572
if (m_listener != nullptr)
573
{
564
- // free(m_listener);
574
+ free(m_listener);
575
}
576
577
m_listener = new MoneroWalletListener();
cw_monero/lib/account_list.dart
+13
-2
@@ -26,7 +26,18 @@ final accountSetLabelNative = moneroApi
26
.lookup<NativeFunction<account_set_label>>('account_set_label_row')
27
.asFunction<AccountSetLabel>();
28
29
-void refreshAccounts() => accountRefreshNative();
29
+bool isUpdating = false;
30
+
31
+void refreshAccounts() {
32
+ try {
33
+ isUpdating = true;
34
+ accountRefreshNative();
35
+ isUpdating = false;
36
+ } catch (e) {
37
+ isUpdating = false;
38
+ rethrow;
39
+ }
40
+}
41
42
List<AccountRow> getAllAccount() {
43
final size = accountSizeNative();
@@ -63,4 +74,4 @@ Future<void> addAccount({String label}) async => compute(_addAccount, label);
74
75
Future<void> setLabelForAccount({int accountIndex, String label}) async =>
76
compute(
66
- _setLabelForAccount, {'accountIndex': accountIndex, 'label': label});
77
+ _setLabelForAccount, {'accountIndex': accountIndex, 'label': label});
\ No newline at end of file
cw_monero/lib/subaddress_list.dart
+14
-3
@@ -26,8 +26,18 @@ final subaddrressSetLabelNative = moneroApi
26
.lookup<NativeFunction<subaddress_set_label>>('subaddress_set_label')
27
.asFunction<SubaddressSetLabel>();
28
29
-void refreshSubaddresses({int accountIndex}) =>
29
+bool isUpdating = false;
30
+
31
+void refreshSubaddresses({@required int accountIndex}) {
32
+ try {
33
+ isUpdating = true;
34
subaddressRefreshNative(accountIndex);
35
+ isUpdating = false;
36
+ } catch (e) {
37
+ isUpdating = false;
38
+ rethrow;
39
+ }
40
+}
41
42
List<SubaddressRow> getAllSubaddresses() {
43
final size = subaddressSizeNative();
@@ -48,7 +58,7 @@ void addSubaddressSync({int accountIndex, String label}) {
58
void setLabelForSubaddressSync(
59
{int accountIndex, int addressIndex, String label}) {
60
final labelPointer = Utf8.toUtf8(label);
51
-
61
+
62
subaddrressSetLabelNative(accountIndex, addressIndex, labelPointer);
63
free(labelPointer);
64
}
@@ -70,7 +80,8 @@ void _setLabelForSubaddress(Map<String, dynamic> args) {
80
}
81
82
Future addSubaddress({int accountIndex, String label}) async =>
73
- compute<Map<String, Object>, void>(_addSubaddress, {'accountIndex': accountIndex, 'label': label});
83
+ compute<Map<String, Object>, void>(
84
+ _addSubaddress, {'accountIndex': accountIndex, 'label': label});
85
86
Future setLabelForSubaddress(
87
{int accountIndex, int addressIndex, String label}) =>
cw_monero/lib/wallet.dart
+22
-7
@@ -114,6 +114,8 @@ final rescanBlockchainAsyncNative = moneroApi
114
.lookup<NativeFunction<rescan_blockchain>>('rescan_blockchain')
115
.asFunction<RescanBlockchainAsync>();
116
117
+bool isStoring = false;
118
+
119
int getSyncingHeight() => getSyncingHeightNative();
120
121
bool isNeededToRefresh() => isNeededToRefreshNative() != 0;
@@ -209,8 +211,8 @@ String getSecretSpendKey() =>
211
String getPublicSpendKey() =>
212
convertUTF8ToString(pointer: getPublicSpendKeyNative());
213
212
-class SyncListner {
213
- SyncListner({this.onNewBlock, this.onNeedToRefresh, this.onNewTransaction});
214
+class SyncListener {
215
+ SyncListener({this.onNewBlock, this.onNeedToRefresh, this.onNewTransaction});
216
217
void Function(int, int, double) onNewBlock;
218
void Function() onNeedToRefresh;
@@ -234,7 +236,7 @@ class SyncListner {
236
_lastKnownBlockHeight = 0;
237
_initialSyncHeight = 0;
238
_updateSyncInfoTimer ??=
237
- Timer.periodic(Duration(milliseconds: 200), (_) async {
239
+ Timer.periodic(Duration(milliseconds: 1200), (_) async {
240
final syncHeight = getSyncingHeight();
241
final needToRefresh = isNeededToRefresh();
242
final newTransactionExist = isNewTransactionExist();
@@ -251,7 +253,7 @@ class SyncListner {
253
final ptc = diff <= 0 ? 0.0 : diff / line;
254
final left = bchHeight - syncHeight;
255
// 1. Actual new height; 2. Blocks left to finish; 3. Progress in percents;
254
- onNewBlock(syncHeight, left, ptc);
256
+ onNewBlock?.call(syncHeight, left, ptc);
257
}
258
259
if (newTransactionExist) {
@@ -267,9 +269,9 @@ class SyncListner {
269
void stop() => _updateSyncInfoTimer?.cancel();
270
}
271
270
-SyncListner setListeners(void Function(int, int, double) onNewBlock,
272
+SyncListener setListeners(void Function(int, int, double) onNewBlock,
273
void Function() onNeedToRefresh, void Function() onNewTransaction) {
272
- final listener = SyncListner(
274
+ final listener = SyncListener(
275
onNewBlock: onNewBlock,
276
onNeedToRefresh: onNeedToRefresh,
277
onNewTransaction: onNewTransaction);
@@ -281,7 +283,20 @@ SyncListner setListeners(void Function(int, int, double) onNewBlock,
283
284
void onStartup() => onStartupNative();
285
284
-void _storeSync(Object _) => storeSync();
286
+void _storeSync(Object _) {
287
+ if (isStoring) {
288
+ return;
289
+ }
290
+
291
+ try {
292
+ isStoring = true;
293
+ storeSync();
294
+ isStoring = false;
295
+ } catch (e) {
296
+ isStoring = false;
297
+ rethrow;
298
+ }
299
+}
300
301
bool _setupNodeSync(Map args) {
302
final address = args['address'] as String;
ios/Flutter/AppFrameworkInfo.plist
+20
-20
@@ -2,25 +2,25 @@
2
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
<plist version="1.0">
4
<dict>
5
- <key>CFBundleDevelopmentRegion</key>
6
- <string>$(DEVELOPMENT_LANGUAGE)</string>
7
- <key>CFBundleExecutable</key>
8
- <string>App</string>
9
- <key>CFBundleIdentifier</key>
10
- <string>io.flutter.flutter.app</string>
11
- <key>CFBundleInfoDictionaryVersion</key>
12
- <string>6.0</string>
13
- <key>CFBundleName</key>
14
- <string>App</string>
15
- <key>CFBundlePackageType</key>
16
- <string>FMWK</string>
17
- <key>CFBundleShortVersionString</key>
18
- <string>1.0</string>
19
- <key>CFBundleSignature</key>
20
- <string>????</string>
21
- <key>CFBundleVersion</key>
22
- <string>1.0</string>
23
- <key>MinimumOSVersion</key>
24
- <string>8.0</string>
5
+ <key>CFBundleDevelopmentRegion</key>
6
+ <string>$(DEVELOPMENT_LANGUAGE)</string>
7
+ <key>CFBundleExecutable</key>
8
+ <string>App</string>
9
+ <key>CFBundleIdentifier</key>
10
+ <string>io.flutter.flutter.app</string>
11
+ <key>CFBundleInfoDictionaryVersion</key>
12
+ <string>6.0</string>
13
+ <key>CFBundleName</key>
14
+ <string>App</string>
15
+ <key>CFBundlePackageType</key>
16
+ <string>FMWK</string>
17
+ <key>CFBundleShortVersionString</key>
18
+ <string>1.0</string>
19
+ <key>CFBundleSignature</key>
20
+ <string>????</string>
21
+ <key>CFBundleVersion</key>
22
+ <string>1.0</string>
23
+ <key>MinimumOSVersion</key>
24
+ <string>13.0</string>
25
</dict>
26
</plist>
ios/Runner.xcodeproj/project.pbxproj
+6
-3
@@ -354,7 +354,7 @@
354
buildSettings = {
355
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
356
CLANG_ENABLE_MODULES = YES;
357
- CURRENT_PROJECT_VERSION = 10;
357
+ CURRENT_PROJECT_VERSION = 11;
358
DEVELOPMENT_TEAM = 32J6BB6VUS;
359
ENABLE_BITCODE = NO;
360
FRAMEWORK_SEARCH_PATHS = (
@@ -362,6 +362,7 @@
362
"$(PROJECT_DIR)/Flutter",
363
);
364
INFOPLIST_FILE = Runner/Info.plist;
365
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
366
LD_RUNPATH_SEARCH_PATHS = (
367
"$(inherited)",
368
"@executable_path/Frameworks",
@@ -493,7 +494,7 @@
494
buildSettings = {
495
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
496
CLANG_ENABLE_MODULES = YES;
496
- CURRENT_PROJECT_VERSION = 10;
497
+ CURRENT_PROJECT_VERSION = 11;
498
DEVELOPMENT_TEAM = 32J6BB6VUS;
499
ENABLE_BITCODE = NO;
500
FRAMEWORK_SEARCH_PATHS = (
@@ -501,6 +502,7 @@
502
"$(PROJECT_DIR)/Flutter",
503
);
504
INFOPLIST_FILE = Runner/Info.plist;
505
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
506
LD_RUNPATH_SEARCH_PATHS = (
507
"$(inherited)",
508
"@executable_path/Frameworks",
@@ -526,7 +528,7 @@
528
buildSettings = {
529
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
530
CLANG_ENABLE_MODULES = YES;
529
- CURRENT_PROJECT_VERSION = 10;
531
+ CURRENT_PROJECT_VERSION = 11;
532
DEVELOPMENT_TEAM = 32J6BB6VUS;
533
ENABLE_BITCODE = NO;
534
FRAMEWORK_SEARCH_PATHS = (
@@ -534,6 +536,7 @@
536
"$(PROJECT_DIR)/Flutter",
537
);
538
INFOPLIST_FILE = Runner/Info.plist;
539
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
540
LD_RUNPATH_SEARCH_PATHS = (
541
"$(inherited)",
542
"@executable_path/Frameworks",
lib/monero/get_height_by_date.dart
+16
-2
@@ -67,8 +67,22 @@ final dates = {
67
"2019-5": 1824671,
68
"2019-6": 1847005,
69
"2019-7": 1868590,
70
- "2019-8": 1888590,
71
- "2019-9": 1898590,
70
+ "2019-8": 1890552,
71
+ "2019-9": 1912212,
72
+ "2019-10": 1932200,
73
+ "2019-11": 1957040,
74
+ "2019-12": 1978090,
75
+ "2020-1": 2001290,
76
+ "2020-2": 2022688,
77
+ "2020-3": 2043987,
78
+ "2020-4": 2066536,
79
+ "2020-5": 2090797,
80
+ "2020-6": 2111633,
81
+ "2020-7": 2131433,
82
+ "2020-8": 2153983,
83
+ "2020-9": 2176466,
84
+ "2020-10": 2198453,
85
+ "2020-11": 2221803
86
};
87
88
int getHeigthByDate({DateTime date}) {
lib/monero/monero_wallet.dart
+39
-7
@@ -19,7 +19,6 @@ import 'package:cake_wallet/entities/wallet_info.dart';
19
import 'package:cake_wallet/entities/node.dart';
20
import 'package:cake_wallet/entities/transaction_priority.dart';
21
22
-
22
part 'monero_wallet.g.dart';
23
24
const moneroBlockSize = 1000;
@@ -80,7 +79,7 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance> with Store {
79
final MoneroAccountList accountList;
80
81
String _filename;
83
- SyncListner _listener;
82
+ SyncListener _listener;
83
ReactionDisposer _onAccountChangeReaction;
84
int _cachedRefreshHeight;
85
@@ -96,6 +95,15 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance> with Store {
95
address = subaddress.address;
96
_setListeners();
97
await transactionHistory.update();
98
+
99
+ if (walletInfo.isRecovery) {
100
+ monero_wallet.setRecoveringFromSeed(isRecovery: walletInfo.isRecovery);
101
+
102
+ if (monero_wallet.getCurrentHeight() <= 1) {
103
+ monero_wallet.setRefreshFromBlockHeight(
104
+ height: walletInfo.restoreHeight);
105
+ }
106
+ }
107
}
108
109
void close() {
@@ -103,6 +111,24 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance> with Store {
111
_onAccountChangeReaction?.reaction?.dispose();
112
}
113
114
+ Future<bool> validate() async {
115
+ await accountList.update();
116
+ final accountListLength = accountList.accounts?.length ?? 0;
117
+
118
+ if (accountListLength <= 0) {
119
+ return false;
120
+ }
121
+
122
+ subaddressList.update(accountIndex: accountList.accounts.first.id);
123
+ final subaddressListLength = subaddressList.subaddresses?.length ?? 0;
124
+
125
+ if (subaddressListLength <= 0) {
126
+ return false;
127
+ }
128
+
129
+ return true;
130
+ }
131
+
132
@override
133
Future<void> connectToNode({@required Node node}) async {
134
try {
@@ -275,8 +301,6 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance> with Store {
301
return;
302
}
303
278
- syncStatus = SyncedSyncStatus();
279
-
304
if (walletInfo.isRecovery) {
305
_askForUpdateTransactionHistory();
306
_askForUpdateBalance();
@@ -285,11 +309,19 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance> with Store {
309
final currentHeight = getCurrentHeight();
310
final nodeHeight = monero_wallet.getNodeHeightSync();
311
288
- if (walletInfo.isRecovery &&
289
- (nodeHeight - currentHeight < moneroBlockSize)) {
290
- await setAsRecovered();
312
+ if (nodeHeight - currentHeight < moneroBlockSize) {
313
+ syncStatus = SyncedSyncStatus();
314
+
315
+ if (walletInfo.isRecovery) {
316
+ await setAsRecovered();
317
+ }
318
}
319
320
+ // if (walletInfo.isRecovery &&
321
+ // (nodeHeight - currentHeight < moneroBlockSize)) {
322
+ // await setAsRecovered();
323
+ // }
324
+
325
if (currentHeight - _cachedRefreshHeight > moneroBlockSize) {
326
_cachedRefreshHeight = currentHeight;
327
await save();
lib/monero/monero_wallet_service.dart
+34
-5
@@ -25,6 +25,11 @@ class MoneroRestoreWalletFromSeedCredentials extends WalletCredentials {
25
final String mnemonic;
26
}
27
28
+class MoneroWalletLoadingException implements Exception {
29
+ @override
30
+ String toString() => 'The wallet is damaged.';
31
+}
32
+
33
class MoneroRestoreWalletFromKeysCredentials extends WalletCredentials {
34
MoneroRestoreWalletFromKeysCredentials(
35
{String name,
@@ -88,11 +93,29 @@ class MoneroWalletService extends WalletService<
93
Future<MoneroWallet> openWallet(String name, String password) async {
94
try {
95
final path = await pathForWallet(name: name, type: WalletType.monero);
91
- await monero_wallet_manager.openWalletAsync({'path': path, 'password': password});
96
+ await monero_wallet_manager
97
+ .openWalletAsync({'path': path, 'password': password});
98
final walletInfo = walletInfoSource.values.firstWhere(
93
- (info) => info.id == WalletBase.idFor(name, WalletType.monero), orElse: () => null);
99
+ (info) => info.id == WalletBase.idFor(name, WalletType.monero),
100
+ orElse: () => null);
101
final wallet = MoneroWallet(
102
filename: monero_wallet.getFilename(), walletInfo: walletInfo);
103
+ final isValid = await wallet.validate();
104
+
105
+ if (!isValid) {
106
+ if (wallet.seed?.isNotEmpty ?? false) {
107
+ // let restore from seed in this case;
108
+ final seed = wallet.seed;
109
+ final credentials = MoneroRestoreWalletFromSeedCredentials(
110
+ name: name, password: password, mnemonic: seed, height: 2000000)
111
+ ..walletInfo = walletInfo;
112
+ await remove(name);
113
+ return restoreFromSeed(credentials);
114
+ }
115
+
116
+ throw MoneroWalletLoadingException();
117
+ }
118
+
119
await wallet.init();
120
121
return wallet;
@@ -104,9 +127,15 @@ class MoneroWalletService extends WalletService<
127
}
128
129
@override
107
- Future<void> remove(String wallet) async =>
108
- File(await pathForWalletDir(name: wallet, type: WalletType.bitcoin))
109
- .delete(recursive: true);
130
+ Future<void> remove(String wallet) async {
131
+ final path = await pathForWalletDir(name: wallet, type: WalletType.monero);
132
+ final file = Directory(path);
133
+ final isExist = file.existsSync();
134
+
135
+ if (isExist) {
136
+ await file.delete(recursive: true);
137
+ }
138
+ }
139
140
@override
141
Future<MoneroWallet> restoreFromKeys(
lib/src/widgets/annotated_editable_text.dart
+38
-39
@@ -32,42 +32,41 @@ class AnnotatedEditableText extends EditableText {
32
Color selectionColor,
33
Color backgroundCursorColor,
34
TextSelectionControls selectionControls,
35
+ TextStyle textStyle = const TextStyle(
36
+ color: Colors.black,
37
+ backgroundColor: Colors.transparent,
38
+ fontWeight: FontWeight.normal,
39
+ fontSize: 16),
40
@required this.words,
41
}) : textAnnotations = words
37
- .map((word) => TextAnnotation(
38
- text: word,
39
- style: TextStyle(
40
- color: Colors.black,
41
- backgroundColor: Colors.transparent,
42
- fontWeight: FontWeight.normal,
43
- fontSize: 16)))
44
- .toList(),
42
+ .map((word) => TextAnnotation(text: word, style: textStyle))
43
+ .toList(),
44
super(
46
- maxLines: null,
47
- key: key,
48
- focusNode: focusNode,
49
- controller: controller,
50
- cursorColor: cursorColor,
51
- style: style,
52
- keyboardType: TextInputType.text,
53
- autocorrect: false,
54
- autofocus: false,
55
- selectionColor: selectionColor,
56
- selectionControls: selectionControls,
57
- backgroundCursorColor: backgroundCursorColor,
58
- onChanged: onChanged,
59
- onSubmitted: onSubmitted,
60
- toolbarOptions: const ToolbarOptions(
61
- copy: true,
62
- cut: true,
63
- paste: true,
64
- selectAll: true,
65
- ),
66
- enableSuggestions: false,
67
- enableInteractiveSelection: true,
68
- showSelectionHandles: true,
69
- showCursor: true,
70
- ) {
45
+ maxLines: null,
46
+ key: key,
47
+ focusNode: focusNode,
48
+ controller: controller,
49
+ cursorColor: cursorColor,
50
+ style: style,
51
+ keyboardType: TextInputType.text,
52
+ autocorrect: false,
53
+ autofocus: false,
54
+ selectionColor: selectionColor,
55
+ selectionControls: selectionControls,
56
+ backgroundCursorColor: backgroundCursorColor,
57
+ onChanged: onChanged,
58
+ onSubmitted: onSubmitted,
59
+ toolbarOptions: const ToolbarOptions(
60
+ copy: true,
61
+ cut: true,
62
+ paste: true,
63
+ selectAll: true,
64
+ ),
65
+ enableSuggestions: false,
66
+ enableInteractiveSelection: true,
67
+ showSelectionHandles: true,
68
+ showCursor: true,
69
+ ) {
70
textAnnotations.add(TextAnnotation(
71
text: ' ', style: TextStyle(backgroundColor: Colors.transparent)));
72
}
@@ -86,7 +85,7 @@ class AnnotatedEditableTextState extends EditableTextState {
85
List<Annotation> getRanges() {
86
final source = widget.textAnnotations
87
.map((item) => range(item.text, textEditingValue.text)
89
- .map((range) => Annotation(style: item.style, range: range)))
88
+ .map((range) => Annotation(style: item.style, range: range)))
89
.expand((e) => e)
90
.toList();
91
final result = List<Annotation>();
@@ -123,7 +122,7 @@ class AnnotatedEditableTextState extends EditableTextState {
122
if (result.length > 0 && result.last.range.end < text.length) {
123
result.add(Annotation(
124
range: TextRange(start: result.last.range.end, end: text.length),
126
- style: TextStyle( backgroundColor: Colors.transparent)));
125
+ style: TextStyle(backgroundColor: Colors.transparent)));
126
}
127
return result;
128
}
@@ -132,8 +131,8 @@ class AnnotatedEditableTextState extends EditableTextState {
131
final result = List<TextRange>();
132
133
for (int index = source.indexOf(pattern);
135
- index >= 0;
136
- index = source.indexOf(pattern, index + 1)) {
134
+ index >= 0;
135
+ index = source.indexOf(pattern, index + 1)) {
136
final start = index;
137
final end = start + pattern.length;
138
result.add(TextRange(start: start, end: end));
@@ -152,10 +151,10 @@ class AnnotatedEditableTextState extends EditableTextState {
151
style: widget.style,
152
children: ranges
153
.map((item) => TextSpan(
155
- style: item.style, text: item.range.textInside(text)))
154
+ style: item.style, text: item.range.textInside(text)))
155
.toList());
156
}
157
158
return TextSpan(style: widget.style, text: text);
159
}
161
-}
\ No newline at end of file
160
+}
lib/src/widgets/seed_widget.dart
+16
-10
@@ -78,16 +78,22 @@ class SeedWidgetState extends State<SeedWidget> {
78
Padding(
79
padding: EdgeInsets.only(right: 40, top: 10),
80
child: AnnotatedEditableText(
81
- cursorColor: Colors.green,
82
- backgroundCursorColor: Colors.blue,
83
- style: TextStyle(
84
- fontSize: 20,
85
- color: Colors.red,
86
- fontWeight: FontWeight.normal,
87
- backgroundColor: Colors.transparent),
88
- focusNode: focusNode,
89
- controller: controller,
90
- words: words)),
81
+ cursorColor: Colors.blue,
82
+ backgroundCursorColor: Colors.blue,
83
+ style: TextStyle(
84
+ fontSize: 16,
85
+ color: Colors.red,
86
+ fontWeight: FontWeight.normal,
87
+ backgroundColor: Colors.transparent),
88
+ focusNode: focusNode,
89
+ controller: controller,
90
+ words: words,
91
+ textStyle: TextStyle(
92
+ color: Theme.of(context).primaryTextTheme.title.color,
93
+ backgroundColor: Colors.transparent,
94
+ fontWeight: FontWeight.normal,
95
+ fontSize: 16),
96
+ )),
97
Positioned(
98
top: 0,
99
right: 0,
lib/view_model/wallet_creation_vm.dart
+1
-1
@@ -34,8 +34,8 @@ abstract class WalletCreationVMBase with Store {
34
35
Future<void> create({dynamic options}) async {
36
try {
37
- name = await generateName();
37
state = IsExecutingState();
38
+ name = await generateName();
39
final dirPath = await pathForWalletDir(name: name, type: type);
40
final path = await pathForWallet(name: name, type: type);
41
final credentials = getCredentials(options);
lib/view_model/wallet_restore_view_model.dart
+2
-1
@@ -55,7 +55,8 @@ abstract class WalletRestoreViewModelBase extends WalletCreationVM with Store {
55
spendKey: spendKey,
56
viewKey: viewKey,
57
address: address,
58
- password: password);
58
+ password: password,
59
+ language: 'English');
60
}
61
62
return null;
pubspec.lock
+10
-10
@@ -7,14 +7,14 @@ packages:
7
name: _fe_analyzer_shared
8
url: "https://pub.dartlang.org"
9
source: hosted
10
- version: "11.0.0"
10
+ version: "12.0.0"
11
analyzer:
12
dependency: transitive
13
description:
14
name: analyzer
15
url: "https://pub.dartlang.org"
16
source: hosted
17
- version: "0.40.4"
17
+ version: "0.40.5"
18
archive:
19
dependency: transitive
20
description:
@@ -140,7 +140,7 @@ packages:
140
name: build_runner
141
url: "https://pub.dartlang.org"
142
source: hosted
143
- version: "1.10.3"
143
+ version: "1.10.4"
144
build_runner_core:
145
dependency: transitive
146
description:
@@ -575,14 +575,14 @@ packages:
575
name: mobx
576
url: "https://pub.dartlang.org"
577
source: hosted
578
- version: "1.2.1+3"
578
+ version: "1.2.1+4"
579
mobx_codegen:
580
dependency: "direct dev"
581
description:
582
name: mobx_codegen
583
url: "https://pub.dartlang.org"
584
source: hosted
585
- version: "1.1.1+1"
585
+ version: "1.1.1+3"
586
node_interop:
587
dependency: transitive
588
description:
@@ -729,7 +729,7 @@ packages:
729
name: protobuf
730
url: "https://pub.dartlang.org"
731
source: hosted
732
- version: "1.0.1"
732
+ version: "1.1.0"
733
provider:
734
dependency: "direct main"
735
description:
@@ -764,7 +764,7 @@ packages:
764
name: quiver
765
url: "https://pub.dartlang.org"
766
source: hosted
767
- version: "2.1.3"
767
+ version: "2.1.4+1"
768
rxdart:
769
dependency: "direct main"
770
description:
@@ -778,7 +778,7 @@ packages:
778
name: share
779
url: "https://pub.dartlang.org"
780
source: hosted
781
- version: "0.6.5+3"
781
+ version: "0.6.5+4"
782
shared_preferences:
783
dependency: "direct main"
784
description:
@@ -853,7 +853,7 @@ packages:
853
name: source_gen
854
url: "https://pub.dartlang.org"
855
source: hosted
856
- version: "0.9.7+1"
856
+ version: "0.9.8"
857
source_span:
858
dependency: transitive
859
description:
@@ -1023,5 +1023,5 @@ packages:
1023
source: hosted
1024
version: "2.2.1"
1025
sdks:
1026
- dart: ">=2.10.0-110 <2.11.0"
1026
+ dart: ">=2.10.0 <2.11.0"
1027
flutter: ">=1.22.0 <2.0.0"