Handle possible promise rejection cracefully (#1066)
This commit is contained in:
parent
56d1fb5f93
commit
e84ec4162c
@ -165,8 +165,11 @@ export async function web3AccountsSubscribe (cb: (accounts: InjectedAccountWithM
|
||||
subscribe((result): void => {
|
||||
accounts[source] = result;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
triggerUpdate();
|
||||
try {
|
||||
triggerUpdate()?.catch(console.error);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user