Skip to content

Conversation

AngelCastilloB
Copy link
Member

Context

setImmediate is not available in browser environments, and we dont really need it.

Proposed Solution

Remove calls to setImmediate

Copy link
Collaborator

@iccicci iccicci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@AngelCastilloB
Copy link
Member Author

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

Copy link
Collaborator

@iccicci iccicci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Collaborator

@mirceahasegan mirceahasegan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@AngelCastilloB AngelCastilloB merged commit 22204c7 into master Jun 25, 2025
10 of 11 checks passed
@AngelCastilloB AngelCastilloB deleted the fix/remove-setImmediate branch June 25, 2025 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants