You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .supply-chain/install-hooks.allowlist
-1Lines changed: 0 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -15,4 +15,3 @@ classic-level # node-gyp-build for the LevelDB C++ binding (hardhat>@nomicfound
15
15
electron # postinstall downloads the Electron binary tarball for the current platform (direct devDep — required for `yarn dev` and electron-builder)
16
16
keccak # node-gyp-build for the Keccak hash native binding (ethereum-cryptography>keccak + hardhat>keccak — used by ethers v5 for blockchain hashing; install falls back to JS via `|| exit 0` if compile fails)
17
17
secp256k1 # node-gyp-build for the secp256k1 ECC signing binding (ethereum-cryptography>secp256k1 — used by ethers for transaction signing; install falls back to JS via `|| exit 0` if compile fails)
18
-
sharp # libvips-backed image optimizer that Next.js 15 ships as a direct dep for next/image; install/check.js looks for a prebuilt binary for the current platform/libc and falls back to building from source if missing — no network beyond the prebuild fetch
|`infra_failed`| Transient failure (RPC/network/timeout) | Mark `hasInfraFailed`, continue scan to try remaining candidates; schedule short rescan if all fail |
185
-
|`aborted`| Auto-run disabled or sleep detected | Stop processing |
185
+
|`aborted`| Auto-run disabled | Stop processing |
186
+
187
+
`aborted` is returned only when auto-run is actually disabled (`enabledRef.current` is false). Transient gates that fail while auto-run is still enabled — a balance-wait timeout, an interrupted retry backoff — return `infra_failed`, not `aborted`, so a single stalled agent does not pause the whole rotation.
186
188
187
189
The `infra_failed` handling prevents the scanner from permanently rotating the selected agent on a transient failure. Remaining candidates in the current scan cycle are still tried (they may have different staking contracts and sufficient balance), but the selected agent is not replaced as the preferred choice.
Copy file name to clipboardExpand all lines: docs/features/staking-and-rewards.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ The user picks which staking program to use. The view cycles through these state
71
71
72
72
- Default program = `selectedAgentConfig.defaultStakingProgramId` (from `frontend/config/agents.ts`)
73
73
- "Change Configuration" button toggles to list view (`LIST_MANUAL`)
74
-
- List is ordered by `useStakingContracts`: active program first, deprecated programs hidden, filtered by `agentsSupported`
74
+
- List is ordered by `useStakingContracts`: current program first (shown even if deprecated), other deprecated programs hidden, filtered by `agentsSupported`. `currentStakingProgramId` here is the on-chain (subgraph) program falling back to the service-stored `staking_program_id` — it never falls back to the agent-config default, so the "Selected" badge can't land on a contract the user never joined (OPE-1841)
75
75
- On selection, `SelectStakingButton` writes the chosen `staking_program_id` to the service config before first deploy
76
76
77
77
### Main page — Staking block
@@ -104,6 +104,8 @@ Two tabs:
104
104
| Epoch countdown |`currentEpochLifetime` from `useStakingDetails`|
105
105
| Stats card | Total rewards earned, current streak |
106
106
107
+
Contract name and stats are both keyed off `useStakingContracts().currentStakingProgramId` (single source — active/subgraph, then service-stored, never the config default), so the header can't name one contract while the stats show another (OPE-1841).
108
+
107
109
"Switch Staking Contract" button → opens SelectStakingPage in migrate mode (see Staking Migration below).
108
110
109
111
**Rewards History tab** (`RewardsHistory.tsx`)
@@ -275,11 +277,13 @@ Derives several status flags from `selectedStakingContractDetails`:
275
277
276
278
### Program ordering (useStakingContracts)
277
279
280
+
`currentStakingProgramId` = subgraph-derived `activeStakingProgramId`, falling back to the service-stored `user_params.staking_program_id`, else `null`. It deliberately does **not** fall back to `defaultStakingProgramId` — the default is not evidence of a stake, and surfacing it as "current" marked contracts the user never joined as "Selected" (OPE-1841).
281
+
278
282
`orderedStakingProgramIds` is built by filtering and sorting available programs:
279
283
280
-
1.Skip deprecated programs
281
-
2. Skip programs that don't support the selected agent type
282
-
3.Place the active staking program first
284
+
1.Place the current staking program first — even if deprecated, so a user staked in a legacy contract can still see it marked as selected
285
+
2. Skip remaining deprecated programs
286
+
3.Skip programs that don't support the selected agent type
283
287
4. Append remaining programs in original order
284
288
285
289
Returns empty array while `isActiveStakingProgramLoaded` is false.
Copy file name to clipboardExpand all lines: frontend/.supply-chain/install-hooks.allowlist
-1Lines changed: 0 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -11,5 +11,4 @@
11
11
# "package # ?" is a TODO, not justification.
12
12
13
13
@parcel/watcher # native fs-watcher prebuild fallback (sass>chokidar transitive); compiles a small N-API binding from source if no prebuilt is shipped for the platform
14
-
sharp # libvips-backed image optimizer that Next.js 15 ships as a direct dep for next/image; install/check.js looks for a prebuilt binary for the current platform/libc and falls back to building from source if missing — no network beyond the prebuild fetch
15
14
unrs-resolver # napi-postinstall stub that prints a platform-mismatch warning if the prebuilt binary's triple doesn't match the host (eslint-config-next>eslint-import-resolver-typescript>unrs-resolver — runs once at install, no network or file mutation beyond stdout)
0 commit comments