From d60577e73aabc6a62a7abb72ab676fd1ffd30715 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Mon, 6 Feb 2023 12:27:13 +0530 Subject: [PATCH] fix compilation details --- .../solidity-compiler/src/lib/contract-selection.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 =
{