dfinity / examples

Example applications, microservices, and code samples for the Internet Computer
https://dfinity.org
Apache License 2.0
547 stars 394 forks source link

fix: await fetchRootKey in agent-js #1035

Closed mraszyk closed 3 weeks ago

mraszyk commented 3 weeks ago

This PR fixes calls to fetchRootKey in agent-js to be awaited before the agent is actually used. Otherwise, signatures might be verified with the ICP mainnet root key before the root key is successfully fetched.

mraszyk commented 3 weeks ago

https://dfinity.slack.com/archives/CGA566TPV/p1730739810179459

mraszyk commented 3 weeks ago

The fix should be implemented in agent-js.