fix method call error

pull/5370/head
aniket-engg 10 months ago committed by yann300
parent 9b182c1bd5
commit 35e4530e61
  1. 7
      apps/remix-ide/src/app/tabs/web3-provider.js
  2. 2
      libs/remix-simulator/src/methods/accounts.ts

@ -1,6 +1,7 @@
import { Plugin } from '@remixproject/engine'
import * as packageJson from '../../../../../package.json'
import {isBigInt} from 'web3-validator'
import { addressToString } from "@remix-ui/helper"
export const profile = {
name: 'web3Provider',
@ -55,7 +56,11 @@ export class Web3ProviderModule extends Plugin {
return
}
const contractData = await this.call('compilerArtefacts', 'getContractDataFromAddress', receipt.contractAddress)
if (contractData) this.call('udapp', 'addInstance', receipt.contractAddress, contractData.contract.abi, contractData.name)
if (contractData) {
this.call('udapp', 'addInstance', receipt.contractAddress, contractData.contract.abi, contractData.name)
const data = await this.call('compilerArtefacts', 'getCompilerAbstract', contractData.file)
await this.call('compilerArtefacts', 'addResolvedContract', addressToString(receipt.contractAddress), data)
}
}, 50)
}
}

@ -106,6 +106,6 @@ export class Web3Accounts {
}
eth_chainId (_payload, cb) {
return cb(null, 1337)
return cb(null, '0x539') // 0x539 is hex of 1337
}
}

Loading…
Cancel
Save