-
Notifications
You must be signed in to change notification settings - Fork 101
frontend: type keystores #2307
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
frontend: type keystores #2307
Conversation
activeSidebar, | ||
sidebarStatus, | ||
} = this.props; | ||
console.log('deviceIDs/keystores/accounts', deviceIDs, keystores, accounts); |
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 an error occurs, keystores is empty, but accounts still has the accounts
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.
cc @Beerosagos could you check in which order the events are pushed to the frontend?
EDIT: it looks like it is pushing in the wrong order, but it could be the frontend that is doing it funny.
What I did NOT expect is that there is no keystores but there is still accounts.
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 seems to me that the notification order from the backend is 1. keystore 2. accounts 3. device.
See in particular https://github.com/digitalbitbox/bitbox-wallet-app/blob/master/backend/backend.go#L552-L555 that emits the keystore event before the account one.
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.
Opened a separate PR to fix #2311
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.
thank you ❤️
I'll drop the last commit in this PR
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.
since this PR error is not related to this PR I'll update the last commit message, and think we could merge this anyway. WDYT?
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.
3597586
to
bf74fe2
Compare
bf74fe2
to
56ddd9f
Compare
rebased |
56ddd9f
to
3d3e16d
Compare
Used mounted hook to only update AddBuyReceiveOnEmptyBalances state if the component is actually mounted.
3d3e16d
to
cf93f46
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.
tACK!
closed in favor of #2389 |
This should only have been a PR to type keystore api, but ran into unknown account error, see 2nd and 3rd commit. 3rd commit fixes unpluging the device for me.