mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-20 06:08:34 +02:00
Added translations for the sell alert
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
import 'package:cake_wallet/entities/wallet.dart';
|
||||
import 'package:cake_wallet/entities/wallet_description.dart';
|
||||
// import 'package:cake_wallet/entities/wallet.dart';
|
||||
// import 'package:cake_wallet/entities/wallet_description.dart';
|
||||
|
||||
abstract class WalletsManager {
|
||||
Future<Wallet> create(String name, String password, String language);
|
||||
// abstract class WalletsManager {
|
||||
// Future<Wallet> create(String name, String password, String language);
|
||||
|
||||
Future<Wallet> restoreFromSeed(
|
||||
String name, String password, String seed, int restoreHeight);
|
||||
// Future<Wallet> restoreFromSeed(
|
||||
// String name, String password, String seed, int restoreHeight);
|
||||
|
||||
Future<Wallet> restoreFromKeys(String name, String password, String language,
|
||||
int restoreHeight, String address, String viewKey, String spendKey);
|
||||
// Future<Wallet> restoreFromKeys(String name, String password, String language,
|
||||
// int restoreHeight, String address, String viewKey, String spendKey);
|
||||
|
||||
Future<Wallet> openWallet(String name, String password);
|
||||
// Future<Wallet> openWallet(String name, String password);
|
||||
|
||||
Future<bool> isWalletExit(String name);
|
||||
// Future<bool> isWalletExit(String name);
|
||||
|
||||
Future remove(WalletDescription wallet);
|
||||
}
|
||||
// Future remove(WalletDescription wallet);
|
||||
// }Remote2434
|
||||
@@ -145,20 +145,18 @@ class DashboardPage extends BasePage {
|
||||
image: exchangeImage,
|
||||
title: S.of(context).exchange,
|
||||
route: Routes.exchange),
|
||||
if (!isMoneroOnly)
|
||||
ActionButton(
|
||||
image: buyImage,
|
||||
title: S.of(context).buy,
|
||||
onClick: () async =>
|
||||
await _onClickBuyButton(context),
|
||||
),
|
||||
if (!isMoneroOnly)
|
||||
ActionButton(
|
||||
image: sellImage,
|
||||
title: 'Sell',
|
||||
onClick: () async =>
|
||||
await _onClickSellButton(context),
|
||||
),
|
||||
if (!isMoneroOnly)
|
||||
ActionButton(
|
||||
image: buyImage,
|
||||
title: S.of(context).buy,
|
||||
onClick: () async => await _onClickBuyButton(context),
|
||||
),
|
||||
if (!isMoneroOnly)
|
||||
ActionButton(
|
||||
image: sellImage,
|
||||
title: 'Sell',
|
||||
onClick: () async => await _onClickSellButton(context),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
@@ -171,15 +169,16 @@ class DashboardPage extends BasePage {
|
||||
return;
|
||||
}
|
||||
|
||||
pages.add(AddressPage(addressListViewModel: addressListViewModel,
|
||||
walletViewModel: walletViewModel));
|
||||
pages.add(AddressPage(
|
||||
addressListViewModel: addressListViewModel,
|
||||
walletViewModel: walletViewModel));
|
||||
pages.add(BalancePage(dashboardViewModel: walletViewModel));
|
||||
pages.add(TransactionsPage(dashboardViewModel: walletViewModel));
|
||||
_isEffectsInstalled = true;
|
||||
|
||||
|
||||
//if (walletViewModel.shouldShowYatPopup) {
|
||||
// await Future<void>.delayed(Duration(seconds: 1));
|
||||
|
||||
|
||||
// if (currentRouteSettings.name == Routes.preSeed
|
||||
// || currentRouteSettings.name == Routes.seed) {
|
||||
// return;
|
||||
@@ -222,8 +221,8 @@ class DashboardPage extends BasePage {
|
||||
if (needToPresentYat) {
|
||||
Future<void>.delayed(Duration(milliseconds: 500)).then((_) {
|
||||
showPopUp<void>(
|
||||
context: navigatorKey.currentContext,
|
||||
builder: (_) => YatEmojiId(walletViewModel.yatStore.emoji));
|
||||
context: navigatorKey.currentContext,
|
||||
builder: (_) => YatEmojiId(walletViewModel.yatStore.emoji));
|
||||
needToPresentYat = false;
|
||||
});
|
||||
}
|
||||
@@ -268,8 +267,9 @@ class DashboardPage extends BasePage {
|
||||
case WalletType.bitcoin:
|
||||
final moonPaySellProvider = MoonPaySellProvider();
|
||||
final uri = await moonPaySellProvider.requestUrl(
|
||||
currency: walletViewModel.wallet.currency,
|
||||
refundWalletAddress: walletViewModel.wallet.walletAddresses.address);
|
||||
currency: walletViewModel.wallet.currency,
|
||||
refundWalletAddress:
|
||||
walletViewModel.wallet.walletAddresses.address);
|
||||
await launch(uri);
|
||||
break;
|
||||
default:
|
||||
@@ -277,8 +277,8 @@ class DashboardPage extends BasePage {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertWithOneAction(
|
||||
alertTitle: S.of(context).buy,
|
||||
alertContent: S.of(context).buy_alert_content,
|
||||
alertTitle: S.of(context).sell,
|
||||
alertContent: S.of(context).sell_alert_content,
|
||||
buttonText: S.of(context).ok,
|
||||
buttonAction: () => Navigator.of(context).pop());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user