Problem
frontend/script.js keeps the user's positions in memory and mirrors them to sessionStorage
(POSITION_STORAGE_KEY, line ~20). Three consequences follow:
- They vanish.
sessionStorage is cleared when the tab closes. A confirmed on-chain bet
disappears from the dashboard even though it is permanently recorded on Stellar.
- They do not follow the user. Open the site in another browser, or on a phone, and the
position history is empty.
- They can lie. The list is whatever the browser wrote locally, never reconciled against the
chain. A transaction that succeeded on chain but failed to write locally is invisible, and a
stale local entry is never corrected.
The contract exposes the real data: get_bet, get_bet_gross, get_position,
get_user_bet_count, get_market_bettors_page.
Acceptance criteria
Why this is critical
Users cannot reliably see what they own. Combined with the missing claim flow, someone can stake
XLM and end up with no record in the UI that they ever did.
Problem
frontend/script.jskeeps the user's positions in memory and mirrors them tosessionStorage(
POSITION_STORAGE_KEY, line ~20). Three consequences follow:sessionStorageis cleared when the tab closes. A confirmed on-chain betdisappears from the dashboard even though it is permanently recorded on Stellar.
position history is empty.
chain. A transaction that succeeded on chain but failed to write locally is invisible, and a
stale local entry is never corrected.
The contract exposes the real data:
get_bet,get_bet_gross,get_position,get_user_bet_count,get_market_bettors_page.Acceptance criteria
Why this is critical
Users cannot reliably see what they own. Combined with the missing claim flow, someone can stake
XLM and end up with no record in the UI that they ever did.