-
Notifications
You must be signed in to change notification settings - Fork 219
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
fix: wallet seed_words command is broken (see issue #4363) #4370
Conversation
…le wallet's gRPC server implementation Signed-off-by: Andrei Gubarev <agubarev@users.noreply.github.com>
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.
Definitely, an improvement. Panic cases are handled, but as you pointed out, it's risky to delete a file path controlled by user input.
self.output_manager_service.remove_encryption().await?; | ||
self.transaction_service.remove_encryption().await?; | ||
self.key_manager_service.remove_encryption().await?; | ||
self.db.remove_encryption().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.
Let's rather not sneak this in :)
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.
Been waiting for another PR for days, you got me :)
@@ -1205,47 +1206,38 @@ impl wallet_server::Wallet for WalletGrpcServer { | |||
} | |||
} | |||
|
|||
/// Returns the contents of a seed words file, provided via CLI | |||
async fn seed_words(&self, _: Request<tari_rpc::Empty>) -> Result<Response<SeedWordsResponse>, Status> { | |||
let cli = Cli::parse(); |
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.
TODO: Cli::parse should (ideally) not be used in GRPC, rather the ApplicationConfig should be made available to the GRPC server
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.
yes, a good idea
Description
#4363
Motivation and Context
Seed word command is broken on GRPC
thread 'tokio-runtime-worker' panicked at 'called
Option::unwrap()on a
Nonevalue', applications/tari_console_wallet/src/grpc/wallet_grpc_server.rs:1210:50
How Has This Been Tested?