Skip to content

Commit ae97a2e

Browse files
ioedeveloperAniket-Engg
authored andcommitted
Enable loading previous proxy deployments.
1 parent e3a79d7 commit ae97a2e

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

apps/remix-ide/src/blockchain/blockchain.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,10 @@ export class Blockchain extends Plugin {
9393
(_) => this.executionContext.currentblockGasLimit()
9494
)
9595
this.txRunner = new TxRunner(web3Runner, {})
96-
9796
this.networkcallid = 0
98-
this.networkStatus = { network: { name: ' - ', id: ' - ' } }
9997
this.registeredPluginEvents = []
10098
this.defaultPinnedProviders = ['vm-cancun', 'vm-mainnet-fork', 'walletconnect', 'injected-MetaMask', 'basic-http-provider', 'hardhat-provider', 'foundry-provider']
99+
this.networkStatus = { network: { name: this.defaultPinnedProviders[0], id: ' - ' } }
101100
this.pinnedProviders = []
102101
this.setupEvents()
103102
this.setupProviders()

libs/remix-ui/run-tab/src/lib/actions/deploy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ export const isValidContractAddress = async (plugin: RunTab, address: string) =>
375375

376376
export const getNetworkProxyAddresses = async (plugin: RunTab, dispatch: React.Dispatch<any>) => {
377377
const network = plugin.blockchain.networkStatus.network
378-
const identifier = network.name === 'custom' ? network.name + '-' + network.id : network.name
378+
const identifier = network.name.startsWith('vm') ? 'VM' : network.name === 'custom' ? network.name + '-' + network.id : network.name
379379
const networkDeploymentsExists = await plugin.call('fileManager', 'exists', `.deploys/upgradeable-contracts/${identifier}/UUPS.json`)
380380

381381
if (networkDeploymentsExists) {

libs/remix-ui/run-tab/src/lib/actions/events.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const setupEvents = (plugin: RunTab) => {
3939

4040
plugin.blockchain.event.register('contextChanged', async (context) => {
4141
dispatch(resetProxyDeployments())
42-
if (!context.startsWith('vm')) getNetworkProxyAddresses(plugin, dispatch)
42+
getNetworkProxyAddresses(plugin, dispatch)
4343
if (context !== 'walletconnect') {
4444
(await plugin.call('manager', 'isActive', 'walletconnect')) && plugin.call('manager', 'deactivatePlugin', 'walletconnect')
4545
}

0 commit comments

Comments
 (0)