Skip to content

Commit 6e44bdf

Browse files
committed
Fixed global scope leaks in Base58.
1 parent 09e8c6e commit 6e44bdf

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/base58.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
} else break;
3030
}
3131

32-
s = chars.join('');
33-
return s;
32+
return chars.join('');
3433
},
3534

3635
/**
@@ -42,7 +41,7 @@
4241
* Ported to JavaScript by Stefan Thomas.
4342
*/
4443
decode: function (input) {
45-
bi = BigInteger.valueOf(0);
44+
var bi = BigInteger.valueOf(0);
4645
var leadingZerosNum = 0;
4746
for (var i = input.length - 1; i >= 0; i--) {
4847
var alphaIndex = B58.alphabet.indexOf(input[i]);

src/opcode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
// template matching params
144144
OP_PUBKEYHASH : 253,
145145
OP_PUBKEY : 254,
146-
OP_INVALIDOPCODE : 255,
146+
OP_INVALIDOPCODE : 255
147147
};
148148

149149
Opcode.reverseMap = [];

0 commit comments

Comments
 (0)