mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-19 05:58:50 +02:00
Cw 55 allow saving templateswith fiat amount (#343)
* added xhv logo * Added prefix icon widget * Added sending fiat template * template for sending selected fiat currency * fix issues
This commit is contained in:
@@ -36,6 +36,24 @@ abstract class SendTemplateViewModelBase with Store {
|
||||
|
||||
FiatCurrency get fiat => _settingsStore.fiatCurrency;
|
||||
|
||||
@observable
|
||||
bool isCurrencySelected = true;
|
||||
|
||||
@observable
|
||||
bool isFiatSelected = false;
|
||||
|
||||
@action
|
||||
void selectCurrency () {
|
||||
isCurrencySelected = true;
|
||||
isFiatSelected = false;
|
||||
}
|
||||
|
||||
@action
|
||||
void selectFiat () {
|
||||
isFiatSelected = true;
|
||||
isCurrencySelected = false;
|
||||
}
|
||||
|
||||
@computed
|
||||
ObservableList<Template> get templates => _sendTemplateStore.templates;
|
||||
|
||||
@@ -48,14 +66,20 @@ abstract class SendTemplateViewModelBase with Store {
|
||||
|
||||
void addTemplate(
|
||||
{String name,
|
||||
bool isCurrencySelected,
|
||||
String address,
|
||||
String cryptoCurrency,
|
||||
String amount}) {
|
||||
String fiatCurrency,
|
||||
String amount,
|
||||
String amountFiat}) {
|
||||
_sendTemplateStore.addTemplate(
|
||||
name: name,
|
||||
isCurrencySelected: isCurrencySelected,
|
||||
address: address,
|
||||
cryptoCurrency: cryptoCurrency,
|
||||
amount: amount);
|
||||
fiatCurrency: fiatCurrency,
|
||||
amount: amount,
|
||||
amountFiat: amountFiat);
|
||||
updateTemplate();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user