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
ui: Add table showing available markets when registering for dex. #1135
Conversation
Looks very nice, @martonp! |
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.
Looks good to me, see below simnet harness result:
Refactoring of forms and other frontend stuff looks good to me too, but @buck54321 will have to review all that since it's more extensive than I anticipated. The refactoring does look positive though with narrower concerns (e.g. getCertFile, getDexAddr, registerDEXFundsFail, etc), but it's not my strong suit.
@chappjc I updated the bind function to be a class. All the logic stayed the same though. |
A good number of conflicts created for you @martonp with the app seed PR merged, although this is just about ready to go pending a look from buck. |
I think it's better to wait for #1119 to be merged first, since that will cause some more conflicts here. |
This is now unblocked with #1119 merged. |
This is merged now. |
<span {{if $passwordIsCached}}class="d-hide"{{end}}>Enter your app password to confirm DEX registration.</span> | ||
When you submit this form, <span id="feeDisplay"></span> DCR will be spent from your Decred wallet to pay | ||
registration fees. | ||
Enter your app password to confirm DEX registration. |
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.
Seems like this line needs to be hidden conditionally too.
Also, apologies in advance because we're likely going to merge #1051 first since we keep making @buck54321 update it. When that goes in, you'll have to resolve the differences with the confirmRegistrationForm
template (and any other conflicts), define any new strings in client/webserver/locales/en-us.go, then do the go generate
command in client/webserver/site
to rebuild the localized_html files. This is going to be part of the site workflow going forward, so we might as well trial it with you after #1051 goes in.
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.
All good, no problem.
With PR #1051 merged, you'll need to update to with strings in client/webserver/locales/en-us.go and the new |
I'm currently hiding the password field if the user selected the |
Makes sense to me to always require pass confirmation for register for the reasons you stated, plus it's a relatively rare event. |
This comment has been minimized.
This comment has been minimized.
@@ -26,10 +24,10 @@ export default class RegistrationPage extends BasePage { | |||
// Form 3: Unlock Decred wallet | |||
'unlockWalletForm', | |||
// Form 4: Configure DEX server | |||
'dexAddrForm', | |||
'dexAddrForm', 'dexAddr', | |||
// Form 5: Confirm DEX registration and pay fee | |||
'confirmRegForm', 'feeDisplay', 'dcrBaseMarketName', 'dexDCRLotSize', 'appPass', 'submitConfirm', 'regErr', |
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.
Can clean up some of these. dexDCRLotSize
is gone from markets.tmpl now, maybe others.
/** | ||
* onCertFileChange when the input certFile changed, read the file | ||
* and setting cert name into text of selectedCert to display on the view | ||
*/ | ||
async onCertFileChange () { | ||
const page = this.page | ||
const files = page.certFile.files | ||
if (!files.length) return | ||
page.selectedCert.textContent = files[0].name | ||
Doc.show(page.removeCert) | ||
Doc.hide(page.addCert) | ||
} |
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.
I believe this method is unused.
return cert | ||
} | ||
|
||
/* gets the dex address inputted by the user */ |
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.
inputted -> input
This PR adds a table on the confirm register form to display what markets the DEX provides.
Also there is a bit of refactoring since the form was used in multiple places, but the code was completely replicated.
Closes #1125.