-
Notifications
You must be signed in to change notification settings - Fork 46
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
use GetTransactions method for fetching tickets #567
Conversation
da28a70
to
27c5f8b
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.
- The tickets page freezes the app a bit before opening.
- Some of the tooltips added by Ticket hover #488 aren't showing
ui/load/ticket.go
Outdated
overview.Voted += ov.Voted | ||
} | ||
|
||
wl.MultiWallet.GetLowestBlockTimestamp() |
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.
What does this do?
ui/load/ticket.go
Outdated
} | ||
} | ||
|
||
func filterToStatus(txFilter int32) string { |
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.
It looks like dcrlibwallet tx filters can be referenced directly instead of converting to identical constants.
322a4fa
to
2a706cc
Compare
2b19b50
to
633497b
Compare
@@ -291,7 +288,7 @@ func (win *Window) Loop(w *app.Window, shutdown chan int) { | |||
break | |||
} | |||
|
|||
win.updateStates(e.Resp) | |||
// win.updateStates(e.Resp) |
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.
Remove if no longer needed.
633497b
to
256efd2
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.
-
Any specific reason the ticket activity page was removed?
-
When you have only one ticket, the ticket is center aligned rather than being aligned to the top left corner of the screen.
- if I click the purchase button without entering my spending password (N:B i needed a password for my wallet), it says Attempting to Purchase ticket (1) but no tickets are purchased.
I understand that we should be able to allow for an empty password but since I currently need a password and non was provided, which also did not allow the ticket to be purchase (i think so), I should get an error message of some sort stating that the ticket purchase was not successful.
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.
After successfully purchasing as ticket, the staking record still shows 0 unmined
tickets instead of 1.
Waiting a while, i see that i now have one unmined ticket as a live ticket, and one staking record however, in the view all ticket page, the ticket is shown as immature.
overview page
SO to narrow down the issues, the ticket overview page is only refreshed when i Navigate to another Page and then back to the ticket page.
I believe at this point, the OnResume() is called which updates the page.
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.
Pr looks good with functionality.
Some observations.
- On the all tickets page, the wallet name is not displayed on the ticket card.
- When i hover on the wallet name from the ticket overview page, there is no tooltip pop up. This was earlier implemented inPR Ticket hover #488.
- remove unused methods - remove multiwallet methods that can be called directly from pages since pages already have multiwallet in the Load struct.
- add ticket methods for fetch different ticket types in the load package
- display correct tickets reward value
- add transactionItem to wrap ticket transaction and tooltips
- Apply shadow to more list items and back up seed bottom pane
- use GridLayout for tickets grid view to fix scrolling lag issues
- show ticket maturity progress and display correct value on time label - use correct progress bar and track colors - add TxStatus struct - sort ticket transactions and prioritize spent tickets
- add tooltip messages for all ticket statuses and format block time for voted and revoked tickets - fix bug where overview page shows the same details for all tickets - add ticket status and confirmations property to transactionItem struct - add shadow to tooltip and remove border stroke
- Add second progress bar layout that fixes a border radius bug - Add shared data to transactionItem - Refresh window after loading data to remove lag in ui update - Use correct format for ticket maturity time
82e74d8
to
acebd08
Compare
* clean up wallet/commands.go - remove unused methods - remove multiwallet methods that can be called directly from pages since pages already have multiwallet in the Load struct. * add ticket type and methods to load package * clean up ticket list page - add ticket methods for fetch different ticket types in the load package * resolve inactive button bug on ticket purchase modal * remove global ticket implementation * use dcrlibwallet staking PR * cleanup fetch ticket code * delete ticket file from load package * move tooltip initialization to onResume * Cleanup tickets overview page - display correct tickets reward value * Fix only tickets purchase tx showing as 'All' in tickets list page - add transactionItem to wrap ticket transaction and tooltips * Add shadow to LinearLayout - Apply shadow to more list items and back up seed bottom pane * Add GridLayout - use GridLayout for tickets grid view to fix scrolling lag issues * tickets: fix ticket cards layouts - show ticket maturity progress and display correct value on time label - use correct progress bar and track colors - add TxStatus struct - sort ticket transactions and prioritize spent tickets * Fix ticket status tooltip - add tooltip messages for all ticket statuses and format block time for voted and revoked tickets - fix bug where overview page shows the same details for all tickets - add ticket status and confirmations property to transactionItem struct - add shadow to tooltip and remove border stroke * Fix content displayed in ticket age, days to vote and maturity duration tooltips * Use transactionItem to populate tickets list values - Add second progress bar layout that fixes a border radius bug - Add shared data to transactionItem - Refresh window after loading data to remove lag in ui update - Use correct format for ticket maturity time * Fix popups and complete tx details not showing on tx overview page * Remove tickets activity page and unused util functions * Cleanup ticket purchase modal * Show error if selected ticket purchase account has insufficient balance * Process ticket purchase in review modal * Refresh tickets overview data after successful ticket purchase * Add tooltip to wallet name * Use dcrlibwallet master(31878a6) Co-authored-by: Olanrewaju Collins <ocollins444@gmail.com>
This PR replaces the use of getTicket method with GetTransactions to fetch wallet tickets. It uses different transaction filters to fetch tickets with different status.
Fix #546
Fix #580
Fix #570
Fix #474
Close #458
The ticket activity page and section on the overview page are commented out. The code implemented looks like a duplicate of the ticket list page and having it as part of the ticket module is redundant. I suggest that page be reviewed before it is added back as an accessible feature.