fix abi file contract pinning

pull/4629/head
aniket-engg 8 months ago committed by Aniket
parent 4978a30b81
commit c389b723f1
  1. 3
      libs/remix-ui/run-tab/src/lib/actions/deploy.ts

@ -250,7 +250,8 @@ export const loadAddress = (plugin: RunTab, dispatch: React.Dispatch<any>, contr
return dispatch(displayNotification('Alert', error, 'OK', null)) return dispatch(displayNotification('Alert', error, 'OK', null))
} }
if (loadType === 'abi') { if (loadType === 'abi') {
return addInstance(dispatch, { abi, address, name: '<at address>' }) const contractData = { name: '<at address>', abi, contract: {file: plugin.REACT_API.contracts.currentFile}} as ContractData
return addInstance(dispatch, { contractData, address, name: '<at address>' })
} else if (loadType === 'instance') { } else if (loadType === 'instance') {
if (!contract) return dispatch(displayPopUp('No compiled contracts found.')) if (!contract) return dispatch(displayPopUp('No compiled contracts found.'))
const currentFile = plugin.REACT_API.contracts.currentFile const currentFile = plugin.REACT_API.contracts.currentFile

Loading…
Cancel
Save