diff --git a/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx b/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx index 3cb983c301..afc67f7370 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx @@ -158,10 +158,10 @@ export const ContractSelection = (props: ContractSelectionProps) => { swarmLocation: 'Swarm url where all metadata information can be found (contract needs to be published first)', web3Deploy: 'Copy/paste this code to any JavaScript/Web3 console to deploy this contract' } - let contractProperties = contractsDetails[selectedContract] || {} - contractProperties.compilerInput = compilerInput + let contractProperties:any = {} // Make 'compilerInput' first field to display it as first item in 'Compilation Details' modal - contractProperties = JSON.parse(JSON.stringify(contractProperties, ["compilerInput", ...Object.keys(contractProperties)], 4)) + if (compilerInput) contractProperties.compilerInput = compilerInput + contractProperties = Object.assign(contractProperties, contractsDetails[selectedContract]) const log =
{