Shorten function name

The variable will always be at least called `wallet`, hence we can
omit the `_wallet` postfix from the function name.
This commit is contained in:
Thomas Eizinger 2021-03-04 17:07:02 +11:00
parent 4f66269887
commit 37f97ac471
No known key found for this signature in database
GPG key ID: 651AC83A6C6C8B96
4 changed files with 11 additions and 11 deletions

View file

@ -141,7 +141,7 @@ async fn init_wallets(
)
.await?;
bitcoin_wallet.sync_wallet().await?;
bitcoin_wallet.sync().await?;
let bitcoin_balance = bitcoin_wallet.balance().await?;
info!(

View file

@ -113,7 +113,7 @@ async fn main() -> Result<()> {
bitcoin_wallet.new_address(),
async {
while bitcoin_wallet.balance().await? == Amount::ZERO {
bitcoin_wallet.sync_wallet().await?;
bitcoin_wallet.sync().await?;
tokio::time::sleep(Duration::from_secs(1)).await;
}
@ -256,7 +256,7 @@ async fn init_bitcoin_wallet(
)
.await?;
wallet.sync_wallet().await?;
wallet.sync().await?;
Ok(wallet)
}

View file

@ -105,7 +105,7 @@ impl Wallet {
Ok(Amount::from_sat(fees))
}
pub async fn sync_wallet(&self) -> Result<()> {
pub async fn sync(&self) -> Result<()> {
self.inner
.lock()
.await