mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-11-15 18:12:53 +00: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> {
|
pub async fn new_address(&self) -> Result<Address> {
|
||||||
self.inner
|
let address = self.inner.lock().await.get_new_address()?;
|
||||||
.lock()
|
|
||||||
.await
|
Ok(address)
|
||||||
.get_new_address()
|
|
||||||
.map_err(Into::into)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn get_tx(&self, txid: Txid) -> Result<Option<Transaction>> {
|
pub async fn get_tx(&self, txid: Txid) -> Result<Option<Transaction>> {
|
||||||
|
Loading…
Reference in New Issue
Block a user