no need to request access in async

pull/3497/head
yann300 2 years ago committed by GitHub
parent f55da6bc0a
commit 4903d69bb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      apps/remix-ide/src/app/providers/injected-provider.tsx

@ -60,7 +60,6 @@ export class InjectedProvider extends Plugin implements IProvider {
return resolve({ jsonrpc: '2.0', error: 'no injected provider found', id: data.id })
}
try {
if ((window as any) && typeof (window as any).ethereum.request === "function") (window as any).ethereum.request({ method: "eth_requestAccounts" });
let resultData = await this.provider.currentProvider.send(data.method, data.params)
if (resultData) {
if (resultData.jsonrpc && resultData.jsonrpc === '2.0') {

Loading…
Cancel
Save