diff --git a/bindings/core/src/method/wallet.rs b/bindings/core/src/method/wallet.rs index 8b374f8952..eea0c5685d 100644 --- a/bindings/core/src/method/wallet.rs +++ b/bindings/core/src/method/wallet.rs @@ -45,7 +45,7 @@ use crate::OmittedDebug; #[non_exhaustive] pub enum WalletMethod { /// Returns the accounts of the wallet. - /// Expected response: [`OutputsWithData`](crate::Response::OutputsWithData) + /// Expected response: [`OutputsData`](crate::Response::OutputsData) Accounts, /// Backup storage. Password must be the current one, when Stronghold is used as SecretManager. /// Expected response: [`Ok`](crate::Response::Ok) @@ -199,13 +199,13 @@ pub enum WalletMethod { bip_path: Option, }, /// Returns the implicit accounts of the wallet. - /// Expected response: [`OutputsWithData`](crate::Response::OutputsWithData) + /// Expected response: [`OutputsData`](crate::Response::OutputsData) ImplicitAccounts, /// Returns all incoming transactions of the wallet. /// Expected response: [`Transactions`](crate::Response::Transactions) IncomingTransactions, /// Returns all outputs of the wallet. - /// Expected response: [`OutputsWithData`](crate::Response::OutputsWithData) + /// Expected response: [`OutputsData`](crate::Response::OutputsData) #[serde(rename_all = "camelCase")] Outputs { filter_options: Option }, /// Returns all pending transactions of the wallet. @@ -452,7 +452,7 @@ pub enum WalletMethod { /// Expected response: [`Transactions`](crate::Response::Transactions) Transactions, /// Returns all unspent outputs of the wallet - /// Expected response: [`OutputsWithData`](crate::Response::OutputsWithData) + /// Expected response: [`OutputsData`](crate::Response::OutputsData) #[serde(rename_all = "camelCase")] UnspentOutputs { filter_options: Option }, /// Emits an event for testing if the event system is working diff --git a/bindings/core/src/method_handler/wallet.rs b/bindings/core/src/method_handler/wallet.rs index b738785b97..cc7086f978 100644 --- a/bindings/core/src/method_handler/wallet.rs +++ b/bindings/core/src/method_handler/wallet.rs @@ -18,7 +18,7 @@ pub(crate) async fn call_wallet_method_internal( method: WalletMethod, ) -> Result { let response = match method { - WalletMethod::Accounts => Response::OutputsWithData(wallet.ledger().await.accounts().cloned().collect()), + WalletMethod::Accounts => Response::OutputsData(wallet.ledger().await.accounts().cloned().collect()), #[cfg(feature = "stronghold")] WalletMethod::BackupToStrongholdSnapshot { destination, password } => { wallet.backup_to_stronghold_snapshot(destination, password).await?; @@ -203,7 +203,7 @@ pub(crate) async fn call_wallet_method_internal( Response::PreparedTransaction(data) } WalletMethod::ImplicitAccounts => { - Response::OutputsWithData(wallet.ledger().await.implicit_accounts().cloned().collect()) + Response::OutputsData(wallet.ledger().await.implicit_accounts().cloned().collect()) } WalletMethod::IncomingTransactions => Response::Transactions( wallet @@ -216,7 +216,7 @@ pub(crate) async fn call_wallet_method_internal( ), WalletMethod::Outputs { filter_options } => { let wallet_ledger = wallet.ledger().await; - Response::OutputsWithData(if let Some(filter) = filter_options { + Response::OutputsData(if let Some(filter) = filter_options { wallet_ledger.filtered_outputs(filter).cloned().collect() } else { wallet_ledger.outputs().values().cloned().collect() @@ -420,7 +420,7 @@ pub(crate) async fn call_wallet_method_internal( ), WalletMethod::UnspentOutputs { filter_options } => { let wallet_ledger = wallet.ledger().await; - Response::OutputsWithData(if let Some(filter) = filter_options { + Response::OutputsData(if let Some(filter) = filter_options { wallet_ledger.filtered_unspent_outputs(filter).cloned().collect() } else { wallet_ledger.unspent_outputs().values().cloned().collect() diff --git a/bindings/core/src/response.rs b/bindings/core/src/response.rs index dcac5e64d9..9523642b78 100644 --- a/bindings/core/src/response.rs +++ b/bindings/core/src/response.rs @@ -308,7 +308,7 @@ pub enum Response { /// Response for: /// - [`Outputs`](crate::method::WalletMethod::Outputs), /// - [`UnspentOutputs`](crate::method::WalletMethod::UnspentOutputs) - OutputsWithData(Vec), + OutputsData(Vec), /// Response for: /// - [`PrepareBurn`](crate::method::WalletMethod::PrepareBurn), /// - [`PrepareClaimOutputs`](crate::method::WalletMethod::PrepareClaimOutputs) diff --git a/bindings/core/tests/combined.rs b/bindings/core/tests/combined.rs index 921051591e..423f68bff4 100644 --- a/bindings/core/tests/combined.rs +++ b/bindings/core/tests/combined.rs @@ -57,7 +57,7 @@ async fn create_wallet() -> Result<(), Error> { .await; match response { - Response::OutputsWithData(_) => {} + Response::OutputsData(_) => {} _ => panic!("unexpected response {response:?}"), }