diff --git a/apps/remix-ide/src/blockchain/blockchain.js b/apps/remix-ide/src/blockchain/blockchain.js index 1a1c591833..4a42057941 100644 --- a/apps/remix-ide/src/blockchain/blockchain.js +++ b/apps/remix-ide/src/blockchain/blockchain.js @@ -177,8 +177,12 @@ export class Blockchain extends Plugin { _paq.push(['trackEvent', 'blockchain', 'Deploy With Proxy', 'Proxy deployment failed: ' + error]) return this.call('terminal', 'logHtml', log) } - if (networkInfo.name === 'VM') this.config.set('vm/proxy', address) - else this.config.set(`${networkInfo.name}/${networkInfo.currentFork}/${networkInfo.id}/proxy`, address) + if (networkInfo.name === 'VM') { + this.call('fileManager', 'exists', '.deploys', (error, exists) => { + this.config.set('vm/proxy', address) + } else { + this.config.set(`${networkInfo.name}/${networkInfo.currentFork}/${networkInfo.id}/proxy`, address) + } _paq.push(['trackEvent', 'blockchain', 'Deploy With Proxy', 'Proxy deployment successful']) this.call('udapp', 'addInstance', addressToString(address), implementationContractObject.abi, implementationContractObject.name) }