fix: update address validation logic in SendCubit and SendScreen#2125
fix: update address validation logic in SendCubit and SendScreen#2125phalmeidal wants to merge 1 commit into
Conversation
|
Hey @phalmeidal ! Thanks for the contribution. |
|
Requesting one change before merge:
Impact: a valid Lightning Address can still depend on typing-time async validation. The user can type/paste an address, tap Continue before parsing finishes, and get "Invalid address" even though the input is valid. The Continue button can also remain disabled until Please make |
Summary
Fixes #2076
Small fix to avoid showing the "Invalid address" error while the user is typing a Lightning Address.
Validation now runs when the user clicks Continue/Send, instead of while the input is still being edited.
Files changed
send_cubit.dartsend_screen.dartChanges
SendCubit.onChangedText, so typing a partial Lightning Address no longer setsinvalidBitcoinStringExceptioncopiedRawPaymentRequest.trim().isNotEmptySendCubit.continueOnAddressConfirmedinvalidBitcoinStringExceptionfor cases where the address is invalid after the user clicks ContinueManual testing
SendAddressScreen)name@example.com