aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/id-management.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-06-22 04:56:04 +0800
committerDan Finlay <dan@danfinlay.com>2016-06-22 04:56:04 +0800
commit8fde8a8921135112ccfdd13ce6b009755b5f71ed (patch)
treecd4ceb1dcd74a601506f92e5669e3022ca800c0c /app/scripts/lib/id-management.js
parentab15b4c8259d6f6c5ae9d1e51548d73cfc1c67cb (diff)
downloadtangerine-wallet-browser-8fde8a8921135112ccfdd13ce6b009755b5f71ed.tar
tangerine-wallet-browser-8fde8a8921135112ccfdd13ce6b009755b5f71ed.tar.gz
tangerine-wallet-browser-8fde8a8921135112ccfdd13ce6b009755b5f71ed.tar.bz2
tangerine-wallet-browser-8fde8a8921135112ccfdd13ce6b009755b5f71ed.tar.lz
tangerine-wallet-browser-8fde8a8921135112ccfdd13ce6b009755b5f71ed.tar.xz
tangerine-wallet-browser-8fde8a8921135112ccfdd13ce6b009755b5f71ed.tar.zst
tangerine-wallet-browser-8fde8a8921135112ccfdd13ce6b009755b5f71ed.zip
Manually linted
Diffstat (limited to 'app/scripts/lib/id-management.js')
-rw-r--r--app/scripts/lib/id-management.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/scripts/lib/id-management.js b/app/scripts/lib/id-management.js
index 4e18bc8a9..30ea866f4 100644
--- a/app/scripts/lib/id-management.js
+++ b/app/scripts/lib/id-management.js
@@ -12,7 +12,7 @@ function IdManagement (opts) {
this.hdPathString = "m/44'/60'/0'/0"
this.getAddresses = function () {
- return keyStore.getAddresses(this.hdPathString).map(function (address) { return '0x' + address })
+ return this.keyStore.getAddresses(this.hdPathString).map(function (address) { return '0x' + address })
}
this.signTx = function (txParams) {
@@ -60,17 +60,17 @@ function IdManagement (opts) {
}
}
-function pad_with_zeroes (number, length) {
- var my_string = '' + number
- while (my_string.length < length) {
- my_string = '0' + my_string
+function padWithZeroes (number, length) {
+ var myString = '' + number
+ while (myString.length < length) {
+ myString = '0' + myString
}
- return my_string
+ return myString
}
function concatSig (v, r, s) {
- r = pad_with_zeroes(ethUtil.fromSigned(r), 64)
- s = pad_with_zeroes(ethUtil.fromSigned(s), 64)
+ r = padWithZeroes(ethUtil.fromSigned(r), 64)
+ s = padWithZeroes(ethUtil.fromSigned(s), 64)
r = ethUtil.stripHexPrefix(r.toString('hex'))
s = ethUtil.stripHexPrefix(s.toString('hex'))
v = ethUtil.stripHexPrefix(ethUtil.intToHex(v))