add each file in workspace

pull/2450/head^2
Aniket-Engg 3 years ago committed by Aniket
parent 90b6344953
commit a74bbc4f6f
  1. 6
      libs/remix-ui/workspace/src/lib/actions/index.ts

@ -95,9 +95,9 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React.
await createWorkspaceTemplate('etherscan-code-sample', 'code-template') await createWorkspaceTemplate('etherscan-code-sample', 'code-template')
plugin.setWorkspace({ name: 'etherscan-code-sample', isLocalhost: false }) plugin.setWorkspace({ name: 'etherscan-code-sample', isLocalhost: false })
dispatch(setCurrentWorkspace('etherscan-code-sample')) dispatch(setCurrentWorkspace('etherscan-code-sample'))
const filePath = Object.keys(data.compilationTargets)[0] let filePath
await workspaceProvider.set(filePath, data.compilationTargets[filePath]['content']) for (filePath in data.compilationTargets)
plugin.on('editor', 'editorMounted', async () => await plugin.fileManager.openFile(filePath)) await workspaceProvider.set(filePath, data.compilationTargets[filePath]['content'])
} }
plugin.call('notification', 'toast', `Added contract(s) verified on ${foundOnNetworks.join(',')} networks of Etherscan for contract address ${contractAddress}`) plugin.call('notification', 'toast', `Added contract(s) verified on ${foundOnNetworks.join(',')} networks of Etherscan for contract address ${contractAddress}`)
} catch (error) { } catch (error) {

Loading…
Cancel
Save