Compare commits

...
Author SHA1 Message Date
Matthew Russell 4ae749189e fix: eager connection for browser wallet 2023-07-31 16:22:30 +01:00
+8 -1
View File
@@ -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 {