@fleet-sdk/blockchain-providers 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -492,8 +492,8 @@ function checksum(len, fn) {
492
492
  decode(data) {
493
493
  if (!isBytes2(data))
494
494
  throw new Error("checksum.decode: input should be Uint8Array");
495
- const payload = data.slice(0, -4);
496
- const oldChecksum = data.slice(-4);
495
+ const payload = data.slice(0, -len);
496
+ const oldChecksum = data.slice(-len);
497
497
  const newChecksum = fn(payload).slice(0, len);
498
498
  for (let i = 0; i < len; i++)
499
499
  if (newChecksum[i] !== oldChecksum[i])