[bisq-network/bisq] Dao UI improvements (#1795)
sqrrm
notifications at github.com
Tue Oct 23 11:30:45 UTC 2018
sqrrm commented on this pull request.
I'm generally ok with this. utACK after tending to the comments (especially on display of phase length)
> - return periodService.getLastBlockOfPhase(height, phase);
- }
-
- public int getDurationForPhase(DaoPhase.Phase phase) {
- return periodService.getDurationForPhase(phase, daoStateService.getChainHeight());
+ // Because last block in request and voting phases must not be used fo making a tx as it will get confirmed in the
+ // next block which would be already the next phase we hide that last block to the user and add it to the break.
+ public int getFirstBlockOfPhaseForDisplay(int height, DaoPhase.Phase phase) {
+ int firstBlock = periodService.getFirstBlockOfPhase(height, phase);
+ switch (phase) {
+ case UNDEFINED:
+ break;
+ case PROPOSAL:
+ break;
+ case BREAK1:
+ firstBlock++;
This seems like the opposite of what the comment says. This will show the second block of the break as the first block.
> throws ValidationException, InsufficientMoneyException, TxException {
this.requestedBsq = requestedBsq;
- this.bsqAddress = bsqAddress;
+ this.bsqAddress = "B" + bsqWalletService.getUnusedAddress().toBase58();
Probably should have convenience functions toBSQAddress() and fromBSQAddress()
> - PHASE_BREAK1(150), // 1 day
- PHASE_BLIND_VOTE(600), // 4 days
- PHASE_BREAK2(10), // 10 blocks
- PHASE_VOTE_REVEAL(300), // 2 days
- PHASE_BREAK3(10), // 10 blocks
- PHASE_RESULT(10); // 10 block
- */
+ // The last block in the proposal and vote phases are not shown to the user as he cannot make a tx there as it would be
+ // confirmed in the next block which would be the following break phase. To hide that complexity we show only the
+ // blocks where the user can be active. To have still round numbers for the durations we add 1 block to those
+ // phases and subtract 1 block from the following breaks.
+ // So in the UI the user will see 3600 blocks and the last
+ // block of the technical 3601 blocks is displayed as part of the break1 phase.
+ /* PHASE_UNDEFINED(0),
+ PHASE_PROPOSAL(3601), // 24 days
+ PHASE_BREAK1(149), // 1 day
How about 299?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/1795#pullrequestreview-167354875
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20181023/3623216f/attachment-0001.html>
More information about the bisq-github
mailing list