Phoenix Prediction Docs

Testing

Wallet integration cases to verify before production

Run these cases before enabling production traffic.

Debit Cases

CaseExpected result
Valid debitBalance decreases once and Phoenix accepts the bet
Duplicate debit tx_idBalance is not decreased again
Insufficient fundsHTTP 200, type: "ERROR", code: "insufficient_funds"
Invalid signatureHTTP 401, no balance change
Malformed bodyHTTP 400 or safe validation error, no balance change

Credit Cases

CaseExpected result
Winner creditBalance increases by settlement amount
Loser credit with amount: 0Settlement is recorded, balance unchanged
Duplicate credit tx_idBalance is not increased again
Temporary 5xxPhoenix retries and later succeeds
Invalid signatureHTTP 401, no balance change

Rollback Cases

CaseExpected result
Valid rollbackOriginal debit is refunded
Duplicate rollback tx_idRefund is not applied again
Rollback without matching debitReturn a clear safe error or no-op according to your ledger policy

Launch Cases

Test wallet behavior together with iframe launch:

  • Visitor can browse but cannot place a bet.
  • Player can place a bet after token upgrade.
  • Token refresh keeps the session alive.
  • Deposit flow returns focus to the iframe.
  • Phoenix signature verification passes in staging.

On this page