From 2f10b617d9fda73cbd8b144f20bbeedeebd79d9b Mon Sep 17 00:00:00 2001 From: benthecarman Date: Mon, 15 Apr 2024 15:50:57 -0500 Subject: [PATCH] Remove unused wasm functions --- mutiny-wasm/src/lib.rs | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/mutiny-wasm/src/lib.rs b/mutiny-wasm/src/lib.rs index 5bf03da80..6135a6565 100644 --- a/mutiny-wasm/src/lib.rs +++ b/mutiny-wasm/src/lib.rs @@ -423,17 +423,6 @@ impl MutinyWallet { Ok(self.inner.node_manager.stop().await?) } - /// Broadcast a transaction to the network. - /// The transaction is broadcast through the configured esplora server. - #[wasm_bindgen] - pub async fn broadcast_transaction(&self, str: String) -> Result<(), MutinyJsError> { - let tx_bytes = - Vec::from_hex(str.as_str()).map_err(|_| MutinyJsError::WalletOperationFailed)?; - let tx: Transaction = - deserialize(&tx_bytes).map_err(|_| MutinyJsError::WalletOperationFailed)?; - Ok(self.inner.node_manager.broadcast_transaction(tx).await?) - } - /// Returns the mnemonic seed phrase for the wallet. #[wasm_bindgen] pub fn show_seed(&self) -> String { @@ -509,12 +498,6 @@ impl MutinyWallet { }) } - /// Gets the current balance of the on-chain wallet. - #[wasm_bindgen] - pub fn get_wallet_balance(&self) -> Result { - Ok(self.inner.node_manager.get_wallet_balance()?) - } - /// Creates a BIP 21 invoice. This creates a new address and a lightning invoice. /// The lightning invoice may return errors related to the LSP. Check the error and /// fallback to `get_new_address` and warn the user that Lightning is not available. @@ -711,15 +694,6 @@ impl MutinyWallet { )?) } - /// Lists all the on-chain transactions in the wallet. - /// These are sorted by confirmation time. - #[wasm_bindgen] - pub fn list_onchain(&self) -> Result */, MutinyJsError> { - Ok(JsValue::from_serde( - &self.inner.node_manager.list_onchain()?, - )?) - } - /// Gets the details of a specific on-chain transaction. #[wasm_bindgen] pub fn get_transaction(