Skip to content

Commit aa77a3e

Browse files
Aniket-Enggyann300
authored andcommitted
fix method call error
1 parent 61e63ff commit aa77a3e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

apps/remix-ide/src/app/tabs/web3-provider.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Plugin } from '@remixproject/engine'
22
import * as packageJson from '../../../../../package.json'
33
import {isBigInt} from 'web3-validator'
4+
import { addressToString } from "@remix-ui/helper"
45

56
export const profile = {
67
name: 'web3Provider',
@@ -55,7 +56,11 @@ export class Web3ProviderModule extends Plugin {
5556
return
5657
}
5758
const contractData = await this.call('compilerArtefacts', 'getContractDataFromAddress', receipt.contractAddress)
58-
if (contractData) this.call('udapp', 'addInstance', receipt.contractAddress, contractData.contract.abi, contractData.name)
59+
if (contractData) {
60+
this.call('udapp', 'addInstance', receipt.contractAddress, contractData.contract.abi, contractData.name)
61+
const data = await this.call('compilerArtefacts', 'getCompilerAbstract', contractData.file)
62+
await this.call('compilerArtefacts', 'addResolvedContract', addressToString(receipt.contractAddress), data)
63+
}
5964
}, 50)
6065
}
6166
}

libs/remix-simulator/src/methods/accounts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,6 @@ export class Web3Accounts {
106106
}
107107

108108
eth_chainId (_payload, cb) {
109-
return cb(null, 1337)
109+
return cb(null, '0x539') // 0x539 is hex of 1337
110110
}
111111
}

0 commit comments

Comments
 (0)