diff --git a/libs/remix-lib/src/execution/typeConversion.ts b/libs/remix-lib/src/execution/typeConversion.ts index 5d7bf97084..c05e9873ec 100644 --- a/libs/remix-lib/src/execution/typeConversion.ts +++ b/libs/remix-lib/src/execution/typeConversion.ts @@ -24,6 +24,8 @@ function convertToString (v) { return ret } else if (BN.isBN(v) || (v.constructor && v.constructor.name === 'BigNumber') || isBigInt(v)) { return v.toString(10) + } else if (v._isBigNumber) { + return toInt(v._hex) } else if (v._isBuffer) { return bufferToHex(v) } else if (typeof v === 'object') { diff --git a/libs/remix-ui/terminal/src/lib/components/Context.tsx b/libs/remix-ui/terminal/src/lib/components/Context.tsx index 197d022750..60a4baa00b 100644 --- a/libs/remix-ui/terminal/src/lib/components/Context.tsx +++ b/libs/remix-ui/terminal/src/lib/components/Context.tsx @@ -16,7 +16,7 @@ const Context = ({opts, provider}: {opts; provider: string}) => { const i = data.receipt ? data.transactionIndex : data.transactionIndex const value = val ? typeConversion.toInt(val) : 0 - if (provider.startsWith('vm')) { + if (provider && provider.startsWith('vm')) { return (