Skip to content

Commit

Permalink
skip redundant step during DEX trading account creation (#2542)
Browse files Browse the repository at this point in the history
Signed-off-by: Philemon Ukane <ukanephilemon@gmail.com>
  • Loading branch information
ukane-philemon committed Sep 29, 2023
1 parent 8d7e37e commit d353aad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client/webserver/site/src/html/bodybuilder.tmpl
Expand Up @@ -103,7 +103,7 @@
{{end}}

{{define "bottom"}}
<script src="/js/entry.js?v=8b29dcbe|497b4091"></script>
<script src="/js/entry.js?v=5548f26e|e23801a1"></script>
</body>
</html>
{{end}}
8 changes: 8 additions & 0 deletions client/webserver/site/src/js/register.ts
Expand Up @@ -17,6 +17,7 @@ import {
Exchange,
PageElement
} from './registry'
import State from './state'

export default class RegistrationPage extends BasePage {
body: HTMLElement
Expand Down Expand Up @@ -122,6 +123,13 @@ export default class RegistrationPage extends BasePage {
}
Doc.show(currentForm)

// There's nothing on the page.discoverAcctForm except to receive user pass
// before attempting to discover user account and there's no need to have
// them click another button when we can carry on without user interaction.
if (currentForm === page.discoverAcctForm && (State.passwordIsCached() || this.pwCache?.pw)) {
this.discoverAcctForm.page.submit.click()
}

if (app().authed()) this.auth()
}

Expand Down

0 comments on commit d353aad

Please sign in to comment.