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

client/webserver/site: skip redundant step during DEX trading account creation #2542

Merged
merged 2 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/webserver/site/src/html/bodybuilder.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
{{end}}

{{define "bottom"}}
<script src="/js/entry.js?v=faadd923|2e83f47d"></script>
<script src="/js/entry.js?v=945985e5|24c1e268"></script>
</body>
</html>
{{end}}
8 changes: 8 additions & 0 deletions client/webserver/site/src/js/register.ts
Original file line number Diff line number Diff line change
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
Loading