AntFleet

Anatomy · 09a05e58-1

wallet-store exposes setConfig but WalletView keeps walletConfig in local state

lowmaintainability
repo 5149da9d·PR #1·reviewed 2 days ago

The vulnerable code

desktop/renderer/src/stores/wallet-store.ts:41-49

Code snippet unavailable.

The reasoning

Opus

wallet-store exposes setConfig but WalletView keeps walletConfig in local state

lowmaintainabilityhigh
  • desktop/renderer/src/stores/wallet-store.ts:41-49
  • desktop/renderer/src/components/wallet/WalletView.tsx:134-135
The store defines `config` and `setConfig` specifically for wallet config, but WalletView never uses them — it duplicates the same data in local React state via `useState<WalletConfig | null>`. The sidebar and any other consumers that wanted to read caps (e.g., session/per-tx caps) cannot, because the store stays `null`. This is both a maintainability issue (dead API surface) and a real functional gap (sidebar can't show caps even though the model supports it).

Recommendation

Either remove `config`/`setConfig` from the store or have WalletView call `setConfig(configRes)` instead of (or in addition to) the local useState.

GPT-5

Output unavailable for this row.

The agreement

Both frontier models flagged this within the same line range. AntFleet's unanimous gate fired — the finding posted on the PR.

Closure

Tweet thread template

tweet 1 of 8170 / 280

Two frontier models reviewed PR #1 on 5149da9d. Both found this bug: low maintainability: wallet-store exposes setConfig but WalletView keeps walletConfig in local state

tweet 2 of 8135 / 280

The vulnerable code (desktop/renderer/src/stores/wallet-store.ts:41-49): (full snippet at https://www.antfleet.dev/anatomy/09a05e58-1)

tweet 3 of 8280 / 280

What Opus saw: "The store defines `config` and `setConfig` specifically for wallet config, but WalletView never uses them — it duplicates the same data in local React state via `useState<WalletConfig | null>`. The sidebar and any other consumers that wanted to read caps (e.g., …

tweet 4 of 837 / 280

What GPT-5 saw: "Output unavailable"

tweet 5 of 897 / 280

Both flagged the same line range. AntFleet's unanimous gate fired — the finding posted on the PR.

tweet 6 of 893 / 280

The fix landed in commit pending: (view diff at https://www.antfleet.dev/anatomy/09a05e58-1)

tweet 7 of 881 / 280

AntFleet reviews every PR with two frontier models. Only unanimous findings post.

tweet 8 of 877 / 280

Full anatomy + reasoning + diffs: https://www.antfleet.dev/anatomy/09a05e58-1

Paste into X composer one tweet at a time. X has no multi-tweet intent API.

low maintainability: wallet-store exposes setConfig but WalletView keeps walletC… — AntFleet anatomy