-
Notifications
You must be signed in to change notification settings - Fork 220
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
feat: add wallet state #6763
feat: add wallet state #6763
Conversation
Test Results (CI) 3 files 129 suites 35m 9s ⏱️ Results for commit ad7de14. ♻️ This comment has been updated with latest results. |
Test Results (Integration tests) 2 files + 2 11 suites +11 29m 19s ⏱️ + 29m 19s For more details on these failures, see this check. Results for commit ad7de14. ± Comparison against base commit 2535e87. ♻️ This comment has been updated with latest results. |
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.
utACK
let mut debouncer = self.debouncer.lock().await; | ||
let balance = match debouncer.get_balance().await { |
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.
fmt ok?
trace!(target: LOG_TARGET, "'get_state' completed in {:.2?}", start.elapsed()); | ||
Ok(Response::new(GetStateResponse { |
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.
fmt ok?
Adjustment possible thanks to tari-project/tari#6763 Description --- Create a backend -> frontend middleware which controls data flow and events triggering. Example: It'll ensure wallet scanning is finished to detect win/lose when new block mined and emit update events in a controlled order and frequency. Changes --- At the end of `setup_inner`, we call `initialize_frontend_updates` which updates frontend with initial data(wallet address, hardware details etc.) and waits for changes in tokio channels. We call `EventsManger` to handle updates for specific update using `EventService` and call `EventEmitter` Improvements --- * Reduce unwanted rerender * Solve problem when importing wallet with extensive tx history - update balance when wallet finished scanning * Robust win/lose block determination * Unify new block height ui updates timing Losing new block height: [lose.webm](https://github.com/user-attachments/assets/10de3c75-9f4a-4b7f-bf96-4fe91c42e345) Winning new block height: [win.webm](https://github.com/user-attachments/assets/b840dedb-de8c-4197-bdd0-76ed9a107da1) Initial wallet scanning: ![scanning](https://github.com/user-attachments/assets/765ee887-8b0d-4130-9b65-b3499494380b)
Description
Adds a wallet state grpc call which returns the balance, scanned height and wallet state