diff --git a/libs/remix-ui/workspace/src/lib/actions/workspace.ts b/libs/remix-ui/workspace/src/lib/actions/workspace.ts index 5ec5572adc..d461a67a2d 100644 --- a/libs/remix-ui/workspace/src/lib/actions/workspace.ts +++ b/libs/remix-ui/workspace/src/lib/actions/workspace.ts @@ -5,7 +5,7 @@ import { addInputFieldSuccess, createWorkspaceError, createWorkspaceRequest, cre import { checkSlash, checkSpecialChars } from '@remix-ui/helper' import { JSONStandardInput } from '../types' -import { examples } from '../templates/examples' +import { remixDefault } from '../templates' import { QueryParams } from '@remix-project/remix-lib' @@ -153,9 +153,9 @@ export const loadWorkspacePreset = async (template: 'gist-template' | 'code-temp case 'remixDefault': // creates a new workspace and populates it with default project template. // insert example contracts - for (const file in examples) { + for (const file in remixDefault) { try { - await workspaceProvider.set(examples[file].name, examples[file].content) + await workspaceProvider.set(remixDefault[file].name, remixDefault[file].content) } catch (error) { console.error(error) } diff --git a/libs/remix-ui/workspace/src/lib/templates/index.ts b/libs/remix-ui/workspace/src/lib/templates/index.ts new file mode 100644 index 0000000000..4739c0bdfb --- /dev/null +++ b/libs/remix-ui/workspace/src/lib/templates/index.ts @@ -0,0 +1 @@ +export { default as remixDefault } from './remixDefault' diff --git a/libs/remix-ui/workspace/src/lib/templates/examples.ts b/libs/remix-ui/workspace/src/lib/templates/remixDefault.ts similarity index 99% rename from libs/remix-ui/workspace/src/lib/templates/examples.ts rename to libs/remix-ui/workspace/src/lib/templates/remixDefault.ts index 6ccfac3160..8b596ec049 100644 --- a/libs/remix-ui/workspace/src/lib/templates/examples.ts +++ b/libs/remix-ui/workspace/src/lib/templates/remixDefault.ts @@ -392,7 +392,7 @@ For now, modules supported by Remix are ethers, web3, swarmgw, chai, remix and h For unsupported modules, an error like this will be thrown: ' module require is not supported by Remix IDE will be shown.' ` -export const examples = { +export default { storage: { name: 'contracts/1_Storage.sol', content: storage }, owner: { name: 'contracts/2_Owner.sol', content: owner }, ballot: { name: 'contracts/3_Ballot.sol', content: ballot },