From efb2ec16af5d5e7a01714aa16bd3f0bf1f33a857 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 12 Feb 2024 17:52:16 +0100 Subject: [PATCH] use addressToString for all --- apps/remix-ide/src/app/tabs/web3-provider.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/web3-provider.js b/apps/remix-ide/src/app/tabs/web3-provider.js index 1489e8e37a..16c3a3dd17 100644 --- a/apps/remix-ide/src/app/tabs/web3-provider.js +++ b/apps/remix-ide/src/app/tabs/web3-provider.js @@ -55,11 +55,12 @@ export class Web3ProviderModule extends Plugin { console.log('receipt available but contract address not present', receipt) return } - const contractData = await this.call('compilerArtefacts', 'getContractDataFromAddress', receipt.contractAddress) + const contractAddressStr = addressToString(receipt.contractAddress) + const contractData = await this.call('compilerArtefacts', 'getContractDataFromAddress', contractAddressStr) if (contractData) { - this.call('udapp', 'addInstance', receipt.contractAddress, contractData.contract.abi, contractData.name) + this.call('udapp', 'addInstance', contractAddressStr, contractData.contract.abi, contractData.name) const data = await this.call('compilerArtefacts', 'getCompilerAbstract', contractData.file) - await this.call('compilerArtefacts', 'addResolvedContract', addressToString(receipt.contractAddress), data) + await this.call('compilerArtefacts', 'addResolvedContract', contractAddressStr, data) } }, 50) }