Skip to content

feat(poll): adopt ocp 0.7.0 and flipcash2 0.19.0 contracts - #1065

Merged
bmc08gt merged 4 commits into
mainfrom
chore/sync-contract-ocp-00ea80d0-flipcash2-1897108a
Oct 14, 2026
Merged

bmc08gt merged 4 commits into
mainfrom
chore/sync-contract-ocp-00ea80d0-flipcash2-1897108a

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Pins ocp-client-protocol 0.7.0 (code-payments/ocp-client-protocol#10) and flipcash2-client-protocol 0.19.0 (code-payments/flipcash2-client-protocol#27), both published, through Scripts/bump-contract.sh, one commit per package with its Package.resolved entry.

Adopts the contract changes:

  • ChatMetadata.DmPayment.Action moved to Flipcash_Intent_V1_PaymentAction. TipDmAction and ChatPaymentMetadata were the only users.
  • A poll client: PollService, FlipClient+Poll (createPoll, getPoll, getPolls, vote) and domain models in Models/Poll/Poll.swift. ErrorGetPoll, ErrorGetPolls and ErrorVote map positionally from new result enums; ErrorCreatePoll follows ErrorStartChat so .textModerated carries the flagged category. PollServiceTests and TransportClassificationTests cover the mapping.
  • ChatPaymentMetadata.groupPayment(chatID:), serialized with action .send.
  • CashContent.receiver maps to ConversationMessage.cashReceiverID. It isn't persisted, so a message read back from the store has it as nil.
  • PollWidget gets an explicit case in the widget mapping and still renders as an unrecognized widget. SystemContent.type needs nothing: the app renders fallback_text.

BalanceService doesn't set exclude_per_mint_balances; requests are unchanged. Link previews and MintBalance.quarks aren't mapped yet since nothing reads them.

Wrap CreatePoll, GetPoll, GetPolls and Vote behind FlipClient, with
Poll/PollDefinition/PollState domain types and positional Error* enums.
- DmPayment.Action moved to Intent.PaymentAction
- group payment chat metadata, CashContent.receiver persisted
- poll widget and UserJoined system content fall back as unrecognized
- GetBalances skips the per-mint map, only the core total is read
@bmc08gt
bmc08gt marked this pull request as ready for review October 14, 2026 21:17
@bmc08gt
bmc08gt merged commit 22f78b5 into main Oct 14, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant