mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
- Fix not filling fiat amount
- Fix conflicts with master
This commit is contained in:
@@ -29,12 +29,11 @@ class SendPage extends BasePage {
|
||||
SendPage({
|
||||
required this.sendViewModel,
|
||||
this.initialPaymentRequest,
|
||||
}) : _formKey = GlobalKey<FormState>(),fiatFromSettings = settingsViewModel.fiatCurrency;
|
||||
}) : _formKey = GlobalKey<FormState>();
|
||||
|
||||
final SendViewModel sendViewModel;
|
||||
final GlobalKey<FormState> _formKey;
|
||||
final controller = PageController(initialPage: 0);
|
||||
final FiatCurrency fiatFromSettings;
|
||||
final PaymentRequest? initialPaymentRequest;
|
||||
|
||||
bool _effectsInstalled = false;
|
||||
|
||||
@@ -43,8 +43,8 @@ class SendCardState extends State<SendCard>
|
||||
required this.output,
|
||||
required this.sendViewModel,
|
||||
this.initialPaymentRequest})
|
||||
: addressController = TextEditingController(text: initialPaymentRequest?.address.toLowerCase()),
|
||||
cryptoAmountController = TextEditingController(text: initialPaymentRequest?.amount),
|
||||
: addressController = TextEditingController(),
|
||||
cryptoAmountController = TextEditingController(),
|
||||
fiatAmountController = TextEditingController(),
|
||||
noteController = TextEditingController(),
|
||||
extractedAddressController = TextEditingController(),
|
||||
@@ -545,8 +545,7 @@ class SendCardState extends State<SendCard>
|
||||
if (output.address.isNotEmpty) {
|
||||
addressController.text = output.address;
|
||||
}
|
||||
if (output.cryptoAmount.isNotEmpty ||
|
||||
sendViewModel.walletCurrencyName != initialPaymentRequest?.scheme.toLowerCase()) {
|
||||
if (output.cryptoAmount.isNotEmpty) {
|
||||
cryptoAmountController.text = output.cryptoAmount;
|
||||
}
|
||||
fiatAmountController.text = output.fiatAmount;
|
||||
@@ -640,6 +639,13 @@ class SendCardState extends State<SendCard>
|
||||
extractedAddressController.text = extractedAddress;
|
||||
});
|
||||
|
||||
if (initialPaymentRequest != null &&
|
||||
sendViewModel.walletCurrencyName != initialPaymentRequest!.scheme.toLowerCase()) {
|
||||
addressController.text = initialPaymentRequest!.address;
|
||||
cryptoAmountController.text = initialPaymentRequest!.amount;
|
||||
noteController.text = initialPaymentRequest!.note;
|
||||
}
|
||||
|
||||
_effectsInstalled = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user