Merge branch '4.1.0' into CAKE-198-notes-for-transactions

This commit is contained in:
M 2021-01-05 21:57:05 +02:00
commit c0835d46ef
42 changed files with 686 additions and 349 deletions

View file

@ -1,2 +1,2 @@
- -
uri: electrumx.cakewallet.com:50002 uri: electrum.cakewallet.com:50002

View file

@ -294,14 +294,26 @@ extern "C"
return true; return true;
} }
void load_wallet(char *path, char *password, int32_t nettype) bool load_wallet(char *path, char *password, int32_t nettype)
{ {
nice(19); nice(19);
Monero::NetworkType networkType = static_cast<Monero::NetworkType>(nettype); Monero::NetworkType networkType = static_cast<Monero::NetworkType>(nettype);
Monero::Wallet *wallet = Monero::WalletManagerFactory::getWalletManager()->openWallet(std::string(path), std::string(password), networkType); Monero::WalletManager *walletManager = Monero::WalletManagerFactory::getWalletManager();
Monero::Wallet *wallet = walletManager->openWallet(std::string(path), std::string(password), networkType);
int status;
std::string errorString;
wallet->statusWithErrorString(status, errorString);
change_current_wallet(wallet); change_current_wallet(wallet);
return !(status != Monero::Wallet::Status_Ok || !errorString.empty());
} }
char *error_string() {
return strdup(get_current_wallet()->errorString().c_str());
}
bool is_wallet_exist(char *path) bool is_wallet_exist(char *path)
{ {
return Monero::WalletManagerFactory::getWalletManager()->walletExists(std::string(path)); return Monero::WalletManagerFactory::getWalletManager()->walletExists(std::string(path));

View file

@ -0,0 +1,8 @@
class WalletOpeningException implements Exception {
WalletOpeningException({this.message});
final String message;
@override
String toString() => message;
}

View file

@ -14,7 +14,9 @@ typedef restore_wallet_from_keys = Int8 Function(Pointer<Utf8>, Pointer<Utf8>,
typedef is_wallet_exist = Int8 Function(Pointer<Utf8>); typedef is_wallet_exist = Int8 Function(Pointer<Utf8>);
typedef load_wallet = Void Function(Pointer<Utf8>, Pointer<Utf8>, Int8); typedef load_wallet = Int8 Function(Pointer<Utf8>, Pointer<Utf8>, Int8);
typedef error_string = Pointer<Utf8> Function();
typedef get_filename = Pointer<Utf8> Function(); typedef get_filename = Pointer<Utf8> Function();

View file

@ -14,7 +14,9 @@ typedef RestoreWalletFromKeys = int Function(Pointer<Utf8>, Pointer<Utf8>,
typedef IsWalletExist = int Function(Pointer<Utf8>); typedef IsWalletExist = int Function(Pointer<Utf8>);
typedef LoadWallet = void Function(Pointer<Utf8>, Pointer<Utf8>, int); typedef LoadWallet = int Function(Pointer<Utf8>, Pointer<Utf8>, int);
typedef ErrorString = Pointer<Utf8> Function();
typedef GetFilename = Pointer<Utf8> Function(); typedef GetFilename = Pointer<Utf8> Function();

View file

@ -1,4 +1,5 @@
import 'dart:ffi'; import 'dart:ffi';
import 'package:cw_monero/exceptions/wallet_opening_exception.dart';
import 'package:cw_monero/wallet.dart'; import 'package:cw_monero/wallet.dart';
import 'package:ffi/ffi.dart'; import 'package:ffi/ffi.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
@ -32,6 +33,10 @@ final loadWalletNative = moneroApi
.lookup<NativeFunction<load_wallet>>('load_wallet') .lookup<NativeFunction<load_wallet>>('load_wallet')
.asFunction<LoadWallet>(); .asFunction<LoadWallet>();
final errorStringNative = moneroApi
.lookup<NativeFunction<error_string>>('error_string')
.asFunction<ErrorString>();
void createWalletSync( void createWalletSync(
{String path, String password, String language, int nettype = 0}) { {String path, String password, String language, int nettype = 0}) {
final pathPointer = Utf8.toUtf8(path); final pathPointer = Utf8.toUtf8(path);
@ -136,10 +141,14 @@ void restoreWalletFromKeysSync(
void loadWallet({String path, String password, int nettype = 0}) { void loadWallet({String path, String password, int nettype = 0}) {
final pathPointer = Utf8.toUtf8(path); final pathPointer = Utf8.toUtf8(path);
final passwordPointer = Utf8.toUtf8(password); final passwordPointer = Utf8.toUtf8(password);
final loaded = loadWalletNative(pathPointer, passwordPointer, nettype) != 0;
loadWalletNative(pathPointer, passwordPointer, nettype);
free(pathPointer); free(pathPointer);
free(passwordPointer); free(passwordPointer);
if (!loaded) {
throw WalletOpeningException(
message: convertUTF8ToString(pointer: errorStringNative()));
}
} }
void _createWallet(Map<String, dynamic> args) { void _createWallet(Map<String, dynamic> args) {

View file

@ -354,7 +354,7 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 7; CURRENT_PROJECT_VERSION = 10;
DEVELOPMENT_TEAM = 32J6BB6VUS; DEVELOPMENT_TEAM = 32J6BB6VUS;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -494,7 +494,7 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 7; CURRENT_PROJECT_VERSION = 10;
DEVELOPMENT_TEAM = 32J6BB6VUS; DEVELOPMENT_TEAM = 32J6BB6VUS;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -528,7 +528,7 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 7; CURRENT_PROJECT_VERSION = 10;
DEVELOPMENT_TEAM = 32J6BB6VUS; DEVELOPMENT_TEAM = 32J6BB6VUS;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (

View file

@ -1,3 +1,5 @@
import 'dart:math';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:cake_wallet/entities/crypto_amount_format.dart'; import 'package:cake_wallet/entities/crypto_amount_format.dart';
@ -7,10 +9,32 @@ final bitcoinAmountFormat = NumberFormat()
..maximumFractionDigits = bitcoinAmountLength ..maximumFractionDigits = bitcoinAmountLength
..minimumFractionDigits = 1; ..minimumFractionDigits = 1;
String bitcoinAmountToString({int amount}) => String bitcoinAmountToString({int amount}) => bitcoinAmountFormat.format(
bitcoinAmountFormat.format(cryptoAmountToDouble(amount: amount, divider: bitcoinAmountDivider)); cryptoAmountToDouble(amount: amount, divider: bitcoinAmountDivider));
double bitcoinAmountToDouble({int amount}) => cryptoAmountToDouble(amount: amount, divider: bitcoinAmountDivider); double bitcoinAmountToDouble({int amount}) =>
cryptoAmountToDouble(amount: amount, divider: bitcoinAmountDivider);
int doubleToBitcoinAmount(double amount) => int stringDoubleToBitcoinAmount(String amount) {
(amount * bitcoinAmountDivider).toInt(); final splitted = amount.split('');
final dotIndex = amount.indexOf('.');
int result = 0;
for (var i = 0; i < splitted.length; i++) {
try {
if (dotIndex == i) {
continue;
}
final char = splitted[i];
final multiplier = dotIndex < i
? bitcoinAmountDivider ~/ pow(10, (i - dotIndex))
: (bitcoinAmountDivider * pow(10, (dotIndex - i -1))).toInt();
final num = int.parse(char) * multiplier;
result += num;
} catch (_) {}
}
return result;
}

View file

@ -27,7 +27,8 @@ class BitcoinBalance extends Balance {
final int confirmed; final int confirmed;
final int unconfirmed; final int unconfirmed;
int get total => confirmed + unconfirmed; int get total =>
confirmed + (unconfirmed < 0 ? unconfirmed * -1 : unconfirmed);
int get availableBalance => confirmed + (unconfirmed < 0 ? unconfirmed : 0); int get availableBalance => confirmed + (unconfirmed < 0 ? unconfirmed : 0);

View file

@ -4,6 +4,6 @@ class BitcoinTransactionCredentials {
BitcoinTransactionCredentials(this.address, this.amount, this.priority); BitcoinTransactionCredentials(this.address, this.amount, this.priority);
final String address; final String address;
final double amount; final String amount;
TransactionPriority priority; TransactionPriority priority;
} }

View file

@ -47,7 +47,7 @@ class BitcoinTransactionInfo extends TransactionInfo {
final out = vin['tx']['vout'][vout] as Map; final out = vin['tx']['vout'][vout] as Map;
final outAddresses = final outAddresses =
(out['scriptPubKey']['addresses'] as List<Object>)?.toSet(); (out['scriptPubKey']['addresses'] as List<Object>)?.toSet();
inputsAmount += doubleToBitcoinAmount(out['value'] as double ?? 0); inputsAmount += stringDoubleToBitcoinAmount((out['value'] as double ?? 0).toString());
if (outAddresses?.intersection(addressesSet)?.isNotEmpty ?? false) { if (outAddresses?.intersection(addressesSet)?.isNotEmpty ?? false) {
direction = TransactionDirection.outgoing; direction = TransactionDirection.outgoing;
@ -58,7 +58,7 @@ class BitcoinTransactionInfo extends TransactionInfo {
final outAddresses = final outAddresses =
out['scriptPubKey']['addresses'] as List<Object> ?? []; out['scriptPubKey']['addresses'] as List<Object> ?? [];
final ntrs = outAddresses.toSet().intersection(addressesSet); final ntrs = outAddresses.toSet().intersection(addressesSet);
final value = doubleToBitcoinAmount(out['value'] as double ?? 0.0); final value = stringDoubleToBitcoinAmount((out['value'] as double ?? 0.0).toString());
totalOutAmount += value; totalOutAmount += value;
if ((direction == TransactionDirection.incoming && ntrs.isNotEmpty) || if ((direction == TransactionDirection.incoming && ntrs.isNotEmpty) ||

View file

@ -116,6 +116,19 @@ abstract class BitcoinWalletBase extends WalletBase<BitcoinBalance> with Store {
walletInfo: walletInfo); walletInfo: walletInfo);
} }
static int feeAmountForPriority(TransactionPriority priority) {
switch (priority) {
case TransactionPriority.slow:
return 6000;
case TransactionPriority.regular:
return 22080;
case TransactionPriority.fast:
return 24000;
default:
return 0;
}
}
@override @override
final BitcoinTransactionHistory transactionHistory; final BitcoinTransactionHistory transactionHistory;
final String path; final String path;
@ -243,16 +256,20 @@ abstract class BitcoinWalletBase extends WalletBase<BitcoinBalance> with Store {
Object credentials) async { Object credentials) async {
final transactionCredentials = credentials as BitcoinTransactionCredentials; final transactionCredentials = credentials as BitcoinTransactionCredentials;
final inputs = <BitcoinUnspent>[]; final inputs = <BitcoinUnspent>[];
final fee = _feeMultiplier(transactionCredentials.priority); final fee = feeAmountForPriority(transactionCredentials.priority);
final amount = transactionCredentials.amount != null final amount = transactionCredentials.amount != null
? doubleToBitcoinAmount(transactionCredentials.amount) ? stringDoubleToBitcoinAmount(transactionCredentials.amount)
: balance.total - fee; : balance.availableBalance - fee;
final totalAmount = amount + fee; final totalAmount = amount + fee;
final txb = bitcoin.TransactionBuilder(network: bitcoin.bitcoin); final txb = bitcoin.TransactionBuilder(network: bitcoin.bitcoin);
var leftAmount = totalAmount;
final changeAddress = address; final changeAddress = address;
var leftAmount = totalAmount;
var totalInputAmount = 0; var totalInputAmount = 0;
if (totalAmount > balance.availableBalance) {
throw BitcoinTransactionWrongBalanceException();
}
final unspent = addresses.map((address) => eclient final unspent = addresses.map((address) => eclient
.getListUnspentWithAddress(address.address) .getListUnspentWithAddress(address.address)
.then((unspent) => unspent .then((unspent) => unspent
@ -319,7 +336,10 @@ abstract class BitcoinWalletBase extends WalletBase<BitcoinBalance> with Store {
return PendingBitcoinTransaction(txb.build(), return PendingBitcoinTransaction(txb.build(),
eclient: eclient, amount: amount, fee: fee) eclient: eclient, amount: amount, fee: fee)
..addListener((transaction) => transactionHistory.addOne(transaction)); ..addListener((transaction) async {
transactionHistory.addOne(transaction);
await _updateBalance();
});
} }
String toJSON() => json.encode({ String toJSON() => json.encode({
@ -331,7 +351,7 @@ abstract class BitcoinWalletBase extends WalletBase<BitcoinBalance> with Store {
@override @override
double calculateEstimatedFee(TransactionPriority priority) => double calculateEstimatedFee(TransactionPriority priority) =>
bitcoinAmountToDouble(amount: _feeMultiplier(priority)); bitcoinAmountToDouble(amount: feeAmountForPriority(priority));
@override @override
Future<void> save() async { Future<void> save() async {
@ -383,17 +403,4 @@ abstract class BitcoinWalletBase extends WalletBase<BitcoinBalance> with Store {
String _getAddress({@required int index}) => String _getAddress({@required int index}) =>
generateAddress(hd: hd, index: index); generateAddress(hd: hd, index: index);
int _feeMultiplier(TransactionPriority priority) {
switch (priority) {
case TransactionPriority.slow:
return 6000;
case TransactionPriority.regular:
return 22080;
case TransactionPriority.fast:
return 24000;
default:
return 0;
}
}
} }

View file

@ -356,7 +356,8 @@ Future setup(
getIt.get<AppStore>().wallet, getIt.get<AppStore>().wallet,
tradesSource, tradesSource,
getIt.get<ExchangeTemplateStore>(), getIt.get<ExchangeTemplateStore>(),
getIt.get<TradesStore>())); getIt.get<TradesStore>(),
getIt.get<AppStore>().settingsStore));
getIt.registerFactory(() => ExchangeTradeViewModel( getIt.registerFactory(() => ExchangeTradeViewModel(
wallet: getIt.get<AppStore>().wallet, wallet: getIt.get<AppStore>().wallet,
@ -433,5 +434,6 @@ Future setup(
(para1, param2) => NewWalletTypePage(getIt.get<WalletNewVM>(), (para1, param2) => NewWalletTypePage(getIt.get<WalletNewVM>(),
onTypeSelected: para1, isNewWallet: param2)); onTypeSelected: para1, isNewWallet: param2));
getIt.registerFactory(() => PreSeedPage()); getIt.registerFactoryParam<PreSeedPage, WalletType, void>(
(WalletType type, _) => PreSeedPage(type));
} }

View file

@ -120,7 +120,7 @@ Future<void> changeMoneroCurrentNodeToDefault(
} }
Node getBitcoinDefaultElectrumServer({@required Box<Node> nodes}) { Node getBitcoinDefaultElectrumServer({@required Box<Node> nodes}) {
final uri = 'electrumx.cakewallet.com:50002'; final uri = 'electrum.cakewallet.com:50002';
return nodes.values return nodes.values
.firstWhere((Node node) => node.uri == uri, orElse: () => null) ?? .firstWhere((Node node) => node.uri == uri, orElse: () => null) ??

View file

@ -147,13 +147,13 @@ class S implements WidgetsLocalizations {
String get please_select => "Please select:"; String get please_select => "Please select:";
String get please_try_to_connect_to_another_node => "Please try to connect to another node"; String get please_try_to_connect_to_another_node => "Please try to connect to another node";
String get pre_seed_button_text => "I understand. Show me my seed"; String get pre_seed_button_text => "I understand. Show me my seed";
String get pre_seed_description => "On the next page you will see a series of 25 words. This is your unique and private seed and it is the ONLY way to recover your wallet in case of loss or malfunction. It is YOUR responsibility to write it down and store it in a safe place outside of the Cake Wallet app.";
String get pre_seed_title => "IMPORTANT"; String get pre_seed_title => "IMPORTANT";
String get private_key => "Private key"; String get private_key => "Private key";
String get public_key => "Public key"; String get public_key => "Public key";
String get receive => "Receive"; String get receive => "Receive";
String get receive_amount => "Amount"; String get receive_amount => "Amount";
String get received => "Received"; String get received => "Received";
String get recipient_address => "Recipient address";
String get reconnect => "Reconnect"; String get reconnect => "Reconnect";
String get reconnect_alert_text => "Are you sure you want to reconnect?"; String get reconnect_alert_text => "Are you sure you want to reconnect?";
String get reconnection => "Reconnection"; String get reconnection => "Reconnection";
@ -357,6 +357,7 @@ class S implements WidgetsLocalizations {
String min_value(String value, String currency) => "Min: ${value} ${currency}"; String min_value(String value, String currency) => "Min: ${value} ${currency}";
String openalias_alert_content(String recipient_name) => "You will be sending funds to\n${recipient_name}"; String openalias_alert_content(String recipient_name) => "You will be sending funds to\n${recipient_name}";
String powered_by(String title) => "Powered by ${title}"; String powered_by(String title) => "Powered by ${title}";
String pre_seed_description(String words) => "On the next page you will see a series of ${words} words. This is your unique and private seed and it is the ONLY way to recover your wallet in case of loss or malfunction. It is YOUR responsibility to write it down and store it in a safe place outside of the Cake Wallet app.";
String provider_error(String provider) => "${provider} error"; String provider_error(String provider) => "${provider} error";
String router_no_route(String name) => "No route defined for ${name}"; String router_no_route(String name) => "No route defined for ${name}";
String send_address(String cryptoCurrency) => "${cryptoCurrency} address"; String send_address(String cryptoCurrency) => "${cryptoCurrency} address";
@ -524,8 +525,6 @@ class $de extends S {
@override @override
String get choose_wallet_currency => "Bitte wählen Sie die Brieftaschenwährung:"; String get choose_wallet_currency => "Bitte wählen Sie die Brieftaschenwährung:";
@override @override
String get pre_seed_description => "Auf der nächsten Seite sehen Sie eine Reihe von 25 Wörtern. Dies ist Ihr einzigartiger und privater Samen und der EINZIGE Weg, um Ihren Geldbeutel im Falle eines Verlusts oder einer Fehlfunktion wiederherzustellen. Es liegt in IHRER Verantwortung, es aufzuschreiben und an einem sicheren Ort außerhalb der Cake Wallet App aufzubewahren.";
@override
String get node_connection_successful => "Die Verbindung war erfolgreich"; String get node_connection_successful => "Die Verbindung war erfolgreich";
@override @override
String get confirmations => "Bestätigungen"; String get confirmations => "Bestätigungen";
@ -992,6 +991,8 @@ class $de extends S {
@override @override
String get trade_state_btc_sent => "geschickt"; String get trade_state_btc_sent => "geschickt";
@override @override
String get recipient_address => "Empfängeradresse";
@override
String get address_book => "Adressbuch"; String get address_book => "Adressbuch";
@override @override
String get enter_your_pin => "PIN eingeben"; String get enter_your_pin => "PIN eingeben";
@ -1032,6 +1033,8 @@ class $de extends S {
@override @override
String error_text_minimal_limit(String provider, String min, String currency) => "Handel für ${provider} wird nicht erstellt. Menge ist weniger als minimal: ${min} ${currency}"; String error_text_minimal_limit(String provider, String min, String currency) => "Handel für ${provider} wird nicht erstellt. Menge ist weniger als minimal: ${min} ${currency}";
@override @override
String pre_seed_description(String words) => "Auf der nächsten Seite sehen Sie eine Reihe von ${words} Wörtern. Dies ist Ihr einzigartiger und privater Samen und der EINZIGE Weg, um Ihren Geldbeutel im Falle eines Verlusts oder einer Fehlfunktion wiederherzustellen. Es liegt in IHRER Verantwortung, es aufzuschreiben und an einem sicheren Ort außerhalb der Cake Wallet App aufzubewahren.";
@override
String trade_id_not_found(String tradeId, String title) => "Handel ${tradeId} von ${title} nicht gefunden."; String trade_id_not_found(String tradeId, String title) => "Handel ${tradeId} von ${title} nicht gefunden.";
@override @override
String transaction_details_copied(String title) => "${title} in die Zwischenablage kopiert"; String transaction_details_copied(String title) => "${title} in die Zwischenablage kopiert";
@ -1236,8 +1239,6 @@ class $hi extends S {
@override @override
String get choose_wallet_currency => "कृपया बटुआ मुद्रा चुनें:"; String get choose_wallet_currency => "कृपया बटुआ मुद्रा चुनें:";
@override @override
String get pre_seed_description => "अगले पेज पर आपको 25 शब्दों की एक श्रृंखला दिखाई देगी। यह आपका अद्वितीय और निजी बीज है और नुकसान या खराबी के मामले में अपने बटुए को पुनर्प्राप्त करने का एकमात्र तरीका है। यह आपकी जिम्मेदारी है कि इसे नीचे लिखें और इसे Cake Wallet ऐप के बाहर सुरक्षित स्थान पर संग्रहीत करें।";
@override
String get node_connection_successful => "कनेक्शन सफल रहा"; String get node_connection_successful => "कनेक्शन सफल रहा";
@override @override
String get confirmations => "पुष्टिकरण"; String get confirmations => "पुष्टिकरण";
@ -1704,6 +1705,8 @@ class $hi extends S {
@override @override
String get trade_state_btc_sent => "भेज दिया"; String get trade_state_btc_sent => "भेज दिया";
@override @override
String get recipient_address => "प्राप्तकर्ता का पता";
@override
String get address_book => "पता पुस्तिका"; String get address_book => "पता पुस्तिका";
@override @override
String get enter_your_pin => "अपना पिन दर्ज करो"; String get enter_your_pin => "अपना पिन दर्ज करो";
@ -1744,6 +1747,8 @@ class $hi extends S {
@override @override
String error_text_minimal_limit(String provider, String min, String currency) => "व्यापार ${provider} के लिए नहीं बनाया गया है। राशि कम है तो न्यूनतम: ${min} ${currency}"; String error_text_minimal_limit(String provider, String min, String currency) => "व्यापार ${provider} के लिए नहीं बनाया गया है। राशि कम है तो न्यूनतम: ${min} ${currency}";
@override @override
String pre_seed_description(String words) => "अगले पेज पर आपको ${words} शब्दों की एक श्रृंखला दिखाई देगी। यह आपका अद्वितीय और निजी बीज है और नुकसान या खराबी के मामले में अपने बटुए को पुनर्प्राप्त करने का एकमात्र तरीका है। यह आपकी जिम्मेदारी है कि इसे नीचे लिखें और इसे Cake Wallet ऐप के बाहर सुरक्षित स्थान पर संग्रहीत करें।";
@override
String trade_id_not_found(String tradeId, String title) => "व्यापार ${tradeId} of ${title} नहीं मिला."; String trade_id_not_found(String tradeId, String title) => "व्यापार ${tradeId} of ${title} नहीं मिला.";
@override @override
String transaction_details_copied(String title) => "${title} क्लिपबोर्ड पर नकल"; String transaction_details_copied(String title) => "${title} क्लिपबोर्ड पर नकल";
@ -1948,8 +1953,6 @@ class $ru extends S {
@override @override
String get choose_wallet_currency => "Пожалуйста, выберите валюту кошелька:"; String get choose_wallet_currency => "Пожалуйста, выберите валюту кошелька:";
@override @override
String get pre_seed_description => "На следующей странице вы увидите серию из 25 слов. Это ваша уникальная и личная мнемоническая фраза, и это ЕДИНСТВЕННЫЙ способ восстановить свой кошелек в случае потери или неисправности. ВАМ необходимо записать ее и хранить в надежном месте вне приложения Cake Wallet.";
@override
String get node_connection_successful => "Подключение прошло успешно"; String get node_connection_successful => "Подключение прошло успешно";
@override @override
String get confirmations => "Подтверждения"; String get confirmations => "Подтверждения";
@ -2416,6 +2419,8 @@ class $ru extends S {
@override @override
String get trade_state_btc_sent => "BTC отправлены"; String get trade_state_btc_sent => "BTC отправлены";
@override @override
String get recipient_address => "Адрес получателя";
@override
String get address_book => "Адресная книга"; String get address_book => "Адресная книга";
@override @override
String get enter_your_pin => "Введите ваш PIN"; String get enter_your_pin => "Введите ваш PIN";
@ -2456,6 +2461,8 @@ class $ru extends S {
@override @override
String error_text_minimal_limit(String provider, String min, String currency) => "Сделка для ${provider} не создана. Сумма меньше минимальной: ${min} ${currency}"; String error_text_minimal_limit(String provider, String min, String currency) => "Сделка для ${provider} не создана. Сумма меньше минимальной: ${min} ${currency}";
@override @override
String pre_seed_description(String words) => "На следующей странице вы увидите серию из ${words} слов. Это ваша уникальная и личная мнемоническая фраза, и это ЕДИНСТВЕННЫЙ способ восстановить свой кошелек в случае потери или неисправности. ВАМ необходимо записать ее и хранить в надежном месте вне приложения Cake Wallet.";
@override
String trade_id_not_found(String tradeId, String title) => "Сделка ${tradeId} ${title} не найдена."; String trade_id_not_found(String tradeId, String title) => "Сделка ${tradeId} ${title} не найдена.";
@override @override
String transaction_details_copied(String title) => "${title} скопировано в буфер обмена"; String transaction_details_copied(String title) => "${title} скопировано в буфер обмена";
@ -2660,8 +2667,6 @@ class $ko extends S {
@override @override
String get choose_wallet_currency => "지갑 통화를 선택하십시오:"; String get choose_wallet_currency => "지갑 통화를 선택하십시오:";
@override @override
String get pre_seed_description => "다음 페이지에서 25 개의 단어를 볼 수 있습니다. 이것은 귀하의 고유하고 개인적인 시드이며 분실 또는 오작동시 지갑을 복구하는 유일한 방법입니다. 기록해두고 Cake Wallet 앱 외부의 안전한 장소에 보관하는 것은 귀하의 책임입니다.";
@override
String get node_connection_successful => "성공적으로 연결되었습니다."; String get node_connection_successful => "성공적으로 연결되었습니다.";
@override @override
String get confirmations => "확인"; String get confirmations => "확인";
@ -3128,6 +3133,8 @@ class $ko extends S {
@override @override
String get trade_state_btc_sent => "보냄"; String get trade_state_btc_sent => "보냄";
@override @override
String get recipient_address => "받는 사람 주소";
@override
String get address_book => "주소록"; String get address_book => "주소록";
@override @override
String get enter_your_pin => "PIN을 입력하십시오"; String get enter_your_pin => "PIN을 입력하십시오";
@ -3168,6 +3175,8 @@ class $ko extends S {
@override @override
String error_text_minimal_limit(String provider, String min, String currency) => "거래 ${provider} 가 생성되지 않습니다. 금액이 최소보다 적습니다. ${min} ${currency}"; String error_text_minimal_limit(String provider, String min, String currency) => "거래 ${provider} 가 생성되지 않습니다. 금액이 최소보다 적습니다. ${min} ${currency}";
@override @override
String pre_seed_description(String words) => "다음 페이지에서 ${words} 개의 단어를 볼 수 있습니다. 이것은 귀하의 고유하고 개인적인 시드이며 분실 또는 오작동시 지갑을 복구하는 유일한 방법입니다. 기록해두고 Cake Wallet 앱 외부의 안전한 장소에 보관하는 것은 귀하의 책임입니다.";
@override
String trade_id_not_found(String tradeId, String title) => "무역 ${tradeId}${title} 찾을 수 없습니다."; String trade_id_not_found(String tradeId, String title) => "무역 ${tradeId}${title} 찾을 수 없습니다.";
@override @override
String transaction_details_copied(String title) => "${title} 클립 보드에 복사"; String transaction_details_copied(String title) => "${title} 클립 보드에 복사";
@ -3372,8 +3381,6 @@ class $pt extends S {
@override @override
String get choose_wallet_currency => "Escolha a moeda da carteira:"; String get choose_wallet_currency => "Escolha a moeda da carteira:";
@override @override
String get pre_seed_description => "Na próxima página, você verá uma série de 25 palavras. Esta é a sua semente única e privada e é a ÚNICA maneira de recuperar sua carteira em caso de perda ou mau funcionamento. É SUA responsabilidade anotá-lo e armazená-lo em um local seguro fora do aplicativo Cake Wallet.";
@override
String get node_connection_successful => "A conexão foi bem sucedida"; String get node_connection_successful => "A conexão foi bem sucedida";
@override @override
String get confirmations => "Confirmações"; String get confirmations => "Confirmações";
@ -3840,6 +3847,8 @@ class $pt extends S {
@override @override
String get trade_state_btc_sent => "BTC enviado"; String get trade_state_btc_sent => "BTC enviado";
@override @override
String get recipient_address => "Endereço do destinatário";
@override
String get address_book => "Livro de endereços"; String get address_book => "Livro de endereços";
@override @override
String get enter_your_pin => "Insira seu PIN"; String get enter_your_pin => "Insira seu PIN";
@ -3880,6 +3889,8 @@ class $pt extends S {
@override @override
String error_text_minimal_limit(String provider, String min, String currency) => "A troca por ${provider} não é criada. O valor é menor que o mínimo: ${min} ${currency}"; String error_text_minimal_limit(String provider, String min, String currency) => "A troca por ${provider} não é criada. O valor é menor que o mínimo: ${min} ${currency}";
@override @override
String pre_seed_description(String words) => "Na próxima página, você verá uma série de ${words} palavras. Esta é a sua semente única e privada e é a ÚNICA maneira de recuperar sua carteira em caso de perda ou mau funcionamento. É SUA responsabilidade anotá-lo e armazená-lo em um local seguro fora do aplicativo Cake Wallet.";
@override
String trade_id_not_found(String tradeId, String title) => "A troca ${tradeId} de ${title} não foi encontrada."; String trade_id_not_found(String tradeId, String title) => "A troca ${tradeId} de ${title} não foi encontrada.";
@override @override
String transaction_details_copied(String title) => "${title} copiados para a área de transferência"; String transaction_details_copied(String title) => "${title} copiados para a área de transferência";
@ -4084,8 +4095,6 @@ class $uk extends S {
@override @override
String get choose_wallet_currency => "Будь ласка, виберіть валюту гаманця:"; String get choose_wallet_currency => "Будь ласка, виберіть валюту гаманця:";
@override @override
String get pre_seed_description => "На наступній сторінці ви побачите серію з 25 слів. Це ваша унікальна та приватна мнемонічна фраза, і це ЄДИНИЙ спосіб відновити ваш гаманець на випадок втрати або несправності. ВАМ необхідно записати її та зберігати в безпечному місці поза програмою Cake Wallet.";
@override
String get node_connection_successful => "З'єднання було успішним"; String get node_connection_successful => "З'єднання було успішним";
@override @override
String get confirmations => "Підтвердження"; String get confirmations => "Підтвердження";
@ -4552,6 +4561,8 @@ class $uk extends S {
@override @override
String get trade_state_btc_sent => "BTC надіслано"; String get trade_state_btc_sent => "BTC надіслано";
@override @override
String get recipient_address => "Адреса одержувача";
@override
String get address_book => "Адресна книга"; String get address_book => "Адресна книга";
@override @override
String get enter_your_pin => "Введіть ваш PIN"; String get enter_your_pin => "Введіть ваш PIN";
@ -4592,6 +4603,8 @@ class $uk extends S {
@override @override
String error_text_minimal_limit(String provider, String min, String currency) => "Операція для ${provider} не створена. Сума менша мінімальної: ${min} ${currency}"; String error_text_minimal_limit(String provider, String min, String currency) => "Операція для ${provider} не створена. Сума менша мінімальної: ${min} ${currency}";
@override @override
String pre_seed_description(String words) => "На наступній сторінці ви побачите серію з ${words} слів. Це ваша унікальна та приватна мнемонічна фраза, і це ЄДИНИЙ спосіб відновити ваш гаманець на випадок втрати або несправності. ВАМ необхідно записати її та зберігати в безпечному місці поза програмою Cake Wallet.";
@override
String trade_id_not_found(String tradeId, String title) => "Операція ${tradeId} ${title} не знайдена."; String trade_id_not_found(String tradeId, String title) => "Операція ${tradeId} ${title} не знайдена.";
@override @override
String transaction_details_copied(String title) => "${title} скопійовано в буфер обміну"; String transaction_details_copied(String title) => "${title} скопійовано в буфер обміну";
@ -4796,8 +4809,6 @@ class $ja extends S {
@override @override
String get choose_wallet_currency => "ウォレット通貨を選択してください:"; String get choose_wallet_currency => "ウォレット通貨を選択してください:";
@override @override
String get pre_seed_description => "次のページでは、一連の25語が表示されます。 これはあなたのユニークでプライベートなシードであり、紛失や誤動作が発生した場合にウォレットを回復する唯一の方法です。 それを書き留めて、Cake Wallet アプリの外の安全な場所に保管するのはあなたの責任です。";
@override
String get node_connection_successful => "接続に成功しました"; String get node_connection_successful => "接続に成功しました";
@override @override
String get confirmations => "確認"; String get confirmations => "確認";
@ -5264,6 +5275,8 @@ class $ja extends S {
@override @override
String get trade_state_btc_sent => "送った"; String get trade_state_btc_sent => "送った";
@override @override
String get recipient_address => "受信者のアドレス";
@override
String get address_book => "住所録"; String get address_book => "住所録";
@override @override
String get enter_your_pin => "PINを入力してください"; String get enter_your_pin => "PINを入力してください";
@ -5304,6 +5317,8 @@ class $ja extends S {
@override @override
String error_text_minimal_limit(String provider, String min, String currency) => "${provider} の取引は作成されません。 金額は最小額より少ない: ${min} ${currency}"; String error_text_minimal_limit(String provider, String min, String currency) => "${provider} の取引は作成されません。 金額は最小額より少ない: ${min} ${currency}";
@override @override
String pre_seed_description(String words) => "次のページでは、一連の${words}語が表示されます。 これはあなたのユニークでプライベートなシードであり、紛失や誤動作が発生した場合にウォレットを回復する唯一の方法です。 それを書き留めて、Cake Wallet アプリの外の安全な場所に保管するのはあなたの責任です。";
@override
String trade_id_not_found(String tradeId, String title) => "トレード ${tradeId} of ${title} 見つかりません"; String trade_id_not_found(String tradeId, String title) => "トレード ${tradeId} of ${title} 見つかりません";
@override @override
String transaction_details_copied(String title) => "${title} クリップボードにコピーしました"; String transaction_details_copied(String title) => "${title} クリップボードにコピーしました";
@ -5512,8 +5527,6 @@ class $pl extends S {
@override @override
String get choose_wallet_currency => "Wybierz walutę portfela:"; String get choose_wallet_currency => "Wybierz walutę portfela:";
@override @override
String get pre_seed_description => "Na następnej stronie zobaczysz serię 25 słów. To jest Twoje unikalne i prywatne ziarno i jest to JEDYNY sposób na odzyskanie portfela w przypadku utraty lub awarii. Twoim obowiązkiem jest zapisanie go i przechowywanie w bezpiecznym miejscu poza aplikacją Cake Wallet.";
@override
String get node_connection_successful => "Połączenie powiodło się"; String get node_connection_successful => "Połączenie powiodło się";
@override @override
String get confirmations => "Potwierdzenia"; String get confirmations => "Potwierdzenia";
@ -5980,6 +5993,8 @@ class $pl extends S {
@override @override
String get trade_state_btc_sent => "Wysłane"; String get trade_state_btc_sent => "Wysłane";
@override @override
String get recipient_address => "Adres odbiorcy";
@override
String get address_book => "Książka adresowa"; String get address_book => "Książka adresowa";
@override @override
String get enter_your_pin => "Wpisz Twój kod PIN"; String get enter_your_pin => "Wpisz Twój kod PIN";
@ -6020,6 +6035,8 @@ class $pl extends S {
@override @override
String error_text_minimal_limit(String provider, String min, String currency) => "Wymiana dla ${provider} nie została utworzona. Kwota jest mniejsza niż minimalna: ${min} ${currency}"; String error_text_minimal_limit(String provider, String min, String currency) => "Wymiana dla ${provider} nie została utworzona. Kwota jest mniejsza niż minimalna: ${min} ${currency}";
@override @override
String pre_seed_description(String words) => "Na następnej stronie zobaczysz serię ${words} słów. To jest Twoje unikalne i prywatne ziarno i jest to JEDYNY sposób na odzyskanie portfela w przypadku utraty lub awarii. Twoim obowiązkiem jest zapisanie go i przechowywanie w bezpiecznym miejscu poza aplikacją Cake Wallet.";
@override
String trade_id_not_found(String tradeId, String title) => "Handel ${tradeId} of ${title} nie znaleziono."; String trade_id_not_found(String tradeId, String title) => "Handel ${tradeId} of ${title} nie znaleziono.";
@override @override
String transaction_details_copied(String title) => "${title} skopiowane do schowka"; String transaction_details_copied(String title) => "${title} skopiowane do schowka";
@ -6224,8 +6241,6 @@ class $es extends S {
@override @override
String get choose_wallet_currency => "Por favor, elija la moneda de la billetera:"; String get choose_wallet_currency => "Por favor, elija la moneda de la billetera:";
@override @override
String get pre_seed_description => "En la página siguiente verá una serie de 25 palabras. Esta es su semilla única y privada y es la ÚNICA forma de recuperar su billetera en caso de pérdida o mal funcionamiento. Es SU responsabilidad escribirlo y guardarlo en un lugar seguro fuera de la aplicación Cake Wallet.";
@override
String get node_connection_successful => "La conexión fue exitosa"; String get node_connection_successful => "La conexión fue exitosa";
@override @override
String get confirmations => "Confirmaciones"; String get confirmations => "Confirmaciones";
@ -6692,6 +6707,8 @@ class $es extends S {
@override @override
String get trade_state_btc_sent => "Btc expedido"; String get trade_state_btc_sent => "Btc expedido";
@override @override
String get recipient_address => "Dirección del receptor";
@override
String get address_book => "Libreta de direcciones"; String get address_book => "Libreta de direcciones";
@override @override
String get enter_your_pin => "Introduce tu PIN"; String get enter_your_pin => "Introduce tu PIN";
@ -6732,6 +6749,8 @@ class $es extends S {
@override @override
String error_text_minimal_limit(String provider, String min, String currency) => "El comercio por ${provider} no se crea. La cantidad es menos que mínima: ${min} ${currency}"; String error_text_minimal_limit(String provider, String min, String currency) => "El comercio por ${provider} no se crea. La cantidad es menos que mínima: ${min} ${currency}";
@override @override
String pre_seed_description(String words) => "En la página siguiente verá una serie de ${words} palabras. Esta es su semilla única y privada y es la ÚNICA forma de recuperar su billetera en caso de pérdida o mal funcionamiento. Es SU responsabilidad escribirlo y guardarlo en un lugar seguro fuera de la aplicación Cake Wallet.";
@override
String trade_id_not_found(String tradeId, String title) => "Comercio ${tradeId} de ${title} no encontrado."; String trade_id_not_found(String tradeId, String title) => "Comercio ${tradeId} de ${title} no encontrado.";
@override @override
String transaction_details_copied(String title) => "${title} Copiado al portapapeles"; String transaction_details_copied(String title) => "${title} Copiado al portapapeles";
@ -6936,8 +6955,6 @@ class $nl extends S {
@override @override
String get choose_wallet_currency => "Kies een portemonnee-valuta:"; String get choose_wallet_currency => "Kies een portemonnee-valuta:";
@override @override
String get pre_seed_description => "Op de volgende pagina ziet u een reeks van 25 woorden. Dit is uw unieke en persoonlijke zaadje en het is de ENIGE manier om uw portemonnee te herstellen in geval van verlies of storing. Het is JOUW verantwoordelijkheid om het op te schrijven en op een veilige plaats op te slaan buiten de Cake Wallet app.";
@override
String get node_connection_successful => "Verbinding is gelukt"; String get node_connection_successful => "Verbinding is gelukt";
@override @override
String get confirmations => "Bevestigingen"; String get confirmations => "Bevestigingen";
@ -7404,6 +7421,8 @@ class $nl extends S {
@override @override
String get trade_state_btc_sent => "Verzonden"; String get trade_state_btc_sent => "Verzonden";
@override @override
String get recipient_address => "Adres ontvanger";
@override
String get address_book => "Adresboek"; String get address_book => "Adresboek";
@override @override
String get enter_your_pin => "Voer uw pincode in"; String get enter_your_pin => "Voer uw pincode in";
@ -7444,6 +7463,8 @@ class $nl extends S {
@override @override
String error_text_minimal_limit(String provider, String min, String currency) => "Ruil voor ${provider} is niet gemaakt. Bedrag is minder dan minimaal: ${min} ${currency}"; String error_text_minimal_limit(String provider, String min, String currency) => "Ruil voor ${provider} is niet gemaakt. Bedrag is minder dan minimaal: ${min} ${currency}";
@override @override
String pre_seed_description(String words) => "Op de volgende pagina ziet u een reeks van ${words} woorden. Dit is uw unieke en persoonlijke zaadje en het is de ENIGE manier om uw portemonnee te herstellen in geval van verlies of storing. Het is JOUW verantwoordelijkheid om het op te schrijven en op een veilige plaats op te slaan buiten de Cake Wallet app.";
@override
String trade_id_not_found(String tradeId, String title) => "Handel ${tradeId} van ${title} niet gevonden."; String trade_id_not_found(String tradeId, String title) => "Handel ${tradeId} van ${title} niet gevonden.";
@override @override
String transaction_details_copied(String title) => "${title} gekopieerd naar het klembord"; String transaction_details_copied(String title) => "${title} gekopieerd naar het klembord";
@ -7648,8 +7669,6 @@ class $zh extends S {
@override @override
String get choose_wallet_currency => "請選擇錢包貨幣:"; String get choose_wallet_currency => "請選擇錢包貨幣:";
@override @override
String get pre_seed_description => "在下一頁上您將看到一系列25個單詞。 這是您獨特的私人種子,是丟失或出現故障時恢復錢包的唯一方法。 您有責任將其寫下並存儲在Cake Wallet應用程序外部的安全地方。";
@override
String get node_connection_successful => "連接成功"; String get node_connection_successful => "連接成功";
@override @override
String get confirmations => "確認書"; String get confirmations => "確認書";
@ -8116,6 +8135,8 @@ class $zh extends S {
@override @override
String get trade_state_btc_sent => "已发送"; String get trade_state_btc_sent => "已发送";
@override @override
String get recipient_address => "收件人地址";
@override
String get address_book => "地址簿"; String get address_book => "地址簿";
@override @override
String get enter_your_pin => "输入密码"; String get enter_your_pin => "输入密码";
@ -8156,6 +8177,8 @@ class $zh extends S {
@override @override
String error_text_minimal_limit(String provider, String min, String currency) => "未創建 ${provider} 交易。 金額少於最小值:${min} ${currency}"; String error_text_minimal_limit(String provider, String min, String currency) => "未創建 ${provider} 交易。 金額少於最小值:${min} ${currency}";
@override @override
String pre_seed_description(String words) => "在下一頁上,您將看到一系列${words}個單詞。 這是您獨特的私人種子,是丟失或出現故障時恢復錢包的唯一方法。 您有責任將其寫下並存儲在Cake Wallet應用程序外部的安全地方。";
@override
String trade_id_not_found(String tradeId, String title) => "贸易方式 ${tradeId}${title} 未找到."; String trade_id_not_found(String tradeId, String title) => "贸易方式 ${tradeId}${title} 未找到.";
@override @override
String transaction_details_copied(String title) => "${title} 复制到剪贴板"; String transaction_details_copied(String title) => "${title} 复制到剪贴板";

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/bitcoin/bitcoin_amount_format.dart';
import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/themes/theme_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';

View file

@ -3,6 +3,7 @@ import 'package:cake_wallet/core/wallet_base.dart';
import 'package:hive/hive.dart'; import 'package:hive/hive.dart';
import 'package:cw_monero/wallet_manager.dart' as monero_wallet_manager; import 'package:cw_monero/wallet_manager.dart' as monero_wallet_manager;
import 'package:cw_monero/wallet.dart' as monero_wallet; import 'package:cw_monero/wallet.dart' as monero_wallet;
import 'package:cw_monero/exceptions/wallet_opening_exception.dart';
import 'package:cake_wallet/monero/monero_wallet.dart'; import 'package:cake_wallet/monero/monero_wallet.dart';
import 'package:cake_wallet/core/wallet_credentials.dart'; import 'package:cake_wallet/core/wallet_credentials.dart';
import 'package:cake_wallet/core/wallet_service.dart'; import 'package:cake_wallet/core/wallet_service.dart';
@ -55,6 +56,18 @@ class MoneroWalletService extends WalletService<
final Box<WalletInfo> walletInfoSource; final Box<WalletInfo> walletInfoSource;
static Future<void> _removeCache(String name) async {
final path = await pathForWallet(name: name, type: WalletType.monero);
final cacheFile = File(path);
if (cacheFile.existsSync()) {
cacheFile.deleteSync();
}
}
static bool walletFilesExist(String path) =>
!File(path).existsSync() && !File('$path.keys').existsSync();
@override @override
Future<MoneroWallet> create(MoneroNewWalletCredentials credentials) async { Future<MoneroWallet> create(MoneroNewWalletCredentials credentials) async {
try { try {
@ -94,7 +107,7 @@ class MoneroWalletService extends WalletService<
try { try {
final path = await pathForWallet(name: name, type: WalletType.monero); final path = await pathForWallet(name: name, type: WalletType.monero);
if (!File(path).existsSync()) { if (walletFilesExist(path)) {
await repairOldAndroidWallet(name); await repairOldAndroidWallet(name);
} }
@ -108,17 +121,9 @@ class MoneroWalletService extends WalletService<
final isValid = wallet.validate(); final isValid = wallet.validate();
if (!isValid) { if (!isValid) {
// if (wallet.seed?.isNotEmpty ?? false) { await _removeCache(name);
// let restore from seed in this case; wallet.close();
// final seed = wallet.seed; return openWallet(name, password);
// final credentials = MoneroRestoreWalletFromSeedCredentials(
// name: name, password: password, mnemonic: seed, height: 2000000)
// ..walletInfo = walletInfo;
// await remove(name);
// return restoreFromSeed(credentials);
// }
throw MoneroWalletLoadingException();
} }
await wallet.init(); await wallet.init();
@ -126,7 +131,15 @@ class MoneroWalletService extends WalletService<
return wallet; return wallet;
} catch (e) { } catch (e) {
// TODO: Implement Exception for wallet list service. // TODO: Implement Exception for wallet list service.
print('MoneroWalletsManager Error: $e');
if (e.toString().contains('bad_alloc') ||
(e is WalletOpeningException &&
(e.message == 'std::bad_alloc' ||
e.message.contains('bad_alloc')))) {
await _removeCache(name);
return openWallet(name, password);
}
rethrow; rethrow;
} }
} }
@ -204,7 +217,7 @@ class MoneroWalletService extends WalletService<
final dir = Directory(oldAndroidWalletDirPath); final dir = Directory(oldAndroidWalletDirPath);
if (!dir.existsSync()) { if (!dir.existsSync()) {
throw MoneroWalletLoadingException(); return;
} }
final newWalletDirPath = final newWalletDirPath =
@ -223,7 +236,6 @@ class MoneroWalletService extends WalletService<
}); });
} catch (e) { } catch (e) {
print(e.toString()); print(e.toString());
throw MoneroWalletLoadingException();
} }
} }
} }

View file

@ -71,8 +71,9 @@ Route<dynamic> createRoute(RouteSettings settings) {
case Routes.newWalletType: case Routes.newWalletType:
return CupertinoPageRoute<void>( return CupertinoPageRoute<void>(
builder: (_) => getIt.get<NewWalletTypePage>( builder: (_) => getIt.get<NewWalletTypePage>(
param1: (BuildContext context, WalletType _) => param1: (BuildContext context, WalletType type) =>
Navigator.of(context).pushNamed(Routes.preSeed, arguments: true), Navigator.of(context)
.pushNamed(Routes.preSeed, arguments: type),
param2: true)); param2: true));
case Routes.newWallet: case Routes.newWallet:
@ -137,7 +138,8 @@ Route<dynamic> createRoute(RouteSettings settings) {
return CupertinoPageRoute<void>( return CupertinoPageRoute<void>(
builder: (_) => getIt.get<SetupPinCodePage>( builder: (_) => getIt.get<SetupPinCodePage>(
param1: (PinCodeState<PinCodeWidget> context, dynamic _) => param1: (PinCodeState<PinCodeWidget> context, dynamic _) =>
Navigator.pushNamed(context.context, Routes.restoreWalletType)), Navigator.pushNamed(
context.context, Routes.restoreWalletType)),
fullscreenDialog: true); fullscreenDialog: true);
case Routes.seed: case Routes.seed:
@ -147,8 +149,8 @@ Route<dynamic> createRoute(RouteSettings settings) {
case Routes.restoreWallet: case Routes.restoreWallet:
return MaterialPageRoute<void>( return MaterialPageRoute<void>(
builder: (_) => builder: (_) => getIt.get<WalletRestorePage>(
getIt.get<WalletRestorePage>(param1: settings.arguments as WalletType)); param1: settings.arguments as WalletType));
case Routes.restoreWalletFromSeed: case Routes.restoreWalletFromSeed:
final type = settings.arguments as WalletType; final type = settings.arguments as WalletType;
@ -311,7 +313,8 @@ Route<dynamic> createRoute(RouteSettings settings) {
case Routes.preSeed: case Routes.preSeed:
return MaterialPageRoute<void>( return MaterialPageRoute<void>(
builder: (_) => getIt.get<PreSeedPage>()); builder: (_) =>
getIt.get<PreSeedPage>(param1: settings.arguments as WalletType));
default: default:
return MaterialPageRoute<void>( return MaterialPageRoute<void>(

View file

@ -59,14 +59,15 @@ class BalancePage extends StatelessWidget {
return AutoSizeText( return AutoSizeText(
dashboardViewModel.balanceViewModel.cryptoBalance, dashboardViewModel.balanceViewModel.cryptoBalance,
style: TextStyle( style: TextStyle(
fontSize: 40, fontSize: 54,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Theme.of(context) color: Theme.of(context)
.accentTextTheme .accentTextTheme
.display3 .display3
.backgroundColor, .backgroundColor,
height: 1), height: 1),
); maxLines: 1,
textAlign: TextAlign.center);
}), }),
SizedBox(height: 10), SizedBox(height: 10),
Observer(builder: (_) { Observer(builder: (_) {

View file

@ -62,7 +62,8 @@ class ExchangePage extends BasePage {
@override @override
Widget trailing(BuildContext context) => TrailButton( Widget trailing(BuildContext context) => TrailButton(
caption: S.of(context).reset, onPressed: () { caption: S.of(context).reset,
onPressed: () {
_formKey.currentState.reset(); _formKey.currentState.reset();
exchangeViewModel.reset(); exchangeViewModel.reset();
}); });
@ -95,8 +96,8 @@ class ExchangePage extends BasePage {
return KeyboardActions( return KeyboardActions(
config: KeyboardActionsConfig( config: KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.IOS, keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
keyboardBarColor: Theme.of(context).accentTextTheme.body2 keyboardBarColor:
.backgroundColor, Theme.of(context).accentTextTheme.body2.backgroundColor,
nextFocus: false, nextFocus: false,
actions: [ actions: [
KeyboardActionsItem( KeyboardActionsItem(
@ -160,6 +161,11 @@ class ExchangePage extends BasePage {
padding: EdgeInsets.fromLTRB(24, 100, 24, 32), padding: EdgeInsets.fromLTRB(24, 100, 24, 32),
child: Observer( child: Observer(
builder: (_) => ExchangeCard( builder: (_) => ExchangeCard(
hasAllAmount: exchangeViewModel.hasAllAmount,
allAmount: exchangeViewModel.hasAllAmount
? () => exchangeViewModel
.calculateDepositAllAmount()
: null,
amountFocusNode: _depositAmountFocus, amountFocusNode: _depositAmountFocus,
key: depositKey, key: depositKey,
title: S.of(context).you_will_send, title: S.of(context).you_will_send,
@ -398,16 +404,21 @@ class ExchangePage extends BasePage {
text: S.of(context).exchange, text: S.of(context).exchange,
onPressed: () { onPressed: () {
if (_formKey.currentState.validate()) { if (_formKey.currentState.validate()) {
if ((exchangeViewModel.depositCurrency == CryptoCurrency.xmr) if ((exchangeViewModel.depositCurrency ==
&&(!(exchangeViewModel.status is SyncedSyncStatus))) { CryptoCurrency.xmr) &&
(!(exchangeViewModel.status
is SyncedSyncStatus))) {
showPopUp<void>( showPopUp<void>(
context: context, context: context,
builder: (BuildContext context) { builder: (BuildContext context) {
return AlertWithOneAction( return AlertWithOneAction(
alertTitle: S.of(context).exchange, alertTitle: S.of(context).exchange,
alertContent: S.of(context).exchange_sync_alert_content, alertContent: S
.of(context)
.exchange_sync_alert_content,
buttonText: S.of(context).ok, buttonText: S.of(context).ok,
buttonAction: () => Navigator.of(context).pop()); buttonAction: () =>
Navigator.of(context).pop());
}); });
} else { } else {
exchangeViewModel.createTrade(); exchangeViewModel.createTrade();
@ -416,8 +427,8 @@ class ExchangePage extends BasePage {
}, },
color: Theme.of(context).accentTextTheme.body2.color, color: Theme.of(context).accentTextTheme.body2.color,
textColor: Colors.white, textColor: Colors.white,
isLoading: exchangeViewModel.tradeState isLoading:
is TradeIsCreating)), exchangeViewModel.tradeState is TradeIsCreating)),
]), ]),
)), )),
)); ));

View file

@ -27,7 +27,9 @@ class ExchangeCard extends StatefulWidget {
this.borderColor = Colors.transparent, this.borderColor = Colors.transparent,
this.currencyValueValidator, this.currencyValueValidator,
this.addressTextFieldValidator, this.addressTextFieldValidator,
this.amountFocusNode}) this.amountFocusNode,
this.hasAllAmount = false,
this.allAmount})
: super(key: key); : super(key: key);
final List<CryptoCurrency> currencies; final List<CryptoCurrency> currencies;
@ -47,6 +49,8 @@ class ExchangeCard extends StatefulWidget {
final FormFieldValidator<String> currencyValueValidator; final FormFieldValidator<String> currencyValueValidator;
final FormFieldValidator<String> addressTextFieldValidator; final FormFieldValidator<String> addressTextFieldValidator;
final FocusNode amountFocusNode; final FocusNode amountFocusNode;
final bool hasAllAmount;
Function allAmount;
@override @override
ExchangeCardState createState() => ExchangeCardState(); ExchangeCardState createState() => ExchangeCardState();
@ -197,7 +201,36 @@ class ExchangeCardState extends State<ExchangeCard> {
]), ]),
), ),
), ),
) ),
if (widget.hasAllAmount)
Positioned(
top: 5,
right: 55,
child: Container(
height: 32,
width: 32,
margin: EdgeInsets.only(left: 14, top: 4, bottom: 10),
decoration: BoxDecoration(
color: Theme.of(context)
.primaryTextTheme
.display1
.color,
borderRadius: BorderRadius.all(Radius.circular(6))),
child: InkWell(
onTap: () => widget.allAmount?.call(),
child: Center(
child: Text(S.of(context).all,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Theme.of(context)
.primaryTextTheme
.display1
.decorationColor)),
),
),
))
], ],
)), )),
Padding( Padding(
@ -238,8 +271,7 @@ class ExchangeCardState extends State<ExchangeCard> {
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: color: Theme.of(context)
Theme.of(context)
.accentTextTheme .accentTextTheme
.display4 .display4
.decorationColor), .decorationColor),
@ -251,7 +283,8 @@ class ExchangeCardState extends State<ExchangeCard> {
child: AddressTextField( child: AddressTextField(
controller: addressController, controller: addressController,
placeholder: widget.hasRefundAddress placeholder: widget.hasRefundAddress
? S.of(context).refund_address : null, ? S.of(context).refund_address
: null,
options: [ options: [
AddressTextFieldOption.paste, AddressTextFieldOption.paste,
AddressTextFieldOption.qrCode, AddressTextFieldOption.qrCode,
@ -265,8 +298,7 @@ class ExchangeCardState extends State<ExchangeCard> {
hintStyle: TextStyle( hintStyle: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: color: Theme.of(context)
Theme.of(context)
.accentTextTheme .accentTextTheme
.display4 .display4
.decorationColor), .decorationColor),
@ -281,8 +313,8 @@ class ExchangeCardState extends State<ExchangeCard> {
onTap: () { onTap: () {
Clipboard.setData( Clipboard.setData(
ClipboardData(text: addressController.text)); ClipboardData(text: addressController.text));
showBar<void>(context, showBar<void>(
S.of(context).copied_to_clipboard); context, S.of(context).copied_to_clipboard);
}, },
child: Row( child: Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/entities/wallet_type.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/themes/theme_base.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -7,8 +8,17 @@ import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/base_page.dart';
class PreSeedPage extends BasePage { class PreSeedPage extends BasePage {
final imageLight = Image.asset('assets/images/pre_seed_light.png'); PreSeedPage(this.type)
final imageDark = Image.asset('assets/images/pre_seed_dark.png'); : imageLight = Image.asset('assets/images/pre_seed_light.png'),
imageDark = Image.asset('assets/images/pre_seed_dark.png'),
wordsCount = type == WalletType.monero
? 25
: 12; // FIXME: Stupid fast implementation
final Image imageDark;
final Image imageLight;
final WalletType type;
final int wordsCount;
@override @override
Widget leading(BuildContext context) => null; Widget leading(BuildContext context) => null;
@ -39,7 +49,7 @@ class PreSeedPage extends BasePage {
Padding( Padding(
padding: EdgeInsets.only(top: 70, left: 16, right: 16), padding: EdgeInsets.only(top: 70, left: 16, right: 16),
child: Text( child: Text(
S.of(context).pre_seed_description, S.of(context).pre_seed_description(wordsCount.toString()),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,

View file

@ -339,6 +339,7 @@ class SendPage extends BasePage {
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Text( Text(
S S
@ -352,7 +353,12 @@ class SendPage extends BasePage {
color: Colors.white)), color: Colors.white)),
Container( Container(
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text( Text(
sendViewModel sendViewModel
.estimatedFee .estimatedFee
@ -367,8 +373,30 @@ class SendPage extends BasePage {
//color: Theme.of(context).primaryTextTheme.display2.color, //color: Theme.of(context).primaryTextTheme.display2.color,
color: color:
Colors.white)), Colors.white)),
Padding(
padding:
EdgeInsets.only(top: 5),
child: Text(
sendViewModel
.estimatedFeeFiatAmount
+ ' ' +
sendViewModel
.fiat.title,
style: TextStyle(
fontSize: 12,
fontWeight:
FontWeight.w600,
color: Theme
.of(context)
.primaryTextTheme
.headline
.decorationColor))
),
],
),
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 2,
left: 5), left: 5),
child: Icon( child: Icon(
Icons.arrow_forward_ios, Icons.arrow_forward_ios,
@ -636,8 +664,14 @@ class SendPage extends BasePage {
amount: S.of(context).send_amount, amount: S.of(context).send_amount,
amountValue: amountValue:
sendViewModel.pendingTransaction.amountFormatted, sendViewModel.pendingTransaction.amountFormatted,
fiatAmountValue: sendViewModel.pendingTransactionFiatAmount
+ ' ' + sendViewModel.fiat.title,
fee: S.of(context).send_fee, fee: S.of(context).send_fee,
feeValue: sendViewModel.pendingTransaction.feeFormatted, feeValue: sendViewModel.pendingTransaction.feeFormatted,
feeFiatAmount: sendViewModel.pendingTransactionFeeFiatAmount
+ ' ' + sendViewModel.fiat.title,
recipientTitle: S.of(context).recipient_address,
recipientAddress: sendViewModel.address,
rightButtonText: S.of(context).ok, rightButtonText: S.of(context).ok,
leftButtonText: S.of(context).cancel, leftButtonText: S.of(context).cancel,
actionRightButton: () { actionRightButton: () {
@ -654,96 +688,17 @@ class SendPage extends BasePage {
} }
if (state is TransactionCommitted) { if (state is TransactionCommitted) {
return Stack( return AlertWithOneAction(
children: <Widget>[ alertTitle: '',
Container( alertContent: S.of(context).send_success(
color: Theme.of(context).backgroundColor,
child: Center(
child: Image.asset(
'assets/images/birthday_cake.png'),
),
),
Center(
child: Padding(
padding: EdgeInsets.only(
top: 220, left: 24, right: 24),
child: Text(
S.of(context).send_success(
sendViewModel.currency sendViewModel.currency
.toString()), .toString()),
textAlign: TextAlign.center, buttonText: S.of(context).ok,
style: TextStyle( buttonAction: () =>
fontSize: 22, Navigator.of(context).pop());
fontWeight: FontWeight.bold,
color: Theme.of(context)
.primaryTextTheme
.title
.color,
decoration: TextDecoration.none,
),
),
),
),
Positioned(
left: 24,
right: 24,
bottom: 24,
child: PrimaryButton(
onPressed: () =>
Navigator.of(context).pop(),
text: S.of(context).send_got_it,
color: Theme.of(context)
.accentTextTheme
.body2
.color,
textColor: Colors.white))
],
);
} }
if (state is TransactionCommitting) { return Offstage();
return Stack(
children: <Widget>[
Container(
color: Theme.of(context).backgroundColor,
child: Center(
child: Image.asset(
'assets/images/birthday_cake.png'),
),
),
BackdropFilter(
filter: ImageFilter.blur(
sigmaX: 3.0, sigmaY: 3.0),
child: Container(
decoration: BoxDecoration(
color: Theme.of(context)
.backgroundColor
.withOpacity(0.25)),
child: Center(
child: Padding(
padding: EdgeInsets.only(top: 220),
child: Text(
S.of(context).send_sending,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
color: Theme.of(context)
.primaryTextTheme
.title
.color,
decoration: TextDecoration.none,
),
),
),
),
),
)
],
);
}
return Container();
}); });
}); });
}, },

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/palette.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/src/widgets/base_alert_dialog.dart'; import 'package:cake_wallet/src/widgets/base_alert_dialog.dart';
@ -6,8 +7,12 @@ class ConfirmSendingAlert extends BaseAlertDialog {
@required this.alertTitle, @required this.alertTitle,
@required this.amount, @required this.amount,
@required this.amountValue, @required this.amountValue,
@required this.fiatAmountValue,
@required this.fee, @required this.fee,
@required this.feeValue, @required this.feeValue,
@required this.feeFiatAmount,
@required this.recipientTitle,
@required this.recipientAddress,
@required this.leftButtonText, @required this.leftButtonText,
@required this.rightButtonText, @required this.rightButtonText,
@required this.actionLeftButton, @required this.actionLeftButton,
@ -18,8 +23,12 @@ class ConfirmSendingAlert extends BaseAlertDialog {
final String alertTitle; final String alertTitle;
final String amount; final String amount;
final String amountValue; final String amountValue;
final String fiatAmountValue;
final String fee; final String fee;
final String feeValue; final String feeValue;
final String feeFiatAmount;
final String recipientTitle;
final String recipientAddress;
final String leftButtonText; final String leftButtonText;
final String rightButtonText; final String rightButtonText;
final VoidCallback actionLeftButton; final VoidCallback actionLeftButton;
@ -29,31 +38,50 @@ class ConfirmSendingAlert extends BaseAlertDialog {
@override @override
String get titleText => alertTitle; String get titleText => alertTitle;
@override
bool get isDividerExists => true;
@override @override
String get leftActionButtonText => leftButtonText; String get leftActionButtonText => leftButtonText;
@override @override
String get rightActionButtonText => rightButtonText; String get rightActionButtonText => rightButtonText;
@override @override
VoidCallback get actionLeft => actionLeftButton; VoidCallback get actionLeft => actionLeftButton;
@override @override
VoidCallback get actionRight => actionRightButton; VoidCallback get actionRight => actionRightButton;
@override @override
bool get barrierDismissible => alertBarrierDismissible; bool get barrierDismissible => alertBarrierDismissible;
@override @override
Widget content(BuildContext context) { Widget content(BuildContext context) {
return Column( return Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Row( Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Text( Text(
amount, amount,
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.normal,
fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme.title.color,
decoration: TextDecoration.none,
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
amountValue,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme.title.color, color: Theme.of(context).primaryTextTheme.title.color,
@ -61,25 +89,43 @@ class ConfirmSendingAlert extends BaseAlertDialog {
), ),
), ),
Text( Text(
amountValue, fiatAmountValue,
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 12,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme.title.color, color: PaletteDark.pigeonBlue,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
) )
], ],
)
],
), ),
Row( Padding(
padding: EdgeInsets.only(top: 16),
child: Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Text( Text(
fee, fee,
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.normal,
fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme.title.color,
decoration: TextDecoration.none,
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
feeValue,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme.title.color, color: Theme.of(context).primaryTextTheme.title.color,
@ -87,18 +133,52 @@ class ConfirmSendingAlert extends BaseAlertDialog {
), ),
), ),
Text( Text(
feeValue, feeFiatAmount,
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 12,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontFamily: 'Lato', fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme.title.color, color: PaletteDark.pigeonBlue,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
) )
], ],
) )
], ],
)
),
Padding(
padding: EdgeInsets.fromLTRB(8, 16, 8, 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
recipientTitle,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.normal,
fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme.title.color,
decoration: TextDecoration.none,
),
),
Padding(
padding: EdgeInsets.only(top: 8),
child: Text(
recipientAddress,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
fontFamily: 'Lato',
color: PaletteDark.pigeonBlue,
decoration: TextDecoration.none,
),
)
)
],
),
)
],
); );
} }
} }

View file

@ -7,6 +7,7 @@ class BaseAlertDialog extends StatelessWidget {
String get contentText => ''; String get contentText => '';
String get leftActionButtonText => ''; String get leftActionButtonText => '';
String get rightActionButtonText => ''; String get rightActionButtonText => '';
bool get isDividerExists => false;
VoidCallback get actionLeft => () {}; VoidCallback get actionLeft => () {};
VoidCallback get actionRight => () {}; VoidCallback get actionRight => () {};
bool get barrierDismissible => true; bool get barrierDismissible => true;
@ -127,19 +128,28 @@ class BaseAlertDialog extends StatelessWidget {
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Container( Column(
padding: EdgeInsets.fromLTRB(24, 32, 24, 32),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
title(context),
Padding( Padding(
padding: EdgeInsets.only(top: 8), padding: EdgeInsets.fromLTRB(24, 32, 24, 0),
child: title(context),
),
isDividerExists
? Padding(
padding: EdgeInsets.only(top: 16, bottom: 8),
child: Container(
height: 1,
color: Theme.of(context).dividerColor,
),
)
: Offstage(),
Padding(
padding: EdgeInsets.fromLTRB(24, 8, 24, 32),
child: content(context), child: content(context),
) )
], ],
), ),
),
Container( Container(
height: 1, height: 1,
color: Theme.of(context).dividerColor, color: Theme.of(context).dividerColor,

View file

@ -85,6 +85,11 @@ abstract class SettingsStoreBase with Store {
(String languageCode) => sharedPreferences.setString( (String languageCode) => sharedPreferences.setString(
PreferencesKey.currentLanguageCode, languageCode)); PreferencesKey.currentLanguageCode, languageCode));
reaction((_) => balanceDisplayMode,
(BalanceDisplayMode mode) => sharedPreferences.setInt(
PreferencesKey.currentBalanceDisplayModeKey,
mode.serialize()));
this this
.nodes .nodes
.observe((change) => _saveCurrentNode(change.newValue, change.key)); .observe((change) => _saveCurrentNode(change.newValue, change.key));
@ -153,7 +158,7 @@ abstract class SettingsStoreBase with Store {
.getBool(PreferencesKey.allowBiometricalAuthenticationKey) ?? .getBool(PreferencesKey.allowBiometricalAuthenticationKey) ??
false; false;
final legacyTheme = final legacyTheme =
sharedPreferences.getBool(PreferencesKey.isDarkThemeLegacy) (sharedPreferences.getBool(PreferencesKey.isDarkThemeLegacy) ?? false)
? ThemeType.dark.index ? ThemeType.dark.index
: ThemeType.bright.index; : ThemeType.bright.index;
final savedTheme = ThemeList.deserialize( final savedTheme = ThemeList.deserialize(

View file

@ -1,5 +1,9 @@
import 'package:cake_wallet/bitcoin/bitcoin_balance.dart';
import 'package:cake_wallet/bitcoin/bitcoin_wallet.dart'; import 'package:cake_wallet/bitcoin/bitcoin_wallet.dart';
import 'package:cake_wallet/core/wallet_base.dart';
import 'package:cake_wallet/entities/balance.dart';
import 'package:cake_wallet/entities/crypto_currency.dart'; import 'package:cake_wallet/entities/crypto_currency.dart';
import 'package:cake_wallet/monero/monero_balance.dart';
import 'package:cake_wallet/monero/monero_wallet.dart'; import 'package:cake_wallet/monero/monero_wallet.dart';
import 'package:cake_wallet/entities/balance_display_mode.dart'; import 'package:cake_wallet/entities/balance_display_mode.dart';
import 'package:cake_wallet/entities/calculate_fiat_amount.dart'; import 'package:cake_wallet/entities/calculate_fiat_amount.dart';
@ -18,8 +22,30 @@ abstract class BalanceViewModelBase with Store {
BalanceViewModelBase( BalanceViewModelBase(
{@required this.appStore, {@required this.appStore,
@required this.settingsStore, @required this.settingsStore,
@required this.fiatConvertationStore}) @required this.fiatConvertationStore
: isReversing = false; }){
isReversing = false;
wallet ??= appStore.wallet;
_reaction = reaction((_) => appStore.wallet, _onWalletChange);
final _wallet = wallet;
if (_wallet is MoneroWallet) {
balance = _wallet.balance;
_onMoneroBalanceChangeReaction = reaction((_) => _wallet.balance,
(MoneroBalance moneroBalance) => balance = moneroBalance);
}
if (_wallet is BitcoinWallet) {
balance = _wallet.balance;
_onBitcoinBalanceChangeReaction = reaction((_) => _wallet.balance,
(BitcoinBalance bitcoinBalance) => balance = bitcoinBalance);
}
}
final AppStore appStore; final AppStore appStore;
final SettingsStore settingsStore; final SettingsStore settingsStore;
@ -31,6 +57,12 @@ abstract class BalanceViewModelBase with Store {
@observable @observable
bool isReversing; bool isReversing;
@observable
Balance balance;
@observable
WalletBase wallet;
@computed @computed
double get price => fiatConvertationStore.prices[appStore.wallet.currency]; double get price => fiatConvertationStore.prices[appStore.wallet.currency];
@ -47,24 +79,24 @@ abstract class BalanceViewModelBase with Store {
@computed @computed
String get cryptoBalance { String get cryptoBalance {
final walletBalance = _walletBalance; final walletBalance = _walletBalance;
var balance = '---'; var _balance = '---';
if (displayMode == BalanceDisplayMode.availableBalance) { if (displayMode == BalanceDisplayMode.availableBalance) {
balance = walletBalance.unlockedBalance ?? '0.0'; _balance = walletBalance.unlockedBalance ?? '0.0';
} }
if (displayMode == BalanceDisplayMode.fullBalance) { if (displayMode == BalanceDisplayMode.fullBalance) {
balance = walletBalance.totalBalance ?? '0.0'; _balance = walletBalance.totalBalance ?? '0.0';
} }
return balance; return _balance;
} }
@computed @computed
String get fiatBalance { String get fiatBalance {
final walletBalance = _walletBalance; final walletBalance = _walletBalance;
final fiatCurrency = settingsStore.fiatCurrency; final fiatCurrency = settingsStore.fiatCurrency;
var balance = '---'; var _balance = '---';
final totalBalance = final totalBalance =
_getFiatBalance(price: price, cryptoAmount: walletBalance.totalBalance); _getFiatBalance(price: price, cryptoAmount: walletBalance.totalBalance);
@ -73,30 +105,30 @@ abstract class BalanceViewModelBase with Store {
price: price, cryptoAmount: walletBalance.unlockedBalance); price: price, cryptoAmount: walletBalance.unlockedBalance);
if (displayMode == BalanceDisplayMode.availableBalance) { if (displayMode == BalanceDisplayMode.availableBalance) {
balance = fiatCurrency.toString() + ' ' + unlockedBalance ?? '0.00'; _balance = fiatCurrency.toString() + ' ' + unlockedBalance ?? '0.00';
} }
if (displayMode == BalanceDisplayMode.fullBalance) { if (displayMode == BalanceDisplayMode.fullBalance) {
balance = fiatCurrency.toString() + ' ' + totalBalance ?? '0.00'; _balance = fiatCurrency.toString() + ' ' + totalBalance ?? '0.00';
} }
return balance; return _balance;
} }
@computed @computed
WalletBalance get _walletBalance { WalletBalance get _walletBalance {
final _wallet = appStore.wallet; final _balance = balance;
if (_wallet is MoneroWallet) { if (_balance is MoneroBalance) {
return WalletBalance( return WalletBalance(
unlockedBalance: _wallet.balance.formattedUnlockedBalance, unlockedBalance: _balance.formattedUnlockedBalance,
totalBalance: _wallet.balance.formattedFullBalance); totalBalance: _balance.formattedFullBalance);
} }
if (_wallet is BitcoinWallet) { if (_balance is BitcoinBalance) {
return WalletBalance( return WalletBalance(
unlockedBalance: _wallet.balance.availableBalanceFormatted, unlockedBalance: _balance.availableBalanceFormatted,
totalBalance: _wallet.balance.totalFormatted); totalBalance: _balance.totalFormatted);
} }
return null; return null;
@ -105,6 +137,33 @@ abstract class BalanceViewModelBase with Store {
@computed @computed
CryptoCurrency get currency => appStore.wallet.currency; CryptoCurrency get currency => appStore.wallet.currency;
@action
void _onWalletChange(WalletBase wallet) {
this.wallet = wallet;
if (wallet is MoneroWallet) {
balance = wallet.balance;
_onMoneroBalanceChangeReaction?.reaction?.dispose();
_onMoneroBalanceChangeReaction = reaction((_) => wallet.balance,
(MoneroBalance moneroBalance) => balance = moneroBalance);
}
if (wallet is BitcoinWallet) {
balance = wallet.balance;
_onBitcoinBalanceChangeReaction?.reaction?.dispose();
_onBitcoinBalanceChangeReaction = reaction((_) => wallet.balance,
(BitcoinBalance bitcoinBalance) => balance = bitcoinBalance);
}
}
ReactionDisposer _onMoneroBalanceChangeReaction;
ReactionDisposer _onBitcoinBalanceChangeReaction;
ReactionDisposer _reaction;
String _getFiatBalance({double price, String cryptoAmount}) { String _getFiatBalance({double price, String cryptoAmount}) {
if (cryptoAmount == null) { if (cryptoAmount == null) {
return '0.00'; return '0.00';

View file

@ -1,3 +1,5 @@
import 'package:cake_wallet/bitcoin/bitcoin_amount_format.dart';
import 'package:cake_wallet/bitcoin/bitcoin_wallet.dart';
import 'package:cake_wallet/core/wallet_base.dart'; import 'package:cake_wallet/core/wallet_base.dart';
import 'package:cake_wallet/entities/crypto_currency.dart'; import 'package:cake_wallet/entities/crypto_currency.dart';
import 'package:cake_wallet/entities/sync_status.dart'; import 'package:cake_wallet/entities/sync_status.dart';
@ -7,6 +9,7 @@ import 'package:cake_wallet/exchange/limits.dart';
import 'package:cake_wallet/exchange/trade.dart'; import 'package:cake_wallet/exchange/trade.dart';
import 'package:cake_wallet/exchange/limits_state.dart'; import 'package:cake_wallet/exchange/limits_state.dart';
import 'package:cake_wallet/store/dashboard/trades_store.dart'; import 'package:cake_wallet/store/dashboard/trades_store.dart';
import 'package:cake_wallet/store/settings_store.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:mobx/mobx.dart'; import 'package:mobx/mobx.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
@ -27,8 +30,8 @@ part 'exchange_view_model.g.dart';
class ExchangeViewModel = ExchangeViewModelBase with _$ExchangeViewModel; class ExchangeViewModel = ExchangeViewModelBase with _$ExchangeViewModel;
abstract class ExchangeViewModelBase with Store { abstract class ExchangeViewModelBase with Store {
ExchangeViewModelBase( ExchangeViewModelBase(this.wallet, this.trades, this._exchangeTemplateStore,
this.wallet, this.trades, this._exchangeTemplateStore, this.tradesStore) { this.tradesStore, this._settingsStore) {
providerList = [ providerList = [
XMRTOExchangeProvider(), XMRTOExchangeProvider(),
ChangeNowExchangeProvider(), ChangeNowExchangeProvider(),
@ -104,10 +107,6 @@ abstract class ExchangeViewModelBase with Store {
@observable @observable
bool isReceiveAmountEntered; bool isReceiveAmountEntered;
Limits limits;
NumberFormat _cryptoNumberFormat;
@computed @computed
SyncStatus get status => wallet.syncStatus; SyncStatus get status => wallet.syncStatus;
@ -115,6 +114,15 @@ abstract class ExchangeViewModelBase with Store {
ObservableList<ExchangeTemplate> get templates => ObservableList<ExchangeTemplate> get templates =>
_exchangeTemplateStore.templates; _exchangeTemplateStore.templates;
bool get hasAllAmount =>
wallet.type == WalletType.bitcoin && depositCurrency == wallet.currency;
Limits limits;
NumberFormat _cryptoNumberFormat;
SettingsStore _settingsStore;
@action @action
void changeProvider({ExchangeProvider provider}) { void changeProvider({ExchangeProvider provider}) {
this.provider = provider; this.provider = provider;
@ -264,9 +272,8 @@ abstract class ExchangeViewModelBase with Store {
await trades.add(trade); await trades.add(trade);
tradeState = TradeIsCreatedSuccessfully(trade: trade); tradeState = TradeIsCreatedSuccessfully(trade: trade);
} catch (e) { } catch (e) {
tradeState = TradeIsCreatedFailure( tradeState =
title: provider.title, TradeIsCreatedFailure(title: provider.title, error: e.toString());
error: e.toString());
} }
} }
} else { } else {
@ -291,6 +298,22 @@ abstract class ExchangeViewModelBase with Store {
_onPairChange(); _onPairChange();
} }
@action
void calculateDepositAllAmount() {
if (wallet is BitcoinWallet) {
final availableBalance = wallet.balance.availableBalance as int;
final fee = BitcoinWalletBase.feeAmountForPriority(
_settingsStore.transactionPriority);
if (availableBalance < fee || availableBalance == 0) {
return;
}
final amount = availableBalance - fee;
depositAmount = bitcoinAmountToString(amount: amount);
}
}
void updateTemplate() => _exchangeTemplateStore.update(); void updateTemplate() => _exchangeTemplateStore.update();
void addTemplate( void addTemplate(

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/entities/balance_display_mode.dart'; import 'package:cake_wallet/entities/balance_display_mode.dart';
import 'package:cake_wallet/entities/calculate_fiat_amount_raw.dart';
import 'package:cake_wallet/entities/transaction_description.dart'; import 'package:cake_wallet/entities/transaction_description.dart';
import 'package:hive/hive.dart'; import 'package:hive/hive.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
@ -64,6 +65,50 @@ abstract class SendViewModelBase with Store {
double get estimatedFee => double get estimatedFee =>
_wallet.calculateEstimatedFee(_settingsStore.transactionPriority); _wallet.calculateEstimatedFee(_settingsStore.transactionPriority);
@computed
String get estimatedFeeFiatAmount {
try {
final fiat = calculateFiatAmountRaw(
price: _fiatConversationStore.prices[_wallet.currency],
cryptoAmount: estimatedFee);
return fiat;
} catch (_) {
return '0.00';
}
}
@computed
String get pendingTransactionFiatAmount {
try {
if (pendingTransaction != null) {
final fiat = calculateFiatAmount(
price: _fiatConversationStore.prices[_wallet.currency],
cryptoAmount: pendingTransaction.amountFormatted);
return fiat;
} else {
return '0.00';
}
} catch (_) {
return '0.00';
}
}
@computed
String get pendingTransactionFeeFiatAmount {
try {
if (pendingTransaction != null) {
final fiat = calculateFiatAmount(
price: _fiatConversationStore.prices[_wallet.currency],
cryptoAmount: pendingTransaction.feeFormatted);
return fiat;
} else {
return '0.00';
}
} catch (_) {
return '0.00';
}
}
FiatCurrency get fiat => _settingsStore.fiatCurrency; FiatCurrency get fiat => _settingsStore.fiatCurrency;
TransactionPriority get transactionPriority => TransactionPriority get transactionPriority =>
@ -205,7 +250,7 @@ abstract class SendViewModelBase with Store {
switch (_wallet.type) { switch (_wallet.type) {
case WalletType.bitcoin: case WalletType.bitcoin:
final amount = !sendAll ? double.parse(_amount) : null; final amount = !sendAll ? _amount : null;
return BitcoinTransactionCredentials( return BitcoinTransactionCredentials(
address, amount, _settingsStore.transactionPriority); address, amount, _settingsStore.transactionPriority);

View file

@ -11,7 +11,7 @@ description: Cake Wallet.
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 4.0.91+22 version: 4.1.0+26
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"

View file

@ -416,7 +416,7 @@
"exchange_sync_alert_content" : "Bitte warten Sie, bis Ihre Brieftasche synchronisiert ist", "exchange_sync_alert_content" : "Bitte warten Sie, bis Ihre Brieftasche synchronisiert ist",
"pre_seed_title" : "WICHTIG", "pre_seed_title" : "WICHTIG",
"pre_seed_description" : "Auf der nächsten Seite sehen Sie eine Reihe von 25 Wörtern. Dies ist Ihr einzigartiger und privater Samen und der EINZIGE Weg, um Ihren Geldbeutel im Falle eines Verlusts oder einer Fehlfunktion wiederherzustellen. Es liegt in IHRER Verantwortung, es aufzuschreiben und an einem sicheren Ort außerhalb der Cake Wallet App aufzubewahren.", "pre_seed_description" : "Auf der nächsten Seite sehen Sie eine Reihe von ${words} Wörtern. Dies ist Ihr einzigartiger und privater Samen und der EINZIGE Weg, um Ihren Geldbeutel im Falle eines Verlusts oder einer Fehlfunktion wiederherzustellen. Es liegt in IHRER Verantwortung, es aufzuschreiben und an einem sicheren Ort außerhalb der Cake Wallet App aufzubewahren.",
"pre_seed_button_text" : "Ich verstehe. Zeig mir meinen Samen", "pre_seed_button_text" : "Ich verstehe. Zeig mir meinen Samen",
"xmr_to_error" : "XMR.TO-Fehler", "xmr_to_error" : "XMR.TO-Fehler",
@ -430,10 +430,10 @@
"light_theme" : "Licht", "light_theme" : "Licht",
"bright_theme" : "Hell", "bright_theme" : "Hell",
"dark_theme" : "Dunkel", "dark_theme" : "Dunkel",
"enter_your_note" : "Geben Sie Ihre Notiz ein…", "enter_your_note" : "Geben Sie Ihre Notiz ein…",
"note_optional" : "Hinweis (optional)", "note_optional" : "Hinweis (optional)",
"note_tap_to_change" : "Hinweis (zum Ändern tippen)", "note_tap_to_change" : "Hinweis (zum Ändern tippen)",
"transaction_key" : "Transaktionsschlüssel", "transaction_key" : "Transaktionsschlüssel",
"confirmations" : "Bestätigungen" "confirmations" : "Bestätigungen",
"recipient_address" : "Empfängeradresse"
} }

View file

@ -416,7 +416,7 @@
"exchange_sync_alert_content" : "Please wait until your wallet is synchronized", "exchange_sync_alert_content" : "Please wait until your wallet is synchronized",
"pre_seed_title" : "IMPORTANT", "pre_seed_title" : "IMPORTANT",
"pre_seed_description" : "On the next page you will see a series of 25 words. This is your unique and private seed and it is the ONLY way to recover your wallet in case of loss or malfunction. It is YOUR responsibility to write it down and store it in a safe place outside of the Cake Wallet app.", "pre_seed_description" : "On the next page you will see a series of ${words} words. This is your unique and private seed and it is the ONLY way to recover your wallet in case of loss or malfunction. It is YOUR responsibility to write it down and store it in a safe place outside of the Cake Wallet app.",
"pre_seed_button_text" : "I understand. Show me my seed", "pre_seed_button_text" : "I understand. Show me my seed",
"xmr_to_error" : "XMR.TO error", "xmr_to_error" : "XMR.TO error",
@ -430,10 +430,10 @@
"light_theme" : "Light", "light_theme" : "Light",
"bright_theme" : "Bright", "bright_theme" : "Bright",
"dark_theme" : "Dark", "dark_theme" : "Dark",
"enter_your_note" : "Enter your note…", "enter_your_note" : "Enter your note…",
"note_optional" : "Note (optional)", "note_optional" : "Note (optional)",
"note_tap_to_change" : "Note (tap to change)", "note_tap_to_change" : "Note (tap to change)",
"transaction_key" : "Transaction Key", "transaction_key" : "Transaction Key",
"confirmations" : "Confirmations" "confirmations" : "Confirmations",
"recipient_address" : "Recipient address"
} }

View file

@ -416,7 +416,7 @@
"exchange_sync_alert_content" : "Espere hasta que su billetera esté sincronizada", "exchange_sync_alert_content" : "Espere hasta que su billetera esté sincronizada",
"pre_seed_title" : "IMPORTANTE", "pre_seed_title" : "IMPORTANTE",
"pre_seed_description" : "En la página siguiente verá una serie de 25 palabras. Esta es su semilla única y privada y es la ÚNICA forma de recuperar su billetera en caso de pérdida o mal funcionamiento. Es SU responsabilidad escribirlo y guardarlo en un lugar seguro fuera de la aplicación Cake Wallet.", "pre_seed_description" : "En la página siguiente verá una serie de ${words} palabras. Esta es su semilla única y privada y es la ÚNICA forma de recuperar su billetera en caso de pérdida o mal funcionamiento. Es SU responsabilidad escribirlo y guardarlo en un lugar seguro fuera de la aplicación Cake Wallet.",
"pre_seed_button_text" : "Entiendo. Muéstrame mi semilla", "pre_seed_button_text" : "Entiendo. Muéstrame mi semilla",
"xmr_to_error" : "Error de XMR.TO", "xmr_to_error" : "Error de XMR.TO",
@ -430,10 +430,10 @@
"light_theme" : "Ligera", "light_theme" : "Ligera",
"bright_theme" : "Brillante", "bright_theme" : "Brillante",
"dark_theme" : "Oscura", "dark_theme" : "Oscura",
"enter_your_note" : "Ingresa tu nota…", "enter_your_note" : "Ingresa tu nota…",
"note_optional" : "Nota (opcional)", "note_optional" : "Nota (opcional)",
"note_tap_to_change" : "Nota (toque para cambiar)", "note_tap_to_change" : "Nota (toque para cambiar)",
"transaction_key" : "Clave de transacción", "transaction_key" : "Clave de transacción",
"confirmations" : "Confirmaciones" "confirmations" : "Confirmaciones",
"recipient_address" : "Dirección del receptor"
} }

View file

@ -416,7 +416,7 @@
"exchange_sync_alert_content" : "कृपया प्रतीक्षा करें जब तक आपका बटुआ सिंक्रनाइज़ नहीं किया जाता है", "exchange_sync_alert_content" : "कृपया प्रतीक्षा करें जब तक आपका बटुआ सिंक्रनाइज़ नहीं किया जाता है",
"pre_seed_title" : "महत्वपूर्ण", "pre_seed_title" : "महत्वपूर्ण",
"pre_seed_description" : "अगले पेज पर आपको 25 शब्दों की एक श्रृंखला दिखाई देगी। यह आपका अद्वितीय और निजी बीज है और नुकसान या खराबी के मामले में अपने बटुए को पुनर्प्राप्त करने का एकमात्र तरीका है। यह आपकी जिम्मेदारी है कि इसे नीचे लिखें और इसे Cake Wallet ऐप के बाहर सुरक्षित स्थान पर संग्रहीत करें।", "pre_seed_description" : "अगले पेज पर आपको ${words} शब्दों की एक श्रृंखला दिखाई देगी। यह आपका अद्वितीय और निजी बीज है और नुकसान या खराबी के मामले में अपने बटुए को पुनर्प्राप्त करने का एकमात्र तरीका है। यह आपकी जिम्मेदारी है कि इसे नीचे लिखें और इसे Cake Wallet ऐप के बाहर सुरक्षित स्थान पर संग्रहीत करें।",
"pre_seed_button_text" : "मै समझता हुँ। मुझे अपना बीज दिखाओ", "pre_seed_button_text" : "मै समझता हुँ। मुझे अपना बीज दिखाओ",
"xmr_to_error" : "XMR.TO त्रुटि", "xmr_to_error" : "XMR.TO त्रुटि",
@ -430,10 +430,10 @@
"light_theme" : "रोशनी", "light_theme" : "रोशनी",
"bright_theme" : "उज्ज्वल", "bright_theme" : "उज्ज्वल",
"dark_theme" : "अंधेरा", "dark_theme" : "अंधेरा",
"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" : "प्राप्तकर्ता का पता"
} }

View file

@ -416,7 +416,7 @@
"exchange_sync_alert_content" : "ウォレットが同期されるまでお待ちください", "exchange_sync_alert_content" : "ウォレットが同期されるまでお待ちください",
"pre_seed_title" : "重要", "pre_seed_title" : "重要",
"pre_seed_description" : "次のページでは、一連の25語が表示されます。 これはあなたのユニークでプライベートなシードであり、紛失や誤動作が発生した場合にウォレットを回復する唯一の方法です。 それを書き留めて、Cake Wallet アプリの外の安全な場所に保管するのはあなたの責任です。", "pre_seed_description" : "次のページでは、一連の${words}語が表示されます。 これはあなたのユニークでプライベートなシードであり、紛失や誤動作が発生した場合にウォレットを回復する唯一の方法です。 それを書き留めて、Cake Wallet アプリの外の安全な場所に保管するのはあなたの責任です。",
"pre_seed_button_text" : "わかります。 種を見せて", "pre_seed_button_text" : "わかります。 種を見せて",
"xmr_to_error" : "XMR.TOエラー", "xmr_to_error" : "XMR.TOエラー",
@ -430,10 +430,10 @@
"light_theme" : "光", "light_theme" : "光",
"bright_theme" : "明るい", "bright_theme" : "明るい",
"dark_theme" : "闇", "dark_theme" : "闇",
"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" : "受信者のアドレス"
} }

View file

@ -416,7 +416,7 @@
"exchange_sync_alert_content" : "지갑이 동기화 될 때까지 기다리십시오", "exchange_sync_alert_content" : "지갑이 동기화 될 때까지 기다리십시오",
"pre_seed_title" : "중대한", "pre_seed_title" : "중대한",
"pre_seed_description" : "다음 페이지에서 25 개의 단어를 볼 수 있습니다. 이것은 귀하의 고유하고 개인적인 시드이며 분실 또는 오작동시 지갑을 복구하는 유일한 방법입니다. 기록해두고 Cake Wallet 앱 외부의 안전한 장소에 보관하는 것은 귀하의 책임입니다.", "pre_seed_description" : "다음 페이지에서 ${words} 개의 단어를 볼 수 있습니다. 이것은 귀하의 고유하고 개인적인 시드이며 분실 또는 오작동시 지갑을 복구하는 유일한 방법입니다. 기록해두고 Cake Wallet 앱 외부의 안전한 장소에 보관하는 것은 귀하의 책임입니다.",
"pre_seed_button_text" : "이해 했어요. 내 씨앗을 보여줘", "pre_seed_button_text" : "이해 했어요. 내 씨앗을 보여줘",
"xmr_to_error" : "XMR.TO 오류", "xmr_to_error" : "XMR.TO 오류",
@ -430,10 +430,10 @@
"light_theme" : "빛", "light_theme" : "빛",
"bright_theme" : "선명한", "bright_theme" : "선명한",
"dark_theme" : "어두운", "dark_theme" : "어두운",
"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" : "받는 사람 주소"
} }

View file

@ -416,7 +416,7 @@
"exchange_sync_alert_content" : "Wacht tot uw portemonnee is gesynchroniseerd", "exchange_sync_alert_content" : "Wacht tot uw portemonnee is gesynchroniseerd",
"pre_seed_title" : "BELANGRIJK", "pre_seed_title" : "BELANGRIJK",
"pre_seed_description" : "Op de volgende pagina ziet u een reeks van 25 woorden. Dit is uw unieke en persoonlijke zaadje en het is de ENIGE manier om uw portemonnee te herstellen in geval van verlies of storing. Het is JOUW verantwoordelijkheid om het op te schrijven en op een veilige plaats op te slaan buiten de Cake Wallet app.", "pre_seed_description" : "Op de volgende pagina ziet u een reeks van ${words} woorden. Dit is uw unieke en persoonlijke zaadje en het is de ENIGE manier om uw portemonnee te herstellen in geval van verlies of storing. Het is JOUW verantwoordelijkheid om het op te schrijven en op een veilige plaats op te slaan buiten de Cake Wallet app.",
"pre_seed_button_text" : "Ik begrijp het. Laat me mijn zaad zien", "pre_seed_button_text" : "Ik begrijp het. Laat me mijn zaad zien",
"xmr_to_error" : "XMR.TO-fout", "xmr_to_error" : "XMR.TO-fout",
@ -430,10 +430,10 @@
"light_theme" : "Licht", "light_theme" : "Licht",
"bright_theme" : "Helder", "bright_theme" : "Helder",
"dark_theme" : "Donker", "dark_theme" : "Donker",
"enter_your_note" : "Voer uw notitie in ...", "enter_your_note" : "Voer uw notitie in ...",
"note_optional" : "Opmerking (optioneel)", "note_optional" : "Opmerking (optioneel)",
"note_tap_to_change" : "Opmerking (tik om te wijzigen)", "note_tap_to_change" : "Opmerking (tik om te wijzigen)",
"transaction_key" : "Transactiesleutel", "transaction_key" : "Transactiesleutel",
"confirmations" : "Bevestigingen" "confirmations" : "Bevestigingen",
"recipient_address" : "Adres ontvanger"
} }

View file

@ -416,7 +416,7 @@
"exchange_sync_alert_content" : "Poczekaj, aż portfel zostanie zsynchronizowany", "exchange_sync_alert_content" : "Poczekaj, aż portfel zostanie zsynchronizowany",
"pre_seed_title" : "WAŻNY", "pre_seed_title" : "WAŻNY",
"pre_seed_description" : "Na następnej stronie zobaczysz serię 25 słów. To jest Twoje unikalne i prywatne ziarno i jest to JEDYNY sposób na odzyskanie portfela w przypadku utraty lub awarii. Twoim obowiązkiem jest zapisanie go i przechowywanie w bezpiecznym miejscu poza aplikacją Cake Wallet.", "pre_seed_description" : "Na następnej stronie zobaczysz serię ${words} słów. To jest Twoje unikalne i prywatne ziarno i jest to JEDYNY sposób na odzyskanie portfela w przypadku utraty lub awarii. Twoim obowiązkiem jest zapisanie go i przechowywanie w bezpiecznym miejscu poza aplikacją Cake Wallet.",
"pre_seed_button_text" : "Rozumiem. Pokaż mi moje nasienie", "pre_seed_button_text" : "Rozumiem. Pokaż mi moje nasienie",
"xmr_to_error" : "Pomyłka XMR.TO", "xmr_to_error" : "Pomyłka XMR.TO",
@ -430,10 +430,10 @@
"light_theme" : "Lekki", "light_theme" : "Lekki",
"bright_theme" : "Jasny", "bright_theme" : "Jasny",
"dark_theme" : "Ciemny", "dark_theme" : "Ciemny",
"enter_your_note" : "Wpisz notatkę…", "enter_your_note" : "Wpisz notatkę…",
"note_optional" : "Notatka (opcjonalnie)", "note_optional" : "Notatka (opcjonalnie)",
"note_tap_to_change" : "Notatka (dotknij, aby zmienić)", "note_tap_to_change" : "Notatka (dotknij, aby zmienić)",
"transaction_key" : "Klucz transakcji", "transaction_key" : "Klucz transakcji",
"confirmations" : "Potwierdzenia" "confirmations" : "Potwierdzenia",
"recipient_address" : "Adres odbiorcy"
} }

View file

@ -416,7 +416,7 @@
"exchange_sync_alert_content" : "Por favor, espere até que sua carteira seja sincronizada", "exchange_sync_alert_content" : "Por favor, espere até que sua carteira seja sincronizada",
"pre_seed_title" : "IMPORTANTE", "pre_seed_title" : "IMPORTANTE",
"pre_seed_description" : "Na próxima página, você verá uma série de 25 palavras. Esta é a sua semente única e privada e é a ÚNICA maneira de recuperar sua carteira em caso de perda ou mau funcionamento. É SUA responsabilidade anotá-lo e armazená-lo em um local seguro fora do aplicativo Cake Wallet.", "pre_seed_description" : "Na próxima página, você verá uma série de ${words} palavras. Esta é a sua semente única e privada e é a ÚNICA maneira de recuperar sua carteira em caso de perda ou mau funcionamento. É SUA responsabilidade anotá-lo e armazená-lo em um local seguro fora do aplicativo Cake Wallet.",
"pre_seed_button_text" : "Compreendo. Me mostre minha semente", "pre_seed_button_text" : "Compreendo. Me mostre minha semente",
"xmr_to_error" : "Erro XMR.TO", "xmr_to_error" : "Erro XMR.TO",
@ -430,10 +430,10 @@
"light_theme" : "Luz", "light_theme" : "Luz",
"bright_theme" : "Brilhante", "bright_theme" : "Brilhante",
"dark_theme" : "Sombria", "dark_theme" : "Sombria",
"enter_your_note" : "Insira sua nota ...", "enter_your_note" : "Insira sua nota ...",
"note_optional" : "Nota (opcional)", "note_optional" : "Nota (opcional)",
"note_tap_to_change" : "Nota (toque para alterar)", "note_tap_to_change" : "Nota (toque para alterar)",
"transaction_key" : "Chave de transação", "transaction_key" : "Chave de transação",
"confirmations" : "Confirmações" "confirmations" : "Confirmações",
"recipient_address" : "Endereço do destinatário"
} }

View file

@ -416,7 +416,7 @@
"exchange_sync_alert_content" : "Подождите, пока ваш кошелек синхронизируется", "exchange_sync_alert_content" : "Подождите, пока ваш кошелек синхронизируется",
"pre_seed_title" : "ВАЖНО", "pre_seed_title" : "ВАЖНО",
"pre_seed_description" : "На следующей странице вы увидите серию из 25 слов. Это ваша уникальная и личная мнемоническая фраза, и это ЕДИНСТВЕННЫЙ способ восстановить свой кошелек в случае потери или неисправности. ВАМ необходимо записать ее и хранить в надежном месте вне приложения Cake Wallet.", "pre_seed_description" : "На следующей странице вы увидите серию из ${words} слов. Это ваша уникальная и личная мнемоническая фраза, и это ЕДИНСТВЕННЫЙ способ восстановить свой кошелек в случае потери или неисправности. ВАМ необходимо записать ее и хранить в надежном месте вне приложения Cake Wallet.",
"pre_seed_button_text" : "Понятно. Покажите мнемоническую фразу", "pre_seed_button_text" : "Понятно. Покажите мнемоническую фразу",
"xmr_to_error" : "Ошибка XMR.TO", "xmr_to_error" : "Ошибка XMR.TO",
@ -430,10 +430,10 @@
"light_theme" : "Светлая", "light_theme" : "Светлая",
"bright_theme" : "Яркая", "bright_theme" : "Яркая",
"dark_theme" : "Темная", "dark_theme" : "Темная",
"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" : "Адрес получателя"
} }

View file

@ -416,7 +416,7 @@
"exchange_sync_alert_content" : "Зачекайте, поки ваш гаманець не синхронізується", "exchange_sync_alert_content" : "Зачекайте, поки ваш гаманець не синхронізується",
"pre_seed_title" : "ВАЖЛИВО", "pre_seed_title" : "ВАЖЛИВО",
"pre_seed_description" : "На наступній сторінці ви побачите серію з 25 слів. Це ваша унікальна та приватна мнемонічна фраза, і це ЄДИНИЙ спосіб відновити ваш гаманець на випадок втрати або несправності. ВАМ необхідно записати її та зберігати в безпечному місці поза програмою Cake Wallet.", "pre_seed_description" : "На наступній сторінці ви побачите серію з ${words} слів. Це ваша унікальна та приватна мнемонічна фраза, і це ЄДИНИЙ спосіб відновити ваш гаманець на випадок втрати або несправності. ВАМ необхідно записати її та зберігати в безпечному місці поза програмою Cake Wallet.",
"pre_seed_button_text" : "Зрозуміло. Покажіть мнемонічну фразу", "pre_seed_button_text" : "Зрозуміло. Покажіть мнемонічну фразу",
"xmr_to_error" : "Помилка XMR.TO", "xmr_to_error" : "Помилка XMR.TO",
@ -430,10 +430,10 @@
"light_theme" : "Світла", "light_theme" : "Світла",
"bright_theme" : "Яскрава", "bright_theme" : "Яскрава",
"dark_theme" : "Темна", "dark_theme" : "Темна",
"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" : "Адреса одержувача"
} }

View file

@ -416,7 +416,7 @@
"exchange_sync_alert_content" : "請等待,直到您的錢包同步", "exchange_sync_alert_content" : "請等待,直到您的錢包同步",
"pre_seed_title" : "重要", "pre_seed_title" : "重要",
"pre_seed_description" : "在下一頁上,您將看到一系列25個單詞。 這是您獨特的私人種子,是丟失或出現故障時恢復錢包的唯一方法。 您有責任將其寫下並存儲在Cake Wallet應用程序外部的安全地方。", "pre_seed_description" : "在下一頁上,您將看到一系列${words}個單詞。 這是您獨特的私人種子,是丟失或出現故障時恢復錢包的唯一方法。 您有責任將其寫下並存儲在Cake Wallet應用程序外部的安全地方。",
"pre_seed_button_text" : "我明白。 給我看我的種子", "pre_seed_button_text" : "我明白。 給我看我的種子",
"xmr_to_error" : "XMR.TO錯誤", "xmr_to_error" : "XMR.TO錯誤",
@ -430,10 +430,10 @@
"light_theme" : "光", "light_theme" : "光",
"bright_theme" : "亮", "bright_theme" : "亮",
"dark_theme" : "黑暗", "dark_theme" : "黑暗",
"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" : "收件人地址"
} }