@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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @fleet-sdk/blockchain-providers
2
2
 
3
+ ## 0.11.0
4
+
5
+ ### Patch Changes
6
+
7
+ - @fleet-sdk/core@0.11.0
8
+
3
9
  ## 0.10.0
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -494,8 +494,8 @@ function checksum(len, fn) {
494
494
  decode(data) {
495
495
  if (!isBytes2(data))
496
496
  throw new Error("checksum.decode: input should be Uint8Array");
497
- const payload = data.slice(0, -4);
498
- const oldChecksum = data.slice(-4);
497
+ const payload = data.slice(0, -len);
498
+ const oldChecksum = data.slice(-len);
499
499
  const newChecksum = fn(payload).slice(0, len);
500
500
  for (let i = 0; i < len; i++)
501
501
  if (newChecksum[i] !== oldChecksum[i])