feat: agent-js v2.0.0
Motivation
Bump agent-js v2.0.0 (release notes) and update HttpAgent creation accordingly.
Changes
npm run update:agent- Defer fetching root key to
HttpAgent.createin thecreateAgentwhich per extension also improve the creation of the agent by also callingsyncTime - For
defaultAgentsimply replace contructor call with synchronousHttpAgent.createSync
size-limit report 📦
| Path | Size |
|---|---|
| @dfinity/ckbtc | 7.91 KB (0%) |
| @dfinity/cketh | 3.45 KB (0%) |
| @dfinity/cmc | 1.29 KB (0%) |
| @dfinity/ledger-icrc | 3.89 KB (0%) |
| @dfinity/ledger-icp | 15.23 KB (0%) |
| @dfinity/nns | 36.62 KB (0%) |
| @dfinity/nns-proto | 140.98 KB (0%) |
| @dfinity/sns | 15.92 KB (0%) |
| @dfinity/utils | 4.5 KB (-0.05% 🔽) |
| @dfinity/ic-management | 2.92 KB (0%) |
Will this require changes in nns-dapp when we update the ic-js deps in nns-dapp? Would it be a good idea to test this in nns-dapp before merging here in case it is more work to make it work in nns-dapp?
Let me put it in draft and I do some testing first.
I don't think it will require changes in NNS dapp.
Indeed does not require any particular changes in NNS dapp except adapt the agent similarly as in this PR in dev.api.ts.
See PR https://github.com/dfinity/nns-dapp/pull/5274