Skip to content

Commit a3f9e19

Browse files
committed
fix_test
1 parent 2864ddc commit a3f9e19

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

apps/remix-ide/src/remixEngine.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class RemixEngine extends Engine {
2727
if (name === 'filePanel') return { queueTimeout: 60000 * 20 }
2828
if (name === 'fileManager') return { queueTimeout: 60000 * 20 }
2929
if (name === 'openaigpt') return { queueTimeout: 60000 * 2 }
30-
if (name === 'cookbookdev') return { queueTimeout: 60000 * 2 }
30+
if (name === 'cookbookdev') return { queueTimeout: 60000 * 3 }
3131
return { queueTimeout: 10000 }
3232
}
3333

libs/remix-lib/src/util.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import { hash } from '@remix-project/remix-lib'
33
import { bytesToHex, setLengthLeft, toBytes, addHexPrefix } from '@ethereumjs/util'
44
import stringSimilarity from 'string-similarity'
5+
import { BN } from 'bn.js'
6+
import { isBigInt } from 'web3-validator'
57

68
/*
79
contains misc util: @TODO should be split
@@ -152,6 +154,12 @@ export function buildCallPath (index, rootCall) {
152154
*/
153155
// eslint-disable-next-line camelcase
154156
export function sha3_256 (value) {
157+
if ((value.constructor && value.constructor.name === 'BigNumber') || BN.isBN(value) || isBigInt(value)) {
158+
value = value.toString(16)
159+
}
160+
if (typeof value === 'number') {
161+
value = value.toString(16)
162+
}
155163
value = toBytes(addHexPrefix(value))
156164
const retInBuffer: Uint8Array = hash.keccak(Buffer.from(setLengthLeft(value, 32)))
157165
return bytesToHex(retInBuffer)

0 commit comments

Comments
 (0)