aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/scripts/lib/idStore.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js
index 33d842d54..486c67be6 100644
--- a/app/scripts/lib/idStore.js
+++ b/app/scripts/lib/idStore.js
@@ -513,10 +513,17 @@ function IdManagement(opts) {
function noop(){}
+function pad_with_zeroes(number, length){
+ var my_string = '' + number;
+ while (my_string.length < length) {
+ my_string = '0' + my_string;
+ }
+ return my_string;
+}
function concatSig(v, r, s) {
- r = ethUtil.fromSigned(r)
- s = ethUtil.fromSigned(s)
+ r = pad_with_zeroes(ethUtil.fromSigned(r))
+ s = pad_with_zeroes(ethUtil.fromSigned(s))
v = ethUtil.bufferToInt(v)
r = ethUtil.toUnsigned(r).toString('hex')
s = ethUtil.toUnsigned(s).toString('hex')