-
-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
I've used convertRadix function on the cashaddr implementation #24 and it converts 5-bit number correctly according to the checksum tests.
But I've faced with that simple test gives incorrect result:
const data = [1];
console.log(convertRadix2(data, 8, 5, true));
// [ 0, 4 ] - correct
console.log(convertRadix(data, 2 ** 8, 2 ** 5));
// [ 1 ] - incorrectI thought that I could understand the behavior from tests, but there are no tests for these methods.
Is this my mistake in use or is the method not implemented correctly?
Metadata
Metadata
Assignees
Labels
No labels