This section will be completed when a published
@stockline/react package ships. Use the hook below against the ABIs until then.regime === 0 is LIVE. DARK is 1. Halted, corporate-action, and sequencer-down revert price() and must disable risk-up actions.
What can go wrong
- Stale hook after a borrow. Refresh on receipt of the tx hash.
- One oracle per book. A multi-stock borrow must AND LIVE across books.
borrowingEnabledis independent of regime. Read both.
borrowingEnabled. Keep repay and add stock enabled in every state. The app copy for a closed market is: Borrowing opens Monday at 09:30. You can still repay or add stock. Prices are paused at Friday’s close. Never a modal.
Multi-stock accounts have one oracle per book. AND the LIVE check across selected books. Read RiskRegistry.book(id).oracle and borrowingEnabled together.
Until @stockline/react ships, copy this hook. Do not invent a second source of truth for numbers. Parameters and Addresses are generated at docs build. Point your constants file at that table.