Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex6323 committed Mar 14, 2024
1 parent 7a158a6 commit 38afbb8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bindings/core/src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,11 @@ pub enum Response {
/// Response for:
/// - [`ClaimableOutputs`](crate::method::WalletMethod::ClaimableOutputs)
OutputIds(Vec<OutputId>),
// TODO: update bindings in a separete PR
// TODO: update bindings in a separate PR
/// Response for:
/// - [`GetOutput`](crate::method::WalletMethod::GetOutput)
OutputData(Option<Box<OutputWithExtendedMetadata>>),
// TODO: update bindings in a separete PR
// TODO: update bindings in a separate PR
/// Response for:
/// - [`Outputs`](crate::method::WalletMethod::Outputs),
/// - [`UnspentOutputs`](crate::method::WalletMethod::UnspentOutputs)
Expand Down
12 changes: 7 additions & 5 deletions sdk/src/wallet/operations/syncing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ use crate::{
};

impl<S: 'static + SecretManage> Wallet<S> {
/// Set the fallback SyncOptions for account syncing.
// TODO: can we rename this to `set_fallback_sync_options`? It's no biggie, but if I read `default` in Rust
// if feels like it would use `SyncOptions::default()`, but that's not what we mean here, right?
/// Set the default SyncOptions for account syncing.
/// If storage is enabled, will persist during restarts.
pub async fn set_default_sync_options(&self, options: SyncOptions) -> Result<(), WalletError> {
#[cfg(feature = "storage")]
Expand Down Expand Up @@ -66,8 +68,8 @@ impl<S: 'static + SecretManage> Wallet<S> {
let (addresses_with_unspent_output_ids, mut spent_or_not_synced_output_ids) =
self.get_output_ids_for_addresses(addresses, options).await?;

// Get the corresponding unspent outputs with extra metadata
let mut new_addresses_with_unspent_outputs = self
// Get the corresponding unspent outputs
let mut addresses_with_unspent_outputs = self
.get_outputs_from_address_output_ids(&addresses_with_unspent_output_ids)
.await?;

Expand All @@ -85,7 +87,7 @@ impl<S: 'static + SecretManage> Wallet<S> {
address,
unspent_output_ids,
unspent_outputs,
} in new_addresses_with_unspent_outputs.drain(..)
} in addresses_with_unspent_outputs.drain(..)
{
for unspent_output in &unspent_outputs {
match &unspent_output.output {
Expand Down Expand Up @@ -145,7 +147,7 @@ impl<S: 'static + SecretManage> Wallet<S> {
address,
unspent_output_ids,
} = address_with_unspent_output_ids.clone();
new_addresses_with_unspent_outputs.push(AddressWithUnspentOutputs {
addresses_with_unspent_outputs.push(AddressWithUnspentOutputs {
address,
unspent_output_ids,
unspent_outputs: account_or_nft_outputs_with_extra_metadata,
Expand Down

0 comments on commit 38afbb8

Please sign in to comment.