Merge branch '4.1.0' of github.com:cake-tech/cake_wallet_private into 4.1.0

wownero
M 4 years ago
commit 1d37aa68aa

@ -56,6 +56,7 @@ import 'package:cake_wallet/view_model/node_list/node_list_view_model.dart';
import 'package:cake_wallet/view_model/node_list/node_create_or_edit_view_model.dart';
import 'package:cake_wallet/view_model/rescan_view_model.dart';
import 'package:cake_wallet/view_model/setup_pin_code_view_model.dart';
import 'package:cake_wallet/view_model/transaction_details_view_model.dart';
import 'package:cake_wallet/view_model/trade_details_view_model.dart';
import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_edit_or_create_view_model.dart';
import 'package:cake_wallet/view_model/auth_view_model.dart';
@ -418,11 +419,17 @@ Future setup(
getIt.registerFactoryParam<WalletRestorePage, WalletType, void>((type, _) =>
WalletRestorePage(getIt.get<WalletRestoreViewModel>(param1: type)));
getIt.registerFactoryParam<TransactionDetailsViewModel, TransactionInfo, void>
((TransactionInfo transactionInfo, _) => TransactionDetailsViewModel(
transactionInfo: transactionInfo,
transactionDescriptionBox: transactionDescriptionBox,
settingsStore: getIt.get<SettingsStore>()
));
getIt.registerFactoryParam<TransactionDetailsPage, TransactionInfo, void>(
(TransactionInfo transactionInfo, _) => TransactionDetailsPage(
transactionInfo,
getIt.get<SettingsStore>().shouldSaveRecipientAddress,
transactionDescriptionBox));
transactionDetailsViewModel: getIt
.get<TransactionDetailsViewModel>(param1: transactionInfo)));
getIt.registerFactoryParam<NewWalletTypePage,
void Function(BuildContext, WalletType), bool>(

@ -4,7 +4,7 @@ part 'transaction_description.g.dart';
@HiveType(typeId: 2)
class TransactionDescription extends HiveObject {
TransactionDescription({this.id, this.recipientAddress});
TransactionDescription({this.id, this.recipientAddress, this.transactionNote});
static const boxName = 'TransactionDescriptions';
static const boxKey = 'transactionDescriptionsBoxKey';
@ -14,4 +14,9 @@ class TransactionDescription extends HiveObject {
@HiveField(1)
String recipientAddress;
@HiveField(2)
String transactionNote;
String get note => transactionNote ?? '';
}

@ -63,6 +63,7 @@ class S implements WidgetsLocalizations {
String get confirm_delete_template => "This action will delete this template. Do you wish to continue?";
String get confirm_delete_wallet => "This action will delete this wallet. Do you wish to continue?";
String get confirm_sending => "Confirm sending";
String get confirmations => "Confirmations";
String get contact => "Contact";
String get contact_name => "Contact Name";
String get continue_text => "Continue";
@ -77,6 +78,7 @@ class S implements WidgetsLocalizations {
String get delete => "Delete";
String get digit_pin => "-digit PIN";
String get edit => "Edit";
String get enter_your_note => "Enter your note…";
String get enter_your_pin => "Enter your PIN";
String get enter_your_pin_again => "Enter your pin again";
String get error => "Error";
@ -127,6 +129,8 @@ class S implements WidgetsLocalizations {
String get node_test => "Test";
String get nodes => "Nodes";
String get nodes_list_reset_to_default_message => "Are you sure that you want to reset settings to default?";
String get note_optional => "Note (optional)";
String get note_tap_to_change => "Note (tap to change)";
String get offer_expires_in => "Offer expires in: ";
String get ok => "OK";
String get openalias_alert_title => "XMR Recipient Detected";
@ -293,10 +297,12 @@ class S implements WidgetsLocalizations {
String get trades => "Trades";
String get transaction_details_amount => "Amount";
String get transaction_details_date => "Date";
String get transaction_details_fee => "Fee";
String get transaction_details_height => "Height";
String get transaction_details_recipient_address => "Recipient address";
String get transaction_details_title => "Transaction Details";
String get transaction_details_transaction_id => "Transaction ID";
String get transaction_key => "Transaction Key";
String get transaction_priority_fast => "Fast";
String get transaction_priority_fastest => "Fastest";
String get transaction_priority_medium => "Medium";
@ -447,6 +453,8 @@ class $de extends S {
@override
String get placeholder_contacts => "Ihre Kontakte werden hier angezeigt";
@override
String get transaction_key => "Transaktionsschlüssel";
@override
String get card_address => "Adresse:";
@override
String get seed_language_portuguese => "Portugiesisch";
@ -473,6 +481,8 @@ class $de extends S {
@override
String get send_your_wallet => "Deine Geldbörse";
@override
String get transaction_details_fee => "Gebühr";
@override
String get remove_node_message => "Möchten Sie den ausgewählten Knoten wirklich entfernen?";
@override
String get error_text_account_name => "Der Kontoname darf nur Wallet und Zahlen enthalten\nund muss zwischen 1 und 15 Zeichen lang sein";
@ -517,6 +527,8 @@ class $de extends S {
@override
String get node_connection_successful => "Die Verbindung war erfolgreich";
@override
String get confirmations => "Bestätigungen";
@override
String get confirm => "Bestätigen";
@override
String get settings_display_balance_as => "Kontostand anzeigen als";
@ -553,6 +565,8 @@ class $de extends S {
@override
String get address_book_menu => "Adressbuch";
@override
String get note_optional => "Hinweis (optional)";
@override
String get wallet_restoration_store_incorrect_seed_length => "Falsche Samenlänge";
@override
String get seed_language_spanish => "Spanisch";
@ -681,6 +695,8 @@ class $de extends S {
@override
String get transaction_details_date => "Datum";
@override
String get note_tap_to_change => "Hinweis (zum Ändern tippen)";
@override
String get show_seed => "Seed zeigen";
@override
String get send_error_currency => "Die Währung kann nur Zahlen enthalten";
@ -761,6 +777,8 @@ class $de extends S {
@override
String get template => "Vorlage";
@override
String get enter_your_note => "Geben Sie Ihre Notiz ein…";
@override
String get transaction_priority_medium => "Mittel";
@override
String get transaction_details_transaction_id => "Transaktions-ID";
@ -1149,6 +1167,8 @@ class $hi extends S {
@override
String get placeholder_contacts => "आपके संपर्क यहां प्रदर्शित होंगे";
@override
String get transaction_key => "लेन-देन की";
@override
String get card_address => "पता:";
@override
String get seed_language_portuguese => "पुर्तगाली";
@ -1175,6 +1195,8 @@ class $hi extends S {
@override
String get send_your_wallet => "आपका बटुआ";
@override
String get transaction_details_fee => "शुल्क";
@override
String get remove_node_message => "क्या आप वाकई चयनित नोड को निकालना चाहते हैं?";
@override
String get error_text_account_name => "खाता नाम में केवल अक्षर, संख्याएं हो सकती हैं\nऔर 1 और 15 वर्णों के बीच लंबा होना चाहिए";
@ -1219,6 +1241,8 @@ class $hi extends S {
@override
String get node_connection_successful => "कनेक्शन सफल रहा";
@override
String get confirmations => "पुष्टिकरण";
@override
String get confirm => "की पुष्टि करें";
@override
String get settings_display_balance_as => "के रूप में संतुलन प्रदर्शित करें";
@ -1255,6 +1279,8 @@ class $hi extends S {
@override
String get address_book_menu => "पता पुस्तिका";
@override
String get note_optional => "नोट (वैकल्पिक)";
@override
String get wallet_restoration_store_incorrect_seed_length => "गलत बीज की लंबाई";
@override
String get seed_language_spanish => "स्पेनिश";
@ -1383,6 +1409,8 @@ class $hi extends S {
@override
String get transaction_details_date => "तारीख";
@override
String get note_tap_to_change => "नोट (टैप टू चेंज)";
@override
String get show_seed => "बीज दिखाओ";
@override
String get send_error_currency => "मुद्रा में केवल संख्याएँ हो सकती हैं";
@ -1463,6 +1491,8 @@ class $hi extends S {
@override
String get template => "खाका";
@override
String get enter_your_note => "अपना नोट दर्ज करें ...";
@override
String get transaction_priority_medium => "मध्यम";
@override
String get transaction_details_transaction_id => "लेनदेन आईडी";
@ -1851,6 +1881,8 @@ class $ru extends S {
@override
String get placeholder_contacts => "Ваши контакты будут отображаться здесь";
@override
String get transaction_key => "Ключ транзакции";
@override
String get card_address => "Адрес:";
@override
String get seed_language_portuguese => "Португальский";
@ -1877,6 +1909,8 @@ class $ru extends S {
@override
String get send_your_wallet => "Ваш кошелёк";
@override
String get transaction_details_fee => "Комиссия";
@override
String get remove_node_message => "Вы уверены, что хотите удалить текущую ноду?";
@override
String get error_text_account_name => "Имя аккаунта может содержать только буквы, цифры\nи должно быть от 1 до 15 символов в длину";
@ -1921,6 +1955,8 @@ class $ru extends S {
@override
String get node_connection_successful => "Подключение прошло успешно";
@override
String get confirmations => "Подтверждения";
@override
String get confirm => "Подтвердить";
@override
String get settings_display_balance_as => "Отображать баланс как";
@ -1957,6 +1993,8 @@ class $ru extends S {
@override
String get address_book_menu => "Адресная книга";
@override
String get note_optional => "Примечание (необязательно)";
@override
String get wallet_restoration_store_incorrect_seed_length => "Неверная длина мнемонической фразы";
@override
String get seed_language_spanish => "Испанский";
@ -2085,6 +2123,8 @@ class $ru extends S {
@override
String get transaction_details_date => "Дата";
@override
String get note_tap_to_change => "Примечание (нажмите для изменения)";
@override
String get show_seed => "Показать мнемоническую фразу";
@override
String get send_error_currency => "Валюта может содержать только цифры";
@ -2165,6 +2205,8 @@ class $ru extends S {
@override
String get template => "Шаблон";
@override
String get enter_your_note => "Введите примечание…";
@override
String get transaction_priority_medium => "Средний";
@override
String get transaction_details_transaction_id => "ID транзакции";
@ -2553,6 +2595,8 @@ class $ko extends S {
@override
String get placeholder_contacts => "연락처가 여기에 표시됩니다";
@override
String get transaction_key => "거래 키";
@override
String get card_address => "주소:";
@override
String get seed_language_portuguese => "포르투갈 인";
@ -2579,6 +2623,8 @@ class $ko extends S {
@override
String get send_your_wallet => "지갑";
@override
String get transaction_details_fee => "회비";
@override
String get remove_node_message => "선택한 노드를 제거 하시겠습니까?";
@override
String get error_text_account_name => "계정 이름은 문자, 숫자 만 포함 할 수 있습니다\n1 ~ 15 자 사이 여야합니다";
@ -2623,6 +2669,8 @@ class $ko extends S {
@override
String get node_connection_successful => "성공적으로 연결되었습니다.";
@override
String get confirmations => "확인";
@override
String get confirm => "확인";
@override
String get settings_display_balance_as => "잔액 표시";
@ -2659,6 +2707,8 @@ class $ko extends S {
@override
String get address_book_menu => "주소록";
@override
String get note_optional => "참고 (선택 사항)";
@override
String get wallet_restoration_store_incorrect_seed_length => "시드 길이가 잘못되었습니다";
@override
String get seed_language_spanish => "스페인의";
@ -2787,6 +2837,8 @@ class $ko extends S {
@override
String get transaction_details_date => "날짜";
@override
String get note_tap_to_change => "메모 (변경하려면 탭하세요)";
@override
String get show_seed => "종자 표시";
@override
String get send_error_currency => "통화는 숫자 만 포함 할 수 있습니다";
@ -2867,6 +2919,8 @@ class $ko extends S {
@override
String get template => "주형";
@override
String get enter_your_note => "메모를 입력하세요…";
@override
String get transaction_priority_medium => "매질";
@override
String get transaction_details_transaction_id => "트랜잭션 ID";
@ -3255,6 +3309,8 @@ class $pt extends S {
@override
String get placeholder_contacts => "Seus contatos serão exibidos aqui";
@override
String get transaction_key => "Chave de transação";
@override
String get card_address => "Endereço:";
@override
String get seed_language_portuguese => "Português";
@ -3281,6 +3337,8 @@ class $pt extends S {
@override
String get send_your_wallet => "Sua carteira";
@override
String get transaction_details_fee => "Taxa";
@override
String get remove_node_message => "Você realmente deseja remover o nó selecionado?";
@override
String get error_text_account_name => "O nome da conta só pode conter letras, números\ne deve ter entre 1 e 15 caracteres";
@ -3325,6 +3383,8 @@ class $pt extends S {
@override
String get node_connection_successful => "A conexão foi bem sucedida";
@override
String get confirmations => "Confirmações";
@override
String get confirm => "Confirmar";
@override
String get settings_display_balance_as => "Saldo a exibir";
@ -3361,6 +3421,8 @@ class $pt extends S {
@override
String get address_book_menu => "Livro de endereços";
@override
String get note_optional => "Nota (opcional)";
@override
String get wallet_restoration_store_incorrect_seed_length => "Comprimento de semente incorreto";
@override
String get seed_language_spanish => "Espanhola";
@ -3489,6 +3551,8 @@ class $pt extends S {
@override
String get transaction_details_date => "Data";
@override
String get note_tap_to_change => "Nota (toque para alterar)";
@override
String get show_seed => "Mostrar semente";
@override
String get send_error_currency => "A moeda só pode conter números";
@ -3569,6 +3633,8 @@ class $pt extends S {
@override
String get template => "Modelo";
@override
String get enter_your_note => "Insira sua nota ...";
@override
String get transaction_priority_medium => "Média";
@override
String get transaction_details_transaction_id => "ID da transação";
@ -3957,6 +4023,8 @@ class $uk extends S {
@override
String get placeholder_contacts => "Тут будуть показані ваші контакти";
@override
String get transaction_key => "Ключ транзакції";
@override
String get card_address => "Адреса:";
@override
String get seed_language_portuguese => "Португальська";
@ -3983,6 +4051,8 @@ class $uk extends S {
@override
String get send_your_wallet => "Ваш гаманець";
@override
String get transaction_details_fee => "Комісія";
@override
String get remove_node_message => "Ви впевнені, що хочете видалити поточний вузол?";
@override
String get error_text_account_name => "Ім'я акаунту може містити тільки букви, цифри\nі повинно бути від 1 до 15 символів в довжину";
@ -4027,6 +4097,8 @@ class $uk extends S {
@override
String get node_connection_successful => "З'єднання було успішним";
@override
String get confirmations => "Підтвердження";
@override
String get confirm => "Підтвердити";
@override
String get settings_display_balance_as => "Відображати баланс як";
@ -4063,6 +4135,8 @@ class $uk extends S {
@override
String get address_book_menu => "Адресна книга";
@override
String get note_optional => "Примітка (необов’язково)";
@override
String get wallet_restoration_store_incorrect_seed_length => "Невірна довжина мнемонічної фрази";
@override
String get seed_language_spanish => "Іспанська";
@ -4191,6 +4265,8 @@ class $uk extends S {
@override
String get transaction_details_date => "Дата";
@override
String get note_tap_to_change => "Примітка (натисніть для зміни)";
@override
String get show_seed => "Показати мнемонічну фразу";
@override
String get send_error_currency => "Валюта може містити тільки цифри";
@ -4271,6 +4347,8 @@ class $uk extends S {
@override
String get template => "Шаблон";
@override
String get enter_your_note => "Введіть примітку…";
@override
String get transaction_priority_medium => "Середній";
@override
String get transaction_details_transaction_id => "ID транзакції";
@ -4659,6 +4737,8 @@ class $ja extends S {
@override
String get placeholder_contacts => "連絡先はここに表示されます";
@override
String get transaction_key => "トランザクションキー";
@override
String get card_address => "住所:";
@override
String get seed_language_portuguese => "ポルトガル語";
@ -4685,6 +4765,8 @@ class $ja extends S {
@override
String get send_your_wallet => "あなたの財布";
@override
String get transaction_details_fee => "費用";
@override
String get remove_node_message => "選択したノードを削除してもよろしいですか?";
@override
String get error_text_account_name => "アカウント名には文字のみを含めることができます \n1〜15文字である必要があります";
@ -4729,6 +4811,8 @@ class $ja extends S {
@override
String get node_connection_successful => "接続に成功しました";
@override
String get confirmations => "確認";
@override
String get confirm => "確認する";
@override
String get settings_display_balance_as => "残高を表示";
@ -4765,6 +4849,8 @@ class $ja extends S {
@override
String get address_book_menu => "住所録";
@override
String get note_optional => "注(オプション)";
@override
String get wallet_restoration_store_incorrect_seed_length => "誤ったシード長s";
@override
String get seed_language_spanish => "スペイン語";
@ -4893,6 +4979,8 @@ class $ja extends S {
@override
String get transaction_details_date => "日付";
@override
String get note_tap_to_change => "注(タップして変更)";
@override
String get show_seed => "シードを表示";
@override
String get send_error_currency => "通貨には数字のみを含めることができます";
@ -4973,6 +5061,8 @@ class $ja extends S {
@override
String get template => "テンプレート";
@override
String get enter_your_note => "メモを入力してください…";
@override
String get transaction_priority_medium => "";
@override
String get transaction_details_transaction_id => "トランザクションID";
@ -5365,6 +5455,8 @@ class $pl extends S {
@override
String get placeholder_contacts => "Twoje kontakty zostaną wyświetlone tutaj";
@override
String get transaction_key => "Klucz transakcji";
@override
String get card_address => "Adres:";
@override
String get seed_language_portuguese => "Portugalski";
@ -5391,6 +5483,8 @@ class $pl extends S {
@override
String get send_your_wallet => "Twój portfel";
@override
String get transaction_details_fee => "Opłata";
@override
String get remove_node_message => "Czy na pewno chcesz usunąć wybrany węzeł?";
@override
String get error_text_account_name => "Nazwa konta może zawierać tylko litery, cyfry\ni musi mieć od 1 do 15 znaków";
@ -5435,6 +5529,8 @@ class $pl extends S {
@override
String get node_connection_successful => "Połączenie powiodło się";
@override
String get confirmations => "Potwierdzenia";
@override
String get confirm => "Potwierdzać";
@override
String get settings_display_balance_as => "Wyświetl saldo jako";
@ -5471,6 +5567,8 @@ class $pl extends S {
@override
String get address_book_menu => "Książka adresowa";
@override
String get note_optional => "Notatka (opcjonalnie)";
@override
String get wallet_restoration_store_incorrect_seed_length => "Nieprawidłowa długość nasion";
@override
String get seed_language_spanish => "Hiszpański";
@ -5599,6 +5697,8 @@ class $pl extends S {
@override
String get transaction_details_date => "Data";
@override
String get note_tap_to_change => "Notatka (dotknij, aby zmienić)";
@override
String get show_seed => "Pokaż nasiona";
@override
String get send_error_currency => "Waluta może zawierać tylko cyfry";
@ -5679,6 +5779,8 @@ class $pl extends S {
@override
String get template => "Szablon";
@override
String get enter_your_note => "Wpisz notatkę…";
@override
String get transaction_priority_medium => "Średni";
@override
String get transaction_details_transaction_id => "Transakcja ID";
@ -6067,6 +6169,8 @@ class $es extends S {
@override
String get placeholder_contacts => "Tus contactos se mostrarán aquí";
@override
String get transaction_key => "Clave de transacción";
@override
String get card_address => "Dirección:";
@override
String get seed_language_portuguese => "Portugués";
@ -6093,6 +6197,8 @@ class $es extends S {
@override
String get send_your_wallet => "Tu billetera";
@override
String get transaction_details_fee => "Cuota";
@override
String get remove_node_message => "¿Está seguro de que desea eliminar el nodo seleccionado?";
@override
String get error_text_account_name => "El nombre de la cuenta solo puede contener letras, números \ny debe tener entre 1 y 15 caracteres de longitud";
@ -6137,6 +6243,8 @@ class $es extends S {
@override
String get node_connection_successful => "La conexión fue exitosa";
@override
String get confirmations => "Confirmaciones";
@override
String get confirm => "Confirmar";
@override
String get settings_display_balance_as => "Mostrar saldo como";
@ -6173,6 +6281,8 @@ class $es extends S {
@override
String get address_book_menu => "Libreta de direcciones";
@override
String get note_optional => "Nota (opcional)";
@override
String get wallet_restoration_store_incorrect_seed_length => "Longitud de semilla incorrecta";
@override
String get seed_language_spanish => "Español";
@ -6301,6 +6411,8 @@ class $es extends S {
@override
String get transaction_details_date => "Fecha";
@override
String get note_tap_to_change => "Nota (toque para cambiar)";
@override
String get show_seed => "Mostrar semilla";
@override
String get send_error_currency => "La moneda solo puede contener números";
@ -6381,6 +6493,8 @@ class $es extends S {
@override
String get template => "Plantilla";
@override
String get enter_your_note => "Ingresa tu nota…";
@override
String get transaction_priority_medium => "Medio";
@override
String get transaction_details_transaction_id => "ID de transacción";
@ -6769,6 +6883,8 @@ class $nl extends S {
@override
String get placeholder_contacts => "Je contacten worden hier weergegeven";
@override
String get transaction_key => "Transactiesleutel";
@override
String get card_address => "Adres:";
@override
String get seed_language_portuguese => "Portugees";
@ -6795,6 +6911,8 @@ class $nl extends S {
@override
String get send_your_wallet => "Uw portemonnee";
@override
String get transaction_details_fee => "Vergoeding";
@override
String get remove_node_message => "Weet u zeker dat u het geselecteerde knooppunt wilt verwijderen?";
@override
String get error_text_account_name => "Accountnaam mag alleen letters, cijfers bevatten\nen moet tussen de 1 en 15 tekens lang zijn";
@ -6839,6 +6957,8 @@ class $nl extends S {
@override
String get node_connection_successful => "Verbinding is gelukt";
@override
String get confirmations => "Bevestigingen";
@override
String get confirm => "Bevestigen";
@override
String get settings_display_balance_as => "Toon saldo als";
@ -6875,6 +6995,8 @@ class $nl extends S {
@override
String get address_book_menu => "Adresboek";
@override
String get note_optional => "Opmerking (optioneel)";
@override
String get wallet_restoration_store_incorrect_seed_length => "Onjuiste zaadlengte";
@override
String get seed_language_spanish => "Spaans";
@ -7003,6 +7125,8 @@ class $nl extends S {
@override
String get transaction_details_date => "Datum";
@override
String get note_tap_to_change => "Opmerking (tik om te wijzigen)";
@override
String get show_seed => "Toon zaad";
@override
String get send_error_currency => "Valuta kan alleen cijfers bevatten";
@ -7083,6 +7207,8 @@ class $nl extends S {
@override
String get template => "Sjabloon";
@override
String get enter_your_note => "Voer uw notitie in ...";
@override
String get transaction_priority_medium => "Medium";
@override
String get transaction_details_transaction_id => "Transactie ID";
@ -7471,6 +7597,8 @@ class $zh extends S {
@override
String get placeholder_contacts => "您的聯繫人將顯示在這裡";
@override
String get transaction_key => "交易密碼";
@override
String get card_address => "地址:";
@override
String get seed_language_portuguese => "葡萄牙語";
@ -7497,6 +7625,8 @@ class $zh extends S {
@override
String get send_your_wallet => "你的钱包";
@override
String get transaction_details_fee => "費用";
@override
String get remove_node_message => "您确定要删除所选节点吗?";
@override
String get error_text_account_name => "帐户名称只能包含字母数字\n且必须介于1到15个字符之间";
@ -7541,6 +7671,8 @@ class $zh extends S {
@override
String get node_connection_successful => "連接成功";
@override
String get confirmations => "確認書";
@override
String get confirm => "确认";
@override
String get settings_display_balance_as => "将余额显示为";
@ -7577,6 +7709,8 @@ class $zh extends S {
@override
String get address_book_menu => "地址簿";
@override
String get note_optional => "注意(可選)";
@override
String get wallet_restoration_store_incorrect_seed_length => "种子长度错误";
@override
String get seed_language_spanish => "西班牙文";
@ -7705,6 +7839,8 @@ class $zh extends S {
@override
String get transaction_details_date => "日期";
@override
String get note_tap_to_change => "注意(輕按即可更改)";
@override
String get show_seed => "显示种子";
@override
String get send_error_currency => "货币只能包含数字";
@ -7785,6 +7921,8 @@ class $zh extends S {
@override
String get template => "模板";
@override
String get enter_your_note => "輸入您的筆記...";
@override
String get transaction_priority_medium => "介质";
@override
String get transaction_details_transaction_id => "交易编号";

@ -31,6 +31,7 @@ class SendPage extends BasePage {
: _addressController = TextEditingController(),
_cryptoAmountController = TextEditingController(),
_fiatAmountController = TextEditingController(),
_noteController = TextEditingController(),
_formKey = GlobalKey<FormState>(),
_cryptoAmountFocus = FocusNode(),
_fiatAmountFocus = FocusNode(),
@ -46,6 +47,7 @@ class SendPage extends BasePage {
final TextEditingController _addressController;
final TextEditingController _cryptoAmountController;
final TextEditingController _fiatAmountController;
final TextEditingController _noteController;
final GlobalKey<FormState> _formKey;
final FocusNode _cryptoAmountFocus;
final FocusNode _fiatAmountFocus;
@ -304,6 +306,30 @@ class SendPage extends BasePage {
fontWeight: FontWeight.w500,
fontSize: 14),
)),
Padding(
padding: EdgeInsets.only(top: 20),
child: BaseTextFormField(
controller: _noteController,
keyboardType: TextInputType.multiline,
maxLines: null,
borderColor: Theme.of(context)
.primaryTextTheme
.headline
.color,
textStyle: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: Colors.white),
hintText: S.of(context).note_optional,
placeholderTextStyle: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: Theme.of(context)
.primaryTextTheme
.headline
.decorationColor),
),
),
Observer(
builder: (_) => GestureDetector(
onTap: () =>
@ -562,6 +588,14 @@ class SendPage extends BasePage {
}
});
_noteController.addListener(() {
final note = _noteController.text ?? '';
if (note != sendViewModel.note) {
sendViewModel.note = note;
}
});
reaction((_) => sendViewModel.sendAll, (bool all) {
if (all) {
_cryptoAmountController.text = S.current.all;
@ -599,6 +633,12 @@ class SendPage extends BasePage {
}
});
reaction((_) => sendViewModel.note, (String note) {
if (note != _noteController.text) {
_noteController.text = note;
}
});
reaction((_) => sendViewModel.state, (ExecutionState state) {
if (state is FailureState) {
WidgetsBinding.instance.addPostFrameCallback((_) {

@ -1,6 +1,6 @@
class StandartListItem {
StandartListItem({this.title, this.value});
import 'package:cake_wallet/src/screens/transaction_details/transaction_details_list_item.dart';
final String title;
final String value;
class StandartListItem extends TransactionDetailsListItem {
StandartListItem({String title, String value})
: super(title: title, value: value);
}

@ -0,0 +1,8 @@
import 'package:cake_wallet/src/screens/transaction_details/transaction_details_list_item.dart';
class TextFieldListItem extends TransactionDetailsListItem {
TextFieldListItem({String title, String value, this.onSubmitted})
: super(title: title, value: value);
final Function(String value) onSubmitted;
}

@ -0,0 +1,6 @@
abstract class TransactionDetailsListItem {
TransactionDetailsListItem({this.title, this.value});
final String title;
final String value;
}

@ -1,87 +1,21 @@
import 'package:cake_wallet/entities/transaction_description.dart';
import 'package:cake_wallet/src/screens/transaction_details/textfield_list_item.dart';
import 'package:cake_wallet/src/screens/transaction_details/widgets/textfield_list_row.dart';
import 'package:cake_wallet/utils/show_bar.dart';
import 'package:cake_wallet/view_model/transaction_details_view_model.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/bitcoin/bitcoin_transaction_info.dart';
import 'package:cake_wallet/monero/monero_transaction_info.dart';
import 'package:cake_wallet/entities/transaction_info.dart';
import 'package:cake_wallet/src/widgets/standart_list_row.dart';
import 'package:cake_wallet/src/screens/transaction_details/standart_list_item.dart';
import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/utils/date_formatter.dart';
import 'package:hive/hive.dart';
class TransactionDetailsPage extends BasePage {
TransactionDetailsPage(this.transactionInfo, bool showRecipientAddress,
Box<TransactionDescription> transactionDescriptionBox)
: _items = [] {
final dateFormat = DateFormatter.withCurrentLocal();
final tx = transactionInfo;
if (tx is MoneroTransactionInfo) {
final items = [
StandartListItem(
title: S.current.transaction_details_transaction_id, value: tx.id),
StandartListItem(
title: S.current.transaction_details_date,
value: dateFormat.format(tx.date)),
StandartListItem(
title: S.current.transaction_details_height, value: '${tx.height}'),
StandartListItem(
title: S.current.transaction_details_amount,
value: tx.amountFormatted()),
StandartListItem(title: S.current.send_fee, value: tx.feeFormatted())
];
if (tx.key?.isNotEmpty ?? null) {
// FIXME: add translation
items.add(StandartListItem(title: 'Transaction Key', value: tx.key));
}
_items.addAll(items);
}
if (tx is BitcoinTransactionInfo) {
final items = [
StandartListItem(
title: S.current.transaction_details_transaction_id, value: tx.id),
StandartListItem(
title: S.current.transaction_details_date,
value: dateFormat.format(tx.date)),
StandartListItem(
title: 'Confirmations', value: tx.confirmations?.toString()),
StandartListItem(
title: S.current.transaction_details_height, value: '${tx.height}'),
StandartListItem(
title: S.current.transaction_details_amount,
value: tx.amountFormatted()),
if (tx.feeFormatted()?.isNotEmpty)
StandartListItem(title: S.current.send_fee, value: tx.feeFormatted())
];
_items.addAll(items);
}
if (showRecipientAddress) {
final recipientAddress = transactionDescriptionBox.values
.firstWhere((val) => val.id == transactionInfo.id, orElse: () => null)
?.recipientAddress;
if (recipientAddress?.isNotEmpty ?? false) {
_items.add(StandartListItem(
title: S.current.transaction_details_recipient_address,
value: recipientAddress));
}
}
}
TransactionDetailsPage({this.transactionDetailsViewModel});
@override
String get title => S.current.transaction_details_title;
final TransactionInfo transactionInfo;
final List<StandartListItem> _items;
final TransactionDetailsViewModel transactionDetailsViewModel;
@override
Widget body(BuildContext context) {
@ -97,22 +31,37 @@ class TransactionDetailsPage extends BasePage {
Theme.of(context).primaryTextTheme.title.backgroundColor,
),
),
itemCount: _items.length,
itemCount: transactionDetailsViewModel.items.length,
itemBuilder: (context, index) {
final item = _items[index];
final isDrawBottom = index == _items.length - 1 ? true : false;
final item = transactionDetailsViewModel.items[index];
final isDrawBottom =
index == transactionDetailsViewModel.items.length - 1
? true : false;
if (item is StandartListItem) {
return GestureDetector(
onTap: () {
Clipboard.setData(ClipboardData(text: item.value));
showBar<void>(context,
S.of(context).transaction_details_copied(item.title));
},
child: StandartListRow(
title: '${item.title}:',
value: item.value,
isDrawBottom: isDrawBottom),
);
}
if (item is TextFieldListItem) {
return TextFieldListRow(
title: item.title,
value: item.value,
onSubmitted: item.onSubmitted,
isDrawBottom: isDrawBottom,
);
}
return GestureDetector(
onTap: () {
Clipboard.setData(ClipboardData(text: item.value));
showBar<void>(context,
S.of(context).transaction_details_copied(item.title));
},
child: StandartListRow(
title: '${item.title}:',
value: item.value,
isDrawBottom: isDrawBottom),
);
return null;
}),
);
}

@ -0,0 +1,88 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:cake_wallet/generated/i18n.dart';
class TextFieldListRow extends StatelessWidget {
TextFieldListRow(
{this.title,
this.value,
this.titleFontSize = 14,
this.valueFontSize = 16,
this.onSubmitted,
this.isDrawBottom = false}) {
_textController = TextEditingController();
_textController.text = value;
}
final String title;
final String value;
final double titleFontSize;
final double valueFontSize;
final Function(String value) onSubmitted;
final bool isDrawBottom;
TextEditingController _textController;
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
Container(
width: double.infinity,
color: Theme.of(context).backgroundColor,
child: Padding(
padding:
const EdgeInsets.only(left: 24, top: 16, bottom: 16, right: 24),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(title,
style: TextStyle(
fontSize: titleFontSize,
fontWeight: FontWeight.w500,
color: Theme.of(context)
.primaryTextTheme.overline.color),
textAlign: TextAlign.left),
TextField(
controller: _textController,
keyboardType: TextInputType.multiline,
textInputAction: TextInputAction.done,
maxLines: null,
textAlign: TextAlign.start,
style: TextStyle(
fontSize: valueFontSize,
fontWeight: FontWeight.w500,
color: Theme.of(context)
.primaryTextTheme.title.color),
decoration: InputDecoration(
isDense: true,
contentPadding: EdgeInsets.only(top: 12, bottom: 0),
hintText: S.of(context).enter_your_note,
hintStyle: TextStyle(
fontSize: valueFontSize,
fontWeight: FontWeight.w500,
color: Theme.of(context)
.primaryTextTheme.overline.color),
border: InputBorder.none
),
onSubmitted: (value) => onSubmitted.call(value),
)
]),
),
),
isDrawBottom
? Container(
height: 1,
padding: EdgeInsets.only(left: 24),
color: Theme.of(context).backgroundColor,
child: Container(
height: 1,
color: Theme.of(context).primaryTextTheme.title.backgroundColor,
),
)
: Offstage(),
],
);
}
}

@ -51,7 +51,7 @@ class BaseTextFormField extends StatelessWidget {
final FocusNode focusNode;
final bool readOnly;
final bool enableInteractiveSelection;
String initialValue;
final String initialValue;
@override
Widget build(BuildContext context) {

@ -38,6 +38,7 @@ abstract class SendViewModelBase with Store {
this._fiatConversationStore, this.transactionDescriptionBox)
: state = InitialExecutionState(),
_cryptoNumberFormat = NumberFormat(),
note = '',
sendAll = false {
_setCryptoNumMaximumFractionDigits();
}
@ -54,6 +55,9 @@ abstract class SendViewModelBase with Store {
@observable
String address;
@observable
String note;
@observable
bool sendAll;
@ -150,6 +154,7 @@ abstract class SendViewModelBase with Store {
cryptoAmount = '';
fiatAmount = '';
address = '';
note = '';
}
@action
@ -169,10 +174,13 @@ abstract class SendViewModelBase with Store {
state = TransactionCommitting();
await pendingTransaction.commit();
if (_settingsStore.shouldSaveRecipientAddress &&
(pendingTransaction.id?.isNotEmpty ?? false)) {
await transactionDescriptionBox.add(TransactionDescription(
id: pendingTransaction.id, recipientAddress: address));
if (pendingTransaction.id?.isNotEmpty ?? false) {
_settingsStore.shouldSaveRecipientAddress
? await transactionDescriptionBox.add(TransactionDescription(
id: pendingTransaction.id, recipientAddress: address,
transactionNote: note))
: await transactionDescriptionBox.add(TransactionDescription(
id: pendingTransaction.id, transactionNote: note));
}
state = TransactionCommitted();

@ -0,0 +1,110 @@
import 'package:cake_wallet/bitcoin/bitcoin_transaction_info.dart';
import 'package:cake_wallet/entities/transaction_info.dart';
import 'package:cake_wallet/monero/monero_transaction_info.dart';
import 'package:cake_wallet/src/screens/transaction_details/standart_list_item.dart';
import 'package:cake_wallet/src/screens/transaction_details/textfield_list_item.dart';
import 'package:cake_wallet/src/screens/transaction_details/transaction_details_list_item.dart';
import 'package:cake_wallet/utils/date_formatter.dart';
import 'package:cake_wallet/entities/transaction_description.dart';
import 'package:hive/hive.dart';
import 'package:mobx/mobx.dart';
import 'package:cake_wallet/store/settings_store.dart';
import 'package:cake_wallet/generated/i18n.dart';
part 'transaction_details_view_model.g.dart';
class TransactionDetailsViewModel = TransactionDetailsViewModelBase with _$TransactionDetailsViewModel;
abstract class TransactionDetailsViewModelBase with Store {
TransactionDetailsViewModelBase({
this.transactionInfo,
this.transactionDescriptionBox,
this.settingsStore}) : items = [] {
showRecipientAddress = settingsStore?.shouldSaveRecipientAddress ?? false;
final dateFormat = DateFormatter.withCurrentLocal();
final tx = transactionInfo;
if (tx is MoneroTransactionInfo) {
final _items = [
StandartListItem(
title: S.current.transaction_details_transaction_id, value: tx.id),
StandartListItem(
title: S.current.transaction_details_date,
value: dateFormat.format(tx.date)),
StandartListItem(
title: S.current.transaction_details_height, value: '${tx.height}'),
StandartListItem(
title: S.current.transaction_details_amount,
value: tx.amountFormatted()),
StandartListItem(
title: S.current.transaction_details_fee,
value: tx.feeFormatted()),
];
if (tx.key?.isNotEmpty ?? null) {
_items.add(StandartListItem(
title: S.current.transaction_key,
value: tx.key));
}
items.addAll(_items);
}
if (tx is BitcoinTransactionInfo) {
final _items = [
StandartListItem(
title: S.current.transaction_details_transaction_id, value: tx.id),
StandartListItem(
title: S.current.transaction_details_date,
value: dateFormat.format(tx.date)),
StandartListItem(
title: S.current.confirmations, value: tx.confirmations?.toString()),
StandartListItem(
title: S.current.transaction_details_height, value: '${tx.height}'),
StandartListItem(
title: S.current.transaction_details_amount,
value: tx.amountFormatted()),
if (tx.feeFormatted()?.isNotEmpty)
StandartListItem(
title: S.current.transaction_details_fee,
value: tx.feeFormatted())
];
items.addAll(_items);
}
if (showRecipientAddress) {
final recipientAddress = transactionDescriptionBox.values
.firstWhere((val) => val.id == transactionInfo.id, orElse: () => null)
?.recipientAddress;
if (recipientAddress?.isNotEmpty ?? false) {
items.add(StandartListItem(
title: S.current.transaction_details_recipient_address,
value: recipientAddress));
}
}
final description = transactionDescriptionBox.values.firstWhere(
(val) => val.id == transactionInfo.id, orElse: () => null);
if (description != null) {
items.add(TextFieldListItem(
title: S.current.note_tap_to_change,
value: description.note,
onSubmitted: (value) {
description.transactionNote = value;
description.save();
}));
}
}
final TransactionInfo transactionInfo;
final Box<TransactionDescription> transactionDescriptionBox;
final SettingsStore settingsStore;
final List<TransactionDetailsListItem> items;
bool showRecipientAddress;
}

@ -282,6 +282,7 @@
"transaction_details_date" : "Datum",
"transaction_details_height" : "Höhe",
"transaction_details_amount" : "Menge",
"transaction_details_fee" : "Gebühr",
"transaction_details_copied" : "${title} in die Zwischenablage kopiert",
"transaction_details_recipient_address" : "Empfängeradresse",
@ -429,6 +430,10 @@
"light_theme" : "Licht",
"bright_theme" : "Hell",
"dark_theme" : "Dunkel",
"enter_your_note" : "Geben Sie Ihre Notiz ein…",
"note_optional" : "Hinweis (optional)",
"note_tap_to_change" : "Hinweis (zum Ändern tippen)",
"transaction_key" : "Transaktionsschlüssel",
"confirmations" : "Bestätigungen",
"recipient_address" : "Empfängeradresse"
}

@ -282,6 +282,7 @@
"transaction_details_date" : "Date",
"transaction_details_height" : "Height",
"transaction_details_amount" : "Amount",
"transaction_details_fee" : "Fee",
"transaction_details_copied" : "${title} copied to Clipboard",
"transaction_details_recipient_address" : "Recipient address",
@ -429,6 +430,10 @@
"light_theme" : "Light",
"bright_theme" : "Bright",
"dark_theme" : "Dark",
"enter_your_note" : "Enter your note…",
"note_optional" : "Note (optional)",
"note_tap_to_change" : "Note (tap to change)",
"transaction_key" : "Transaction Key",
"confirmations" : "Confirmations",
"recipient_address" : "Recipient address"
}

@ -282,6 +282,7 @@
"transaction_details_date" : "Fecha",
"transaction_details_height" : "Altura",
"transaction_details_amount" : "Cantidad",
"transaction_details_fee" : "Cuota",
"transaction_details_copied" : "${title} Copiado al portapapeles",
"transaction_details_recipient_address" : "Dirección del receptor",
@ -429,6 +430,10 @@
"light_theme" : "Ligera",
"bright_theme" : "Brillante",
"dark_theme" : "Oscura",
"enter_your_note" : "Ingresa tu nota…",
"note_optional" : "Nota (opcional)",
"note_tap_to_change" : "Nota (toque para cambiar)",
"transaction_key" : "Clave de transacción",
"confirmations" : "Confirmaciones",
"recipient_address" : "Dirección del receptor"
}

@ -282,6 +282,7 @@
"transaction_details_date" : "तारीख",
"transaction_details_height" : "ऊंचाई",
"transaction_details_amount" : "रकम",
"transaction_details_fee" : "शुल्क",
"transaction_details_copied" : "${title} क्लिपबोर्ड पर नकल",
"transaction_details_recipient_address" : "प्राप्तकर्ता का पता",
@ -429,6 +430,10 @@
"light_theme" : "रोशनी",
"bright_theme" : "उज्ज्वल",
"dark_theme" : "अंधेरा",
"enter_your_note" : "अपना नोट दर्ज करें ...",
"note_optional" : "नोट (वैकल्पिक)",
"note_tap_to_change" : "नोट (टैप टू चेंज)",
"transaction_key" : "लेन-देन की",
"confirmations" : "पुष्टिकरण",
"recipient_address" : "प्राप्तकर्ता का पता"
}

@ -282,6 +282,7 @@
"transaction_details_date" : "日付",
"transaction_details_height" : "高さ",
"transaction_details_amount" : "量",
"transaction_details_fee" : "費用",
"transaction_details_copied" : "${title} クリップボードにコピーしました",
"transaction_details_recipient_address" : "受取人の住所",
@ -429,6 +430,10 @@
"light_theme" : "光",
"bright_theme" : "明るい",
"dark_theme" : "闇",
"enter_your_note" : "メモを入力してください…",
"note_optional" : "注(オプション)",
"note_tap_to_change" : "注(タップして変更)",
"transaction_key" : "トランザクションキー",
"confirmations" : "確認",
"recipient_address" : "受信者のアドレス"
}

@ -282,6 +282,7 @@
"transaction_details_date" : "날짜",
"transaction_details_height" : "신장",
"transaction_details_amount" : "양",
"transaction_details_fee" : "회비",
"transaction_details_copied" : "${title} 클립 보드에 복사",
"transaction_details_recipient_address" : "받는 사람 주소",
@ -429,6 +430,10 @@
"light_theme" : "빛",
"bright_theme" : "선명한",
"dark_theme" : "어두운",
"enter_your_note" : "메모를 입력하세요…",
"note_optional" : "참고 (선택 사항)",
"note_tap_to_change" : "메모 (변경하려면 탭하세요)",
"transaction_key" : "거래 키",
"confirmations" : "확인",
"recipient_address" : "받는 사람 주소"
}

@ -282,6 +282,7 @@
"transaction_details_date" : "Datum",
"transaction_details_height" : "Hoogte",
"transaction_details_amount" : "Bedrag",
"transaction_details_fee" : "Vergoeding",
"transaction_details_copied" : "${title} gekopieerd naar het klembord",
"transaction_details_recipient_address" : "Adres van de ontvanger",
@ -429,6 +430,10 @@
"light_theme" : "Licht",
"bright_theme" : "Helder",
"dark_theme" : "Donker",
"enter_your_note" : "Voer uw notitie in ...",
"note_optional" : "Opmerking (optioneel)",
"note_tap_to_change" : "Opmerking (tik om te wijzigen)",
"transaction_key" : "Transactiesleutel",
"confirmations" : "Bevestigingen",
"recipient_address" : "Adres ontvanger"
}

@ -282,6 +282,7 @@
"transaction_details_date" : "Data",
"transaction_details_height" : "Wysokość",
"transaction_details_amount" : "Ilość",
"transaction_details_fee" : "Opłata",
"transaction_details_copied" : "${title} skopiowane do schowka",
"transaction_details_recipient_address" : "Adres odbiorcy",
@ -429,6 +430,10 @@
"light_theme" : "Lekki",
"bright_theme" : "Jasny",
"dark_theme" : "Ciemny",
"enter_your_note" : "Wpisz notatkę…",
"note_optional" : "Notatka (opcjonalnie)",
"note_tap_to_change" : "Notatka (dotknij, aby zmienić)",
"transaction_key" : "Klucz transakcji",
"confirmations" : "Potwierdzenia",
"recipient_address" : "Adres odbiorcy"
}

@ -282,6 +282,7 @@
"transaction_details_date" : "Data",
"transaction_details_height" : "Altura",
"transaction_details_amount" : "Quantia",
"transaction_details_fee" : "Taxa",
"transaction_details_copied" : "${title} copiados para a área de transferência",
"transaction_details_recipient_address" : "Endereço do destinatário",
@ -429,6 +430,10 @@
"light_theme" : "Luz",
"bright_theme" : "Brilhante",
"dark_theme" : "Sombria",
"enter_your_note" : "Insira sua nota ...",
"note_optional" : "Nota (opcional)",
"note_tap_to_change" : "Nota (toque para alterar)",
"transaction_key" : "Chave de transação",
"confirmations" : "Confirmações",
"recipient_address" : "Endereço do destinatário"
}

@ -282,6 +282,7 @@
"transaction_details_date" : "Дата",
"transaction_details_height" : "Высота",
"transaction_details_amount" : "Сумма",
"transaction_details_fee" : "Комиссия",
"transaction_details_copied" : "${title} скопировано в буфер обмена",
"transaction_details_recipient_address" : "Адрес получателя",
@ -429,6 +430,10 @@
"light_theme" : "Светлая",
"bright_theme" : "Яркая",
"dark_theme" : "Темная",
"enter_your_note" : "Введите примечание…",
"note_optional" : "Примечание (необязательно)",
"note_tap_to_change" : "Примечание (нажмите для изменения)",
"transaction_key" : "Ключ транзакции",
"confirmations" : "Подтверждения",
"recipient_address" : "Адрес получателя"
}

@ -282,6 +282,7 @@
"transaction_details_date" : "Дата",
"transaction_details_height" : "Висота",
"transaction_details_amount" : "Сума",
"transaction_details_fee" : "Комісія",
"transaction_details_copied" : "${title} скопійовано в буфер обміну",
"transaction_details_recipient_address" : "Адреса отримувача",
@ -429,6 +430,10 @@
"light_theme" : "Світла",
"bright_theme" : "Яскрава",
"dark_theme" : "Темна",
"enter_your_note" : "Введіть примітку…",
"note_optional" : "Примітка (необов’язково)",
"note_tap_to_change" : "Примітка (натисніть для зміни)",
"transaction_key" : "Ключ транзакції",
"confirmations" : "Підтвердження",
"recipient_address" : "Адреса одержувача"
}

@ -282,6 +282,7 @@
"transaction_details_date" : "日期",
"transaction_details_height" : "高度",
"transaction_details_amount" : "量",
"transaction_details_fee" : "費用",
"transaction_details_copied" : "${title} 复制到剪贴板",
"transaction_details_recipient_address" : "收件人地址",
@ -429,6 +430,10 @@
"light_theme" : "光",
"bright_theme" : "亮",
"dark_theme" : "黑暗",
"enter_your_note" : "輸入您的筆記...",
"note_optional" : "注意(可選)",
"note_tap_to_change" : "注意(輕按即可更改)",
"transaction_key" : "交易密碼",
"confirmations" : "確認書",
"recipient_address" : "收件人地址"
}
Loading…
Cancel
Save