fix unpinning

pull/5370/head
aniket-engg 8 months ago committed by Aniket
parent 493d6ee5ed
commit 475742b470
  1. 9
      libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx

@ -113,8 +113,13 @@ export function UniversalDappUI(props: UdappProps) {
}
const unsavePinnedContract = async () => {
const {network} = await props.plugin.call('blockchain', 'getCurrentNetworkStatus')
await props.plugin.call('fileManager', 'remove', `.deploys/pinned-contracts/${network.id}/${props.instance.address}.json`)
let dirName
if (props.plugin.REACT_API.networkName === 'VM') dirName = props.plugin.REACT_API.selectExEnv
else {
const {network} = await props.plugin.call('blockchain', 'getCurrentNetworkStatus')
dirName = network.id
}
await props.plugin.call('fileManager', 'remove', `.deploys/pinned-contracts/${dirName}/${props.instance.address}.json`)
}
const remove = async() => {

Loading…
Cancel
Save