fix(trading,governance): eager connection for browser wallet (#4444)
This commit is contained in:
parent
b87c981a90
commit
65071f57d0
@ -31,7 +31,14 @@ export function useEagerConnect(Connectors: {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await connect(Connectors[cfg.connector]);
|
||||
if (cfg.connector === 'injected') {
|
||||
const injectedInstance = Connectors[cfg.connector];
|
||||
// @ts-ignore only injected wallet has connectWallet method
|
||||
await injectedInstance.connectWallet();
|
||||
await connect(injectedInstance);
|
||||
} else {
|
||||
await connect(Connectors[cfg.connector]);
|
||||
}
|
||||
} catch {
|
||||
console.warn(`Failed to connect with connector: ${cfg.connector}`);
|
||||
} finally {
|
||||
|
Loading…
Reference in New Issue
Block a user