From fe5cdf78a9aa1a27fa8af0f75b23df1de15ccf76 Mon Sep 17 00:00:00 2001 From: ronaldsg Date: Mon, 7 Oct 2024 20:03:29 -0500 Subject: [PATCH] Add block event listener to refresh balance --- src/common/store/session/actions.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/store/session/actions.ts b/src/common/store/session/actions.ts index cd2cb481..391d81f9 100644 --- a/src/common/store/session/actions.ts +++ b/src/common/store/session/actions.ts @@ -28,6 +28,7 @@ export const actions: ActionTree = { commit(constants.SESSION_SET_RLOGIN, rLoginResponse); commit(constants.SESSION_SET_RLOGIN_INSTANCE, rLogin); commit(constants.SESSION_SET_WEB3_INSTANCE, markRaw(provider)); + provider.on('block', () => dispatch(constants.WEB3_SESSION_ADD_BALANCE)); return provider.listAccounts(); }) .then((accounts) => {