diff --git a/packages/crypto/src/blake2b-hash.ts b/packages/crypto/src/blake2b-hash.ts index e3e2c294502..f2b86057e90 100644 --- a/packages/crypto/src/blake2b-hash.ts +++ b/packages/crypto/src/blake2b-hash.ts @@ -35,10 +35,6 @@ export const blake2b: Blake2b = { return hash(outputLengthBytes).update(hexStringToBuffer(message)).digest('hex') as T; }, async hashAsync(message: HexBlob, outputLengthBytes: number): Promise { - return new Promise((resolve) => { - setImmediate(() => { - resolve(blake2b.hash(message, outputLengthBytes)); - }); - }); + return blake2b.hash(message, outputLengthBytes); } }; diff --git a/packages/crypto/src/strategies/CmlBip32Ed25519.ts b/packages/crypto/src/strategies/CmlBip32Ed25519.ts index 71da4c03091..b749ccacc83 100644 --- a/packages/crypto/src/strategies/CmlBip32Ed25519.ts +++ b/packages/crypto/src/strategies/CmlBip32Ed25519.ts @@ -104,11 +104,7 @@ export class CmlBip32Ed25519 implements Bip32Ed25519 { parentKey: Bip32PublicKeyHex, derivationIndices: BIP32Path ): Promise { - return new Promise((resolve) => { - setImmediate(() => { - resolve(this.derivePublicKey(parentKey, derivationIndices)); - }); - }); + return this.derivePublicKey(parentKey, derivationIndices); } public sign( diff --git a/packages/crypto/src/strategies/SodiumBip32Ed25519.ts b/packages/crypto/src/strategies/SodiumBip32Ed25519.ts index 90b22be9f1f..419e09206f4 100644 --- a/packages/crypto/src/strategies/SodiumBip32Ed25519.ts +++ b/packages/crypto/src/strategies/SodiumBip32Ed25519.ts @@ -74,11 +74,7 @@ export class SodiumBip32Ed25519 implements Bip32Ed25519 { parentKey: Bip32PublicKeyHex, derivationIndices: BIP32Path ): Promise { - return new Promise((resolve) => { - setImmediate(() => { - resolve(this.derivePublicKey(parentKey, derivationIndices)); - }); - }); + return this.derivePublicKey(parentKey, derivationIndices); } public sign(