Skip to content

Commit

Permalink
chore: await async methods
Browse files Browse the repository at this point in the history
  • Loading branch information
r4mmer committed Mar 13, 2023
1 parent dc872cc commit 920957d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/storage/leveldb/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default class LevelDBStore implements IStore {
}

if (info.bip32AddressIndex > (await this.walletIndex.getLastLoadedAddressIndex())) {
this.walletIndex.setLastLoadedAddressIndex(info.bip32AddressIndex);
await this.walletIndex.setLastLoadedAddressIndex(info.bip32AddressIndex);
}
}

Expand Down Expand Up @@ -360,9 +360,9 @@ export default class LevelDBStore implements IStore {
}
}
if ((await this.walletIndex.getCurrentAddressIndex()) < maxIndex) {
this.walletIndex.setCurrentAddressIndex(Math.min(maxIndex + 1, await this.walletIndex.getLastLoadedAddressIndex()));
await this.walletIndex.setCurrentAddressIndex(Math.min(maxIndex + 1, await this.walletIndex.getLastLoadedAddressIndex()));
}
this.walletIndex.setLastUsedAddressIndex(maxIndex);
await this.walletIndex.setLastUsedAddressIndex(maxIndex);
}

async getTx(txId: string): Promise<IHistoryTx | null> {
Expand Down

0 comments on commit 920957d

Please sign in to comment.