Skip to content

Commit

Permalink
Remove unused wasm functions
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Apr 15, 2024
1 parent 142d0b5 commit 2f10b61
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions mutiny-wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -509,12 +498,6 @@ impl MutinyWallet {
})
}

/// Gets the current balance of the on-chain wallet.
#[wasm_bindgen]
pub fn get_wallet_balance(&self) -> Result<u64, MutinyJsError> {
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.
Expand Down Expand Up @@ -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<JsValue /* Vec<TransactionDetails> */, 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(
Expand Down

0 comments on commit 2f10b61

Please sign in to comment.