diff --git a/libs/remix-ui/workspace/src/lib/actions/workspace.ts b/libs/remix-ui/workspace/src/lib/actions/workspace.ts index dc69bc5408..0d821bc75d 100644 --- a/libs/remix-ui/workspace/src/lib/actions/workspace.ts +++ b/libs/remix-ui/workspace/src/lib/actions/workspace.ts @@ -46,7 +46,6 @@ export const addInputField = async (type: 'file' | 'folder', path: string, cb?: export const createWorkspace = async (workspaceName: string, workspaceTemplateName: WorkspaceTemplate, opts = null, isEmpty = false, cb?: (err: Error, result?: string | number | boolean | Record) => void, isGitRepo: boolean = false) => { await plugin.fileManager.closeAllFiles() const promise = createWorkspaceTemplate(workspaceName, workspaceTemplateName) - console.log('opts-->', opts) dispatch(createWorkspaceRequest(promise)) promise.then(async () => { dispatch(createWorkspaceSuccess({ name: workspaceName, isGitRepo })) diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 135bac5b31..c7ba7e0bd5 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -106,7 +106,7 @@ export function Workspace () { const workspaceName = workspaceCreateInput.current.value // @ts-ignore: Object is possibly 'null'. const workspaceTemplateName = workspaceCreateTemplateInput.current.value || 'remixDefault' - console.log('upgradeable.current--->', upgradeable.current) + const opts = { upgradeable: upgradeable.current } @@ -147,7 +147,6 @@ export function Workspace () { // @ts-ignore if (workspaceCreateTemplateInput.current.value.startsWith('oz')) setDisplayOzCustoms(true) else setDisplayOzCustoms(false) - console.log('inside updateWsName', displayOzCustoms) // @ts-ignore workspaceCreateInput.current.value = `${workspaceCreateTemplateInput.current.value || 'remixDefault'}_${Date.now()}` } @@ -166,8 +165,7 @@ export function Workspace () { setShowDropdown(isOpen) } - const handleUpgradeChange = (e) => { - console.log('selected option', e.target.value) + const handleUpgradeability = (e) => { // @ts-ignore upgradeable.current = e.target.value } @@ -194,7 +192,7 @@ export function Workspace () {


-
handleUpgradeChange(e)}> +
handleUpgradeability(e)}>
@@ -206,6 +204,7 @@ export function Workspace () {

+ diff --git a/libs/remix-ws-templates/src/templates/ozerc20/index.ts b/libs/remix-ws-templates/src/templates/ozerc20/index.ts index 3addf406cd..17ed9113f2 100644 --- a/libs/remix-ws-templates/src/templates/ozerc20/index.ts +++ b/libs/remix-ws-templates/src/templates/ozerc20/index.ts @@ -1,7 +1,6 @@ import { erc20 } from '@openzeppelin/wizard'; export default async (opts) => { - console.log('opts---->', opts) return { 'contracts/MyToken.sol': erc20.print({ ...erc20.defaults, upgradeable: opts.upgradeable}), // @ts-ignore diff --git a/libs/remix-ws-templates/src/templates/ozerc721/index.ts b/libs/remix-ws-templates/src/templates/ozerc721/index.ts index 26a3acd59b..6505e5f0ef 100644 --- a/libs/remix-ws-templates/src/templates/ozerc721/index.ts +++ b/libs/remix-ws-templates/src/templates/ozerc721/index.ts @@ -1,8 +1,8 @@ import { erc721 } from '@openzeppelin/wizard'; -export default async () => { +export default async (opts) => { return { - 'contracts/MyToken.sol': erc721.print(), + 'contracts/MyToken.sol': erc721.print({ ...erc721.defaults, upgradeable: opts.upgradeable}), // @ts-ignore 'scripts/deploy_with_ethers.ts': (await import('!!raw-loader!./scripts/deploy_with_ethers.ts')).default, // @ts-ignore