mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-10-01 01:45:40 -04:00
Remove map_err
in favor of ?
`?` maps the error automatically.
This commit is contained in:
parent
7d324d966a
commit
1876d17ba4
@ -82,11 +82,9 @@ impl Wallet {
|
||||
}
|
||||
|
||||
pub async fn new_address(&self) -> Result<Address> {
|
||||
self.inner
|
||||
.lock()
|
||||
.await
|
||||
.get_new_address()
|
||||
.map_err(Into::into)
|
||||
let address = self.inner.lock().await.get_new_address()?;
|
||||
|
||||
Ok(address)
|
||||
}
|
||||
|
||||
pub async fn get_tx(&self, txid: Txid) -> Result<Option<Transaction>> {
|
||||
|
Loading…
Reference in New Issue
Block a user