@onekeyfe/hwk-trezor-core 1.1.29-alpha.7 → 1.1.29-alpha.9

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.js CHANGED
@@ -9632,8 +9632,9 @@ function randomBytes(size, callback) {
9632
9632
  }
9633
9633
  throw error2;
9634
9634
  }
9635
- const bytes = Buffer2.alloc(size);
9636
- cryptoApi.getRandomValues(bytes);
9635
+ const entropy = new Uint8Array(size);
9636
+ cryptoApi.getRandomValues(entropy);
9637
+ const bytes = Buffer2.from(entropy);
9637
9638
  if (callback) {
9638
9639
  callback(null, bytes);
9639
9640
  return;