From 23a088d18b0d6d8c5c4c9fbf126429d9f619337b Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Mon, 8 Aug 2022 12:11:39 +0200 Subject: [PATCH] fix handling basefeepergas --- .../debugger-ui/src/lib/vm-debugger/global-variables.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/global-variables.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/global-variables.tsx index 98713182cd..7cd7dc58de 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/global-variables.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/global-variables.tsx @@ -1,6 +1,7 @@ import React from 'react' // eslint-disable-line import DropdownPanel from './dropdown-panel' // eslint-disable-line import { BN } from 'ethereumjs-util' +import Web3 from 'web3' export const GlobalVariables = ({ block, receipt, tx }) => { // see https://docs.soliditylang.org/en/latest/units-and-global-variables.html#block-and-transaction-properties @@ -17,7 +18,7 @@ export const GlobalVariables = ({ block, receipt, tx }) => { 'tx.origin': tx.from } if (block.baseFeePerGas) { - globals['block.basefee'] = (new BN(block.baseFeePerGas.replace('0x', ''), 'hex')).toString(10) + ` Wei (${block.baseFeePerGas})` + globals['block.basefee'] = (Web3.utils.toBN(block.baseFeePerGas)) + ` Wei (${block.baseFeePerGas})` //(new BN(block.baseFeePerGas.replace('0x', ''), 'hex')).toString(10) + ` Wei (${block.baseFeePerGas})` } return (