Merge branch 'new-world' of github.com:cake-tech/cake_wallet_private into rework-restore-wallet

This commit is contained in:
M 2020-10-24 15:55:31 +03:00
commit 71e02f429d
25 changed files with 245 additions and 93 deletions

View file

@ -23,3 +23,11 @@ class AmountValidator extends TextValidator {
}
}
}
class AllAmountValidator extends TextValidator {
AllAmountValidator() : super(
errorMessage: S.current.error_text_amount,
pattern: S.current.all,
minLength: 0,
maxLength: 0);
}

View file

@ -130,6 +130,8 @@ class S implements WidgetsLocalizations {
String get please_make_selection => "Please make selection below to create or recover your wallet.";
String get please_select => "Please select:";
String get please_try_to_connect_to_another_node => "Please try to connect to another node";
String get private_key => "Private key";
String get public_key => "Public key";
String get receive => "Receive";
String get receive_amount => "Amount";
String get received => "Received";
@ -229,7 +231,7 @@ class S implements WidgetsLocalizations {
String get setup_pin => "Setup PIN";
String get setup_successful => "Your PIN has been set up successfully!";
String get share_address => "Share address";
String get show_keys => "Show keys";
String get show_keys => "Show seed/keys";
String get show_seed => "Show seed";
String get spend_key_private => "Spend key (private)";
String get spend_key_public => "Spend key (public)";
@ -288,7 +290,7 @@ class S implements WidgetsLocalizations {
String get use => "Switch to ";
String get view_key_private => "View key (private)";
String get view_key_public => "View key (public)";
String get wallet_keys => "Wallet keys";
String get wallet_keys => "Wallet seed/keys";
String get wallet_list_create_new_wallet => "Create New Wallet";
String get wallet_list_load_wallet => "Load wallet";
String get wallet_list_restore_wallet => "Restore Wallet";
@ -296,6 +298,7 @@ class S implements WidgetsLocalizations {
String get wallet_menu => "Menu";
String get wallet_name => "Wallet name";
String get wallet_restoration_store_incorrect_seed_length => "Incorrect seed length";
String get wallet_seed => "Wallet seed";
String get wallet_store_monero_wallet => "Monero Wallet";
String get wallets => "Wallets";
String get welcome => "Welcome to";
@ -350,6 +353,8 @@ class $de extends S {
@override
String get cancel => "Abbrechen";
@override
String get public_key => "Öffentlicher Schlüssel";
@override
String get trade_state_unpaid => "Unbezahlt";
@override
String get authenticated => "Authentifiziert";
@ -400,6 +405,8 @@ class $de extends S {
@override
String get received => "Empfangen";
@override
String get private_key => "Privat Schlüssel";
@override
String get auth_store_banned_minutes => " Protokoll";
@override
String get restore_title_from_seed_keys => "Vom Seed / Schlüssel wiederherstellen";
@ -448,7 +455,7 @@ class $de extends S {
@override
String get seed_language_choose => "Bitte wählen Sie die Ausgangssprache:";
@override
String get wallet_keys => "Wallet schlüssel";
String get wallet_keys => "Brieftaschensamen / Schlüssel";
@override
String get reconnect => "Erneut verbinden";
@override
@ -574,6 +581,8 @@ class $de extends S {
@override
String get add_new_node => "Neuen Knoten hinzufügen";
@override
String get wallet_seed => "Brieftaschensamen";
@override
String get yesterday => "Gestern";
@override
String get send_amount => "Menge:";
@ -774,7 +783,7 @@ class $de extends S {
@override
String get rescan => "Erneut scannen";
@override
String get show_keys => "Schlüssel anzeigen";
String get show_keys => "Samen/Schlüssel anzeigen";
@override
String get error_text_fiat => "Der Wert des Betrags darf den verfügbaren Kontostand nicht überschreiten.\nDie Anzahl der Nachkommastellen muss kleiner oder gleich 2 sein";
@override
@ -994,6 +1003,8 @@ class $hi extends S {
@override
String get cancel => "रद्द करना";
@override
String get public_key => "सार्वजनिक कुंजी";
@override
String get trade_state_unpaid => "अवैतनिक";
@override
String get authenticated => "प्रमाणीकृत";
@ -1044,6 +1055,8 @@ class $hi extends S {
@override
String get received => "प्राप्त किया";
@override
String get private_key => "निजी चाबी";
@override
String get auth_store_banned_minutes => " मिनट";
@override
String get restore_title_from_seed_keys => "बीज / कुंजियों से पुनर्स्थापित करें";
@ -1092,7 +1105,7 @@ class $hi extends S {
@override
String get seed_language_choose => "कृपया बीज भाषा चुनें:";
@override
String get wallet_keys => "बटुआ की";
String get wallet_keys => "बटुआ बीज / चाबियाँ";
@override
String get reconnect => "रिकनेक्ट";
@override
@ -1218,6 +1231,8 @@ class $hi extends S {
@override
String get add_new_node => "नया नोड जोड़ें";
@override
String get wallet_seed => "बटुआ का बीज";
@override
String get yesterday => "बिता कल";
@override
String get send_amount => "रकम:";
@ -1418,7 +1433,7 @@ class $hi extends S {
@override
String get rescan => "पुन: स्कैन";
@override
String get show_keys => "चाबी दिखाओ";
String get show_keys => "बीज / कुंजियाँ दिखाएँ";
@override
String get error_text_fiat => "राशि का मूल्य उपलब्ध शेष राशि से अधिक नहीं हो सकता.\nअंश अंकों की संख्या कम या 2 के बराबर होनी चाहिए";
@override
@ -1638,6 +1653,8 @@ class $ru extends S {
@override
String get cancel => "Отменить";
@override
String get public_key => "Публичный ключ";
@override
String get trade_state_unpaid => "Неоплаченная";
@override
String get authenticated => "Аутентифицировано";
@ -1688,6 +1705,8 @@ class $ru extends S {
@override
String get received => "Полученные";
@override
String get private_key => "Приватный ключ";
@override
String get auth_store_banned_minutes => " минут";
@override
String get restore_title_from_seed_keys => "Восстановить из мнемонической фразы/ключей";
@ -1736,7 +1755,7 @@ class $ru extends S {
@override
String get seed_language_choose => "Пожалуйста, выберите язык мнемонической фразы:";
@override
String get wallet_keys => "Ключи кошелька";
String get wallet_keys => "Мнемоническая фраза/ключи кошелька";
@override
String get reconnect => "Переподключиться";
@override
@ -1862,6 +1881,8 @@ class $ru extends S {
@override
String get add_new_node => "Добавить новую ноду";
@override
String get wallet_seed => "Мнемоническая фраза кошелька";
@override
String get yesterday => "Вчера";
@override
String get send_amount => "Сумма:";
@ -2062,7 +2083,7 @@ class $ru extends S {
@override
String get rescan => "Пересканировать";
@override
String get show_keys => "Показать ключи";
String get show_keys => "Показать мнемоническую фразу/ключи";
@override
String get error_text_fiat => "Значение суммы не может превышать доступный баланс.\nКоличество цифр после запятой должно быть меньше или равно 2";
@override
@ -2282,6 +2303,8 @@ class $ko extends S {
@override
String get cancel => "취소";
@override
String get public_key => "공개 키";
@override
String get trade_state_unpaid => "미지급";
@override
String get authenticated => "인증";
@ -2332,6 +2355,8 @@ class $ko extends S {
@override
String get received => "받았습니다";
@override
String get private_key => "개인 키";
@override
String get auth_store_banned_minutes => " 의사록";
@override
String get restore_title_from_seed_keys => "시드 / 키에서 복원";
@ -2380,7 +2405,7 @@ class $ko extends S {
@override
String get seed_language_choose => "종자 언어를 선택하십시오:";
@override
String get wallet_keys => "지갑";
String get wallet_keys => "지갑 시드 /";
@override
String get reconnect => "다시 연결";
@override
@ -2506,6 +2531,8 @@ class $ko extends S {
@override
String get add_new_node => "새 노드 추가";
@override
String get wallet_seed => "지갑 시드";
@override
String get yesterday => "어제";
@override
String get send_amount => "양:";
@ -2706,7 +2733,7 @@ class $ko extends S {
@override
String get rescan => "재검색";
@override
String get show_keys => "키 표시";
String get show_keys => "시드 / 키 표시";
@override
String get error_text_fiat => "금액은 사용 가능한 잔액을 초과 할 수 없습니다.\n소수 자릿수는 2보다 작거나 같아야합니다";
@override
@ -2926,6 +2953,8 @@ class $pt extends S {
@override
String get cancel => "Cancelar";
@override
String get public_key => "Chave pública";
@override
String get trade_state_unpaid => "Não paga";
@override
String get authenticated => "Autenticado";
@ -2976,6 +3005,8 @@ class $pt extends S {
@override
String get received => "Recebida";
@override
String get private_key => "Chave privada";
@override
String get auth_store_banned_minutes => " minutos";
@override
String get restore_title_from_seed_keys => "Restaurar a partir de sementes/chaves";
@ -3024,7 +3055,7 @@ class $pt extends S {
@override
String get seed_language_choose => "Por favor, escolha o idioma da semente:";
@override
String get wallet_keys => "Chaves da carteira";
String get wallet_keys => "Semente/chaves da carteira";
@override
String get reconnect => "Reconectar";
@override
@ -3150,6 +3181,8 @@ class $pt extends S {
@override
String get add_new_node => "Adicionar novo nó";
@override
String get wallet_seed => "Semente de carteira";
@override
String get yesterday => "Ontem";
@override
String get send_amount => "Montante:";
@ -3350,7 +3383,7 @@ class $pt extends S {
@override
String get rescan => "Reescanear";
@override
String get show_keys => "Mostrar chaves";
String get show_keys => "Mostrar semente/chaves";
@override
String get error_text_fiat => "O valor do valor não pode exceder o saldo disponível.\nO número de dígitos decimais deve ser menor ou igual a 2";
@override
@ -3570,6 +3603,8 @@ class $uk extends S {
@override
String get cancel => "Відмінити";
@override
String get public_key => "Публічний ключ";
@override
String get trade_state_unpaid => "Неоплачена";
@override
String get authenticated => "Аутентифіковано";
@ -3620,6 +3655,8 @@ class $uk extends S {
@override
String get received => "Отримані";
@override
String get private_key => "Приватний ключ";
@override
String get auth_store_banned_minutes => " хвилин";
@override
String get restore_title_from_seed_keys => "Відновити з мнемонічної фрази/ключів";
@ -3668,7 +3705,7 @@ class $uk extends S {
@override
String get seed_language_choose => "Будь ласка, виберіть мову мнемонічної фрази:";
@override
String get wallet_keys => "Ключі гаманця";
String get wallet_keys => "Мнемонічна фраза/ключі гаманця";
@override
String get reconnect => "Перепідключитися";
@override
@ -3794,6 +3831,8 @@ class $uk extends S {
@override
String get add_new_node => "Додати новий вузол";
@override
String get wallet_seed => "Мнемонічна фраза гаманця";
@override
String get yesterday => "Вчора";
@override
String get send_amount => "Сума:";
@ -3994,7 +4033,7 @@ class $uk extends S {
@override
String get rescan => "Пересканувати";
@override
String get show_keys => "Показати ключі";
String get show_keys => "Показати мнемонічну фразу/ключі";
@override
String get error_text_fiat => "Значення суми не може перевищувати доступний баланс.\nКількість цифр після коми повинно бути меншим або дорівнювати 2";
@override
@ -4214,6 +4253,8 @@ class $ja extends S {
@override
String get cancel => "キャンセル";
@override
String get public_key => "公開鍵";
@override
String get trade_state_unpaid => "未払い";
@override
String get authenticated => "認証済み";
@ -4264,6 +4305,8 @@ class $ja extends S {
@override
String get received => "受け取った";
@override
String get private_key => "秘密鍵";
@override
String get auth_store_banned_minutes => " 数分";
@override
String get restore_title_from_seed_keys => "シード/キーから復元";
@ -4312,7 +4355,7 @@ class $ja extends S {
@override
String get seed_language_choose => "シード言語を選択してください:";
@override
String get wallet_keys => "ウォレットキー";
String get wallet_keys => "ウォレットシード/キー";
@override
String get reconnect => "再接続";
@override
@ -4438,6 +4481,8 @@ class $ja extends S {
@override
String get add_new_node => "新しいノードを追加";
@override
String get wallet_seed => "ウォレットシード";
@override
String get yesterday => "昨日";
@override
String get send_amount => "量:";
@ -4638,7 +4683,7 @@ class $ja extends S {
@override
String get rescan => "再スキャン";
@override
String get show_keys => "キーを表示";
String get show_keys => "シード/キーを表示する";
@override
String get error_text_fiat => "金額は利用可能な残高を超えることはできません.\n小数桁の数は2以下でなければなりません";
@override
@ -4862,6 +4907,8 @@ class $pl extends S {
@override
String get cancel => "Anulować";
@override
String get public_key => "Klucz publiczny";
@override
String get trade_state_unpaid => "Nie zapłacony";
@override
String get authenticated => "Zalegalizowany";
@ -4912,6 +4959,8 @@ class $pl extends S {
@override
String get received => "Odebrane";
@override
String get private_key => "Prywatny klucz";
@override
String get auth_store_banned_minutes => " minuty";
@override
String get restore_title_from_seed_keys => "Przywróć z nasion / kluczy";
@ -4960,7 +5009,7 @@ class $pl extends S {
@override
String get seed_language_choose => "Proszę wybrać język początkowy:";
@override
String get wallet_keys => "Klucze portfela";
String get wallet_keys => "Nasiono portfela/klucze";
@override
String get reconnect => "Na nowo połączyć";
@override
@ -5086,6 +5135,8 @@ class $pl extends S {
@override
String get add_new_node => "Dodaj nowy węzeł";
@override
String get wallet_seed => "Nasiono portfela";
@override
String get yesterday => "Wczoraj";
@override
String get send_amount => "Ilość:";
@ -5286,7 +5337,7 @@ class $pl extends S {
@override
String get rescan => "Skanuj ponownie";
@override
String get show_keys => "Pokaż klucze";
String get show_keys => "Pokaż nasiona/klucze";
@override
String get error_text_fiat => "Wartość kwoty nie może przekroczyć dostępnego salda.\nLiczba cyfr ułamkowych musi być mniejsza lub równa 2";
@override
@ -5506,6 +5557,8 @@ class $es extends S {
@override
String get cancel => "Cancelar";
@override
String get public_key => "Clave pública";
@override
String get trade_state_unpaid => "No pagado";
@override
String get authenticated => "Autenticados";
@ -5556,6 +5609,8 @@ class $es extends S {
@override
String get received => "Recibido";
@override
String get private_key => "Clave privada";
@override
String get auth_store_banned_minutes => " minutos";
@override
String get restore_title_from_seed_keys => "Restaurar desde semilla/claves";
@ -5604,7 +5659,7 @@ class $es extends S {
@override
String get seed_language_choose => "Por favor elija el idioma semilla:";
@override
String get wallet_keys => "Billetera clave";
String get wallet_keys => "Billetera semilla/claves";
@override
String get reconnect => "Volver a conectar";
@override
@ -5730,6 +5785,8 @@ class $es extends S {
@override
String get add_new_node => "Agregar nuevo nodo";
@override
String get wallet_seed => "Semilla de billetera";
@override
String get yesterday => "Ayer";
@override
String get send_amount => "Cantidad:";
@ -5930,7 +5987,7 @@ class $es extends S {
@override
String get rescan => "Reescanear";
@override
String get show_keys => "Mostrar llaves";
String get show_keys => "Mostrar semilla/claves";
@override
String get error_text_fiat => "El valor de la cantidad no puede exceder el saldo disponible.\nEl número de dígitos de fracción debe ser menor o igual a 2";
@override
@ -6150,6 +6207,8 @@ class $nl extends S {
@override
String get cancel => "Annuleer";
@override
String get public_key => "Publieke sleutel";
@override
String get trade_state_unpaid => "Onbetaald";
@override
String get authenticated => "Authenticated";
@ -6200,6 +6259,8 @@ class $nl extends S {
@override
String get received => "Ontvangen";
@override
String get private_key => "Prive sleutel";
@override
String get auth_store_banned_minutes => " notulen";
@override
String get restore_title_from_seed_keys => "Herstel van zaad / sleutels";
@ -6248,7 +6309,7 @@ class $nl extends S {
@override
String get seed_language_choose => "Kies een starttaal:";
@override
String get wallet_keys => "Portemonnee sleutels";
String get wallet_keys => "Portemonnee zaad/sleutels";
@override
String get reconnect => "Sluit";
@override
@ -6374,6 +6435,8 @@ class $nl extends S {
@override
String get add_new_node => "Voeg een nieuw knooppunt toe";
@override
String get wallet_seed => "Portemonnee zaad";
@override
String get yesterday => "Gisteren";
@override
String get send_amount => "Bedrag:";
@ -6574,7 +6637,7 @@ class $nl extends S {
@override
String get rescan => "Opnieuw scannen";
@override
String get show_keys => "Toon sleutels";
String get show_keys => "Toon zaad/sleutels";
@override
String get error_text_fiat => "Waarde van bedrag kan het beschikbare saldo niet overschrijden.\nHet aantal breukcijfers moet kleiner zijn dan of gelijk zijn aan 2";
@override
@ -6794,6 +6857,8 @@ class $zh extends S {
@override
String get cancel => "取消";
@override
String get public_key => "公鑰";
@override
String get trade_state_unpaid => "未付";
@override
String get authenticated => "已认证";
@ -6844,6 +6909,8 @@ class $zh extends S {
@override
String get received => "已收到";
@override
String get private_key => "私鑰";
@override
String get auth_store_banned_minutes => " 分钟";
@override
String get restore_title_from_seed_keys => "从种子/密钥还原";
@ -6892,7 +6959,7 @@ class $zh extends S {
@override
String get seed_language_choose => "請選擇種子語言:";
@override
String get wallet_keys => "钱包钥";
String get wallet_keys => "錢包種子/鑰";
@override
String get reconnect => "重新连接";
@override
@ -7018,6 +7085,8 @@ class $zh extends S {
@override
String get add_new_node => "添加新節點";
@override
String get wallet_seed => "錢包種子";
@override
String get yesterday => "昨天";
@override
String get send_amount => "量:";
@ -7218,7 +7287,7 @@ class $zh extends S {
@override
String get rescan => "重新扫描";
@override
String get show_keys => "显示按键";
String get show_keys => "顯示種子/密鑰";
@override
String get error_text_fiat => "金额不能超过可用余额.\n小数位数必须小于或等于2";
@override

View file

@ -1,7 +1,7 @@
import 'package:cake_wallet/src/screens/dashboard/wallet_menu_item.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:flutter/material.dart';
import 'package:cake_wallet/routes.dart';
import 'package:provider/provider.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/screens/auth/auth_page.dart';
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
@ -11,26 +11,35 @@ import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
class WalletMenu {
WalletMenu(this.context, this.reconnect);
final List<String> items = [
S.current.reconnect,
S.current.rescan,
S.current.wallets,
S.current.nodes,
S.current.show_seed,
S.current.show_keys,
S.current.address_book_menu,
S.current.settings_title
];
final List<Image> images = [
Image.asset('assets/images/reconnect_menu.png', height: 16, width: 16),
Image.asset('assets/images/filter_icon.png', height: 16, width: 16),
Image.asset('assets/images/wallet_menu.png', height: 16, width: 16),
Image.asset('assets/images/nodes_menu.png', height: 16, width: 16),
Image.asset('assets/images/eye_menu.png', height: 16, width: 16),
Image.asset('assets/images/key_menu.png', height: 16, width: 16),
Image.asset('assets/images/open_book_menu.png', height: 16, width: 16),
Image.asset('assets/images/settings_menu.png', height: 16, width: 16),
final List<WalletMenuItem> items = [
WalletMenuItem(
title: S.current.reconnect,
image: Image.asset('assets/images/reconnect_menu.png',
height: 16, width: 16)),
WalletMenuItem(
title: S.current.rescan,
image: Image.asset('assets/images/filter_icon.png',
height: 16, width: 16)),
WalletMenuItem(
title: S.current.wallets,
image: Image.asset('assets/images/wallet_menu.png',
height: 16, width: 16)),
WalletMenuItem(
title: S.current.nodes,
image: Image.asset('assets/images/nodes_menu.png',
height: 16, width: 16)),
WalletMenuItem(
title: S.current.show_keys,
image: Image.asset('assets/images/key_menu.png',
height: 16, width: 16)),
WalletMenuItem(
title: S.current.address_book_menu,
image: Image.asset('assets/images/open_book_menu.png',
height: 16, width: 16)),
WalletMenuItem(
title: S.current.settings_title,
image: Image.asset('assets/images/settings_menu.png',
height: 16, width: 16)),
];
final BuildContext context;
@ -51,14 +60,6 @@ class WalletMenu {
Navigator.of(context).pushNamed(Routes.nodeList);
break;
case 4:
Navigator.of(context).pushNamed(Routes.auth,
arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) =>
isAuthenticatedSuccessfully
? Navigator.of(auth.context).popAndPushNamed(Routes.seed, arguments: false)
: null);
break;
case 5:
Navigator.of(context).pushNamed(Routes.auth,
arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) =>
isAuthenticatedSuccessfully
@ -66,10 +67,10 @@ class WalletMenu {
.popAndPushNamed(Routes.showKeys)
: null);
break;
case 6:
case 5:
Navigator.of(context).pushNamed(Routes.addressBook);
break;
case 7:
case 6:
Navigator.of(context).pushNamed(Routes.settings);
break;
default:

View file

@ -0,0 +1,10 @@
import 'package:flutter/material.dart';
class WalletMenuItem {
WalletMenuItem({
@required this.title,
@required this.image});
final String title;
final Image image;
}

View file

@ -168,7 +168,8 @@ class MenuWidgetState extends State<MenuWidget> {
index--;
final item = walletMenu.items[index];
final image = walletMenu.images[index] ?? Offstage();
final title = item.title;
final image = item.image ?? Offstage();
final isLastTile = index == itemCount - 1;
return GestureDetector(
@ -199,7 +200,7 @@ class MenuWidgetState extends State<MenuWidget> {
SizedBox(width: 16),
Expanded(
child: Text(
item,
title,
style: TextStyle(
color: Theme.of(context)
.textTheme

View file

@ -373,7 +373,9 @@ class ExchangePage extends BasePage {
child: Observer(builder: (_) {
final description =
exchangeViewModel.provider is XMRTOExchangeProvider
? S.of(context).amount_is_guaranteed
? exchangeViewModel.isReceiveAmountEntered
? S.of(context).amount_is_guaranteed
: S.of(context).amount_is_estimate
: S.of(context).amount_is_estimate;
return Center(
child: Text(
@ -433,6 +435,7 @@ class ExchangePage extends BasePage {
exchangeViewModel.changeDepositAmount(amount: template.amount);
exchangeViewModel.depositAddress = template.depositAddress;
exchangeViewModel.receiveAddress = template.receiveAddress;
exchangeViewModel.isReceiveAmountEntered = false;
}
void _setReactions(

View file

@ -1,4 +1,5 @@
import 'dart:ui';
import 'package:cake_wallet/exchange/exchange_provider.dart';
import 'package:cake_wallet/exchange/exchange_template.dart';
import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
@ -169,7 +170,9 @@ class ExchangeTemplatePage extends BasePage {
exchangeViewModel.wallet.currency
? exchangeViewModel.wallet.address
: exchangeViewModel.receiveAddress,
initialIsAmountEditable: false,
initialIsAmountEditable:
exchangeViewModel.provider is
XMRTOExchangeProvider ? true : false,
initialIsAddressEditable:
exchangeViewModel.isReceiveAddressEnabled,
isAmountEstimated: true,
@ -202,7 +205,9 @@ class ExchangeTemplatePage extends BasePage {
child: Observer(builder: (_) {
final description =
exchangeViewModel.provider is XMRTOExchangeProvider
? S.of(context).amount_is_guaranteed
? exchangeViewModel.isReceiveAmountEntered
? S.of(context).amount_is_guaranteed
: S.of(context).amount_is_estimate
: S.of(context).amount_is_estimate;
return Center(
child: Text(
@ -328,6 +333,12 @@ class ExchangeTemplatePage extends BasePage {
receiveKey.currentState.isAddressEditable(isEditable: isEnabled);
});
reaction((_) => exchangeViewModel.provider, (ExchangeProvider provider) {
provider is XMRTOExchangeProvider
? receiveKey.currentState.isAmountEditable(isEditable: true)
: receiveKey.currentState.isAmountEditable(isEditable: false);
});
/*reaction((_) => exchangeViewModel.limitsState, (LimitsState state) {
String min;
String max;
@ -358,6 +369,7 @@ class ExchangeTemplatePage extends BasePage {
if (depositAmountController.text != exchangeViewModel.depositAmount) {
exchangeViewModel.changeDepositAmount(
amount: depositAmountController.text);
exchangeViewModel.isReceiveAmountEntered = false;
}
});
@ -368,6 +380,7 @@ class ExchangeTemplatePage extends BasePage {
if (receiveAmountController.text != exchangeViewModel.receiveAmount) {
exchangeViewModel.changeReceiveAmount(
amount: receiveAmountController.text);
exchangeViewModel.isReceiveAmountEntered = true;
}
});

View file

@ -44,8 +44,8 @@ class QRWidget extends StatelessWidget {
child: QrImage(
data: addressListViewModel.uri.toString(),
backgroundColor: Colors.transparent,
foregroundColor:
Theme.of(context).textTheme.headline.color,
foregroundColor: Colors.white,
//Theme.of(context).textTheme.headline.color,
))))),
Spacer(flex: 3)
]),

View file

@ -163,14 +163,14 @@ class SendPage extends BasePage {
.decorationColor),
validator: sendViewModel.addressValidator,
),
Padding(
Observer(builder: (_) => Padding(
padding: const EdgeInsets.only(top: 20),
child: BaseTextFormField(
focusNode: _cryptoAmountFocus,
controller: _cryptoAmountController,
keyboardType:
TextInputType.numberWithOptions(
signed: false, decimal: true),
TextInputType.numberWithOptions(
signed: false, decimal: true),
prefixIcon: Padding(
padding: EdgeInsets.only(top: 9),
child: Text(
@ -226,7 +226,9 @@ class SendPage extends BasePage {
fontWeight: FontWeight.w500,
fontSize: 14),
validator:
sendViewModel.amountValidator)),
sendViewModel.sendAll
? sendViewModel.allAmountValidator
: sendViewModel.amountValidator))),
Observer(
builder: (_) => Padding(
padding: EdgeInsets.only(top: 10),
@ -513,6 +515,7 @@ class SendPage extends BasePage {
final amount = _fiatAmountController.text;
if (amount != sendViewModel.fiatAmount) {
sendViewModel.sendAll = false;
sendViewModel.setFiatAmount(amount);
}
});

View file

@ -305,7 +305,8 @@ class Themes {
decorationColor: Palette.darkLavender, // text color (information page)
),
subtitle: TextStyle(
color: PaletteDark.lightBlueGrey, // QR code (exchange trade page)
//color: PaletteDark.lightBlueGrey, // QR code (exchange trade page)
color: Colors.white, // QR code (exchange trade page)
backgroundColor: PaletteDark.deepVioletBlue, // divider (exchange trade page)
decorationColor: Colors.white // crete new wallet button background (wallet list page)
),

View file

@ -93,6 +93,7 @@ abstract class ExchangeViewModelBase with Store {
@observable
bool isReceiveAddressEnabled;
@observable
bool isReceiveAmountEntered;
Limits limits;
@ -256,6 +257,7 @@ abstract class ExchangeViewModelBase with Store {
@action
void reset() {
isReceiveAmountEntered = false;
depositAmount = '';
receiveAmount = '';
depositCurrency = CryptoCurrency.xmr;

View file

@ -67,6 +67,8 @@ abstract class SendViewModelBase with Store {
Validator get amountValidator => AmountValidator(type: _wallet.type);
Validator get allAmountValidator => AllAmountValidator();
Validator get addressValidator => AddressValidator(type: _wallet.currency);
Validator get templateValidator => TemplateValidator();

View file

@ -24,6 +24,8 @@ abstract class WalletKeysViewModelBase with Store {
title: S.current.view_key_public, value: keys.publicViewKey),
StandartListItem(
title: S.current.view_key_private, value: keys.privateViewKey),
StandartListItem(
title: S.current.wallet_seed, value: wallet.seed),
]);
}
@ -32,8 +34,9 @@ abstract class WalletKeysViewModelBase with Store {
items.addAll([
StandartListItem(title: 'WIF', value: keys.wif),
StandartListItem(title: 'Public key', value: keys.publicKey),
StandartListItem(title: 'Private key', value: keys.privateKey)
StandartListItem(title: S.current.public_key, value: keys.publicKey),
StandartListItem(title: S.current.private_key, value: keys.privateKey),
StandartListItem(title: S.current.wallet_seed, value: wallet.seed)
]);
}
}

View file

@ -53,7 +53,7 @@
"reconnect" : "Erneut verbinden",
"wallets" : "Wallets",
"show_seed" : "Seed zeigen",
"show_keys" : "Schlüssel anzeigen",
"show_keys" : "Samen/Schlüssel anzeigen",
"address_book_menu" : "Adressbuch",
"reconnection" : "Wiederverbindung",
"reconnect_alert_text" : "Sind Sie sicher, dass Sie die Verbindung wiederherstellen möchten?",
@ -240,7 +240,10 @@
"setup_successful" : "Ihre PIN wurde erfolgreich eingerichtet!",
"wallet_keys" : "Wallet schlüssel",
"wallet_keys" : "Brieftaschensamen / Schlüssel",
"wallet_seed" : "Brieftaschensamen",
"private_key" : "Privat Schlüssel",
"public_key" : "Öffentlicher Schlüssel",
"view_key_private" : "Schlüssel anzeigen (eheim)",
"view_key_public" : "Schlüssel anzeigen (Öffentlichkeit)",
"spend_key_private" : "Schlüssel ausgeben (geheim)",

View file

@ -53,7 +53,7 @@
"reconnect" : "Reconnect",
"wallets" : "Wallets",
"show_seed" : "Show seed",
"show_keys" : "Show keys",
"show_keys" : "Show seed/keys",
"address_book_menu" : "Address book",
"reconnection" : "Reconnection",
"reconnect_alert_text" : "Are you sure to reconnect?",
@ -240,7 +240,10 @@
"setup_successful" : "Your PIN has been set up successfully!",
"wallet_keys" : "Wallet keys",
"wallet_keys" : "Wallet seed/keys",
"wallet_seed" : "Wallet seed",
"private_key" : "Private key",
"public_key" : "Public key",
"view_key_private" : "View key (private)",
"view_key_public" : "View key (public)",
"spend_key_private" : "Spend key (private)",

View file

@ -53,7 +53,7 @@
"reconnect" : "Volver a conectar",
"wallets" : "Carteras",
"show_seed" : "Mostrar semilla",
"show_keys" : "Mostrar llaves",
"show_keys" : "Mostrar semilla/claves",
"address_book_menu" : "Libreta de direcciones",
"reconnection" : "Reconexión",
"reconnect_alert_text" : "¿Estás seguro de reconectar?",
@ -240,7 +240,10 @@
"setup_successful" : "Su PIN se ha configurado correctamente!",
"wallet_keys" : "Billetera clave",
"wallet_keys" : "Billetera semilla/claves",
"wallet_seed" : "Semilla de billetera",
"private_key" : "Clave privada",
"public_key" : "Clave pública",
"view_key_private" : "View clave (privado)",
"view_key_public" : "View clave (público)",
"spend_key_private" : "Spend clave (privado)",

View file

@ -53,7 +53,7 @@
"reconnect" : "रिकनेक्ट",
"wallets" : "पर्स",
"show_seed" : "बीज दिखाओ",
"show_keys" : "चाबी दिखाओ",
"show_keys" : "बीज / कुंजियाँ दिखाएँ",
"address_book_menu" : "पता पुस्तिका",
"reconnection" : "पुनर्संयोजन",
"reconnect_alert_text" : "क्या आप पुन: कनेक्ट होना सुनिश्चित करते हैं?",
@ -240,7 +240,10 @@
"setup_successful" : "आपका पिन सफलतापूर्वक सेट हो गया है",
"wallet_keys" : "बटुआ की",
"wallet_keys" : "बटुआ बीज / चाबियाँ",
"wallet_seed" : "बटुआ का बीज",
"private_key" : "निजी चाबी",
"public_key" : "सार्वजनिक कुंजी",
"view_key_private" : "कुंजी देखें(निजी)",
"view_key_public" : "कुंजी देखें (जनता)",
"spend_key_private" : "खर्च करना (निजी)",

View file

@ -53,7 +53,7 @@
"reconnect" : "再接続",
"wallets" : "財布",
"show_seed" : "シードを表示",
"show_keys" : "キーを表示",
"show_keys" : "シード/キーを表示する",
"address_book_menu" : "住所録",
"reconnection" : "再接続",
"reconnect_alert_text" : "再接続しますか?",
@ -240,7 +240,10 @@
"setup_successful" : "PINは正常に設定されました!",
"wallet_keys" : "ウォレットキー",
"wallet_keys" : "ウォレットシード/キー",
"wallet_seed" : "ウォレットシード",
"private_key" : "秘密鍵",
"public_key" : "公開鍵",
"view_key_private" : "ビューキー (プライベート)",
"view_key_public" : "ビューキー (パブリック)",
"spend_key_private" : "キーを使う (プライベート)",

View file

@ -53,7 +53,7 @@
"reconnect" : "다시 연결",
"wallets" : "지갑",
"show_seed" : "종자 표시",
"show_keys" : "키 표시",
"show_keys" : "시드 / 키 표시",
"address_book_menu" : "주소록",
"reconnection" : "재 연결",
"reconnect_alert_text" : "다시 연결 하시겠습니까?",
@ -240,7 +240,10 @@
"setup_successful" : "PIN이 성공적으로 설정되었습니다!",
"wallet_keys" : "지갑 키",
"wallet_keys" : "지갑 시드 / 키",
"wallet_seed" : "지갑 시드",
"private_key" : "개인 키",
"public_key" : "공개 키",
"view_key_private" : "키보기(은밀한)",
"view_key_public" : "키보기 (공공의)",
"spend_key_private" : "지출 키 (은밀한)",

View file

@ -53,7 +53,7 @@
"reconnect" : "Sluit",
"wallets" : "Portefeuilles",
"show_seed" : "Toon zaad",
"show_keys" : "Toon sleutels",
"show_keys" : "Toon zaad/sleutels",
"address_book_menu" : "Adresboek",
"reconnection" : "Reconnection",
"reconnect_alert_text" : "Weet u zeker dat u opnieuw verbinding wilt maken?",
@ -240,7 +240,10 @@
"setup_successful" : "Uw PIN is succesvol ingesteld!",
"wallet_keys" : "Portemonnee sleutels",
"wallet_keys" : "Portemonnee zaad/sleutels",
"wallet_seed" : "Portemonnee zaad",
"private_key" : "Prive sleutel",
"public_key" : "Publieke sleutel",
"view_key_private" : "Bekijk sleutel (privaat)",
"view_key_public" : "Bekijk sleutel (openbaar)",
"spend_key_private" : "Sleutel uitgeven (privaat)",

View file

@ -53,7 +53,7 @@
"reconnect" : "Na nowo połączyć",
"wallets" : "Portfele",
"show_seed" : "Pokaż nasiona",
"show_keys" : "Pokaż klucze",
"show_keys" : "Pokaż nasiona/klucze",
"address_book_menu" : "Książka adresowa",
"reconnection" : "Ponowne połączenie",
"reconnect_alert_text" : "Czy na pewno ponownie się połączysz?",
@ -240,7 +240,10 @@
"setup_successful" : "Twój kod PIN został pomyślnie skonfigurowany!",
"wallet_keys" : "Klucze portfela",
"wallet_keys" : "Nasiono portfela/klucze",
"wallet_seed" : "Nasiono portfela",
"private_key" : "Prywatny klucz",
"public_key" : "Klucz publiczny",
"view_key_private" : "Wyświetl klucz (prywatny)",
"view_key_public" : "Wyświetl klucz (publiczny)",
"spend_key_private" : "Wydaj klucz (prywatny)",

View file

@ -53,7 +53,7 @@
"reconnect" : "Reconectar",
"wallets" : "Carteiras",
"show_seed" : "Mostrar semente",
"show_keys" : "Mostrar chaves",
"show_keys" : "Mostrar semente/chaves",
"address_book_menu" : "Livro de endereços",
"reconnection" : "Reconectar",
"reconnect_alert_text" : "Você tem certeza de que deseja reconectar?",
@ -240,7 +240,10 @@
"setup_successful" : "Seu PIN foi configurado com sucesso!",
"wallet_keys" : "Chaves da carteira",
"wallet_keys" : "Semente/chaves da carteira",
"wallet_seed" : "Semente de carteira",
"private_key" : "Chave privada",
"public_key" : "Chave pública",
"view_key_private" : "Chave de visualização (privada)",
"view_key_public" : "Chave de visualização (pública)",
"spend_key_private" : "Chave de gastos (privada)",

View file

@ -53,7 +53,7 @@
"reconnect" : "Переподключиться",
"wallets" : "Кошельки",
"show_seed" : "Показать мнемоническую фразу",
"show_keys" : "Показать ключи",
"show_keys" : "Показать мнемоническую фразу/ключи",
"address_book_menu" : "Адресная книга",
"reconnection" : "Переподключение",
"reconnect_alert_text" : "Вы хотите переподключиться?",
@ -240,7 +240,10 @@
"setup_successful" : "PIN был успешно установлен!",
"wallet_keys" : "Ключи кошелька",
"wallet_keys" : "Мнемоническая фраза/ключи кошелька",
"wallet_seed" : "Мнемоническая фраза кошелька",
"private_key" : "Приватный ключ",
"public_key" : "Публичный ключ",
"view_key_private" : "Приватный ключ просмотра",
"view_key_public" : "Публичный ключ просмотра",
"spend_key_private" : "Приватный ключ траты",

View file

@ -53,7 +53,7 @@
"reconnect" : "Перепідключитися",
"wallets" : "Гаманці",
"show_seed" : "Показати мнемонічну фразу",
"show_keys" : "Показати ключі",
"show_keys" : "Показати мнемонічну фразу/ключі",
"address_book_menu" : "Адресна книга",
"reconnection" : "Перепідключення",
"reconnect_alert_text" : "Ви хочете перепідключитися?",
@ -240,7 +240,10 @@
"setup_successful" : "PIN було успішно встановлено!",
"wallet_keys" : "Ключі гаманця",
"wallet_keys" : "Мнемонічна фраза/ключі гаманця",
"wallet_seed" : "Мнемонічна фраза гаманця",
"private_key" : "Приватний ключ",
"public_key" : "Публічний ключ",
"view_key_private" : "Приватний ключ перегляду",
"view_key_public" : "Публічний ключ перегляду",
"spend_key_private" : "Приватний ключ витрати",

View file

@ -53,7 +53,7 @@
"reconnect" : "重新连接",
"wallets" : "皮夹",
"show_seed" : "显示种子",
"show_keys" : "显示按键",
"show_keys" : "顯示種子/密鑰",
"address_book_menu" : "地址簿",
"reconnection" : "重新连线",
"reconnect_alert_text" : "您确定要重新连接吗?",
@ -240,7 +240,10 @@
"setup_successful" : "您的PIN码已成功设置!",
"wallet_keys" : "钱包钥匙",
"wallet_keys" : "錢包種子/鑰匙",
"wallet_seed" : "錢包種子",
"private_key" : "私鑰",
"public_key" : "公鑰",
"view_key_private" : "查看金钥 (私人的)",
"view_key_public" : "查看金钥 (public)",
"spend_key_private" : "支出金钥 (私人的)",