diff --git a/packages/desktop/components/popup/popups/EvmTransactionFromDappPopup.svelte b/packages/desktop/components/popup/popups/EvmTransactionFromDappPopup.svelte index d2e7d08e26..09f1a6fd07 100644 --- a/packages/desktop/components/popup/popups/EvmTransactionFromDappPopup.svelte +++ b/packages/desktop/components/popup/popups/EvmTransactionFromDappPopup.svelte @@ -53,7 +53,7 @@ let baseCoinTransfer: TokenTransferData | undefined let isSmartContractCall = false let methodName: string | undefined = undefined - let inputs: IParsedInput[] | undefined = undefined + let inputs: Record | undefined = undefined let busy = false setTransactionInformation() @@ -76,7 +76,10 @@ ) methodName = parsedData?.parsedMethod?.name - inputs = parsedData?.parsedMethod?.inputs + inputs = parsedData?.parsedMethod?.inputs.reduce((acc, input: IParsedInput) => { + acc[input.name] = input.value + return acc + }, {}) switch (parsedData?.type) { case ParsedSmartContractType.CoinTransfer: { diff --git a/packages/shared/src/components/activities/evm/info/EvmSmartContractInformation.svelte b/packages/shared/src/components/activities/evm/info/EvmSmartContractInformation.svelte index e4b19d47ae..9f8d614223 100644 --- a/packages/shared/src/components/activities/evm/info/EvmSmartContractInformation.svelte +++ b/packages/shared/src/components/activities/evm/info/EvmSmartContractInformation.svelte @@ -11,6 +11,12 @@ const url = getExplorerUrl(activity.destinationNetworkId, ExplorerEndpoint.Address, address) openUrlInBrowser(url) } + + // change inputs from object with index as key to object with name as key + $: inputs = activity.inputs?.reduce((acc, input) => { + acc[input.name] = input.value + return acc + }, {})