Skip to content

Commit cbedfc3

Browse files
committed
use toNumber
1 parent 9a9af6f commit cbedfc3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

libs/remix-debug/src/init.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22
import Web3, { Web3PluginBase } from 'web3'
3-
import {toHex} from 'web3-utils'
3+
import {toNumber} from 'web3-utils'
44

55
export function extendWeb3 (web3) {
66
if(!web3.debug){
@@ -59,7 +59,7 @@ class Web3DebugPlugin extends Web3PluginBase {
5959
public storageRangeAt(txBlockHash, txIndex, address, start, maxSize, cb) {
6060
this.requestManager.send({
6161
method: 'debug_storageRangeAt',
62-
params: [txBlockHash, toHex(txIndex), address, start, maxSize]
62+
params: [txBlockHash, toNumber(txIndex), address, start, maxSize]
6363
})
6464
.then(result => cb(null, result))
6565
.catch(error => cb(error))

libs/remix-lib/src/init.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22
import Web3, { Web3PluginBase } from 'web3'
3-
import {toHex} from 'web3-utils'
3+
import {toNumber} from 'web3-utils'
44

55
export function extendWeb3 (web3) {
66
if(!web3.debug){
@@ -39,7 +39,7 @@ class Web3DebugPlugin extends Web3PluginBase {
3939
public storageRangeAt(txBlockHash, txIndex, address, start, maxSize, cb) {
4040
this.requestManager.send({
4141
method: 'debug_storageRangeAt',
42-
params: [txBlockHash, toHex(txIndex), address, start, maxSize]
42+
params: [txBlockHash, toNumber(txIndex), address, start, maxSize]
4343
})
4444
.then(result => cb(null, result))
4545
.catch(error => cb(error))

0 commit comments

Comments
 (0)