-
Notifications
You must be signed in to change notification settings - Fork 127
client: fix confirm when adding new dex server #1644
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working well.
@@ -319,8 +310,6 @@ export default class SettingsPage extends BasePage { | |||
/* Called after successful registration to a DEX. */ | |||
async registerDEXSuccess () { | |||
const page = this.page | |||
page.dexAddr.value = '' | |||
this.clearCertFile() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In forms.tmpl
, dexAddr
used to be the id of the element, but it got updated to be a data-tmpl
, so it wasn't getting loaded into the page
object on the settings page.
As @vctt94 said, it probably happened during a refactoring to modals. This code that clears the form should be in the form's class, it shouldn't have been here in the first place.
I believe the reason of the bug is the refactor which changed how forms were, to the newer version with modals. So when it gets to the point of register success, the page.addr component is already Right now the I also added the |
e71f558
to
b91a36f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. A glance from @buck54321 and we can merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there's some related cleanup to be done.
In forms.tmpl, the elements are
<label for="dexAddr" class="form-label ps-1 mt-2">[[[DEX Address]]]</label>
<input type="text" class="form-control select" data-tmpl="addr">
But that for
attribute no longer makes sense. We should add an id
back to the input so that user clicks on the label will cause focus on the element.
Also, there are two page methods called getDexAddr
that are unused. Could you nuke those too.
this PR closes #1531