git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit e3569511d2b9077dbe811b4eb5ac6e9defaf7184

Rename all instances of ethUtils to ethUtil

Alex Beregszaszi committed on 8/23/2016, 12:19:29 AM
Parent: 90958f4d99b2d6238ce08db7e2d226b9f5bc5ea8

Files changed

address.jschanged
u256.jschanged
address.jsView
@@ -1,16 +1,16 @@
1-const ethUtils = require('ethereumjs-util')
1+const ethUtil = require('ethereumjs-util')
22
33 module.exports = class Address extends Buffer {
44 constructor (value) {
55 if (value instanceof Address || value instanceof Uint8Array) {
66 super(value)
77 } else if (typeof value !== 'string') {
88 throw new Error('Invalid input to address')
9- } else if (!ethUtils.isHexPrefixed(value)) {
9+ } else if (!ethUtil.isHexPrefixed(value)) {
1010 throw new Error('Invalid address format')
1111 } else {
12- super(ethUtils.stripHexPrefix(value), 'hex')
12+ super(ethUtil.stripHexPrefix(value), 'hex')
1313 }
1414
1515 if (this.length !== 20) {
1616 throw new Error('Invalid address length')
u256.jsView
@@ -1,13 +1,13 @@
11 const BN = require('bn.js')
2-const ethUtils = require('ethereumjs-util')
2+const ethUtil = require('ethereumjs-util')
33
44 module.exports = class U256 {
55 constructor (value) {
66 // This is the case when data is copied from WASM
77 if (value instanceof Uint8Array) {
88 this._value = new BN(value, 16, 'le')
9- } else if ((typeof value === 'string') && ethUtils.isHexPrefixed(value)) {
9+ } else if ((typeof value === 'string') && ethUtil.isHexPrefixed(value)) {
1010 this._value = new BN(value, 16)
1111 } else {
1212 this._value = new BN(value, 10)
1313 }

Built with git-ssb-web