mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 01:37:40 +00:00
Merge pull request #133 from cake-tech/CAKE-143-implement-newexchange-alert
Cake 143 implement newexchange alert
This commit is contained in:
commit
73133d71fe
15 changed files with 88 additions and 25 deletions
|
@ -95,6 +95,7 @@ class S implements WidgetsLocalizations {
|
||||||
String get exchange_new_template => "New template";
|
String get exchange_new_template => "New template";
|
||||||
String get exchange_result_write_down_ID => "*Please copy or write down your ID shown above.";
|
String get exchange_result_write_down_ID => "*Please copy or write down your ID shown above.";
|
||||||
String get exchange_result_write_down_trade_id => "Please copy or write down the trade ID to continue.";
|
String get exchange_result_write_down_trade_id => "Please copy or write down the trade ID to continue.";
|
||||||
|
String get exchange_sync_alert_content => "Please wait until your wallet is synchronized";
|
||||||
String get expired => "Expired";
|
String get expired => "Expired";
|
||||||
String get faq => "FAQ";
|
String get faq => "FAQ";
|
||||||
String get fetching => "Fetching";
|
String get fetching => "Fetching";
|
||||||
|
@ -669,6 +670,8 @@ class $de extends S {
|
||||||
@override
|
@override
|
||||||
String get restore_bitcoin_title_from_keys => "Aus WIF wiederherstellen";
|
String get restore_bitcoin_title_from_keys => "Aus WIF wiederherstellen";
|
||||||
@override
|
@override
|
||||||
|
String get exchange_sync_alert_content => "Bitte warten Sie, bis Ihre Brieftasche synchronisiert ist";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "Scannen Sie den QR-Code, um die Adresse zu erhalten";
|
String get scan_qr_code => "Scannen Sie den QR-Code, um die Adresse zu erhalten";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "Bezahlt";
|
String get trade_state_paid => "Bezahlt";
|
||||||
|
@ -1335,6 +1338,8 @@ class $hi extends S {
|
||||||
@override
|
@override
|
||||||
String get restore_bitcoin_title_from_keys => "WIF से पुनर्स्थापित करें";
|
String get restore_bitcoin_title_from_keys => "WIF से पुनर्स्थापित करें";
|
||||||
@override
|
@override
|
||||||
|
String get exchange_sync_alert_content => "कृपया प्रतीक्षा करें जब तक आपका बटुआ सिंक्रनाइज़ नहीं किया जाता है";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "पता प्राप्त करने के लिए QR कोड स्कैन करें";
|
String get scan_qr_code => "पता प्राप्त करने के लिए QR कोड स्कैन करें";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "भुगतान किया है";
|
String get trade_state_paid => "भुगतान किया है";
|
||||||
|
@ -2001,6 +2006,8 @@ class $ru extends S {
|
||||||
@override
|
@override
|
||||||
String get restore_bitcoin_title_from_keys => "Восстановить с помощью WIF";
|
String get restore_bitcoin_title_from_keys => "Восстановить с помощью WIF";
|
||||||
@override
|
@override
|
||||||
|
String get exchange_sync_alert_content => "Подождите, пока ваш кошелек синхронизируется";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "Отсканируйте QR-код для получения адреса";
|
String get scan_qr_code => "Отсканируйте QR-код для получения адреса";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "Оплаченная";
|
String get trade_state_paid => "Оплаченная";
|
||||||
|
@ -2667,6 +2674,8 @@ class $ko extends S {
|
||||||
@override
|
@override
|
||||||
String get restore_bitcoin_title_from_keys => "WIF에서 복원";
|
String get restore_bitcoin_title_from_keys => "WIF에서 복원";
|
||||||
@override
|
@override
|
||||||
|
String get exchange_sync_alert_content => "지갑이 동기화 될 때까지 기다리십시오";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "QR 코드를 스캔하여 주소를 얻습니다.";
|
String get scan_qr_code => "QR 코드를 스캔하여 주소를 얻습니다.";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "유료";
|
String get trade_state_paid => "유료";
|
||||||
|
@ -3333,6 +3342,8 @@ class $pt extends S {
|
||||||
@override
|
@override
|
||||||
String get restore_bitcoin_title_from_keys => "Restaurar de WIF";
|
String get restore_bitcoin_title_from_keys => "Restaurar de WIF";
|
||||||
@override
|
@override
|
||||||
|
String get exchange_sync_alert_content => "Por favor, espere até que sua carteira seja sincronizada";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "Digitalize o código QR para obter o endereço";
|
String get scan_qr_code => "Digitalize o código QR para obter o endereço";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "Paga";
|
String get trade_state_paid => "Paga";
|
||||||
|
@ -3999,6 +4010,8 @@ class $uk extends S {
|
||||||
@override
|
@override
|
||||||
String get restore_bitcoin_title_from_keys => "Відновити за допомогою WIF";
|
String get restore_bitcoin_title_from_keys => "Відновити за допомогою WIF";
|
||||||
@override
|
@override
|
||||||
|
String get exchange_sync_alert_content => "Зачекайте, поки ваш гаманець не синхронізується";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "Скануйте QR-код для одержання адреси";
|
String get scan_qr_code => "Скануйте QR-код для одержання адреси";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "Оплачена";
|
String get trade_state_paid => "Оплачена";
|
||||||
|
@ -4665,6 +4678,8 @@ class $ja extends S {
|
||||||
@override
|
@override
|
||||||
String get restore_bitcoin_title_from_keys => "WIFから復元";
|
String get restore_bitcoin_title_from_keys => "WIFから復元";
|
||||||
@override
|
@override
|
||||||
|
String get exchange_sync_alert_content => "ウォレットが同期されるまでお待ちください";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "QRコードをスキャンして住所を取得します";
|
String get scan_qr_code => "QRコードをスキャンして住所を取得します";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "有料";
|
String get trade_state_paid => "有料";
|
||||||
|
@ -5335,6 +5350,8 @@ class $pl extends S {
|
||||||
@override
|
@override
|
||||||
String get restore_bitcoin_title_from_keys => "Przywróć z WIF";
|
String get restore_bitcoin_title_from_keys => "Przywróć z WIF";
|
||||||
@override
|
@override
|
||||||
|
String get exchange_sync_alert_content => "Poczekaj, aż portfel zostanie zsynchronizowany";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "Zeskanuj kod QR, aby uzyskać adres";
|
String get scan_qr_code => "Zeskanuj kod QR, aby uzyskać adres";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "Płatny";
|
String get trade_state_paid => "Płatny";
|
||||||
|
@ -6001,6 +6018,8 @@ class $es extends S {
|
||||||
@override
|
@override
|
||||||
String get restore_bitcoin_title_from_keys => "Restaurar desde WIF";
|
String get restore_bitcoin_title_from_keys => "Restaurar desde WIF";
|
||||||
@override
|
@override
|
||||||
|
String get exchange_sync_alert_content => "Espere hasta que su billetera esté sincronizada";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "Escanee el código QR para obtener la dirección";
|
String get scan_qr_code => "Escanee el código QR para obtener la dirección";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "Pagado";
|
String get trade_state_paid => "Pagado";
|
||||||
|
@ -6667,6 +6686,8 @@ class $nl extends S {
|
||||||
@override
|
@override
|
||||||
String get restore_bitcoin_title_from_keys => "Herstel van WIF";
|
String get restore_bitcoin_title_from_keys => "Herstel van WIF";
|
||||||
@override
|
@override
|
||||||
|
String get exchange_sync_alert_content => "Wacht tot uw portemonnee is gesynchroniseerd";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "Scan de QR-code om het adres te krijgen";
|
String get scan_qr_code => "Scan de QR-code om het adres te krijgen";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "Betaald";
|
String get trade_state_paid => "Betaald";
|
||||||
|
@ -7333,6 +7354,8 @@ class $zh extends S {
|
||||||
@override
|
@override
|
||||||
String get restore_bitcoin_title_from_keys => "從WIF還原";
|
String get restore_bitcoin_title_from_keys => "從WIF還原";
|
||||||
@override
|
@override
|
||||||
|
String get exchange_sync_alert_content => "請等待,直到您的錢包同步";
|
||||||
|
@override
|
||||||
String get scan_qr_code => "掃描二維碼獲取地址";
|
String get scan_qr_code => "掃描二維碼獲取地址";
|
||||||
@override
|
@override
|
||||||
String get trade_state_paid => "已付费";
|
String get trade_state_paid => "已付费";
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
import 'package:cake_wallet/entities/sync_status.dart';
|
||||||
import 'package:dotted_border/dotted_border.dart';
|
import 'package:dotted_border/dotted_border.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
@ -394,19 +395,30 @@ class ExchangePage extends BasePage {
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
Observer(
|
Observer(
|
||||||
builder: (_) => LoadingPrimaryButton(
|
builder: (_) => LoadingPrimaryButton(
|
||||||
text: S.of(context).exchange,
|
text: S.of(context).exchange,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (_formKey.currentState.validate()) {
|
if (_formKey.currentState.validate()) {
|
||||||
exchangeViewModel.createTrade();
|
if ((exchangeViewModel.depositCurrency == CryptoCurrency.xmr)
|
||||||
}
|
&&(!(exchangeViewModel.status is SyncedSyncStatus))) {
|
||||||
},
|
showPopUp<void>(
|
||||||
color:
|
context: context,
|
||||||
Theme.of(context).accentTextTheme.body2.color,
|
builder: (BuildContext context) {
|
||||||
textColor: Colors.white,
|
return AlertWithOneAction(
|
||||||
isLoading: exchangeViewModel.tradeState
|
alertTitle: S.of(context).exchange,
|
||||||
is TradeIsCreating,
|
alertContent: S.of(context).exchange_sync_alert_content,
|
||||||
)),
|
buttonText: S.of(context).ok,
|
||||||
|
buttonAction: () => Navigator.of(context).pop());
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
exchangeViewModel.createTrade();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
color: Theme.of(context).accentTextTheme.body2.color,
|
||||||
|
textColor: Colors.white,
|
||||||
|
isLoading: exchangeViewModel.tradeState
|
||||||
|
is TradeIsCreating)),
|
||||||
]),
|
]),
|
||||||
)),
|
)),
|
||||||
));
|
));
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
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/wallet_type.dart';
|
import 'package:cake_wallet/entities/wallet_type.dart';
|
||||||
import 'package:cake_wallet/exchange/exchange_provider.dart';
|
import 'package:cake_wallet/exchange/exchange_provider.dart';
|
||||||
import 'package:cake_wallet/exchange/limits.dart';
|
import 'package:cake_wallet/exchange/limits.dart';
|
||||||
|
@ -100,6 +101,9 @@ abstract class ExchangeViewModelBase with Store {
|
||||||
|
|
||||||
NumberFormat _cryptoNumberFormat;
|
NumberFormat _cryptoNumberFormat;
|
||||||
|
|
||||||
|
@computed
|
||||||
|
SyncStatus get status => wallet.syncStatus;
|
||||||
|
|
||||||
@computed
|
@computed
|
||||||
ObservableList<ExchangeTemplate> get templates =>
|
ObservableList<ExchangeTemplate> get templates =>
|
||||||
_exchangeTemplateStore.templates;
|
_exchangeTemplateStore.templates;
|
||||||
|
|
|
@ -405,5 +405,7 @@
|
||||||
"seed_alert_title" : "Beachtung",
|
"seed_alert_title" : "Beachtung",
|
||||||
"seed_alert_content" : "Der Samen ist der einzige Weg, um Ihren Geldbeutel wiederzugewinnen. Hast du es aufgeschrieben?",
|
"seed_alert_content" : "Der Samen ist der einzige Weg, um Ihren Geldbeutel wiederzugewinnen. Hast du es aufgeschrieben?",
|
||||||
"seed_alert_back" : "Geh zurück",
|
"seed_alert_back" : "Geh zurück",
|
||||||
"seed_alert_yes" : "Ja, habe ich"
|
"seed_alert_yes" : "Ja, habe ich",
|
||||||
|
|
||||||
|
"exchange_sync_alert_content" : "Bitte warten Sie, bis Ihre Brieftasche synchronisiert ist"
|
||||||
}
|
}
|
|
@ -405,5 +405,7 @@
|
||||||
"seed_alert_title" : "Attention",
|
"seed_alert_title" : "Attention",
|
||||||
"seed_alert_content" : "The seed is the only way to recover your wallet. Have you written it down?",
|
"seed_alert_content" : "The seed is the only way to recover your wallet. Have you written it down?",
|
||||||
"seed_alert_back" : "Go back",
|
"seed_alert_back" : "Go back",
|
||||||
"seed_alert_yes" : "Yes, I have"
|
"seed_alert_yes" : "Yes, I have",
|
||||||
|
|
||||||
|
"exchange_sync_alert_content" : "Please wait until your wallet is synchronized"
|
||||||
}
|
}
|
|
@ -405,5 +405,7 @@
|
||||||
"seed_alert_title" : "Atención",
|
"seed_alert_title" : "Atención",
|
||||||
"seed_alert_content" : "La semilla es la única forma de recuperar su billetera. ¿Lo has escrito?",
|
"seed_alert_content" : "La semilla es la única forma de recuperar su billetera. ¿Lo has escrito?",
|
||||||
"seed_alert_back" : "Regresa",
|
"seed_alert_back" : "Regresa",
|
||||||
"seed_alert_yes" : "Sí tengo"
|
"seed_alert_yes" : "Sí tengo",
|
||||||
|
|
||||||
|
"exchange_sync_alert_content" : "Espere hasta que su billetera esté sincronizada"
|
||||||
}
|
}
|
|
@ -405,5 +405,7 @@
|
||||||
"seed_alert_title" : "ध्यान",
|
"seed_alert_title" : "ध्यान",
|
||||||
"seed_alert_content" : "बीज आपके बटुए को पुनर्प्राप्त करने का एकमात्र तरीका है। क्या आपने इसे लिखा है?",
|
"seed_alert_content" : "बीज आपके बटुए को पुनर्प्राप्त करने का एकमात्र तरीका है। क्या आपने इसे लिखा है?",
|
||||||
"seed_alert_back" : "वापस जाओ",
|
"seed_alert_back" : "वापस जाओ",
|
||||||
"seed_alert_yes" : "हाँ मेरे पास है"
|
"seed_alert_yes" : "हाँ मेरे पास है",
|
||||||
|
|
||||||
|
"exchange_sync_alert_content" : "कृपया प्रतीक्षा करें जब तक आपका बटुआ सिंक्रनाइज़ नहीं किया जाता है"
|
||||||
}
|
}
|
|
@ -405,5 +405,7 @@
|
||||||
"seed_alert_title" : "注意",
|
"seed_alert_title" : "注意",
|
||||||
"seed_alert_content" : "種子はあなたの財布を回復する唯一の方法です。 書き留めましたか?",
|
"seed_alert_content" : "種子はあなたの財布を回復する唯一の方法です。 書き留めましたか?",
|
||||||
"seed_alert_back" : "戻る",
|
"seed_alert_back" : "戻る",
|
||||||
"seed_alert_yes" : "はい、あります"
|
"seed_alert_yes" : "はい、あります",
|
||||||
|
|
||||||
|
"exchange_sync_alert_content" : "ウォレットが同期されるまでお待ちください"
|
||||||
}
|
}
|
|
@ -405,5 +405,7 @@
|
||||||
"seed_alert_title" : "주의",
|
"seed_alert_title" : "주의",
|
||||||
"seed_alert_content" : "씨앗은 지갑을 복구하는 유일한 방법입니다. 적어 보셨나요?",
|
"seed_alert_content" : "씨앗은 지갑을 복구하는 유일한 방법입니다. 적어 보셨나요?",
|
||||||
"seed_alert_back" : "돌아 가기",
|
"seed_alert_back" : "돌아 가기",
|
||||||
"seed_alert_yes" : "네, 있어요"
|
"seed_alert_yes" : "네, 있어요",
|
||||||
|
|
||||||
|
"exchange_sync_alert_content" : "지갑이 동기화 될 때까지 기다리십시오"
|
||||||
}
|
}
|
|
@ -405,5 +405,7 @@
|
||||||
"seed_alert_title" : "Aandacht",
|
"seed_alert_title" : "Aandacht",
|
||||||
"seed_alert_content" : "Het zaad is de enige manier om uw portemonnee te herstellen. Heb je het opgeschreven?",
|
"seed_alert_content" : "Het zaad is de enige manier om uw portemonnee te herstellen. Heb je het opgeschreven?",
|
||||||
"seed_alert_back" : "Ga terug",
|
"seed_alert_back" : "Ga terug",
|
||||||
"seed_alert_yes" : "Ja ik heb"
|
"seed_alert_yes" : "Ja ik heb",
|
||||||
|
|
||||||
|
"exchange_sync_alert_content" : "Wacht tot uw portemonnee is gesynchroniseerd"
|
||||||
}
|
}
|
|
@ -405,5 +405,7 @@
|
||||||
"seed_alert_title" : "Uwaga",
|
"seed_alert_title" : "Uwaga",
|
||||||
"seed_alert_content" : "Ziarno to jedyny sposób na odzyskanie portfela. Zapisałeś to?",
|
"seed_alert_content" : "Ziarno to jedyny sposób na odzyskanie portfela. Zapisałeś to?",
|
||||||
"seed_alert_back" : "Wróć",
|
"seed_alert_back" : "Wróć",
|
||||||
"seed_alert_yes" : "Tak"
|
"seed_alert_yes" : "Tak",
|
||||||
|
|
||||||
|
"exchange_sync_alert_content" : "Poczekaj, aż portfel zostanie zsynchronizowany"
|
||||||
}
|
}
|
|
@ -405,5 +405,7 @@
|
||||||
"seed_alert_title" : "Atenção",
|
"seed_alert_title" : "Atenção",
|
||||||
"seed_alert_content" : "A semente é a única forma de recuperar sua carteira. Você escreveu isso?",
|
"seed_alert_content" : "A semente é a única forma de recuperar sua carteira. Você escreveu isso?",
|
||||||
"seed_alert_back" : "Volte",
|
"seed_alert_back" : "Volte",
|
||||||
"seed_alert_yes" : "Sim, eu tenho"
|
"seed_alert_yes" : "Sim, eu tenho",
|
||||||
|
|
||||||
|
"exchange_sync_alert_content" : "Por favor, espere até que sua carteira seja sincronizada"
|
||||||
}
|
}
|
||||||
|
|
|
@ -405,5 +405,7 @@
|
||||||
"seed_alert_title" : "Внимание",
|
"seed_alert_title" : "Внимание",
|
||||||
"seed_alert_content" : "Мнемоническая фраза - единственный способ восстановить ваш кошелек. Вы записали ее?",
|
"seed_alert_content" : "Мнемоническая фраза - единственный способ восстановить ваш кошелек. Вы записали ее?",
|
||||||
"seed_alert_back" : "Назад",
|
"seed_alert_back" : "Назад",
|
||||||
"seed_alert_yes" : "Да"
|
"seed_alert_yes" : "Да",
|
||||||
|
|
||||||
|
"exchange_sync_alert_content" : "Подождите, пока ваш кошелек синхронизируется"
|
||||||
}
|
}
|
|
@ -405,5 +405,7 @@
|
||||||
"seed_alert_title" : "Увага",
|
"seed_alert_title" : "Увага",
|
||||||
"seed_alert_content" : "Мнемонічна фраза - єдиний спосіб відновити ваш гаманець. Ви записали її?",
|
"seed_alert_content" : "Мнемонічна фраза - єдиний спосіб відновити ваш гаманець. Ви записали її?",
|
||||||
"seed_alert_back" : "Назад",
|
"seed_alert_back" : "Назад",
|
||||||
"seed_alert_yes" : "Так"
|
"seed_alert_yes" : "Так",
|
||||||
|
|
||||||
|
"exchange_sync_alert_content" : "Зачекайте, поки ваш гаманець не синхронізується"
|
||||||
}
|
}
|
|
@ -405,5 +405,7 @@
|
||||||
"seed_alert_title" : "注意",
|
"seed_alert_title" : "注意",
|
||||||
"seed_alert_content" : "種子是恢復錢包的唯一方法。 你寫下來了嗎?",
|
"seed_alert_content" : "種子是恢復錢包的唯一方法。 你寫下來了嗎?",
|
||||||
"seed_alert_back" : "回去",
|
"seed_alert_back" : "回去",
|
||||||
"seed_alert_yes" : "是的,我有"
|
"seed_alert_yes" : "是的,我有",
|
||||||
|
|
||||||
|
"exchange_sync_alert_content" : "請等待,直到您的錢包同步"
|
||||||
}
|
}
|
Loading…
Reference in a new issue