fix: decode URL-encoded characters

pull/3622/head
Neuti Yoo 2 years ago committed by Aniket
parent 9317bd4f42
commit 44ef80bb05
  1. 2
      libs/remix-ui/workspace/src/lib/actions/workspace.ts

@ -176,7 +176,7 @@ export const loadWorkspacePreset = async (template: WorkspaceTemplate = 'remixDe
const hashed = bufferToHex(hash.keccakFromString(params.code)) const hashed = bufferToHex(hash.keccakFromString(params.code))
path = 'contract-' + hashed.replace('0x', '').substring(0, 10) + (params.language && params.language.toLowerCase() === 'yul' ? '.yul' : '.sol') path = 'contract-' + hashed.replace('0x', '').substring(0, 10) + (params.language && params.language.toLowerCase() === 'yul' ? '.yul' : '.sol')
content = atob(params.code) content = atob(decodeURIComponent(params.code))
await workspaceProvider.set(path, content) await workspaceProvider.set(path, content)
} }
if (params.url) { if (params.url) {

Loading…
Cancel
Save