@ledgerhq/ledger-key-ring-protocol 0.5.1-nightly.1 → 0.5.1-nightly.2

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.
@@ -94,8 +94,8 @@ export async function recordTestTrustchainSdk(
94
94
  // Monkey patches the `crypto.randomBytes` method to log generated random bytes in hexadecimal format in order to deterministically replay them in unit tests.
95
95
  const randomBytesOutputs: string[] = [];
96
96
  const originalRandomBytes = crypto.randomBytes;
97
- crypto.randomBytes = async (size: number) => {
98
- const bytes = await originalRandomBytes.call(crypto, size);
97
+ crypto.randomBytes = (size: number) => {
98
+ const bytes = originalRandomBytes.call(crypto, size);
99
99
  randomBytesOutputs.push(crypto.to_hex(bytes));
100
100
  return bytes;
101
101
  };
@@ -103,8 +103,8 @@ export async function recordTestTrustchainSdk(
103
103
  // Monkey patches the `crypto.randomKeypair` method to log generated random keypairs in hexadecimal format in order to deterministically replay them in unit tests.
104
104
  const randomKeypairOutputs: string[] = [];
105
105
  const originalRandomKeypair = crypto.randomKeypair;
106
- crypto.randomKeypair = async () => {
107
- const keypair = await originalRandomKeypair.call(crypto);
106
+ crypto.randomKeypair = () => {
107
+ const keypair = originalRandomKeypair.call(crypto);
108
108
  randomKeypairOutputs.push(crypto.to_hex(keypair.privateKey));
109
109
  return keypair;
110
110
  };
@@ -69,7 +69,7 @@ export async function replayTrustchainSdkTests<Json extends JsonShape>(
69
69
  if (bytes.length !== size) {
70
70
  throw new Error("unexpected randomBytes size. Expected " + size + " but got " + bytes.length);
71
71
  }
72
- return Promise.resolve(bytes);
72
+ return bytes;
73
73
  });
74
74
 
75
75
  const recordStore = RecordStore.fromString(json.apdus);