Skip to content

Commit

Permalink
fix: use computed <ref> signer to avoid errors
Browse files Browse the repository at this point in the history
  • Loading branch information
re2005 committed Aug 13, 2022
1 parent c8babd1 commit 7c53344
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 7c53344

Please sign in to comment.