Skip to content

handle if editied wallet name exists before#842

Merged
AlaaElattar merged 13 commits into
developmentfrom
development_walletName_edit
Jan 27, 2025
Merged

handle if editied wallet name exists before#842
AlaaElattar merged 13 commits into
developmentfrom
development_walletName_edit

Conversation

@AlaaElattar
Copy link
Copy Markdown
Contributor

@AlaaElattar AlaaElattar commented Jan 6, 2025

Changes

  • Checked that wallet name won't be edited to existing name.
  • Added cancel button for cancelling edit when there's an error.

Related Issues

Tested Scenarios

image

  • If user tried to update wallet name to existing one, error will appear.

Comment thread app/lib/screens/wallets/wallet_info.dart Outdated
const WalletDetailsWidget(
{super.key,
required this.wallet,
required this.wallets,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please wait for this #822 to use the wallet provider instead

Copy link
Copy Markdown
Contributor

@AhmedHanafy725 AhmedHanafy725 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will show the error but it won't block the user from saving

@AlaaElattar AlaaElattar marked this pull request as draft January 20, 2025 07:20
@AlaaElattar AlaaElattar marked this pull request as ready for review January 20, 2025 20:52
walletsRef = ref.read(walletsNotifier.notifier);
walletNameController.text = widget.wallet.name;
walletName = widget.wallet.name;
walletNameController.addListener(_validateWalletName);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we use listeners? can't we use onChanged on the textfield?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread app/lib/screens/wallets/wallet_info.dart
@AlaaElattar AlaaElattar merged commit 03703d7 into development Jan 27, 2025
@AlaaElattar AlaaElattar deleted the development_walletName_edit branch January 27, 2025 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants