fix validation edge cases when applying payment request (#3063)

This commit is contained in:
malik1004x
2026-03-13 01:36:33 +01:00
committed by GitHub
parent 8f7819be82
commit 429f6f334f
3 changed files with 8 additions and 0 deletions
+6
View File
@@ -687,6 +687,12 @@ class _NewSendPageState extends State<NewSendPage> {
void _handleSend() async {
//TODO refactor this action. code was copied over from old ui. i don't like it.
for(int i=0; i<widget.sendViewModel.outputs.length; i++) {
if(i < _amountControllers.length) {
widget.sendViewModel.outputs[i].cryptoAmount = _amountControllers[i].text;
}
}
if (_formKey.currentState != null && !_formKey.currentState!.validate()) {
if (widget.sendViewModel.outputs.length > 1) {
showErrorValidationAlert(context);
@@ -70,6 +70,7 @@ class _NewSendAddressInputState extends State<NewSendAddressInput> {
: EdgeInsets.zero,
child: FormField<String>(
key: formFieldKey,
initialValue: widget.addressController.text,
validator: widget.validator,
builder: (state) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -39,6 +39,7 @@ class _NewSendAmountInputState extends State<NewSendAmountInput> {
Widget build(BuildContext context) {
return FormField<String>(
key: formFieldKey,
initialValue: widget.amountController.text,
validator: widget.validator,
builder: (state) => Column(
crossAxisAlignment: CrossAxisAlignment.start,