base58check: buffers only, remove explicit 0
Undefined is treated as zero if it ever gets to this point anyway, so no value is added by having this default param here. A test fixture to verify this behaviour is added.
This commit is contained in:
parent
77ed66b24d
commit
2b2081bed9
3 changed files with 9 additions and 8 deletions
test
|
@ -11,7 +11,7 @@ describe('base58check', function() {
|
|||
it('can decode ' + f.string, function() {
|
||||
var actual = base58check.decode(f.string)
|
||||
var expected = {
|
||||
version: f.decode.version,
|
||||
version: f.decode.version || 0,
|
||||
payload: h2b(f.decode.payload),
|
||||
checksum: h2b(f.decode.checksum)
|
||||
}
|
||||
|
@ -40,4 +40,3 @@ describe('base58check', function() {
|
|||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue