Skip to content

Commit

Permalink
Merge pull request #72 from re2005/main
Browse files Browse the repository at this point in the history
fix: use computed <ref> signer to avoid errors
  • Loading branch information
johnson86tw authored Aug 15, 2022
2 parents c8babd1 + 7c53344 commit 1f18c23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/composables/useEthers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ async function activate(externalProvider: ExternalProvider) {

const updateBalance = async (interval: number = 10000) => {
setInterval(async () => {
const _balance = await _signer.getBalance()
if (!signer.value) return
const _balance = await signer?.value.getBalance()
balance.value = _balance.toBigInt()
}, interval)
}
Expand Down

0 comments on commit 1f18c23

Please sign in to comment.