Merge pull request #97 from cake-tech/CAKE-31-update-restore-screens
Cake 31 update restore screens
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 9 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.8 KiB |
|
@ -7,42 +7,42 @@ packages:
|
||||||
name: archive
|
name: archive
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.11"
|
version: "2.0.13"
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: args
|
name: args
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.5.2"
|
version: "1.6.0"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.0"
|
version: "2.4.1"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: boolean_selector
|
name: boolean_selector
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.5"
|
version: "2.0.0"
|
||||||
charcode:
|
charcode:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: charcode
|
name: charcode
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.2"
|
version: "1.1.3"
|
||||||
collection:
|
collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.14.11"
|
version: "1.14.12"
|
||||||
convert:
|
convert:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -56,7 +56,7 @@ packages:
|
||||||
name: crypto
|
name: crypto
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.3"
|
version: "2.1.4"
|
||||||
ffi:
|
ffi:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -80,7 +80,7 @@ packages:
|
||||||
name: image
|
name: image
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.4"
|
version: "2.1.12"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -109,13 +109,6 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.4.0"
|
version: "1.4.0"
|
||||||
pedantic:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: pedantic
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "1.8.0+1"
|
|
||||||
petitparser:
|
petitparser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -136,7 +129,7 @@ packages:
|
||||||
name: quiver
|
name: quiver
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.5"
|
version: "2.1.3"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
|
@ -148,7 +141,7 @@ packages:
|
||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.5.5"
|
version: "1.7.0"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -183,7 +176,7 @@ packages:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.11"
|
version: "0.2.15"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -204,7 +197,7 @@ packages:
|
||||||
name: xml
|
name: xml
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.5.0"
|
version: "3.6.1"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.6.0 <3.0.0"
|
dart: ">=2.6.0 <3.0.0"
|
||||||
flutter: ">=0.1.4 <2.0.0"
|
flutter: ">=0.1.4 <2.0.0"
|
||||||
|
|
91
ios/Podfile
|
@ -15,59 +15,72 @@ def parse_KV_file(file, separator='=')
|
||||||
if !File.exists? file_abs_path
|
if !File.exists? file_abs_path
|
||||||
return [];
|
return [];
|
||||||
end
|
end
|
||||||
pods_ary = []
|
generated_key_values = {}
|
||||||
skip_line_start_symbols = ["#", "/"]
|
skip_line_start_symbols = ["#", "/"]
|
||||||
File.foreach(file_abs_path) { |line|
|
File.foreach(file_abs_path) do |line|
|
||||||
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
|
||||||
plugin = line.split(pattern=separator)
|
plugin = line.split(pattern=separator)
|
||||||
if plugin.length == 2
|
if plugin.length == 2
|
||||||
podname = plugin[0].strip()
|
podname = plugin[0].strip()
|
||||||
path = plugin[1].strip()
|
path = plugin[1].strip()
|
||||||
podpath = File.expand_path("#{path}", file_abs_path)
|
podpath = File.expand_path("#{path}", file_abs_path)
|
||||||
pods_ary.push({:name => podname, :path => podpath});
|
generated_key_values[podname] = podpath
|
||||||
else
|
else
|
||||||
puts "Invalid plugin specification: #{line}"
|
puts "Invalid plugin specification: #{line}"
|
||||||
end
|
end
|
||||||
}
|
end
|
||||||
return pods_ary
|
generated_key_values
|
||||||
end
|
end
|
||||||
|
|
||||||
target 'Runner' do
|
target 'Runner' do
|
||||||
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
|
|
||||||
# referring to absolute paths on developers' machines.
|
|
||||||
use_frameworks!
|
use_frameworks!
|
||||||
system('rm -rf .symlinks')
|
use_modular_headers!
|
||||||
system('mkdir -p .symlinks/plugins')
|
|
||||||
|
|
||||||
# Flutter Pods
|
# Flutter Pod
|
||||||
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
|
|
||||||
if generated_xcode_build_settings.empty?
|
copied_flutter_dir = File.join(__dir__, 'Flutter')
|
||||||
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first."
|
copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
|
||||||
end
|
copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
|
||||||
generated_xcode_build_settings.map { |p|
|
unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
|
||||||
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
|
# Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
|
||||||
symlink = File.join('.symlinks', 'flutter')
|
# That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
|
||||||
File.symlink(File.dirname(p[:path]), symlink)
|
# CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
|
||||||
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
|
|
||||||
|
generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
|
||||||
|
unless File.exist?(generated_xcode_build_settings_path)
|
||||||
|
raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
|
||||||
end
|
end
|
||||||
}
|
generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
|
||||||
|
cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
|
||||||
|
|
||||||
|
unless File.exist?(copied_framework_path)
|
||||||
|
FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
|
||||||
|
end
|
||||||
|
unless File.exist?(copied_podspec_path)
|
||||||
|
FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Keep pod path relative so it can be checked into Podfile.lock.
|
||||||
|
pod 'Flutter', :path => 'Flutter'
|
||||||
|
|
||||||
# Plugin Pods
|
# Plugin Pods
|
||||||
plugin_pods = parse_KV_file('../.flutter-plugins')
|
|
||||||
plugin_pods.map { |p|
|
|
||||||
symlink = File.join('.symlinks', 'plugins', p[:name])
|
|
||||||
File.symlink(p[:path], symlink)
|
|
||||||
pod p[:name], :path => File.join(symlink, 'ios')
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
|
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
|
||||||
install! 'cocoapods', :disable_input_output_paths => true
|
# referring to absolute paths on developers' machines.
|
||||||
|
system('rm -rf .symlinks')
|
||||||
|
system('mkdir -p .symlinks/plugins')
|
||||||
|
plugin_pods = parse_KV_file('../.flutter-plugins')
|
||||||
|
plugin_pods.each do |name, path|
|
||||||
|
symlink = File.join('.symlinks', 'plugins', name)
|
||||||
|
File.symlink(path, symlink)
|
||||||
|
pod name, :path => File.join(symlink, 'ios')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
post_install do |installer|
|
post_install do |installer|
|
||||||
installer.pods_project.targets.each do |target|
|
installer.pods_project.targets.each do |target|
|
||||||
target.build_configurations.each do |config|
|
target.build_configurations.each do |config|
|
||||||
config.build_settings['SWIFT_VERSION'] = '4.0' # required by simple_permission
|
|
||||||
config.build_settings['ENABLE_BITCODE'] = 'NO'
|
config.build_settings['ENABLE_BITCODE'] = 'NO'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -61,7 +61,7 @@ DEPENDENCIES:
|
||||||
- cw_monero (from `.symlinks/plugins/cw_monero/ios`)
|
- cw_monero (from `.symlinks/plugins/cw_monero/ios`)
|
||||||
- devicelocale (from `.symlinks/plugins/devicelocale/ios`)
|
- devicelocale (from `.symlinks/plugins/devicelocale/ios`)
|
||||||
- esys_flutter_share (from `.symlinks/plugins/esys_flutter_share/ios`)
|
- esys_flutter_share (from `.symlinks/plugins/esys_flutter_share/ios`)
|
||||||
- Flutter (from `.symlinks/flutter/ios`)
|
- Flutter (from `Flutter`)
|
||||||
- flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`)
|
- flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`)
|
||||||
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
|
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
|
||||||
- local_auth (from `.symlinks/plugins/local_auth/ios`)
|
- local_auth (from `.symlinks/plugins/local_auth/ios`)
|
||||||
|
@ -92,7 +92,7 @@ EXTERNAL SOURCES:
|
||||||
esys_flutter_share:
|
esys_flutter_share:
|
||||||
:path: ".symlinks/plugins/esys_flutter_share/ios"
|
:path: ".symlinks/plugins/esys_flutter_share/ios"
|
||||||
Flutter:
|
Flutter:
|
||||||
:path: ".symlinks/flutter/ios"
|
:path: Flutter
|
||||||
flutter_plugin_android_lifecycle:
|
flutter_plugin_android_lifecycle:
|
||||||
:path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios"
|
:path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios"
|
||||||
flutter_secure_storage:
|
flutter_secure_storage:
|
||||||
|
@ -145,6 +145,6 @@ SPEC CHECKSUMS:
|
||||||
url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313
|
url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313
|
||||||
url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c
|
url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c
|
||||||
|
|
||||||
PODFILE CHECKSUM: f1916a43bb28badbd408be80e8e4b8652a74e93e
|
PODFILE CHECKSUM: c34e2287a9ccaa606aeceab922830efb9a6ff69a
|
||||||
|
|
||||||
COCOAPODS: 1.9.3
|
COCOAPODS: 1.9.3
|
||||||
|
|
|
@ -272,9 +272,40 @@
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
inputPaths = (
|
inputPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
|
||||||
|
"${PODS_ROOT}/../Flutter/Flutter.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/MTBBarcodeScanner/MTBBarcodeScanner.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/SwiftProtobuf/SwiftProtobuf.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/barcode_scan/barcode_scan.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/cw_monero/cw_monero.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/devicelocale/devicelocale.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/esys_flutter_share/esys_flutter_share.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/flutter_plugin_android_lifecycle/flutter_plugin_android_lifecycle.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/flutter_secure_storage/flutter_secure_storage.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/local_auth/local_auth.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/package_info/package_info.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/share/share.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/url_launcher/url_launcher.framework",
|
||||||
);
|
);
|
||||||
name = "[CP] Embed Pods Frameworks";
|
name = "[CP] Embed Pods Frameworks";
|
||||||
outputPaths = (
|
outputPaths = (
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MTBBarcodeScanner.framework",
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftProtobuf.framework",
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/barcode_scan.framework",
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/cw_monero.framework",
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/devicelocale.framework",
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/esys_flutter_share.framework",
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_plugin_android_lifecycle.framework",
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_secure_storage.framework",
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth.framework",
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info.framework",
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework",
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/share.framework",
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework",
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher.framework",
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
|
|
14
lib/di.dart
|
@ -57,6 +57,7 @@ import 'package:mobx/mobx.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||||
import 'package:cake_wallet/view_model/wallet_restoration_from_seed_vm.dart';
|
import 'package:cake_wallet/view_model/wallet_restoration_from_seed_vm.dart';
|
||||||
|
import 'package:cake_wallet/view_model/wallet_restoration_from_keys_vm.dart';
|
||||||
import 'package:cake_wallet/core/wallet_creation_service.dart';
|
import 'package:cake_wallet/core/wallet_creation_service.dart';
|
||||||
import 'package:cake_wallet/store/app_store.dart';
|
import 'package:cake_wallet/store/app_store.dart';
|
||||||
import 'package:cake_wallet/src/domain/common/wallet_type.dart';
|
import 'package:cake_wallet/src/domain/common/wallet_type.dart';
|
||||||
|
@ -156,6 +157,16 @@ Future setup(
|
||||||
type: type, language: language, seed: mnemonic);
|
type: type, language: language, seed: mnemonic);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
getIt
|
||||||
|
.registerFactoryParam<WalletRestorationFromKeysVM, List, void>((args, _) {
|
||||||
|
final type = args.first as WalletType;
|
||||||
|
final language = args[1] as String;
|
||||||
|
|
||||||
|
return WalletRestorationFromKeysVM(
|
||||||
|
getIt.get<WalletCreationService>(param1: type), walletInfoSource,
|
||||||
|
type: type, language: language);
|
||||||
|
});
|
||||||
|
|
||||||
getIt.registerFactory<WalletAddressListViewModel>(
|
getIt.registerFactory<WalletAddressListViewModel>(
|
||||||
() => WalletAddressListViewModel(wallet: getIt.get<AppStore>().wallet));
|
() => WalletAddressListViewModel(wallet: getIt.get<AppStore>().wallet));
|
||||||
|
|
||||||
|
@ -290,9 +301,6 @@ Future setup(
|
||||||
getIt.registerFactory(() => ContactListViewModel(
|
getIt.registerFactory(() => ContactListViewModel(
|
||||||
getIt.get<AppStore>().contactListStore, getIt.get<ContactService>()));
|
getIt.get<AppStore>().contactListStore, getIt.get<ContactService>()));
|
||||||
|
|
||||||
/*getIt.registerFactory(
|
|
||||||
() => ContactListPage(getIt.get<ContactListViewModel>()));*/
|
|
||||||
|
|
||||||
getIt.registerFactoryParam<ContactListPage, bool, void>((bool isEditable, _) =>
|
getIt.registerFactoryParam<ContactListPage, bool, void>((bool isEditable, _) =>
|
||||||
ContactListPage(getIt.get<ContactListViewModel>(), isEditable: isEditable));
|
ContactListPage(getIt.get<ContactListViewModel>(), isEditable: isEditable));
|
||||||
|
|
||||||
|
|
|
@ -144,6 +144,9 @@ class S implements WidgetsLocalizations {
|
||||||
String get reset => "Reset";
|
String get reset => "Reset";
|
||||||
String get restore_active_seed => "Active seed";
|
String get restore_active_seed => "Active seed";
|
||||||
String get restore_address => "Address";
|
String get restore_address => "Address";
|
||||||
|
String get restore_bitcoin_description_from_keys => "Restore your wallet from generated WIF string from your private keys";
|
||||||
|
String get restore_bitcoin_description_from_seed => "Restore your wallet from 12 word combination code";
|
||||||
|
String get restore_bitcoin_title_from_keys => "Restore from WIF";
|
||||||
String get restore_description_from_backup => "You can restore the whole Cake Wallet app from your back-up file";
|
String get restore_description_from_backup => "You can restore the whole Cake Wallet app from your back-up file";
|
||||||
String get restore_description_from_keys => "Restore your wallet from generated keystrokes saved from your private keys";
|
String get restore_description_from_keys => "Restore your wallet from generated keystrokes saved from your private keys";
|
||||||
String get restore_description_from_seed => "Restore your wallet from either the 25 word or 13 word combination code";
|
String get restore_description_from_seed => "Restore your wallet from either the 25 word or 13 word combination code";
|
||||||
|
@ -496,6 +499,8 @@ class $de extends S {
|
||||||
@override
|
@override
|
||||||
String get settings_title => "die Einstellungen";
|
String get settings_title => "die Einstellungen";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_seed => "Stellen Sie Ihre Brieftasche aus dem 12-Wort-Kombinationscode wieder her";
|
||||||
|
@override
|
||||||
String get address_book_menu => "Adressbuch";
|
String get address_book_menu => "Adressbuch";
|
||||||
@override
|
@override
|
||||||
String get wallet_restoration_store_incorrect_seed_length => "Falsche Samenlänge";
|
String get wallet_restoration_store_incorrect_seed_length => "Falsche Samenlänge";
|
||||||
|
@ -630,6 +635,10 @@ class $de extends S {
|
||||||
@override
|
@override
|
||||||
String get xmr_available_balance => "XMR verfügbares Guthaben";
|
String get xmr_available_balance => "XMR verfügbares Guthaben";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_keys => "Stellen Sie Ihre Brieftasche aus der generierten WIF-Zeichenfolge aus Ihren privaten Schlüsseln wieder her";
|
||||||
|
@override
|
||||||
|
String get restore_bitcoin_title_from_keys => "Aus WIF wiederherstellen";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "Scannen Sie den QR-Code, um die Adresse zu erhalten";
|
String get scan_qr_code => "Scannen Sie den QR-Code, um die Adresse zu erhalten";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "Bezahlt";
|
String get trade_state_paid => "Bezahlt";
|
||||||
|
@ -1128,6 +1137,8 @@ class $hi extends S {
|
||||||
@override
|
@override
|
||||||
String get settings_title => "सेटिंग्स";
|
String get settings_title => "सेटिंग्स";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_seed => "12 शब्द संयोजन कोड से अपने वॉलेट को पुनर्स्थापित करें";
|
||||||
|
@override
|
||||||
String get address_book_menu => "पता पुस्तिका";
|
String get address_book_menu => "पता पुस्तिका";
|
||||||
@override
|
@override
|
||||||
String get wallet_restoration_store_incorrect_seed_length => "गलत बीज की लंबाई";
|
String get wallet_restoration_store_incorrect_seed_length => "गलत बीज की लंबाई";
|
||||||
|
@ -1262,6 +1273,10 @@ class $hi extends S {
|
||||||
@override
|
@override
|
||||||
String get xmr_available_balance => "XMR उपलब्ध शेष राशि";
|
String get xmr_available_balance => "XMR उपलब्ध शेष राशि";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_keys => "अपने निजी कुंजी से उत्पन्न WIF स्ट्रिंग से अपने वॉलेट को पुनर्स्थापित करें";
|
||||||
|
@override
|
||||||
|
String get restore_bitcoin_title_from_keys => "WIF से पुनर्स्थापित करें";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "पता प्राप्त करने के लिए QR कोड स्कैन करें";
|
String get scan_qr_code => "पता प्राप्त करने के लिए QR कोड स्कैन करें";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "भुगतान किया है";
|
String get trade_state_paid => "भुगतान किया है";
|
||||||
|
@ -1760,6 +1775,8 @@ class $ru extends S {
|
||||||
@override
|
@override
|
||||||
String get settings_title => "Настройки";
|
String get settings_title => "Настройки";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_seed => "Вы можете восстановить кошелёк используя 12-ти значную мнемоническую фразу";
|
||||||
|
@override
|
||||||
String get address_book_menu => "Адресная книга";
|
String get address_book_menu => "Адресная книга";
|
||||||
@override
|
@override
|
||||||
String get wallet_restoration_store_incorrect_seed_length => "Неверная длина мнемонической фразы";
|
String get wallet_restoration_store_incorrect_seed_length => "Неверная длина мнемонической фразы";
|
||||||
|
@ -1894,6 +1911,10 @@ class $ru extends S {
|
||||||
@override
|
@override
|
||||||
String get xmr_available_balance => "Доступный XMR баланс";
|
String get xmr_available_balance => "Доступный XMR баланс";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_keys => "Вы можете восстановить кошелёк с помощью WIF";
|
||||||
|
@override
|
||||||
|
String get restore_bitcoin_title_from_keys => "Восстановить с помощью WIF";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "Отсканируйте QR-код для получения адреса";
|
String get scan_qr_code => "Отсканируйте QR-код для получения адреса";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "Оплаченная";
|
String get trade_state_paid => "Оплаченная";
|
||||||
|
@ -2392,6 +2413,8 @@ class $ko extends S {
|
||||||
@override
|
@override
|
||||||
String get settings_title => "설정";
|
String get settings_title => "설정";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_seed => "12 단어 조합 코드에서 지갑 복원";
|
||||||
|
@override
|
||||||
String get address_book_menu => "주소록";
|
String get address_book_menu => "주소록";
|
||||||
@override
|
@override
|
||||||
String get wallet_restoration_store_incorrect_seed_length => "시드 길이가 잘못되었습니다";
|
String get wallet_restoration_store_incorrect_seed_length => "시드 길이가 잘못되었습니다";
|
||||||
|
@ -2526,6 +2549,10 @@ class $ko extends S {
|
||||||
@override
|
@override
|
||||||
String get xmr_available_balance => "XMR 사용 가능한 잔액";
|
String get xmr_available_balance => "XMR 사용 가능한 잔액";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_keys => "개인 키에서 생성 된 WIF 문자열에서 지갑 복원";
|
||||||
|
@override
|
||||||
|
String get restore_bitcoin_title_from_keys => "WIF에서 복원";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "QR 코드를 스캔하여 주소를 얻습니다.";
|
String get scan_qr_code => "QR 코드를 스캔하여 주소를 얻습니다.";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "유료";
|
String get trade_state_paid => "유료";
|
||||||
|
@ -3024,6 +3051,8 @@ class $pt extends S {
|
||||||
@override
|
@override
|
||||||
String get settings_title => "Configurações";
|
String get settings_title => "Configurações";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_seed => "Restaure sua carteira a partir de um código de combinação de 12 palavras";
|
||||||
|
@override
|
||||||
String get address_book_menu => "Livro de endereços";
|
String get address_book_menu => "Livro de endereços";
|
||||||
@override
|
@override
|
||||||
String get wallet_restoration_store_incorrect_seed_length => "Comprimento de semente incorreto";
|
String get wallet_restoration_store_incorrect_seed_length => "Comprimento de semente incorreto";
|
||||||
|
@ -3158,6 +3187,10 @@ class $pt extends S {
|
||||||
@override
|
@override
|
||||||
String get xmr_available_balance => "Saldo XMR disponível";
|
String get xmr_available_balance => "Saldo XMR disponível";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_keys => "Restaure sua carteira a partir da string WIF gerada de suas chaves privadas";
|
||||||
|
@override
|
||||||
|
String get restore_bitcoin_title_from_keys => "Restaurar de WIF";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "Digitalize o código QR para obter o endereço";
|
String get scan_qr_code => "Digitalize o código QR para obter o endereço";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "Paga";
|
String get trade_state_paid => "Paga";
|
||||||
|
@ -3656,6 +3689,8 @@ class $uk extends S {
|
||||||
@override
|
@override
|
||||||
String get settings_title => "Налаштування";
|
String get settings_title => "Налаштування";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_seed => "Ви можете відновити гаманець використовуючи 12-ти слівну мнемонічну фразу";
|
||||||
|
@override
|
||||||
String get address_book_menu => "Адресна книга";
|
String get address_book_menu => "Адресна книга";
|
||||||
@override
|
@override
|
||||||
String get wallet_restoration_store_incorrect_seed_length => "Невірна довжина мнемонічної фрази";
|
String get wallet_restoration_store_incorrect_seed_length => "Невірна довжина мнемонічної фрази";
|
||||||
|
@ -3790,6 +3825,10 @@ class $uk extends S {
|
||||||
@override
|
@override
|
||||||
String get xmr_available_balance => "Доступний XMR баланс";
|
String get xmr_available_balance => "Доступний XMR баланс";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_keys => "Ви можете відновити гаманець за допомогою WIF";
|
||||||
|
@override
|
||||||
|
String get restore_bitcoin_title_from_keys => "Відновити за допомогою WIF";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "Скануйте QR-код для одержання адреси";
|
String get scan_qr_code => "Скануйте QR-код для одержання адреси";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "Оплачена";
|
String get trade_state_paid => "Оплачена";
|
||||||
|
@ -4288,6 +4327,8 @@ class $ja extends S {
|
||||||
@override
|
@override
|
||||||
String get settings_title => "設定";
|
String get settings_title => "設定";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_seed => "12ワードの組み合わせコードからウォレットを復元する";
|
||||||
|
@override
|
||||||
String get address_book_menu => "住所録";
|
String get address_book_menu => "住所録";
|
||||||
@override
|
@override
|
||||||
String get wallet_restoration_store_incorrect_seed_length => "誤ったシード長s";
|
String get wallet_restoration_store_incorrect_seed_length => "誤ったシード長s";
|
||||||
|
@ -4422,6 +4463,10 @@ class $ja extends S {
|
||||||
@override
|
@override
|
||||||
String get xmr_available_balance => "XMR利用可能残高";
|
String get xmr_available_balance => "XMR利用可能残高";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_keys => "秘密鍵から生成されたWIF文字列からウォレットを復元します";
|
||||||
|
@override
|
||||||
|
String get restore_bitcoin_title_from_keys => "WIFから復元";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "QRコードをスキャンして住所を取得します";
|
String get scan_qr_code => "QRコードをスキャンして住所を取得します";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "有料";
|
String get trade_state_paid => "有料";
|
||||||
|
@ -4924,6 +4969,8 @@ class $pl extends S {
|
||||||
@override
|
@override
|
||||||
String get settings_title => "Ustawienia";
|
String get settings_title => "Ustawienia";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_seed => "Przywróć swój portfel z kodu złożonego z 12 słów";
|
||||||
|
@override
|
||||||
String get address_book_menu => "Książka adresowa";
|
String get address_book_menu => "Książka adresowa";
|
||||||
@override
|
@override
|
||||||
String get wallet_restoration_store_incorrect_seed_length => "Nieprawidłowa długość nasion";
|
String get wallet_restoration_store_incorrect_seed_length => "Nieprawidłowa długość nasion";
|
||||||
|
@ -5058,6 +5105,10 @@ class $pl extends S {
|
||||||
@override
|
@override
|
||||||
String get xmr_available_balance => "XMR Dostępne saldo";
|
String get xmr_available_balance => "XMR Dostępne saldo";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_keys => "Przywróć swój portfel z wygenerowanego ciągu WIF z kluczy prywatnych";
|
||||||
|
@override
|
||||||
|
String get restore_bitcoin_title_from_keys => "Przywróć z WIF";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "Zeskanuj kod QR, aby uzyskać adres";
|
String get scan_qr_code => "Zeskanuj kod QR, aby uzyskać adres";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "Płatny";
|
String get trade_state_paid => "Płatny";
|
||||||
|
@ -5556,6 +5607,8 @@ class $es extends S {
|
||||||
@override
|
@override
|
||||||
String get settings_title => "Configuraciones";
|
String get settings_title => "Configuraciones";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_seed => "Restaure su billetera a partir del código de combinación de 12 palabras";
|
||||||
|
@override
|
||||||
String get address_book_menu => "Libreta de direcciones";
|
String get address_book_menu => "Libreta de direcciones";
|
||||||
@override
|
@override
|
||||||
String get wallet_restoration_store_incorrect_seed_length => "Longitud de semilla incorrecta";
|
String get wallet_restoration_store_incorrect_seed_length => "Longitud de semilla incorrecta";
|
||||||
|
@ -5690,6 +5743,10 @@ class $es extends S {
|
||||||
@override
|
@override
|
||||||
String get xmr_available_balance => "XMR Available Balance";
|
String get xmr_available_balance => "XMR Available Balance";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_keys => "Restaure su billetera a partir de una cadena WIF generada a partir de sus claves privadas";
|
||||||
|
@override
|
||||||
|
String get restore_bitcoin_title_from_keys => "Restaurar desde WIF";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "Escanee el código QR para obtener la dirección";
|
String get scan_qr_code => "Escanee el código QR para obtener la dirección";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "Pagado";
|
String get trade_state_paid => "Pagado";
|
||||||
|
@ -6188,6 +6245,8 @@ class $nl extends S {
|
||||||
@override
|
@override
|
||||||
String get settings_title => "Instellingen";
|
String get settings_title => "Instellingen";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_seed => "Herstel uw portemonnee met een combinatiecode van 12 woorden";
|
||||||
|
@override
|
||||||
String get address_book_menu => "Adresboek";
|
String get address_book_menu => "Adresboek";
|
||||||
@override
|
@override
|
||||||
String get wallet_restoration_store_incorrect_seed_length => "Onjuiste zaadlengte";
|
String get wallet_restoration_store_incorrect_seed_length => "Onjuiste zaadlengte";
|
||||||
|
@ -6322,6 +6381,10 @@ class $nl extends S {
|
||||||
@override
|
@override
|
||||||
String get xmr_available_balance => "XMR Beschikbaar saldo";
|
String get xmr_available_balance => "XMR Beschikbaar saldo";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_keys => "Herstel uw portemonnee van de gegenereerde WIF-string van uw privésleutels";
|
||||||
|
@override
|
||||||
|
String get restore_bitcoin_title_from_keys => "Herstel van WIF";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "Scan de QR-code om het adres te krijgen";
|
String get scan_qr_code => "Scan de QR-code om het adres te krijgen";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "Betaald";
|
String get trade_state_paid => "Betaald";
|
||||||
|
@ -6820,6 +6883,8 @@ class $zh extends S {
|
||||||
@override
|
@override
|
||||||
String get settings_title => "设定值";
|
String get settings_title => "设定值";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_seed => "從12個單詞的組合碼恢復您的錢包";
|
||||||
|
@override
|
||||||
String get address_book_menu => "地址簿";
|
String get address_book_menu => "地址簿";
|
||||||
@override
|
@override
|
||||||
String get wallet_restoration_store_incorrect_seed_length => "种子长度错误";
|
String get wallet_restoration_store_incorrect_seed_length => "种子长度错误";
|
||||||
|
@ -6954,6 +7019,10 @@ class $zh extends S {
|
||||||
@override
|
@override
|
||||||
String get xmr_available_balance => "XMR 可用余额 ";
|
String get xmr_available_balance => "XMR 可用余额 ";
|
||||||
@override
|
@override
|
||||||
|
String get restore_bitcoin_description_from_keys => "從私鑰中生成的WIF字符串還原您的錢包";
|
||||||
|
@override
|
||||||
|
String get restore_bitcoin_title_from_keys => "從WIF還原";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "掃描二維碼獲取地址";
|
String get scan_qr_code => "掃描二維碼獲取地址";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "已付费";
|
String get trade_state_paid => "已付费";
|
||||||
|
|
|
@ -2,6 +2,7 @@ import 'package:cake_wallet/src/screens/dashboard/dashboard_page.dart';
|
||||||
import 'package:cake_wallet/src/screens/seed/wallet_seed_page.dart';
|
import 'package:cake_wallet/src/screens/seed/wallet_seed_page.dart';
|
||||||
import 'package:cake_wallet/view_model/wallet_new_vm.dart';
|
import 'package:cake_wallet/view_model/wallet_new_vm.dart';
|
||||||
import 'package:cake_wallet/view_model/wallet_restoration_from_seed_vm.dart';
|
import 'package:cake_wallet/view_model/wallet_restoration_from_seed_vm.dart';
|
||||||
|
import 'package:cake_wallet/view_model/wallet_restoration_from_keys_vm.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||||
|
@ -165,6 +166,7 @@ class Router {
|
||||||
builder: (_) => NewWalletTypePage(
|
builder: (_) => NewWalletTypePage(
|
||||||
onTypeSelected: (context, type) => Navigator.of(context)
|
onTypeSelected: (context, type) => Navigator.of(context)
|
||||||
.pushNamed(Routes.restoreWalletOptions, arguments: type),
|
.pushNamed(Routes.restoreWalletOptions, arguments: type),
|
||||||
|
isNewWallet: false,
|
||||||
));
|
));
|
||||||
|
|
||||||
case Routes.restoreOptions:
|
case Routes.restoreOptions:
|
||||||
|
@ -196,7 +198,7 @@ class Router {
|
||||||
? Routes.seedLanguage
|
? Routes.seedLanguage
|
||||||
: Routes.restoreWalletFromKeys;
|
: Routes.restoreWalletFromKeys;
|
||||||
final args = type == WalletType.monero
|
final args = type == WalletType.monero
|
||||||
? [type, Routes.restoreWalletFromSeed]
|
? [type, Routes.restoreWalletFromKeys]
|
||||||
: [type];
|
: [type];
|
||||||
|
|
||||||
Navigator.of(context).pushNamed(route, arguments: args);
|
Navigator.of(context).pushNamed(route, arguments: args);
|
||||||
|
@ -236,17 +238,12 @@ class Router {
|
||||||
? args[1] as String
|
? args[1] as String
|
||||||
: 'English'; // FIXME: Unnamed constant; English default and only one language for bitcoin.
|
: 'English'; // FIXME: Unnamed constant; English default and only one language for bitcoin.
|
||||||
|
|
||||||
|
final walletRestorationFromKeysVM =
|
||||||
|
getIt.get<WalletRestorationFromKeysVM>(param1: [type, language]);
|
||||||
|
|
||||||
return CupertinoPageRoute<void>(
|
return CupertinoPageRoute<void>(
|
||||||
builder: (_) =>
|
builder: (_) => RestoreWalletFromKeysPage(
|
||||||
ProxyProvider<AuthenticationStore, WalletRestorationStore>(
|
walletRestorationFromKeysVM: walletRestorationFromKeysVM));
|
||||||
update: (_, authStore, __) => WalletRestorationStore(
|
|
||||||
authStore: authStore,
|
|
||||||
sharedPreferences: sharedPreferences,
|
|
||||||
walletListService: walletListService),
|
|
||||||
child: RestoreWalletFromKeysPage(
|
|
||||||
walletsService: walletListService,
|
|
||||||
walletService: walletService,
|
|
||||||
sharedPreferences: sharedPreferences)));
|
|
||||||
|
|
||||||
case Routes.dashboard:
|
case Routes.dashboard:
|
||||||
return CupertinoPageRoute<void>(
|
return CupertinoPageRoute<void>(
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import 'package:cake_wallet/di.dart';
|
||||||
|
import 'package:cake_wallet/store/settings_store.dart';
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
@ -40,6 +42,7 @@ class _WalletNameFormState extends State<WalletNameForm> {
|
||||||
static const aspectRatioImage = 1.22;
|
static const aspectRatioImage = 1.22;
|
||||||
|
|
||||||
final walletNameImage = Image.asset('assets/images/wallet_name.png');
|
final walletNameImage = Image.asset('assets/images/wallet_name.png');
|
||||||
|
final walletNameLightImage = Image.asset('assets/images/wallet_name_light.png');
|
||||||
final _formKey = GlobalKey<FormState>();
|
final _formKey = GlobalKey<FormState>();
|
||||||
final _languageSelectorKey = GlobalKey<SeedLanguageSelectorState>();
|
final _languageSelectorKey = GlobalKey<SeedLanguageSelectorState>();
|
||||||
ReactionDisposer _stateReaction;
|
ReactionDisposer _stateReaction;
|
||||||
|
@ -72,6 +75,9 @@ class _WalletNameFormState extends State<WalletNameForm> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final walletImage = getIt.get<SettingsStore>().isDarkTheme
|
||||||
|
? walletNameImage : walletNameLightImage;
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.only(top: 24),
|
padding: EdgeInsets.only(top: 24),
|
||||||
child: ScrollableWithBottomSection(
|
child: ScrollableWithBottomSection(
|
||||||
|
@ -82,7 +88,7 @@ class _WalletNameFormState extends State<WalletNameForm> {
|
||||||
padding: EdgeInsets.only(left: 12, right: 12),
|
padding: EdgeInsets.only(left: 12, right: 12),
|
||||||
child: AspectRatio(
|
child: AspectRatio(
|
||||||
aspectRatio: aspectRatioImage,
|
aspectRatio: aspectRatioImage,
|
||||||
child: FittedBox(child: walletNameImage, fit: BoxFit.fill)),
|
child: FittedBox(child: walletImage, fit: BoxFit.fill)),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: 24),
|
padding: EdgeInsets.only(top: 24),
|
||||||
|
@ -98,19 +104,26 @@ class _WalletNameFormState extends State<WalletNameForm> {
|
||||||
Theme.of(context).primaryTextTheme.title.color),
|
Theme.of(context).primaryTextTheme.title.color),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
fontSize: 16.0,
|
fontSize: 18.0,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.primaryTextTheme
|
.accentTextTheme
|
||||||
.caption
|
.display3
|
||||||
.color),
|
.color),
|
||||||
hintText: S.of(context).wallet_name,
|
hintText: S.of(context).wallet_name,
|
||||||
focusedBorder: UnderlineInputBorder(
|
focusedBorder: UnderlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: Theme.of(context).dividerColor,
|
color: Theme.of(context)
|
||||||
|
.accentTextTheme
|
||||||
|
.display3
|
||||||
|
.decorationColor,
|
||||||
width: 1.0)),
|
width: 1.0)),
|
||||||
enabledBorder: UnderlineInputBorder(
|
enabledBorder: UnderlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: Theme.of(context).dividerColor,
|
color: Theme.of(context)
|
||||||
|
.accentTextTheme
|
||||||
|
.display3
|
||||||
|
.decorationColor,
|
||||||
width: 1.0))),
|
width: 1.0))),
|
||||||
validator: WalletNameValidator())),
|
validator: WalletNameValidator())),
|
||||||
),
|
),
|
||||||
|
@ -122,7 +135,7 @@ class _WalletNameFormState extends State<WalletNameForm> {
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w500,
|
||||||
color: Theme.of(context).primaryTextTheme.title.color),
|
color: Theme.of(context).primaryTextTheme.title.color),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -140,7 +153,8 @@ class _WalletNameFormState extends State<WalletNameForm> {
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return LoadingPrimaryButton(
|
return LoadingPrimaryButton(
|
||||||
onPressed: _confirmForm,
|
onPressed: _confirmForm,
|
||||||
text: S.of(context).continue_text,
|
//text: S.of(context).continue_text,
|
||||||
|
text: S.of(context).seed_language_next,
|
||||||
color: Colors.green,
|
color: Colors.green,
|
||||||
textColor: Colors.white,
|
textColor: Colors.white,
|
||||||
isLoading: _walletNewVM.state is WalletCreatedSuccessfully,
|
isLoading: _walletNewVM.state is WalletCreatedSuccessfully,
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
import 'package:cake_wallet/di.dart';
|
||||||
import 'package:cake_wallet/src/domain/common/wallet_type.dart';
|
import 'package:cake_wallet/src/domain/common/wallet_type.dart';
|
||||||
|
import 'package:cake_wallet/store/settings_store.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:cake_wallet/generated/i18n.dart';
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
|
@ -6,15 +8,17 @@ import 'package:cake_wallet/src/screens/base_page.dart';
|
||||||
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
||||||
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
|
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
|
||||||
import 'package:cake_wallet/src/screens/new_wallet/widgets/select_button.dart';
|
import 'package:cake_wallet/src/screens/new_wallet/widgets/select_button.dart';
|
||||||
import 'package:cake_wallet/routes.dart';
|
|
||||||
|
|
||||||
class NewWalletTypePage extends BasePage {
|
class NewWalletTypePage extends BasePage {
|
||||||
NewWalletTypePage({this.onTypeSelected});
|
NewWalletTypePage({this.onTypeSelected, this.isNewWallet = true});
|
||||||
|
|
||||||
final void Function(BuildContext, WalletType) onTypeSelected;
|
final void Function(BuildContext, WalletType) onTypeSelected;
|
||||||
|
final bool isNewWallet;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get title => S.current.new_wallet;
|
String get title => isNewWallet
|
||||||
|
? S.current.new_wallet
|
||||||
|
: S.current.wallet_list_restore_wallet;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget body(BuildContext context) =>
|
Widget body(BuildContext context) =>
|
||||||
|
@ -38,6 +42,7 @@ class WalletTypeFormState extends State<WalletTypeForm> {
|
||||||
final bitcoinIcon =
|
final bitcoinIcon =
|
||||||
Image.asset('assets/images/bitcoin.png', height: 24, width: 24);
|
Image.asset('assets/images/bitcoin.png', height: 24, width: 24);
|
||||||
final walletTypeImage = Image.asset('assets/images/wallet_type.png');
|
final walletTypeImage = Image.asset('assets/images/wallet_type.png');
|
||||||
|
final walletTypeLightImage = Image.asset('assets/images/wallet_type_light.png');
|
||||||
|
|
||||||
WalletType selected;
|
WalletType selected;
|
||||||
List<WalletType> types;
|
List<WalletType> types;
|
||||||
|
@ -50,6 +55,9 @@ class WalletTypeFormState extends State<WalletTypeForm> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final walletImage = getIt.get<SettingsStore>().isDarkTheme
|
||||||
|
? walletTypeImage : walletTypeLightImage;
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.only(top: 24),
|
padding: EdgeInsets.only(top: 24),
|
||||||
child: ScrollableWithBottomSection(
|
child: ScrollableWithBottomSection(
|
||||||
|
@ -61,7 +69,7 @@ class WalletTypeFormState extends State<WalletTypeForm> {
|
||||||
padding: EdgeInsets.only(left: 12, right: 12),
|
padding: EdgeInsets.only(left: 12, right: 12),
|
||||||
child: AspectRatio(
|
child: AspectRatio(
|
||||||
aspectRatio: aspectRatioImage,
|
aspectRatio: aspectRatioImage,
|
||||||
child: FittedBox(child: walletTypeImage, fit: BoxFit.fill)),
|
child: FittedBox(child: walletImage, fit: BoxFit.fill)),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: 48),
|
padding: EdgeInsets.only(top: 48),
|
||||||
|
@ -70,7 +78,7 @@ class WalletTypeFormState extends State<WalletTypeForm> {
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w500,
|
||||||
color: Theme.of(context).primaryTextTheme.title.color),
|
color: Theme.of(context).primaryTextTheme.title.color),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -79,8 +87,7 @@ class WalletTypeFormState extends State<WalletTypeForm> {
|
||||||
child: SelectButton(
|
child: SelectButton(
|
||||||
image: _iconFor(type),
|
image: _iconFor(type),
|
||||||
text: walletTypeToString(type),
|
text: walletTypeToString(type),
|
||||||
color: _backgroundColorFor(selected == type),
|
isSelected: selected == type,
|
||||||
textColor: _textColorFor(selected == type),
|
|
||||||
onTap: () => setState(() => selected = type)),
|
onTap: () => setState(() => selected = type)),
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
|
@ -97,16 +104,6 @@ class WalletTypeFormState extends State<WalletTypeForm> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Move color selection inside ui element; add isSelected to buttons.
|
|
||||||
|
|
||||||
Color _backgroundColorFor(bool isSelected) => isSelected
|
|
||||||
? Theme.of(context).accentTextTheme.title.decorationColor
|
|
||||||
: Theme.of(context).accentTextTheme.title.backgroundColor;
|
|
||||||
|
|
||||||
Color _textColorFor(bool isSelected) => isSelected
|
|
||||||
? Theme.of(context).primaryTextTheme.title.backgroundColor
|
|
||||||
: Theme.of(context).primaryTextTheme.title.color;
|
|
||||||
|
|
||||||
Image _iconFor(WalletType type) {
|
Image _iconFor(WalletType type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case WalletType.monero:
|
case WalletType.monero:
|
||||||
|
|
|
@ -4,21 +4,30 @@ class SelectButton extends StatelessWidget {
|
||||||
SelectButton({
|
SelectButton({
|
||||||
@required this.image,
|
@required this.image,
|
||||||
@required this.text,
|
@required this.text,
|
||||||
@required this.color,
|
|
||||||
@required this.textColor,
|
|
||||||
@required this.onTap,
|
@required this.onTap,
|
||||||
|
this.isSelected = false,
|
||||||
});
|
});
|
||||||
|
|
||||||
final Image image;
|
final Image image;
|
||||||
final String text;
|
final String text;
|
||||||
final Color color;
|
final bool isSelected;
|
||||||
final Color textColor;
|
|
||||||
final VoidCallback onTap;
|
final VoidCallback onTap;
|
||||||
|
|
||||||
final selectArrowImage = Image.asset('assets/images/select_arrow.png');
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final color = isSelected
|
||||||
|
? Theme.of(context).accentTextTheme.subtitle.decorationColor
|
||||||
|
: Theme.of(context).accentTextTheme.caption.color;
|
||||||
|
final textColor = isSelected
|
||||||
|
? Theme.of(context).accentTextTheme.headline.decorationColor
|
||||||
|
: Theme.of(context).primaryTextTheme.title.color;
|
||||||
|
final arrowColor = isSelected
|
||||||
|
? Theme.of(context).accentTextTheme.headline.decorationColor
|
||||||
|
: Theme.of(context).accentTextTheme.subhead.color;
|
||||||
|
|
||||||
|
final selectArrowImage = Image.asset('assets/images/select_arrow.png',
|
||||||
|
color: arrowColor);
|
||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
@ -39,9 +48,7 @@ class SelectButton extends StatelessWidget {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
image != null
|
image ?? Offstage(),
|
||||||
? image
|
|
||||||
: Offstage(),
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: image != null
|
padding: image != null
|
||||||
? EdgeInsets.only(left: 15)
|
? EdgeInsets.only(left: 15)
|
||||||
|
@ -50,7 +57,7 @@ class SelectButton extends StatelessWidget {
|
||||||
text,
|
text,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w500,
|
||||||
color: textColor
|
color: textColor
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,40 +1,36 @@
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:cake_wallet/core/validator.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:cake_wallet/palette.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||||
import 'package:cake_wallet/generated/i18n.dart';
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
import 'package:cake_wallet/src/domain/services/wallet_list_service.dart';
|
|
||||||
import 'package:cake_wallet/src/domain/services/wallet_service.dart';
|
|
||||||
import 'package:cake_wallet/src/stores/wallet_restoration/wallet_restoration_store.dart';
|
|
||||||
import 'package:cake_wallet/src/stores/wallet_restoration/wallet_restoration_state.dart';
|
|
||||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||||
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
||||||
import 'package:cake_wallet/src/widgets/blockchain_height_widget.dart';
|
import 'package:cake_wallet/src/widgets/blockchain_height_widget.dart';
|
||||||
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
|
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
|
||||||
import 'package:cake_wallet/src/stores/seed_language/seed_language_store.dart';
|
|
||||||
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
|
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
|
||||||
|
import 'package:cake_wallet/view_model/wallet_restoration_from_keys_vm.dart';
|
||||||
|
import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
|
||||||
|
|
||||||
class RestoreWalletFromKeysPage extends BasePage {
|
class RestoreWalletFromKeysPage extends BasePage {
|
||||||
RestoreWalletFromKeysPage(
|
RestoreWalletFromKeysPage(
|
||||||
{@required this.walletsService,
|
{@required this.walletRestorationFromKeysVM});
|
||||||
@required this.sharedPreferences,
|
|
||||||
@required this.walletService});
|
|
||||||
|
|
||||||
final WalletListService walletsService;
|
final WalletRestorationFromKeysVM walletRestorationFromKeysVM;
|
||||||
final WalletService walletService;
|
|
||||||
final SharedPreferences sharedPreferences;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get title => S.current.restore_title_from_keys;
|
String get title => S.current.restore_title_from_keys;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget body(BuildContext context) => RestoreFromKeysFrom();
|
Widget body(BuildContext context) => RestoreFromKeysFrom(walletRestorationFromKeysVM);
|
||||||
}
|
}
|
||||||
|
|
||||||
class RestoreFromKeysFrom extends StatefulWidget {
|
class RestoreFromKeysFrom extends StatefulWidget {
|
||||||
|
RestoreFromKeysFrom(this.walletRestorationFromKeysVM);
|
||||||
|
|
||||||
|
final WalletRestorationFromKeysVM walletRestorationFromKeysVM;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_RestoreFromKeysFromState createState() => _RestoreFromKeysFromState();
|
_RestoreFromKeysFromState createState() => _RestoreFromKeysFromState();
|
||||||
}
|
}
|
||||||
|
@ -46,6 +42,23 @@ class _RestoreFromKeysFromState extends State<RestoreFromKeysFrom> {
|
||||||
final _addressController = TextEditingController();
|
final _addressController = TextEditingController();
|
||||||
final _viewKeyController = TextEditingController();
|
final _viewKeyController = TextEditingController();
|
||||||
final _spendKeyController = TextEditingController();
|
final _spendKeyController = TextEditingController();
|
||||||
|
final _wifController = TextEditingController();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
_nameController.addListener(() =>
|
||||||
|
widget.walletRestorationFromKeysVM.name = _nameController.text);
|
||||||
|
_addressController.addListener(() =>
|
||||||
|
widget.walletRestorationFromKeysVM.address = _addressController.text);
|
||||||
|
_viewKeyController.addListener(() =>
|
||||||
|
widget.walletRestorationFromKeysVM.viewKey = _viewKeyController.text);
|
||||||
|
_spendKeyController.addListener(() =>
|
||||||
|
widget.walletRestorationFromKeysVM.spendKey = _spendKeyController.text);
|
||||||
|
_wifController.addListener(() =>
|
||||||
|
widget.walletRestorationFromKeysVM.wif = _wifController.text);
|
||||||
|
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
|
@ -53,31 +66,14 @@ class _RestoreFromKeysFromState extends State<RestoreFromKeysFrom> {
|
||||||
_addressController.dispose();
|
_addressController.dispose();
|
||||||
_viewKeyController.dispose();
|
_viewKeyController.dispose();
|
||||||
_spendKeyController.dispose();
|
_spendKeyController.dispose();
|
||||||
|
_wifController.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
void onHandleControllers(WalletRestorationStore walletRestorationStore) {
|
|
||||||
if (_nameController.text.isNotEmpty &&
|
|
||||||
_addressController.text.isNotEmpty &&
|
|
||||||
_viewKeyController.text.isNotEmpty &&
|
|
||||||
_spendKeyController.text.isNotEmpty) {
|
|
||||||
walletRestorationStore.setDisabledState(false);
|
|
||||||
} else {
|
|
||||||
walletRestorationStore.setDisabledState(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final walletRestorationStore = Provider.of<WalletRestorationStore>(context);
|
|
||||||
final seedLanguageStore = Provider.of<SeedLanguageStore>(context);
|
|
||||||
|
|
||||||
_nameController.addListener(() {onHandleControllers(walletRestorationStore);});
|
/*reaction((_) => walletRestorationStore.state, (WalletRestorationState state) {
|
||||||
_addressController.addListener(() {onHandleControllers(walletRestorationStore);});
|
|
||||||
_viewKeyController.addListener(() {onHandleControllers(walletRestorationStore);});
|
|
||||||
_spendKeyController.addListener(() {onHandleControllers(walletRestorationStore);});
|
|
||||||
|
|
||||||
reaction((_) => walletRestorationStore.state, (WalletRestorationState state) {
|
|
||||||
if (state is WalletRestoredSuccessfully) {
|
if (state is WalletRestoredSuccessfully) {
|
||||||
Navigator.of(context).popUntil((route) => route.isFirst);
|
Navigator.of(context).popUntil((route) => route.isFirst);
|
||||||
}
|
}
|
||||||
|
@ -96,7 +92,7 @@ class _RestoreFromKeysFromState extends State<RestoreFromKeysFrom> {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});*/
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.only(left: 24, right: 24),
|
padding: EdgeInsets.only(left: 24, right: 24),
|
||||||
|
@ -110,66 +106,39 @@ class _RestoreFromKeysFromState extends State<RestoreFromKeysFrom> {
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.only(top: 20.0),
|
padding: EdgeInsets.only(top: 20.0),
|
||||||
child: TextFormField(
|
child: BaseTextFormField(
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16.0,
|
|
||||||
color: Theme.of(context).primaryTextTheme.title.color
|
|
||||||
),
|
|
||||||
controller: _nameController,
|
controller: _nameController,
|
||||||
decoration: InputDecoration(
|
hintText: S.of(context).restore_wallet_name,
|
||||||
hintStyle: TextStyle(
|
validator: WalletNameValidator(),
|
||||||
color: Theme.of(context).primaryTextTheme.caption.color,
|
)
|
||||||
fontSize: 16
|
|
||||||
),
|
|
||||||
hintText: S.of(context).restore_wallet_name,
|
|
||||||
focusedBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Theme.of(context).dividerColor,
|
|
||||||
width: 1.0)),
|
|
||||||
enabledBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Theme.of(context).dividerColor,
|
|
||||||
width: 1.0))),
|
|
||||||
validator: (value) {
|
|
||||||
walletRestorationStore.validateWalletName(value);
|
|
||||||
return walletRestorationStore.errorMessage;
|
|
||||||
},
|
|
||||||
),
|
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
if (!widget.walletRestorationFromKeysVM.hasRestorationHeight)
|
||||||
|
Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Flexible(
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.only(top: 20.0),
|
||||||
|
child: BaseTextFormField(
|
||||||
|
controller: _wifController,
|
||||||
|
hintText: 'WIF',
|
||||||
|
)
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
if (widget.walletRestorationFromKeysVM.hasRestorationHeight) ... [
|
||||||
Row(
|
Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.only(top: 20.0),
|
padding: EdgeInsets.only(top: 20.0),
|
||||||
child: TextFormField(
|
child: BaseTextFormField(
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16.0,
|
|
||||||
color: Theme.of(context).primaryTextTheme.title.color
|
|
||||||
),
|
|
||||||
controller: _addressController,
|
controller: _addressController,
|
||||||
keyboardType: TextInputType.multiline,
|
keyboardType: TextInputType.multiline,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
decoration: InputDecoration(
|
hintText: S.of(context).restore_address,
|
||||||
hintStyle: TextStyle(
|
)
|
||||||
color: Theme.of(context).primaryTextTheme.caption.color,
|
|
||||||
fontSize: 16
|
|
||||||
),
|
|
||||||
hintText: S.of(context).restore_address,
|
|
||||||
focusedBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Theme.of(context).dividerColor,
|
|
||||||
width: 1.0)),
|
|
||||||
enabledBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Theme.of(context).dividerColor,
|
|
||||||
width: 1.0))),
|
|
||||||
validator: (value) {
|
|
||||||
walletRestorationStore.validateAddress(value);
|
|
||||||
return walletRestorationStore.errorMessage;
|
|
||||||
},
|
|
||||||
),
|
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -178,31 +147,10 @@ class _RestoreFromKeysFromState extends State<RestoreFromKeysFrom> {
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.only(top: 20.0),
|
padding: EdgeInsets.only(top: 20.0),
|
||||||
child: TextFormField(
|
child: BaseTextFormField(
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16.0,
|
|
||||||
color: Theme.of(context).primaryTextTheme.title.color
|
|
||||||
),
|
|
||||||
controller: _viewKeyController,
|
controller: _viewKeyController,
|
||||||
decoration: InputDecoration(
|
hintText: S.of(context).restore_view_key_private,
|
||||||
hintStyle: TextStyle(
|
)
|
||||||
color: Theme.of(context).primaryTextTheme.caption.color,
|
|
||||||
fontSize: 16
|
|
||||||
),
|
|
||||||
hintText: S.of(context).restore_view_key_private,
|
|
||||||
focusedBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Theme.of(context).dividerColor,
|
|
||||||
width: 1.0)),
|
|
||||||
enabledBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Theme.of(context).dividerColor,
|
|
||||||
width: 1.0))),
|
|
||||||
validator: (value) {
|
|
||||||
walletRestorationStore.validateKeys(value);
|
|
||||||
return walletRestorationStore.errorMessage;
|
|
||||||
},
|
|
||||||
),
|
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -211,35 +159,19 @@ class _RestoreFromKeysFromState extends State<RestoreFromKeysFrom> {
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.only(top: 20.0),
|
padding: EdgeInsets.only(top: 20.0),
|
||||||
child: TextFormField(
|
child: BaseTextFormField(
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16.0,
|
|
||||||
color: Theme.of(context).primaryTextTheme.title.color
|
|
||||||
),
|
|
||||||
controller: _spendKeyController,
|
controller: _spendKeyController,
|
||||||
decoration: InputDecoration(
|
hintText: S.of(context).restore_spend_key_private,
|
||||||
hintStyle: TextStyle(
|
)
|
||||||
color: Theme.of(context).primaryTextTheme.caption.color,
|
|
||||||
fontSize: 16
|
|
||||||
),
|
|
||||||
hintText: S.of(context).restore_spend_key_private,
|
|
||||||
focusedBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Theme.of(context).dividerColor,
|
|
||||||
width: 1.0)),
|
|
||||||
enabledBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Theme.of(context).dividerColor,
|
|
||||||
width: 1.0))),
|
|
||||||
validator: (value) {
|
|
||||||
walletRestorationStore.validateKeys(value);
|
|
||||||
return walletRestorationStore.errorMessage;
|
|
||||||
},
|
|
||||||
),
|
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
BlockchainHeightWidget(key: _blockchainHeightKey),
|
BlockchainHeightWidget(
|
||||||
|
key: _blockchainHeightKey,
|
||||||
|
onHeightChange: (height) {
|
||||||
|
widget.walletRestorationFromKeysVM.height = height;
|
||||||
|
print(height);
|
||||||
|
})],
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
bottomSectionPadding: EdgeInsets.only(bottom: 24),
|
bottomSectionPadding: EdgeInsets.only(bottom: 24),
|
||||||
|
@ -247,19 +179,19 @@ class _RestoreFromKeysFromState extends State<RestoreFromKeysFrom> {
|
||||||
return LoadingPrimaryButton(
|
return LoadingPrimaryButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (_formKey.currentState.validate()) {
|
if (_formKey.currentState.validate()) {
|
||||||
walletRestorationStore.restoreFromKeys(
|
/*walletRestorationStore.restoreFromKeys(
|
||||||
name: _nameController.text,
|
name: _nameController.text,
|
||||||
language: seedLanguageStore.selectedSeedLanguage,
|
language: seedLanguageStore.selectedSeedLanguage,
|
||||||
address: _addressController.text,
|
address: _addressController.text,
|
||||||
viewKey: _viewKeyController.text,
|
viewKey: _viewKeyController.text,
|
||||||
spendKey: _spendKeyController.text,
|
spendKey: _spendKeyController.text,
|
||||||
restoreHeight: _blockchainHeightKey.currentState.height);
|
restoreHeight: _blockchainHeightKey.currentState.height);*/
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
text: S.of(context).restore_recover,
|
text: S.of(context).restore_recover,
|
||||||
color: Colors.green,
|
color: Palette.blueCraiola,
|
||||||
textColor: Colors.white,
|
textColor: Colors.white,
|
||||||
isDisabled: walletRestorationStore.disabledState,
|
//isDisabled: walletRestorationStore.disabledState,
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import 'package:cake_wallet/palette.dart';
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||||
|
@ -9,6 +10,7 @@ import 'package:cake_wallet/src/widgets/blockchain_height_widget.dart';
|
||||||
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
|
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
|
||||||
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
||||||
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
|
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
|
||||||
|
import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
|
||||||
import 'package:cake_wallet/view_model/wallet_restoration_from_seed_vm.dart';
|
import 'package:cake_wallet/view_model/wallet_restoration_from_seed_vm.dart';
|
||||||
|
|
||||||
class RestoreWalletFromSeedDetailsPage extends BasePage {
|
class RestoreWalletFromSeedDetailsPage extends BasePage {
|
||||||
|
@ -91,27 +93,9 @@ class _RestoreFromSeedDetailsFormState
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.only(top: 20.0),
|
padding: EdgeInsets.only(top: 20.0),
|
||||||
child: TextFormField(
|
child: BaseTextFormField(
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16.0,
|
|
||||||
color: Theme.of(context).primaryTextTheme.title.color),
|
|
||||||
controller: _nameController,
|
controller: _nameController,
|
||||||
decoration: InputDecoration(
|
hintText: S.of(context).restore_wallet_name,
|
||||||
hintStyle: TextStyle(
|
|
||||||
color: Theme.of(context)
|
|
||||||
.primaryTextTheme
|
|
||||||
.caption
|
|
||||||
.color,
|
|
||||||
fontSize: 16),
|
|
||||||
hintText: S.of(context).restore_wallet_name,
|
|
||||||
focusedBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Theme.of(context).dividerColor,
|
|
||||||
width: 1.0)),
|
|
||||||
enabledBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Theme.of(context).dividerColor,
|
|
||||||
width: 1.0))),
|
|
||||||
validator: WalletNameValidator(),
|
validator: WalletNameValidator(),
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
|
@ -137,7 +121,7 @@ class _RestoreFromSeedDetailsFormState
|
||||||
isLoading:
|
isLoading:
|
||||||
widget.walletRestorationFromSeedVM.state is WalletCreating,
|
widget.walletRestorationFromSeedVM.state is WalletCreating,
|
||||||
text: S.of(context).restore_recover,
|
text: S.of(context).restore_recover,
|
||||||
color: Colors.green,
|
color: Palette.blueCraiola,
|
||||||
textColor: Colors.white,
|
textColor: Colors.white,
|
||||||
isDisabled: _nameController.text.isNotEmpty,
|
isDisabled: _nameController.text.isNotEmpty,
|
||||||
);
|
);
|
||||||
|
|
|
@ -20,20 +20,40 @@ class RestoreWalletFromSeedPage extends BasePage {
|
||||||
String get title => S.current.restore_title_from_seed;
|
String get title => S.current.restore_title_from_seed;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Color get backgroundLightColor => Palette.lavender;
|
Color get titleColor => Colors.white;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Color get backgroundDarkColor => PaletteDark.lightNightBlue;
|
Color get backgroundLightColor => Colors.transparent;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Color get backgroundDarkColor => Colors.transparent;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool get resizeToAvoidBottomPadding => false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget body(BuildContext context) =>
|
Widget body(BuildContext context) =>
|
||||||
RestoreFromSeedForm(key: formKey, type: type, language: language);
|
RestoreFromSeedForm(key: formKey, type: type, language: language,
|
||||||
|
leading: leading(context), middle: middle(context));
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
resizeToAvoidBottomPadding: resizeToAvoidBottomPadding,
|
||||||
|
body: Container(
|
||||||
|
color: Theme.of(context).backgroundColor,
|
||||||
|
child: body(context)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class RestoreFromSeedForm extends StatefulWidget {
|
class RestoreFromSeedForm extends StatefulWidget {
|
||||||
RestoreFromSeedForm({Key key, this.type, this.language}) : super(key: key);
|
RestoreFromSeedForm({Key key, this.type, this.language, this.leading, this.middle}) : super(key: key);
|
||||||
final WalletType type;
|
final WalletType type;
|
||||||
final String language;
|
final String language;
|
||||||
|
final Widget leading;
|
||||||
|
final Widget middle;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_RestoreFromSeedFormState createState() => _RestoreFromSeedFormState();
|
_RestoreFromSeedFormState createState() => _RestoreFromSeedFormState();
|
||||||
|
@ -49,18 +69,17 @@ class _RestoreFromSeedFormState extends State<RestoreFromSeedForm> {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
SystemChannels.textInput.invokeMethod<void>('TextInput.hide'),
|
SystemChannels.textInput.invokeMethod<void>('TextInput.hide'),
|
||||||
child: Container(
|
child: SeedWidget(
|
||||||
color: Theme.of(context).backgroundColor,
|
key: _seedKey,
|
||||||
child: SeedWidget(
|
maxLength: mnemonicLength(widget.type),
|
||||||
key: _seedKey,
|
onMnemonicChange: (seed) => null,
|
||||||
maxLength: mnemonicLength(widget.type),
|
onFinish: () => Navigator.of(context).pushNamed(
|
||||||
onMnemonicChange: (seed) => null,
|
Routes.restoreWalletFromSeedDetails,
|
||||||
onFinish: () => Navigator.of(context).pushNamed(
|
arguments: [widget.type, widget.language, mnemonic()]),
|
||||||
Routes.restoreWalletFromSeedDetails,
|
leading: widget.leading,
|
||||||
arguments: [widget.type, widget.language, mnemonic()]),
|
middle: widget.middle,
|
||||||
validator:
|
validator:
|
||||||
SeedValidator(type: widget.type, language: widget.language),
|
SeedValidator(type: widget.type, language: widget.language),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
|
||||||
import 'package:cake_wallet/routes.dart';
|
|
||||||
import 'package:cake_wallet/src/screens/restore/widgets/restore_button.dart';
|
import 'package:cake_wallet/src/screens/restore/widgets/restore_button.dart';
|
||||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||||
import 'package:cake_wallet/src/domain/common/wallet_type.dart';
|
import 'package:cake_wallet/src/domain/common/wallet_type.dart';
|
||||||
import 'package:cake_wallet/generated/i18n.dart';
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
import 'package:cake_wallet/src/stores/seed_language/seed_language_store.dart';
|
|
||||||
|
|
||||||
class RestoreWalletOptionsPage extends BasePage {
|
class RestoreWalletOptionsPage extends BasePage {
|
||||||
RestoreWalletOptionsPage(
|
RestoreWalletOptionsPage(
|
||||||
|
@ -56,7 +53,7 @@ class RestoreWalletOptionsPage extends BasePage {
|
||||||
return S.of(context).restore_description_from_seed;
|
return S.of(context).restore_description_from_seed;
|
||||||
case WalletType.bitcoin:
|
case WalletType.bitcoin:
|
||||||
// TODO: Add transaction for bitcoin description.
|
// TODO: Add transaction for bitcoin description.
|
||||||
return 'Restore your wallet from 12 word combination code';
|
return S.of(context).restore_bitcoin_description_from_seed;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
@ -68,7 +65,7 @@ class RestoreWalletOptionsPage extends BasePage {
|
||||||
return S.of(context).restore_description_from_keys;
|
return S.of(context).restore_description_from_keys;
|
||||||
case WalletType.bitcoin:
|
case WalletType.bitcoin:
|
||||||
// TODO: Add transaction for bitcoin description.
|
// TODO: Add transaction for bitcoin description.
|
||||||
return 'Restore your wallet from generated WIF string from your private keys';
|
return S.of(context).restore_bitcoin_description_from_keys;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
@ -80,7 +77,7 @@ class RestoreWalletOptionsPage extends BasePage {
|
||||||
return S.of(context).restore_title_from_keys;
|
return S.of(context).restore_title_from_keys;
|
||||||
case WalletType.bitcoin:
|
case WalletType.bitcoin:
|
||||||
// TODO: Add transaction for bitcoin description.
|
// TODO: Add transaction for bitcoin description.
|
||||||
return 'Restore from WIF';
|
return S.of(context).restore_bitcoin_title_from_keys;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,12 +19,12 @@ class RestoreButton extends StatelessWidget {
|
||||||
onTap: onPressed,
|
onTap: onPressed,
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 150,
|
height: 170,
|
||||||
padding: EdgeInsets.all(24),
|
padding: EdgeInsets.all(24),
|
||||||
alignment: Alignment.topLeft,
|
alignment: Alignment.topLeft,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
borderRadius: BorderRadius.all(Radius.circular(12)),
|
||||||
color: Theme.of(context).accentTextTheme.title.backgroundColor,
|
color: Theme.of(context).accentTextTheme.caption.color,
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
@ -44,7 +44,7 @@ class RestoreButton extends StatelessWidget {
|
||||||
title,
|
title,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w500,
|
||||||
color: Theme.of(context).primaryTextTheme.title.color
|
color: Theme.of(context).primaryTextTheme.title.color
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -54,7 +54,8 @@ class RestoreButton extends StatelessWidget {
|
||||||
description,
|
description,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Theme.of(context).primaryTextTheme.caption.color
|
fontWeight: FontWeight.normal,
|
||||||
|
color: Theme.of(context).primaryTextTheme.overline.color
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
import 'package:cake_wallet/di.dart';
|
||||||
import 'package:cake_wallet/src/widgets/seed_language_selector.dart';
|
import 'package:cake_wallet/src/widgets/seed_language_selector.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:cake_wallet/store/settings_store.dart';
|
||||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
|
@ -7,8 +8,6 @@ import 'package:cake_wallet/generated/i18n.dart';
|
||||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||||
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
||||||
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
|
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
|
||||||
import 'package:cake_wallet/src/stores/seed_language/seed_language_store.dart';
|
|
||||||
import 'package:cake_wallet/src/screens/new_wallet/widgets/select_button.dart';
|
|
||||||
import 'package:cake_wallet/src/screens/seed_language/widgets/seed_language_picker.dart';
|
import 'package:cake_wallet/src/screens/seed_language/widgets/seed_language_picker.dart';
|
||||||
|
|
||||||
class SeedLanguage extends BasePage {
|
class SeedLanguage extends BasePage {
|
||||||
|
@ -16,6 +15,9 @@ class SeedLanguage extends BasePage {
|
||||||
|
|
||||||
final Function(BuildContext, String) onConfirm;
|
final Function(BuildContext, String) onConfirm;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get title => S.current.wallet_list_restore_wallet;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget body(BuildContext context) => SeedLanguageForm(onConfirm: onConfirm);
|
Widget body(BuildContext context) => SeedLanguageForm(onConfirm: onConfirm);
|
||||||
}
|
}
|
||||||
|
@ -33,10 +35,14 @@ class SeedLanguageFormState extends State<SeedLanguageForm> {
|
||||||
static const aspectRatioImage = 1.22;
|
static const aspectRatioImage = 1.22;
|
||||||
|
|
||||||
final walletNameImage = Image.asset('assets/images/wallet_name.png');
|
final walletNameImage = Image.asset('assets/images/wallet_name.png');
|
||||||
|
final walletNameLightImage = Image.asset('assets/images/wallet_name_light.png');
|
||||||
final _languageSelectorKey = GlobalKey<SeedLanguageSelectorState>();
|
final _languageSelectorKey = GlobalKey<SeedLanguageSelectorState>();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final walletImage = getIt.get<SettingsStore>().isDarkTheme
|
||||||
|
? walletNameImage : walletNameLightImage;
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.only(top: 24),
|
padding: EdgeInsets.only(top: 24),
|
||||||
child: ScrollableWithBottomSection(
|
child: ScrollableWithBottomSection(
|
||||||
|
@ -47,7 +53,7 @@ class SeedLanguageFormState extends State<SeedLanguageForm> {
|
||||||
padding: EdgeInsets.only(left: 12, right: 12),
|
padding: EdgeInsets.only(left: 12, right: 12),
|
||||||
child: AspectRatio(
|
child: AspectRatio(
|
||||||
aspectRatio: aspectRatioImage,
|
aspectRatio: aspectRatioImage,
|
||||||
child: FittedBox(child: walletNameImage, fit: BoxFit.fill)),
|
child: FittedBox(child: walletImage, fit: BoxFit.fill)),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: 40),
|
padding: EdgeInsets.only(top: 40),
|
||||||
|
@ -56,7 +62,7 @@ class SeedLanguageFormState extends State<SeedLanguageForm> {
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w500,
|
||||||
color: Theme.of(context).primaryTextTheme.title.color),
|
color: Theme.of(context).primaryTextTheme.title.color),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
import 'package:cake_wallet/src/widgets/alert_background.dart';
|
||||||
|
import 'package:cake_wallet/src/widgets/alert_close_button.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:cake_wallet/palette.dart';
|
import 'package:cake_wallet/palette.dart';
|
||||||
import 'package:provider/provider.dart';
|
|
||||||
import 'package:cake_wallet/src/stores/seed_language/seed_language_store.dart';
|
|
||||||
import 'package:cake_wallet/generated/i18n.dart';
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
|
|
||||||
List<Image> flagImages = [
|
List<Image> flagImages = [
|
||||||
|
@ -57,170 +57,111 @@ class SeedLanguagePicker extends StatefulWidget {
|
||||||
class SeedLanguagePickerState extends State<SeedLanguagePicker> {
|
class SeedLanguagePickerState extends State<SeedLanguagePicker> {
|
||||||
SeedLanguagePickerState({this.selected});
|
SeedLanguagePickerState({this.selected});
|
||||||
|
|
||||||
|
final closeButton = Image.asset('assets/images/close.png');
|
||||||
String selected;
|
String selected;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GestureDetector(
|
return AlertBackground(
|
||||||
onTap: () => Navigator.of(context).pop(),
|
child: Stack(
|
||||||
child: Container(
|
alignment: Alignment.center,
|
||||||
color: Colors.transparent,
|
children: <Widget>[
|
||||||
child: BackdropFilter(
|
Column(
|
||||||
filter: ImageFilter.blur(sigmaX: 3.0, sigmaY: 3.0),
|
mainAxisSize: MainAxisSize.min,
|
||||||
child: Container(
|
children: <Widget>[
|
||||||
decoration: BoxDecoration(
|
Container(
|
||||||
color: PaletteDark.darkNightBlue.withOpacity(0.75)),
|
padding: EdgeInsets.only(left: 24, right: 24),
|
||||||
child: Center(
|
child: Text(
|
||||||
child: Column(
|
S.of(context).seed_choose,
|
||||||
mainAxisSize: MainAxisSize.min,
|
textAlign: TextAlign.center,
|
||||||
children: <Widget>[
|
style: TextStyle(
|
||||||
Container(
|
fontSize: 18,
|
||||||
padding: EdgeInsets.only(left: 24, right: 24),
|
fontWeight: FontWeight.bold,
|
||||||
child: Text(
|
fontFamily: 'Poppins',
|
||||||
S.of(context).seed_choose,
|
decoration: TextDecoration.none,
|
||||||
textAlign: TextAlign.center,
|
color: Colors.white
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 18,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
decoration: TextDecoration.none,
|
|
||||||
color: Colors.white),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
),
|
||||||
padding: EdgeInsets.only(top: 24),
|
Padding(
|
||||||
child: GestureDetector(
|
padding: EdgeInsets.only(top: 24),
|
||||||
onTap: () => null,
|
child: ClipRRect(
|
||||||
child: Container(
|
borderRadius: BorderRadius.all(Radius.circular(14)),
|
||||||
height: 300,
|
child: Container(
|
||||||
width: 300,
|
height: 300,
|
||||||
decoration: BoxDecoration(
|
width: 300,
|
||||||
borderRadius: BorderRadius.all(Radius.circular(14)),
|
color: Theme.of(context).accentTextTheme.title.backgroundColor,
|
||||||
color: Theme.of(context).dividerColor),
|
child: GridView.count(
|
||||||
child: GridView.count(
|
shrinkWrap: true,
|
||||||
shrinkWrap: true,
|
crossAxisCount: 3,
|
||||||
crossAxisCount: 3,
|
childAspectRatio: 1,
|
||||||
childAspectRatio: 1,
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
crossAxisSpacing: 1,
|
||||||
crossAxisSpacing: 1,
|
mainAxisSpacing: 1,
|
||||||
mainAxisSpacing: 1,
|
children: List.generate(9, (index) {
|
||||||
children: List.generate(9, (index) {
|
|
||||||
if (index == 8) {
|
|
||||||
return gridTile(
|
|
||||||
isCurrent: false,
|
|
||||||
place: Places.bottomRight,
|
|
||||||
image: null,
|
|
||||||
text: '',
|
|
||||||
onTap: null);
|
|
||||||
} else {
|
|
||||||
final code = languageCodes[index];
|
|
||||||
final flag = flagImages[index];
|
|
||||||
final isCurrent =
|
|
||||||
index == seedLanguages.indexOf(selected);
|
|
||||||
|
|
||||||
if (index == 0) {
|
if (index == 8) {
|
||||||
return gridTile(
|
|
||||||
isCurrent: isCurrent,
|
return gridTile(
|
||||||
place: Places.topLeft,
|
isCurrent: false,
|
||||||
image: flag,
|
image: null,
|
||||||
text: code,
|
text: '',
|
||||||
onTap: () {
|
onTap: null);
|
||||||
selected = seedLanguages[index];
|
|
||||||
Navigator.of(context).pop(selected);
|
}
|
||||||
});
|
|
||||||
|
final code = languageCodes[index];
|
||||||
|
final flag = flagImages[index];
|
||||||
|
final isCurrent =
|
||||||
|
index == seedLanguages.indexOf(selected);
|
||||||
|
|
||||||
|
return gridTile(
|
||||||
|
isCurrent: isCurrent,
|
||||||
|
image: flag,
|
||||||
|
text: code,
|
||||||
|
onTap: () {
|
||||||
|
selected = seedLanguages[index];
|
||||||
|
Navigator.of(context).pop(selected);
|
||||||
}
|
}
|
||||||
|
);
|
||||||
if (index == 2) {
|
}),
|
||||||
return gridTile(
|
|
||||||
isCurrent: isCurrent,
|
|
||||||
place: Places.topRight,
|
|
||||||
image: flag,
|
|
||||||
text: code,
|
|
||||||
onTap: () {
|
|
||||||
selected = seedLanguages[index];
|
|
||||||
Navigator.of(context).pop(selected);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (index == 6) {
|
|
||||||
return gridTile(
|
|
||||||
isCurrent: isCurrent,
|
|
||||||
place: Places.bottomLeft,
|
|
||||||
image: flag,
|
|
||||||
text: code,
|
|
||||||
onTap: () {
|
|
||||||
selected = seedLanguages[index];
|
|
||||||
Navigator.of(context).pop(selected);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return gridTile(
|
|
||||||
isCurrent: isCurrent,
|
|
||||||
place: Places.inside,
|
|
||||||
image: flag,
|
|
||||||
text: code,
|
|
||||||
onTap: () {
|
|
||||||
selected = seedLanguages[index];
|
|
||||||
Navigator.of(context).pop(selected);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
)
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
AlertCloseButton(image: closeButton)
|
||||||
),
|
],
|
||||||
),
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget gridTile(
|
Widget gridTile({
|
||||||
{@required bool isCurrent,
|
@required bool isCurrent,
|
||||||
@required Places place,
|
@required Image image,
|
||||||
@required Image image,
|
@required String text,
|
||||||
@required String text,
|
@required VoidCallback onTap}) {
|
||||||
@required VoidCallback onTap}) {
|
|
||||||
BorderRadius borderRadius;
|
|
||||||
final color = isCurrent
|
|
||||||
? Theme.of(context).accentTextTheme.subtitle.decorationColor
|
|
||||||
: Theme.of(context).primaryTextTheme.display1.color;
|
|
||||||
final textColor = isCurrent
|
|
||||||
? Colors.blue
|
|
||||||
: Theme.of(context).primaryTextTheme.title.color;
|
|
||||||
|
|
||||||
switch (place) {
|
final color = isCurrent
|
||||||
case Places.topLeft:
|
? Theme.of(context).textTheme.body2.color
|
||||||
borderRadius = BorderRadius.only(topLeft: Radius.circular(14));
|
: Theme.of(context).accentTextTheme.title.color;
|
||||||
break;
|
final textColor = isCurrent
|
||||||
case Places.topRight:
|
? Palette.blueCraiola
|
||||||
borderRadius = BorderRadius.only(topRight: Radius.circular(14));
|
: Theme.of(context).primaryTextTheme.title.color;
|
||||||
break;
|
|
||||||
case Places.bottomLeft:
|
|
||||||
borderRadius = BorderRadius.only(bottomLeft: Radius.circular(14));
|
|
||||||
break;
|
|
||||||
case Places.bottomRight:
|
|
||||||
borderRadius = BorderRadius.only(bottomRight: Radius.circular(14));
|
|
||||||
break;
|
|
||||||
case Places.inside:
|
|
||||||
borderRadius = BorderRadius.all(Radius.circular(0));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.all(10),
|
padding: EdgeInsets.all(10),
|
||||||
decoration: BoxDecoration(borderRadius: borderRadius, color: color),
|
color: color,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
image != null ? image : Offstage(),
|
image ?? Offstage(),
|
||||||
Padding(
|
Padding(
|
||||||
padding: image != null
|
padding: image != null
|
||||||
? EdgeInsets.only(left: 10)
|
? EdgeInsets.only(left: 10)
|
||||||
|
@ -229,14 +170,17 @@ class SeedLanguagePickerState extends State<SeedLanguagePicker> {
|
||||||
text,
|
text,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.w600,
|
||||||
|
fontFamily: 'Poppins',
|
||||||
decoration: TextDecoration.none,
|
decoration: TextDecoration.none,
|
||||||
color: textColor),
|
color: textColor
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
));
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:cake_wallet/generated/i18n.dart';
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
import 'package:cake_wallet/src/domain/monero/get_height_by_date.dart';
|
import 'package:cake_wallet/src/domain/monero/get_height_by_date.dart';
|
||||||
|
import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
|
||||||
|
|
||||||
class BlockchainHeightWidget extends StatefulWidget {
|
class BlockchainHeightWidget extends StatefulWidget {
|
||||||
BlockchainHeightWidget({GlobalKey key, this.onHeightChange})
|
BlockchainHeightWidget({GlobalKey key, this.onHeightChange})
|
||||||
|
@ -46,26 +47,12 @@ class BlockchainHeightState extends State<BlockchainHeightWidget> {
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.only(top: 20.0, bottom: 10.0),
|
padding: EdgeInsets.only(top: 20.0, bottom: 10.0),
|
||||||
child: TextFormField(
|
child: BaseTextFormField(
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16.0,
|
|
||||||
color: Theme.of(context).primaryTextTheme.title.color),
|
|
||||||
controller: restoreHeightController,
|
controller: restoreHeightController,
|
||||||
keyboardType: TextInputType.numberWithOptions(
|
keyboardType: TextInputType.numberWithOptions(
|
||||||
signed: false, decimal: false),
|
signed: false, decimal: false),
|
||||||
decoration: InputDecoration(
|
hintText: S.of(context).widgets_restore_from_blockheight,
|
||||||
hintStyle: TextStyle(
|
)
|
||||||
color: Theme.of(context).primaryTextTheme.caption.color,
|
|
||||||
fontSize: 16),
|
|
||||||
hintText: S.of(context).widgets_restore_from_blockheight,
|
|
||||||
focusedBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Theme.of(context).dividerColor, width: 1.0)),
|
|
||||||
enabledBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Theme.of(context).dividerColor,
|
|
||||||
width: 1.0))),
|
|
||||||
),
|
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -75,7 +62,7 @@ class BlockchainHeightState extends State<BlockchainHeightWidget> {
|
||||||
S.of(context).widgets_or,
|
S.of(context).widgets_or,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.w500,
|
||||||
color: Theme.of(context).primaryTextTheme.title.color),
|
color: Theme.of(context).primaryTextTheme.title.color),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -86,31 +73,10 @@ class BlockchainHeightState extends State<BlockchainHeightWidget> {
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () => _selectDate(context),
|
onTap: () => _selectDate(context),
|
||||||
child: IgnorePointer(
|
child: IgnorePointer(
|
||||||
child: TextFormField(
|
child: BaseTextFormField(
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16.0,
|
|
||||||
color: Theme.of(context).primaryTextTheme.title.color),
|
|
||||||
decoration: InputDecoration(
|
|
||||||
hintStyle: TextStyle(
|
|
||||||
color: Theme.of(context)
|
|
||||||
.primaryTextTheme
|
|
||||||
.caption
|
|
||||||
.color,
|
|
||||||
fontSize: 16),
|
|
||||||
hintText: S.of(context).widgets_restore_from_date,
|
|
||||||
focusedBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Theme.of(context).dividerColor,
|
|
||||||
width: 1.0)),
|
|
||||||
enabledBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Theme.of(context).dividerColor,
|
|
||||||
width: 1.0))),
|
|
||||||
controller: dateController,
|
controller: dateController,
|
||||||
validator: (value) {
|
hintText: S.of(context).widgets_restore_from_date,
|
||||||
return null;
|
)
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
|
|
|
@ -34,14 +34,14 @@ class SeedLanguageSelectorState extends State<SeedLanguageSelector> {
|
||||||
return SelectButton(
|
return SelectButton(
|
||||||
image: null,
|
image: null,
|
||||||
text: seedLocales[seedLanguages.indexOf(selected)],
|
text: seedLocales[seedLanguages.indexOf(selected)],
|
||||||
color: Theme.of(context).accentTextTheme.title.backgroundColor,
|
|
||||||
textColor: Theme.of(context).primaryTextTheme.title.color,
|
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final selected = await showDialog<String>(
|
final selected = await showDialog<String>(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) =>
|
builder: (BuildContext context) =>
|
||||||
SeedLanguagePicker(key: _pickerKey, selected: this.selected));
|
SeedLanguagePicker(key: _pickerKey, selected: this.selected));
|
||||||
setState(() => this.selected = selected);
|
if (selected != null) {
|
||||||
|
setState(() => this.selected = selected);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import 'package:cake_wallet/core/seed_validator.dart';
|
||||||
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
||||||
import 'package:cake_wallet/src/domain/common/mnemonic_item.dart';
|
import 'package:cake_wallet/src/domain/common/mnemonic_item.dart';
|
||||||
import 'package:cake_wallet/generated/i18n.dart';
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
|
import 'package:flutter/widgets.dart';
|
||||||
|
|
||||||
class SeedWidget extends StatefulWidget {
|
class SeedWidget extends StatefulWidget {
|
||||||
SeedWidget(
|
SeedWidget(
|
||||||
|
@ -13,6 +14,8 @@ class SeedWidget extends StatefulWidget {
|
||||||
this.maxLength,
|
this.maxLength,
|
||||||
this.onMnemonicChange,
|
this.onMnemonicChange,
|
||||||
this.onFinish,
|
this.onFinish,
|
||||||
|
this.leading,
|
||||||
|
this.middle,
|
||||||
this.validator})
|
this.validator})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
|
@ -20,6 +23,8 @@ class SeedWidget extends StatefulWidget {
|
||||||
final Function(List<MnemonicItem>) onMnemonicChange;
|
final Function(List<MnemonicItem>) onMnemonicChange;
|
||||||
final Function() onFinish;
|
final Function() onFinish;
|
||||||
final SeedValidator validator;
|
final SeedValidator validator;
|
||||||
|
final Widget leading;
|
||||||
|
final Widget middle;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
SeedWidgetState createState() => SeedWidgetState(maxLength: maxLength);
|
SeedWidgetState createState() => SeedWidgetState(maxLength: maxLength);
|
||||||
|
@ -199,74 +204,91 @@ class SeedWidgetState extends State<SeedWidget> {
|
||||||
child: Column(children: [
|
child: Column(children: [
|
||||||
Flexible(
|
Flexible(
|
||||||
fit: FlexFit.tight,
|
fit: FlexFit.tight,
|
||||||
flex: 1,
|
flex: 2,
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
padding: EdgeInsets.all(24),
|
padding: EdgeInsets.all(0),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
bottomLeft: Radius.circular(24),
|
bottomLeft: Radius.circular(24),
|
||||||
bottomRight: Radius.circular(24)),
|
bottomRight: Radius.circular(24)),
|
||||||
color: Theme.of(context).accentTextTheme.title.backgroundColor),
|
gradient: LinearGradient(colors: [
|
||||||
child: SingleChildScrollView(
|
Theme.of(context).primaryTextTheme.subhead.color,
|
||||||
child: Column(
|
Theme.of(context).primaryTextTheme.subhead.decorationColor,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: <Widget>[
|
|
||||||
Text(
|
|
||||||
S.of(context).restore_active_seed,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
color:
|
|
||||||
Theme.of(context).primaryTextTheme.caption.color),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(top: 5),
|
|
||||||
child: Wrap(
|
|
||||||
children: items.map((item) {
|
|
||||||
final isValid = widget.validator.isValid(item);
|
|
||||||
final isSelected = selectedItem == item;
|
|
||||||
|
|
||||||
return InkWell(
|
|
||||||
onTap: () => onMnemonicTap(item),
|
|
||||||
child: Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: isValid
|
|
||||||
? Colors.transparent
|
|
||||||
: Palette.red),
|
|
||||||
margin: EdgeInsets.only(right: 7, bottom: 8),
|
|
||||||
child: Text(
|
|
||||||
item.toString(),
|
|
||||||
style: TextStyle(
|
|
||||||
color: isValid
|
|
||||||
? Theme.of(context)
|
|
||||||
.primaryTextTheme
|
|
||||||
.title
|
|
||||||
.color
|
|
||||||
: Theme.of(context)
|
|
||||||
.primaryTextTheme
|
|
||||||
.caption
|
|
||||||
.color,
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: isSelected
|
|
||||||
? FontWeight.w900
|
|
||||||
: FontWeight.w400,
|
|
||||||
decoration: isSelected
|
|
||||||
? TextDecoration.underline
|
|
||||||
: TextDecoration.none),
|
|
||||||
)),
|
|
||||||
);
|
|
||||||
}).toList(),
|
|
||||||
))
|
|
||||||
],
|
],
|
||||||
),
|
begin: Alignment.topLeft,
|
||||||
|
end: Alignment.bottomRight)
|
||||||
),
|
),
|
||||||
|
child: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
CupertinoNavigationBar(
|
||||||
|
leading: widget.leading,
|
||||||
|
middle: widget.middle,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
border: null,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.all(24),
|
||||||
|
alignment: Alignment.topLeft,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
S.of(context).restore_active_seed,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
color:
|
||||||
|
Theme.of(context).textTheme.overline.backgroundColor),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(top: 5),
|
||||||
|
child: Wrap(
|
||||||
|
children: items.map((item) {
|
||||||
|
final isValid = widget.validator.isValid(item);
|
||||||
|
final isSelected = selectedItem == item;
|
||||||
|
|
||||||
|
return InkWell(
|
||||||
|
onTap: () => onMnemonicTap(item),
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: isValid
|
||||||
|
? Colors.transparent
|
||||||
|
: Palette.red),
|
||||||
|
margin: EdgeInsets.only(right: 7, bottom: 8),
|
||||||
|
child: Text(
|
||||||
|
item.toString(),
|
||||||
|
style: TextStyle(
|
||||||
|
color: isValid
|
||||||
|
? Colors.white
|
||||||
|
: Colors.grey,
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: isSelected
|
||||||
|
? FontWeight.w900
|
||||||
|
: FontWeight.w600,
|
||||||
|
decoration: isSelected
|
||||||
|
? TextDecoration.underline
|
||||||
|
: TextDecoration.none),
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Flexible(
|
Flexible(
|
||||||
fit: FlexFit.tight,
|
fit: FlexFit.tight,
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding:
|
||||||
EdgeInsets.only(left: 24, top: 48, right: 24, bottom: 24),
|
EdgeInsets.only(left: 24, top: 48, right: 24, bottom: 24),
|
||||||
|
@ -277,8 +299,8 @@ class SeedWidgetState extends State<SeedWidget> {
|
||||||
Text(
|
Text(
|
||||||
S.of(context).restore_new_seed,
|
S.of(context).restore_new_seed,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 20,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.w500,
|
||||||
color:
|
color:
|
||||||
Theme.of(context).primaryTextTheme.title.color),
|
Theme.of(context).primaryTextTheme.title.color),
|
||||||
),
|
),
|
||||||
|
@ -291,6 +313,7 @@ class SeedWidgetState extends State<SeedWidget> {
|
||||||
: null,
|
: null,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
color:
|
color:
|
||||||
Theme.of(context).primaryTextTheme.title.color),
|
Theme.of(context).primaryTextTheme.title.color),
|
||||||
controller: _seedController,
|
controller: _seedController,
|
||||||
|
@ -306,10 +329,11 @@ class SeedWidgetState extends State<SeedWidget> {
|
||||||
Text('${items.length}/$maxLength',
|
Text('${items.length}/$maxLength',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.primaryTextTheme
|
.accentTextTheme
|
||||||
.caption
|
.display2
|
||||||
.color,
|
.decorationColor,
|
||||||
fontSize: 14)),
|
fontWeight: FontWeight.normal,
|
||||||
|
fontSize: 16)),
|
||||||
SizedBox(width: 10),
|
SizedBox(width: 10),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () async =>
|
onTap: () async =>
|
||||||
|
@ -322,17 +346,14 @@ class SeedWidgetState extends State<SeedWidget> {
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.accentTextTheme
|
.accentTextTheme
|
||||||
.title
|
.caption
|
||||||
.backgroundColor,
|
.color,
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.circular(10.0)),
|
BorderRadius.circular(10.0)),
|
||||||
child: Text(
|
child: Text(
|
||||||
S.of(context).paste,
|
S.of(context).paste,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context)
|
color: Palette.blueCraiola),
|
||||||
.primaryTextTheme
|
|
||||||
.title
|
|
||||||
.color),
|
|
||||||
)),
|
)),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
@ -341,20 +362,21 @@ class SeedWidgetState extends State<SeedWidget> {
|
||||||
),
|
),
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.primaryTextTheme
|
.accentTextTheme
|
||||||
.caption
|
.display2
|
||||||
.color,
|
.decorationColor,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
fontSize: 16),
|
fontSize: 16),
|
||||||
hintText:
|
hintText:
|
||||||
S.of(context).restore_from_seed_placeholder,
|
S.of(context).restore_from_seed_placeholder,
|
||||||
errorText: _errorMessage,
|
errorText: _errorMessage,
|
||||||
focusedBorder: UnderlineInputBorder(
|
focusedBorder: UnderlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: Theme.of(context).dividerColor,
|
color: Theme.of(context).accentTextTheme.subtitle.backgroundColor,
|
||||||
width: 1.0)),
|
width: 1.0)),
|
||||||
enabledBorder: UnderlineInputBorder(
|
enabledBorder: UnderlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: Theme.of(context).dividerColor,
|
color: Theme.of(context).accentTextTheme.subtitle.backgroundColor,
|
||||||
width: 1.0))),
|
width: 1.0))),
|
||||||
enableInteractiveSelection: false,
|
enableInteractiveSelection: false,
|
||||||
),
|
),
|
||||||
|
@ -386,7 +408,7 @@ class SeedWidgetState extends State<SeedWidget> {
|
||||||
onPressed: () => widget.onFinish != null
|
onPressed: () => widget.onFinish != null
|
||||||
? widget.onFinish()
|
? widget.onFinish()
|
||||||
: null,
|
: null,
|
||||||
color: Colors.green,
|
color: Palette.blueCraiola,
|
||||||
textColor: Colors.white)
|
textColor: Colors.white)
|
||||||
: PrimaryButton(
|
: PrimaryButton(
|
||||||
text: selectedItem != null
|
text: selectedItem != null
|
||||||
|
@ -397,7 +419,7 @@ class SeedWidgetState extends State<SeedWidget> {
|
||||||
: null,
|
: null,
|
||||||
onDisabledPressed: () => showErrorIfExist(),
|
onDisabledPressed: () => showErrorIfExist(),
|
||||||
isDisabled: !isCurrentMnemonicValid,
|
isDisabled: !isCurrentMnemonicValid,
|
||||||
color: Colors.green,
|
color: Palette.blueCraiola,
|
||||||
textColor: Colors.white),
|
textColor: Colors.white),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
|
@ -154,6 +154,11 @@ class Themes {
|
||||||
),
|
),
|
||||||
display2: TextStyle(
|
display2: TextStyle(
|
||||||
color: Palette.shadowWhite, // action button color (address text field)
|
color: Palette.shadowWhite, // action button color (address text field)
|
||||||
|
decorationColor: Palette.darkGray // hint text (seed widget)
|
||||||
|
),
|
||||||
|
display3: TextStyle(
|
||||||
|
color: Palette.darkGray, // hint text (new wallet page)
|
||||||
|
decorationColor: Palette.periwinkleCraiola // underline (new wallet page)
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -320,6 +325,11 @@ class Themes {
|
||||||
),
|
),
|
||||||
display2: TextStyle(
|
display2: TextStyle(
|
||||||
color: PaletteDark.nightBlue, // action button color (address text field)
|
color: PaletteDark.nightBlue, // action button color (address text field)
|
||||||
|
decorationColor: PaletteDark.darkCyanBlue // hint text (seed widget)
|
||||||
|
),
|
||||||
|
display3: TextStyle(
|
||||||
|
color: PaletteDark.cyanBlue, // hint text (new wallet page)
|
||||||
|
decorationColor: PaletteDark.darkGrey // underline (new wallet page)
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
64
lib/view_model/wallet_restoration_from_keys_vm.dart
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:hive/hive.dart';
|
||||||
|
import 'package:mobx/mobx.dart';
|
||||||
|
import 'package:cake_wallet/monero/monero_wallet_service.dart';
|
||||||
|
import 'package:cake_wallet/bitcoin/bitcoin_wallet_creation_credentials.dart';
|
||||||
|
import 'package:cake_wallet/core/generate_wallet_password.dart';
|
||||||
|
import 'package:cake_wallet/core/wallet_creation_service.dart';
|
||||||
|
import 'package:cake_wallet/core/wallet_credentials.dart';
|
||||||
|
import 'package:cake_wallet/src/domain/common/wallet_type.dart';
|
||||||
|
import 'package:cake_wallet/view_model/wallet_creation_vm.dart';
|
||||||
|
import 'package:cake_wallet/src/domain/common/wallet_info.dart';
|
||||||
|
|
||||||
|
part 'wallet_restoration_from_keys_vm.g.dart';
|
||||||
|
|
||||||
|
class WalletRestorationFromKeysVM = WalletRestorationFromKeysVMBase
|
||||||
|
with _$WalletRestorationFromKeysVM;
|
||||||
|
|
||||||
|
abstract class WalletRestorationFromKeysVMBase extends WalletCreationVM
|
||||||
|
with Store {
|
||||||
|
WalletRestorationFromKeysVMBase(this._walletCreationService, Box<WalletInfo> walletInfoSource,
|
||||||
|
{@required WalletType type, @required this.language})
|
||||||
|
: super(walletInfoSource, type: type, isRecovery: true);
|
||||||
|
|
||||||
|
@observable
|
||||||
|
int height;
|
||||||
|
|
||||||
|
@observable
|
||||||
|
String viewKey;
|
||||||
|
|
||||||
|
@observable
|
||||||
|
String spendKey;
|
||||||
|
|
||||||
|
@observable
|
||||||
|
String wif;
|
||||||
|
|
||||||
|
@observable
|
||||||
|
String address;
|
||||||
|
|
||||||
|
bool get hasRestorationHeight => type == WalletType.monero;
|
||||||
|
|
||||||
|
final String language;
|
||||||
|
final WalletCreationService _walletCreationService;
|
||||||
|
|
||||||
|
@override
|
||||||
|
WalletCredentials getCredentials(dynamic options) {
|
||||||
|
final password = generateWalletPassword(type);
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
case WalletType.monero:
|
||||||
|
return MoneroRestoreWalletFromKeysCredentials(
|
||||||
|
name: name, password: password, language: language, address: address,
|
||||||
|
viewKey: viewKey, spendKey: spendKey, height: height);
|
||||||
|
case WalletType.bitcoin:
|
||||||
|
return BitcoinRestoreWalletFromWIFCredentials(
|
||||||
|
name: name, password: password, wif: wif);
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> process(WalletCredentials credentials) async =>
|
||||||
|
_walletCreationService.restoreFromKeys(credentials);
|
||||||
|
}
|
|
@ -165,6 +165,9 @@
|
||||||
"restore_wallet_restore_description" : "Beschreibung zur Wiederherstellung der Brieftasche",
|
"restore_wallet_restore_description" : "Beschreibung zur Wiederherstellung der Brieftasche",
|
||||||
"restore_new_seed" : "Neuer Seed",
|
"restore_new_seed" : "Neuer Seed",
|
||||||
"restore_active_seed" : "Aktives Seed",
|
"restore_active_seed" : "Aktives Seed",
|
||||||
|
"restore_bitcoin_description_from_seed" : "Stellen Sie Ihre Brieftasche aus dem 12-Wort-Kombinationscode wieder her",
|
||||||
|
"restore_bitcoin_description_from_keys" : "Stellen Sie Ihre Brieftasche aus der generierten WIF-Zeichenfolge aus Ihren privaten Schlüsseln wieder her",
|
||||||
|
"restore_bitcoin_title_from_keys" : "Aus WIF wiederherstellen",
|
||||||
|
|
||||||
|
|
||||||
"seed_title" : "Seed",
|
"seed_title" : "Seed",
|
||||||
|
|
|
@ -165,6 +165,9 @@
|
||||||
"restore_wallet_restore_description" : "Wallet restore description",
|
"restore_wallet_restore_description" : "Wallet restore description",
|
||||||
"restore_new_seed" : "New seed",
|
"restore_new_seed" : "New seed",
|
||||||
"restore_active_seed" : "Active seed",
|
"restore_active_seed" : "Active seed",
|
||||||
|
"restore_bitcoin_description_from_seed" : "Restore your wallet from 12 word combination code",
|
||||||
|
"restore_bitcoin_description_from_keys" : "Restore your wallet from generated WIF string from your private keys",
|
||||||
|
"restore_bitcoin_title_from_keys" : "Restore from WIF",
|
||||||
|
|
||||||
|
|
||||||
"seed_title" : "Seed",
|
"seed_title" : "Seed",
|
||||||
|
|
|
@ -165,6 +165,9 @@
|
||||||
"restore_wallet_restore_description" : "Restaurar billetera",
|
"restore_wallet_restore_description" : "Restaurar billetera",
|
||||||
"restore_new_seed" : "Nueva semilla",
|
"restore_new_seed" : "Nueva semilla",
|
||||||
"restore_active_seed" : "Semilla activa",
|
"restore_active_seed" : "Semilla activa",
|
||||||
|
"restore_bitcoin_description_from_seed" : "Restaure su billetera a partir del código de combinación de 12 palabras",
|
||||||
|
"restore_bitcoin_description_from_keys" : "Restaure su billetera a partir de una cadena WIF generada a partir de sus claves privadas",
|
||||||
|
"restore_bitcoin_title_from_keys" : "Restaurar desde WIF",
|
||||||
|
|
||||||
|
|
||||||
"seed_title" : "Semilla",
|
"seed_title" : "Semilla",
|
||||||
|
|
|
@ -165,6 +165,9 @@
|
||||||
"restore_wallet_restore_description" : "बटुआ विवरण पुनर्स्थापित करें",
|
"restore_wallet_restore_description" : "बटुआ विवरण पुनर्स्थापित करें",
|
||||||
"restore_new_seed" : "नया बीज",
|
"restore_new_seed" : "नया बीज",
|
||||||
"restore_active_seed" : "सक्रिय बीज",
|
"restore_active_seed" : "सक्रिय बीज",
|
||||||
|
"restore_bitcoin_description_from_seed" : "12 शब्द संयोजन कोड से अपने वॉलेट को पुनर्स्थापित करें",
|
||||||
|
"restore_bitcoin_description_from_keys" : "अपने निजी कुंजी से उत्पन्न WIF स्ट्रिंग से अपने वॉलेट को पुनर्स्थापित करें",
|
||||||
|
"restore_bitcoin_title_from_keys" : "WIF से पुनर्स्थापित करें",
|
||||||
|
|
||||||
|
|
||||||
"seed_title" : "बीज",
|
"seed_title" : "बीज",
|
||||||
|
|
|
@ -165,6 +165,9 @@
|
||||||
"restore_wallet_restore_description" : "ウォレットの復元",
|
"restore_wallet_restore_description" : "ウォレットの復元",
|
||||||
"restore_new_seed" : "新しい種",
|
"restore_new_seed" : "新しい種",
|
||||||
"restore_active_seed" : "アクティブシード",
|
"restore_active_seed" : "アクティブシード",
|
||||||
|
"restore_bitcoin_description_from_seed" : "12ワードの組み合わせコードからウォレットを復元する",
|
||||||
|
"restore_bitcoin_description_from_keys" : "秘密鍵から生成されたWIF文字列からウォレットを復元します",
|
||||||
|
"restore_bitcoin_title_from_keys" : "WIFから復元",
|
||||||
|
|
||||||
|
|
||||||
"seed_title" : "シード",
|
"seed_title" : "シード",
|
||||||
|
|
|
@ -165,6 +165,9 @@
|
||||||
"restore_wallet_restore_description" : "월렛 복원 설명",
|
"restore_wallet_restore_description" : "월렛 복원 설명",
|
||||||
"restore_new_seed" : "새로운 씨앗",
|
"restore_new_seed" : "새로운 씨앗",
|
||||||
"restore_active_seed" : "활성 종자",
|
"restore_active_seed" : "활성 종자",
|
||||||
|
"restore_bitcoin_description_from_seed" : "12 단어 조합 코드에서 지갑 복원",
|
||||||
|
"restore_bitcoin_description_from_keys" : "개인 키에서 생성 된 WIF 문자열에서 지갑 복원",
|
||||||
|
"restore_bitcoin_title_from_keys" : "WIF에서 복원",
|
||||||
|
|
||||||
|
|
||||||
"seed_title" : "씨",
|
"seed_title" : "씨",
|
||||||
|
|
|
@ -165,6 +165,9 @@
|
||||||
"restore_wallet_restore_description" : "Portemonnee-herstelbeschrijving",
|
"restore_wallet_restore_description" : "Portemonnee-herstelbeschrijving",
|
||||||
"restore_new_seed" : "Nieuw zaad",
|
"restore_new_seed" : "Nieuw zaad",
|
||||||
"restore_active_seed" : "Actief zaad",
|
"restore_active_seed" : "Actief zaad",
|
||||||
|
"restore_bitcoin_description_from_seed" : "Herstel uw portemonnee met een combinatiecode van 12 woorden",
|
||||||
|
"restore_bitcoin_description_from_keys" : "Herstel uw portemonnee van de gegenereerde WIF-string van uw privésleutels",
|
||||||
|
"restore_bitcoin_title_from_keys" : "Herstel van WIF",
|
||||||
|
|
||||||
|
|
||||||
"seed_title" : "Zaad",
|
"seed_title" : "Zaad",
|
||||||
|
|
|
@ -165,6 +165,9 @@
|
||||||
"restore_wallet_restore_description" : "Opis przywracania portfela",
|
"restore_wallet_restore_description" : "Opis przywracania portfela",
|
||||||
"restore_new_seed" : "Nowe nasienie",
|
"restore_new_seed" : "Nowe nasienie",
|
||||||
"restore_active_seed" : "Aktywne nasiona",
|
"restore_active_seed" : "Aktywne nasiona",
|
||||||
|
"restore_bitcoin_description_from_seed" : "Przywróć swój portfel z kodu złożonego z 12 słów",
|
||||||
|
"restore_bitcoin_description_from_keys" : "Przywróć swój portfel z wygenerowanego ciągu WIF z kluczy prywatnych",
|
||||||
|
"restore_bitcoin_title_from_keys" : "Przywróć z WIF",
|
||||||
|
|
||||||
|
|
||||||
"seed_title" : "Ziarno",
|
"seed_title" : "Ziarno",
|
||||||
|
|
|
@ -165,6 +165,9 @@
|
||||||
"restore_wallet_restore_description" : "Restauração da carteira",
|
"restore_wallet_restore_description" : "Restauração da carteira",
|
||||||
"restore_new_seed" : "Nova semente",
|
"restore_new_seed" : "Nova semente",
|
||||||
"restore_active_seed" : "Semente ativa",
|
"restore_active_seed" : "Semente ativa",
|
||||||
|
"restore_bitcoin_description_from_seed" : "Restaure sua carteira a partir de um código de combinação de 12 palavras",
|
||||||
|
"restore_bitcoin_description_from_keys" : "Restaure sua carteira a partir da string WIF gerada de suas chaves privadas",
|
||||||
|
"restore_bitcoin_title_from_keys" : "Restaurar de WIF",
|
||||||
|
|
||||||
|
|
||||||
"seed_title" : "Semente",
|
"seed_title" : "Semente",
|
||||||
|
|
|
@ -165,6 +165,9 @@
|
||||||
"restore_wallet_restore_description" : "Описание восстановления кошелька",
|
"restore_wallet_restore_description" : "Описание восстановления кошелька",
|
||||||
"restore_new_seed" : "Новая мнемоническая фраза",
|
"restore_new_seed" : "Новая мнемоническая фраза",
|
||||||
"restore_active_seed" : "Активная мнемоническая фраза",
|
"restore_active_seed" : "Активная мнемоническая фраза",
|
||||||
|
"restore_bitcoin_description_from_seed" : "Вы можете восстановить кошелёк используя 12-ти значную мнемоническую фразу",
|
||||||
|
"restore_bitcoin_description_from_keys" : "Вы можете восстановить кошелёк с помощью WIF",
|
||||||
|
"restore_bitcoin_title_from_keys" : "Восстановить с помощью WIF",
|
||||||
|
|
||||||
|
|
||||||
"seed_title" : "Мнемоническая фраза",
|
"seed_title" : "Мнемоническая фраза",
|
||||||
|
|
|
@ -165,6 +165,9 @@
|
||||||
"restore_wallet_restore_description" : "Опис відновлюваного гаманця",
|
"restore_wallet_restore_description" : "Опис відновлюваного гаманця",
|
||||||
"restore_new_seed" : "Нова мнемонічна фраза",
|
"restore_new_seed" : "Нова мнемонічна фраза",
|
||||||
"restore_active_seed" : "Активна мнемонічна фраза",
|
"restore_active_seed" : "Активна мнемонічна фраза",
|
||||||
|
"restore_bitcoin_description_from_seed" : "Ви можете відновити гаманець використовуючи 12-ти слівну мнемонічну фразу",
|
||||||
|
"restore_bitcoin_description_from_keys" : "Ви можете відновити гаманець за допомогою WIF",
|
||||||
|
"restore_bitcoin_title_from_keys" : "Відновити за допомогою WIF",
|
||||||
|
|
||||||
|
|
||||||
"seed_title" : "Мнемонічна фраза",
|
"seed_title" : "Мнемонічна фраза",
|
||||||
|
|
|
@ -165,6 +165,9 @@
|
||||||
"restore_wallet_restore_description" : "钱包还原说明",
|
"restore_wallet_restore_description" : "钱包还原说明",
|
||||||
"restore_new_seed" : "新種子",
|
"restore_new_seed" : "新種子",
|
||||||
"restore_active_seed" : "活性種子",
|
"restore_active_seed" : "活性種子",
|
||||||
|
"restore_bitcoin_description_from_seed" : "從12個單詞的組合碼恢復您的錢包",
|
||||||
|
"restore_bitcoin_description_from_keys" : "從私鑰中生成的WIF字符串還原您的錢包",
|
||||||
|
"restore_bitcoin_title_from_keys" : "從WIF還原",
|
||||||
|
|
||||||
|
|
||||||
"seed_title" : "种子",
|
"seed_title" : "种子",
|
||||||
|
|