Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Hansie Odendaal <39146854+hansieodendaal@users.noreply.github.com>
  • Loading branch information
SWvheerden and hansieodendaal committed May 30, 2024
1 parent b8824ba commit ebba5f2
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion base_layer/common_types/src/tari_address/dual_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl DualAddress {
Self::from_bytes(buf.as_slice())
}

/// Convert Tari Address to bytes
/// Convert Tari Address to hex string
pub fn to_hex(&self) -> String {
let buf = self.to_bytes();
buf.to_hex()
Expand Down
2 changes: 1 addition & 1 deletion base_layer/common_types/src/tari_address/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl TariAddress {
}
}

/// Construct an TariAddress from an emoji string with checksum trying to calculate the network
/// Construct an TariAddress from an emoji string with checksum
pub fn from_emoji_string(emoji: &str) -> Result<Self, TariAddressError> {
let bytes = TariAddress::emoji_to_bytes(emoji)?;

Expand Down
2 changes: 1 addition & 1 deletion base_layer/common_types/src/tari_address/single_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl SingleAddress {
&self.public_spend_key
}

/// Construct Tari Address from bytes and try to calculate the network
/// Construct Tari Address from bytes
pub fn from_bytes(bytes: &[u8]) -> Result<Self, TariAddressError>
where Self: Sized {
if bytes.len() != INTERNAL_SINGLE_SIZE {
Expand Down
2 changes: 1 addition & 1 deletion base_layer/wallet/src/transaction_service/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2337,7 +2337,7 @@ where
.insert(data.tx_id, tx_finalized_sender);
self.receiver_transaction_cancellation_senders
.insert(data.tx_id, cancellation_sender);
// We are recieving an interactive transaction from someone on our network, so we assume is features are
// We are recieving an interactive transaction from someone on our network, so we assume its features are
// interactive and its the same network
let source_address = TariAddress::new_single_address(
source_pubkey,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl UtxoScannerServiceBuilder {
wallet: &WalletSqlite,
shutdown_signal: ShutdownSignal,
) -> Result<UtxoScannerService<WalletSqliteDatabase, WalletConnectivityHandle>, KeyManagerServiceError> {
let view_key = wallet.key_manager_service.get_view_key_id().await?;
let view_key_id = wallet.key_manager_service.get_view_key_id().await?;
let view_key = wallet.key_manager_service.get_public_key_at_key_id(&view_key).await?;
let tari_address = TariAddress::new_dual_address_with_default_features(
view_key,
Expand Down Expand Up @@ -165,7 +165,7 @@ impl UtxoScannerServiceBuilder {
one_sided_message_watch: watch::Receiver<String>,
recovery_message_watch: watch::Receiver<String>,
) -> Result<UtxoScannerService<TBackend, TWalletConnectivity>, KeyManagerServiceError> {
let view_key = key_manager.get_view_key_id().await?;
let view_key_id = key_manager.get_view_key_id().await?;
let view_key = key_manager.get_public_key_at_key_id(&view_key).await?;
let tari_address =
TariAddress::new_dual_address_with_default_features(view_key, node_identity.public_key().clone(), network);
Expand Down
2 changes: 1 addition & 1 deletion base_layer/wallet/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ where
}

pub async fn get_wallet_id(&self) -> Result<WalletIdentity, WalletError> {
let view_key = self.key_manager_service.get_view_key_id().await?;
let view_key_id = self.key_manager_service.get_view_key_id().await?;
let view_key = self.key_manager_service.get_public_key_at_key_id(&view_key).await?;
let address = TariAddress::new_dual_address_with_default_features(
view_key.clone(),
Expand Down

0 comments on commit ebba5f2

Please sign in to comment.