Implement true dual-wallet signing for complete_maintenance so hospital and technician
resolve to two distinct pubkeys, replacing the current state where both roles use the
same connected wallet. Follow-up to TD-03 (#3) — the localStorage keypair was removed
there, but role separation itself remains unresolved.
- Add a builder that constructs the unsigned completeMaintenance instruction(s),
sets hospital as fee payer, and returns a partially-signed Transaction once the
hospital wallet signs.
- Add serialize/deserialize helpers so the partially-signed transaction can be
transferred out of the hospital's session and loaded into the technician's session.
- Add a hand-off UI step in the hospital flow: after triggering "complete maintenance,"
display the serialized transaction with a copy action instead of sending it directly.
- Add a corresponding load step in the technician flow: paste input, decoded summary
for review (asset, hospital, escrow amount) before signing, then submit.
- Verify the account metas in the parsed transaction match PDAs re-derived from the
transfer payload before allowing the technician to sign (no blind signing).
- Handle transaction expiration (recentBlockhash validity window) with a visible
countdown on both sides.
Acceptance Criteria:
- hospital and technician resolve to two distinct pubkeys in a completed
complete_maintenance transaction when tested with two separate wallets.
- Technician sees a decoded, verified summary before signing — never a raw blob.
- No new dependencies.
Implement true dual-wallet signing for complete_maintenance so hospital and technician
resolve to two distinct pubkeys, replacing the current state where both roles use the
same connected wallet. Follow-up to TD-03 (#3) — the localStorage keypair was removed
there, but role separation itself remains unresolved.
sets hospital as fee payer, and returns a partially-signed Transaction once the
hospital wallet signs.
transferred out of the hospital's session and loaded into the technician's session.
display the serialized transaction with a copy action instead of sending it directly.
for review (asset, hospital, escrow amount) before signing, then submit.
transfer payload before allowing the technician to sign (no blind signing).
countdown on both sides.
Acceptance Criteria:
complete_maintenance transaction when tested with two separate wallets.