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
DEX create password, DCR wallet and add server #676
Conversation
597973e
to
e0bc7a4
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.
Looks good and works well. Major change required is connecting a DEX before connecting a wallet to pay fees. Also, if there are no plans to add assets aside dcr and btc for now, no need to initialize them or add their icons.
While reviewing, I tinkered with some of the requested changes and made a commit here for your perusal: itswisdomagain@5bcef82
4af88ba
to
ec23c9a
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.
Almost there. Just a few nits from me now.
8d3b092
to
56819eb
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.
Looks good to go from my end. Just one more possible improvement.
I have this issue with fee payments sometimes not getting broadcasted until godcr restart. Occasionally, I see the following error logs after paying the dex fee but the fee tx may still not be broadcasted even if there is no error log:
In all cases though, I see
but the tx may not show up on dcrdata until godcr is restarted. My guess is the dex is using a too little miners fee for the dex fee tx which causes it to be rejected by spv peers until godcr restart where dcrlibwallet/dcrwallet resends pending transactions. Confirming this theory will require constructing and sending raw transactions with small fees using dcrlibwallet, to see if the sent transaction gets indexed by dcrlibwallet but isn't found on dcrdata. UPDATE: |
56819eb
to
6d5e0c7
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.
Just one more change requirement from me. I had tried to test what happens after the fee is confirmed but was unable to because multiple fee payment attempts had their transactions rejected and thus never confirmed. I've tested it now and it doesn't work quite well.
One additional thing, once any modal is displayed on the dex page, the rest of the app cannot be used until the user completes what's required by the modal. For a new dex user, that would require initializing the app, adding a DEX, adding a wallet and paying the fee before the modals disappear and the user can use the rest of the godcr app. Consider adding a close [x] button to each modal or allowing the modals to be closed by clicking outside them.
1af84f8
to
87e0d00
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.
I believe we need more detailed description on this PR... Reason is i see a few unrelated changes to the issue addressed here.
Like appCTX
dex initializing a db on godcr etc.
Also, details on how this PR can be properly tested.
Both those changes re This PR uses a couple dcrdex packages to provide DEX client functionality. The primary package for this purpose is As explained in a comment above, |
Valid point.. however, i believe dcrlibwallet is designed for this. We can pass any required parameter to the calling function from the lib. dcrwallet, VSPD etc operate almost like dex. |
87e0d00
to
94059c8
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.
d9625cf
to
9c649cc
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.
- When the Dex page is selected, the button is still the inactive button. not Active. (I have asked the UI/UX guys to get us the logo).
- Also, When the dex page is opened, is shows password form. My recommendation will be to have a dex welcome describing what dex is about, and then a button for customer proceed. When the button is pressed, the create password modal is shown and the set up process follow. if the modal cancel button is pressed, we remain on the dex welcome page.
This just a proof of concept, however, if this is merged, it will be part of the next prerelease and as such, should look presentable on the app.
Link to the DEX icons https://www.figma.com/file/e0cYaAzkXyXXPY00v23cQY/GoDCR?node-id=452%3A90904 |
30c19f4
to
2af3033
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.
While we're here, a minor improvement.
- Show the initialize app password modal - Show the add wallet modal for dcr to use to pay the dex server fee - Show the add dex server modal this come before adding any wallet - Show the fee confirmations
- Remove redundant field at loginModal and walletInfoWidget
- Remove Confirm Register Modal - Change Create Wallet modal to page
- Update menu icon - Remove add dex page, create wallets page. Use it as widgets
- Remove AppCtx from load and window - Only create dexCreateWalletWidget when DexClient do not have any wallet
- Add cancel button to Add Dex Modal and Create Wallet Modal - When app initialize or login check if client is not have dex registered, will go to register new one
- Button "Start sync to continue" will show at the Welcome Page allow to connect to DCR network before use Dex client - Remove LTC, BCH icons
9f3cc2a
to
85b5675
Compare
* Initialize client app and adding the dex server - Show the initialize app password modal - Show the add wallet modal for dcr to use to pay the dex server fee - Show the add dex server modal this come before adding any wallet - Show the fee confirmations * update dcrdex and dcrlibwallet mods * refactor main page navigation and dex client set up flow - Remove redundant field at loginModal and walletInfoWidget * show correct lot size for dex markets * Fix lint errors * Update dcrlibwallet version * use dex client features from dcrlibwallet * Update dex icon DrawerNav * Change modals Login, Set App password to page - Remove Confirm Register Modal - Change Create Wallet modal to page * Add welcome page, update login and password modal - Update menu icon - Remove add dex page, create wallets page. Use it as widgets * Only create addDexWidget widget when necessary - Remove AppCtx from load and window - Only create dexCreateWalletWidget when DexClient do not have any wallet * Update dcrlibwallet version * Add "Add a dex" button to welcome page - Add cancel button to Add Dex Modal and Create Wallet Modal - When app initialize or login check if client is not have dex registered, will go to register new one * Show registration fee payment completed * Add sync button for Welcome Page - Button "Start sync to continue" will show at the Welcome Page allow to connect to DCR network before use Dex client - Remove LTC, BCH icons * Remove unnecessary field isConnectedToDcrNetwork Co-authored-by: song50119 <> Co-authored-by: Wisdom Arerosuoghene <wisdom.arerosuoghene@gmail.com>
Work towards #619
Test server: dex-test.ssgen.io:7232