Files
mpc/pkg
zeekay fd8eb49dc7 fix(mpc): unreachable custody backend + invented smart wallets
Two defects found by capturing the console against production.

1. Every custody write path was dark because a VALID IAM token was
   rejected. fetchUserInfo built <issuer>/oauth/userinfo, which the SPA
   shell answers 200 text/html; the JSON decode then failed on '<' and
   surfaced as 401 "failed to decode userinfo: invalid character '<'".
   The issuer serves userinfo at /v1/iam/oauth/userinfo (401 JSON when
   unauthenticated, as it should). The provider allowlist keys on the
   issuer ORIGIN, so the /v1/iam prefix cannot be supplied by the caller
   and belongs in this function.

   Verified by hand against lux.id: authorization_code + S256 completes,
   token endpoint 200, and userinfo at the /v1/iam path returns
   {"email":"[email protected]","isAdmin":true,"owner":"lux"}.

2. /wallets/[id]/smart-wallets rendered two invented wallets: a "2-of-3"
   Safe at 0x1234...abcd on Ethereum and an ERC-4337 account at
   0x5678...efgh on 96369, both green and marked deployed, hardcoded
   under a "TODO: fetch from API". They rendered for ANY key id.

   A custody screen claiming a 2-of-3 multisig that exists on no chain is
   not a placeholder, it is a false statement about where funds are — and
   it contradicted lux.cloud's own honest "1 of 1 today, no ring
   deployed". The list is now empty until the API is read.

The login page needs no change: it already uses @hanzo/iam startLogin
with PKCE. Production is serving an older build than main, which is why
it still requested the implicit response_type=token that this repo
removed.

Still required and NOT done here: register
https://mpc.lux.cloud/auth/callback on the lux-mpc IAM client, and
deploy. Neither is a code change.
2026-07-27 13:51:48 -07:00
..
2024-09-21 20:52:40 +07:00
2025-08-02 22:27:51 -05:00