Repository navigation
Commit a1c77bb
committed
feat: make node.pair.approve idempotent for already-paired nodes (fixes #94040)
When approveNodePairing returns null (e.g., request expired, superseded by reconnect), check if the node is already paired. If so, treat it as a successful approval to avoid misleading 'unknown requestId' errors during duplicate clicks or delayed approvals.
Changes:
- Add getPairedNode import
- Before approval, capture nodeId from pending request (if still present)
- If approve returns null but nodeId exists and node already paired, synthesize approved result
- Maintain existing error handling for truly unknown requests
This improves UX by making approval actions idempotent once pairing is complete.1 parent 7048906 commit a1c77bb
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
816 | 817 | | |
817 | 818 | | |
818 | 819 | | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
819 | 824 | | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
820 | 832 | | |
821 | 833 | | |
822 | 834 | | |
| |||
0 commit comments