-
Notifications
You must be signed in to change notification settings - Fork 122
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: disable submit button for masp tx when using disconnected ledger device #1572
feat: disable submit button for masp tx when using disconnected ledger device #1572
Conversation
3bfbb29
to
1c6d586
Compare
e8afcf7
to
029ea71
Compare
029ea71
to
55aca55
Compare
return { | ||
refetchInterval: 1000, | ||
queryKey: ["ledger-status"], | ||
queryFn: async () => { |
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 think something may need to change here after testing. What I found was that this loop continues to execute after I've connected and submitted a Tx, and I hit a few cases with different errors thrown. It will definitely be an issue if we try to open transport on Web when the Keychain is attempting to open transport to sign. I'll give it some thought! Maybe if we, say, detect it once, if it's undetected, require the user to click to Connect, once connected, fetch build params then submit. I think maybe it would be better if validation happens once, or, if the check is discontinued after first successful connection? Not sure, will take some thought
@mateuszjasiuk looks good! I did encounter some weird behavior when trying to Unshield, I think related to the loop and transport management. I think it's leading to edge cases like these: Namadillo:
Keychain:
We might want to require the user to initiate connection to Ledger to have better management of transport open & close, or ensure that transport is closed on Namadillo by the time it's needed in the Keychain. We can chat about it though! |
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.
Code looks good, retested the Unshielding tx, and is working great with Ledger!
a7567d8
into
feat/ledger-masp-integration-branch
…r device (#1572) * feat: disable submit button for masp tx using disconnected ledger * fix: do not check for conencted ledger while tx is submitting
quit app -> open app -> unplug device -> plug device in and open app again
ledger.button.mp4