Commit ac17d537 authored by aniket-engg's avatar aniket-engg Committed by Aniket

web3 extend fix

parent d8abda98
...@@ -26,13 +26,13 @@ module.exports = { ...@@ -26,13 +26,13 @@ module.exports = {
}, },
extend: function (web3) { extend: function (web3) {
if (!web3._extend) { if (!web3.extend) {
return return
} }
// DEBUG // DEBUG
var methods = [] var methods = []
if (!(web3.debug && web3.debug.preimage)) { if (!(web3.debug && web3.debug.preimage)) {
methods.push(new web3._extend.Method({ methods.push(new web3.extend.Method({
name: 'preimage', name: 'preimage',
call: 'debug_preimage', call: 'debug_preimage',
inputFormatter: [null], inputFormatter: [null],
...@@ -41,7 +41,7 @@ module.exports = { ...@@ -41,7 +41,7 @@ module.exports = {
} }
if (!(web3.debug && web3.debug.traceTransaction)) { if (!(web3.debug && web3.debug.traceTransaction)) {
methods.push(new web3._extend.Method({ methods.push(new web3.extend.Method({
name: 'traceTransaction', name: 'traceTransaction',
call: 'debug_traceTransaction', call: 'debug_traceTransaction',
inputFormatter: [null, null], inputFormatter: [null, null],
...@@ -50,7 +50,7 @@ module.exports = { ...@@ -50,7 +50,7 @@ module.exports = {
} }
if (!(web3.debug && web3.debug.storageRangeAt)) { if (!(web3.debug && web3.debug.storageRangeAt)) {
methods.push(new web3._extend.Method({ methods.push(new web3.extend.Method({
name: 'storageRangeAt', name: 'storageRangeAt',
call: 'debug_storageRangeAt', call: 'debug_storageRangeAt',
inputFormatter: [null, null, null, null, null], inputFormatter: [null, null, null, null, null],
...@@ -58,7 +58,7 @@ module.exports = { ...@@ -58,7 +58,7 @@ module.exports = {
})) }))
} }
if (methods.length > 0) { if (methods.length > 0) {
web3._extend({ web3.extend({
property: 'debug', property: 'debug',
methods: methods, methods: methods,
properties: [] properties: []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment