Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

636 check for existing wallet #720

Merged

Conversation

zmjohnso
Copy link
Contributor

@zmjohnso zmjohnso commented Feb 8, 2024

This PR is a fix for #636. When creating/importing a new wallet, the wallet name will now be validated immediately for duplicates, instead of on form submission when the user clicks "Create".

636.mov

An attempted fix was made using react router loaders, but this caused many redundant api calls to be made on component mount and session refresh. For now, this fix follows existing patterns, but utilizing a loader is something that could/should be investigated in future refactors.

@theborakompanioni theborakompanioni added the bug Something isn't working label Feb 8, 2024
.then((data) => {
if (abortCtrl.signal.aborted) return
setWalletList(data.wallets)
})
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
})
})
.catch(() => {
// do nothing on purpose
})
return () => abortCtrl.abort()

@kristapsk
Copy link
Contributor

Concept ACK

@theborakompanioni theborakompanioni self-requested a review February 9, 2024 01:08
@theborakompanioni theborakompanioni merged commit ac383dc into joinmarket-webui:master Feb 9, 2024
3 checks passed
@zmjohnso zmjohnso deleted the 636-fix-without-loaders branch February 9, 2024 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants