Skip to content

feat: loadKeyShare use getJson - #629

Closed
ieow wants to merge 1 commit into
cw/header-tokenfrom
cw/loadKeyShare-getJson
Closed

feat: loadKeyShare use getJson#629
ieow wants to merge 1 commit into
cw/header-tokenfrom
cw/loadKeyShare-getJson

Conversation

@ieow

@ieow ieow commented Sep 3, 2026

Copy link
Copy Markdown

Summary

  • Add a shared parseJsonResponse helper in packages/keyring-eth-mpc/src/cloud.ts to centralize JSON parsing and non-OK error handling for cloud API responses.
  • Introduce getJson for Bearer-authenticated GET requests and refactor postJson to reuse parseJsonResponse.
  • Update loadKeyShareBackup to call getJson with GET instead of POST with an empty body.

Test plan

  • Run yarn test in packages/keyring-eth-mpc and confirm all tests pass.
  • Confirm the loadKeyShareBackup test asserts a GET request with an Authorization: Bearer <token> header.

… enhance error handling. Updated loadKeyShareBackup to utilize the new function, ensuring consistent response parsing. Added tests to verify the inclusion of the Bearer token in requests.
@ieow
ieow changed the base branch from main to cw/header-token September 3, 2026 15:15
@ieow

ieow commented Sep 4, 2026

Copy link
Copy Markdown
Author

close infavor of #631

@ieow ieow closed this Sep 4, 2026
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.

1 participant