This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Tame overeager wallet manager #9262
Merged
CriesofCarrots
merged 3 commits into
solana-labs:master
from
CriesofCarrots:tame-wallet-manager
Apr 2, 2020
Merged
Tame overeager wallet manager #9262
CriesofCarrots
merged 3 commits into
solana-labs:master
from
CriesofCarrots:tame-wallet-manager
Apr 2, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
garious
previously approved these changes
Apr 2, 2020
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.
A test for check_for_usb
would be nice. Also, check out the new matches!
macro in Rust 1.42.
@garious , do you need this in 1.0? |
No, just 1.1 |
Codecov Report
@@ Coverage Diff @@
## master #9262 +/- ##
========================================
- Coverage 81% 81% -0.1%
========================================
Files 276 276
Lines 61103 61103
========================================
- Hits 49511 49498 -13
- Misses 11592 11605 +13 |
mergify bot
pushed a commit
that referenced
this pull request
Apr 2, 2020
* Add helper fn to check for usb cli args * Use helper fn to prevent wallet_manager connecting unnecessarily * Review improvements (cherry picked from commit ec4745d)
solana-grimes
pushed a commit
that referenced
this pull request
Apr 2, 2020
CriesofCarrots
pushed a commit
to CriesofCarrots/solana
that referenced
this pull request
Apr 18, 2020
This reverts commit ec4745d.
CriesofCarrots
pushed a commit
to CriesofCarrots/solana
that referenced
this pull request
Apr 18, 2020
This reverts commit ec4745d.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The cli's wallet manager is indexing usb devices anytime it detects one, even if a command doesn't require a remote wallet. This is particularly problematic if a hardware wallet is connected but has timed out, because the cli may return a remote-wallet error instead of processing the command normally.
Summary of Changes
Add helper function to check for KeypairUrl::Usb args, and only initialize the wallet manager if one or more is present.
Fixes #8768