fix(crypto): remove setImmediate from async calls#1637
Conversation
iccicci
left a comment
There was a problem hiding this comment.
IDK if blake2b.hash<T>(message, outputLengthBytes) returns a Promise, I guess yes, otherwise we would have had a type error.
If that's the case, wouldn't be better to remove the async attribute from the function definition?
blake2b.hash doesnt return a promise, but because is inside an async function it will be wrapped inside a promise that resolves immediately. We need the function to be async to match the interface, the mobile implementataion uses an async provider for this interface |
Context
setImmediate is not available in browser environments, and we dont really need it.
Proposed Solution
Remove calls to setImmediate