Skip to content

Commit 2077583

Browse files
committed
Fix web3 type definitions
Based on web3/web3.js#1658 (comment)
1 parent 1aba8e5 commit 2077583

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"build": "npm run lint && npm run build:webpack",
2323
"version": "git checkout develop && npm run build && git add -A dist",
2424
"postversion": "git push && git push --tags",
25-
"release": "git checkout master && git merge develop && git push && git checkout develop"
25+
"release": "git checkout master && git merge develop && git push && git checkout develop",
26+
"postinstall": "rm -f node_modules/web3/index.d.ts"
2627
},
2728
"standard": {
2829
"ignore": [

src/services/Web3.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import config from 'Config'
2-
import Web3 from 'web3'
2+
import Web3 = require('web3')
33

44
declare global {
55
interface Window {

src/utilities/convert.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export function toTxFee(gasLimit: Numerical, gasPrice: Numerical): BigNumber {
8181

8282
export function toHex(value: Numerical): string {
8383
value = toBigNumber(value)
84-
return web3.utils.numberToHex(value)
84+
return web3.utils.toHex(value)
8585
}
8686

8787
export function toChecksumAddress(address: string): string {

0 commit comments

Comments
 (0)