From 765662e8f8065b63b998a1b36e4b9c147d610d9c Mon Sep 17 00:00:00 2001 From: thunderbiscuit Date: Wed, 17 Aug 2022 17:35:47 -0400 Subject: [PATCH] Fix method names to mirror Rust bdk API --- src/bdk.udl | 4 ++-- src/lib.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bdk.udl b/src/bdk.udl index d98cfeca..7acf258b 100644 --- a/src/bdk.udl +++ b/src/bdk.udl @@ -185,9 +185,9 @@ interface Wallet { boolean sign([ByRef] PartiallySignedBitcoinTransaction psbt); [Throws=BdkError] - sequence get_transactions(); + sequence list_transactions(); - Network get_network(); + Network network(); [Throws=BdkError] void sync([ByRef] Blockchain blockchain, Progress? progress); diff --git a/src/lib.rs b/src/lib.rs index 95243cbc..1d928857 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -302,7 +302,7 @@ impl Wallet { self.wallet_mutex.lock().expect("wallet") } - fn get_network(&self) -> Network { + fn network(&self) -> Network { self.get_wallet().network() } @@ -337,7 +337,7 @@ impl Wallet { self.get_wallet().sign(&mut psbt, SignOptions::default()) } - fn get_transactions(&self) -> Result, Error> { + fn list_transactions(&self) -> Result, Error> { let transactions = self.get_wallet().list_transactions(true)?; Ok(transactions.iter().map(Transaction::from).collect()) } @@ -346,7 +346,7 @@ impl Wallet { let unspents = self.get_wallet().list_unspent()?; Ok(unspents .iter() - .map(|u| LocalUtxo::from_utxo(u, self.get_network())) + .map(|u| LocalUtxo::from_utxo(u, self.network())) .collect()) } }