Skip to content

636 check for existing wallet#720

Merged
theborakompanioni merged 7 commits intojoinmarket-webui:masterfrom
zmjohnso:636-fix-without-loaders
Feb 9, 2024
Merged

636 check for existing wallet#720
theborakompanioni merged 7 commits intojoinmarket-webui:masterfrom
zmjohnso:636-fix-without-loaders

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
@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