Commit 0b2fdca
committed
fix: align DAEMON_ERRORS string checks with canonical constants
The credential daemon error retry logic in DaemonKeyStore used locally
hardcoded strings ('SESSION_EXPIRED', 'SOURCE_AUTH_DENIED') that did not
match the actual error values sent by the credential daemon (defined in
constants.ts as 'invalid or expired session', 'invalid source
authentication'). This caused the session refresh/retry path to silently
never trigger, permanently blocking all chain operations after a session
expiry.
## Changes
- `modules/key_store.ts`: Remove local DAEMON_ERRORS shadow object;
import DAEMON_ERRORS from constants.ts instead so checks always stay
in sync with the daemon's actual error messages.
- `modules/chain_orders.ts`: Remove stale unused DAEMON_ERRORS import.
- `tests/test_uncertain_broadcast.ts`: Update mock error strings to
match the canonical DAEMON_ERRORS values so the tests actually
exercise the retry path.
## Testing Notes
- Existing test suite covers the retry path (UNC-008h, UNC-008i);
mock strings now match real daemon output.1 parent 51ed6a5 commit 0b2fdca
3 files changed
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | 126 | | |
131 | 127 | | |
132 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
689 | 689 | | |
690 | 690 | | |
691 | 691 | | |
692 | | - | |
| 692 | + | |
693 | 693 | | |
694 | 694 | | |
695 | 695 | | |
| |||
726 | 726 | | |
727 | 727 | | |
728 | 728 | | |
729 | | - | |
| 729 | + | |
730 | 730 | | |
731 | 731 | | |
732 | 732 | | |
| |||
0 commit comments