Skip to content

Commit

Permalink
Restore whoami command, closes #80.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpfs committed Aug 11, 2022
1 parent 8c41f5b commit f8b72d0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
9 changes: 4 additions & 5 deletions workspace/client/src/shell/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1035,11 +1035,10 @@ fn exec_program(
Ok(())
}
ShellCommand::Whoami => {
let _reader = cache.read().unwrap();
todo!("restore address in whoami");
//let address = reader.address()?;
//println!("{}", address);
//Ok(())
let reader = cache.read().unwrap();
let address = reader.signer().address()?;
println!("{}", address);
Ok(())
}
ShellCommand::Close => {
let mut writer = cache.write().unwrap();
Expand Down
2 changes: 1 addition & 1 deletion workspace/core/src/gatekeeper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{
decode, encode,
events::SyncEvent,
search::SearchIndex,
secret::{Secret, SecretId, SecretMeta, SecretRef, VaultMeta},
secret::{Secret, SecretId, SecretMeta, VaultMeta},
vault::{Summary, Vault, VaultAccess, VaultCommit, VaultEntry, VaultId},
Error, Result,
};
Expand Down
5 changes: 5 additions & 0 deletions workspace/node/src/client/node_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ where
self.snapshots.as_ref()
}

/// Get the signer for this node cache.
pub fn signer(&self) -> &BoxedSigner {
&self.signer
}

/// Take a snapshot of the WAL for the given vault.
///
/// Snapshots must be enabled.
Expand Down

0 comments on commit f8b72d0

Please sign in to comment.