Skip to content

feat(flipcash): adopt ocp 0.8.0 and flipcash2 0.20.0 contracts - #1078

Merged
bmc08gt merged 5 commits into
mainfrom
chore/contract-ocp-0.8.0-flipcash2-0.20.0
Oct 19, 2026
Merged

bmc08gt merged 5 commits into
mainfrom
chore/contract-ocp-0.8.0-flipcash2-0.20.0

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Pins ocp-client-protocol 0.8.0 (code-payments/ocp-client-protocol#11) and flipcash2-client-protocol 0.20.0 (code-payments/flipcash2-client-protocol#28), both published. Each pin moved with its Package.resolved entry via Scripts/bump-contract.sh, one commit per package. e3c4224 makes destinationOwner required on multi-payment intents, matching Android.

Adopts the contract changes:

  • SendPublicMultiPayment: IntentMultiTransfer, TransactionService.transferMultiple and Client.transferMultiple. They emit one noPrivacyTransfer per payment, in order, with a shared VerifiedState. IntentMultiTransferTests covers the action list, the metadata, the count limits and duplicate destinations. Decoding the new Metadata case throws unsupportedMetadataType, as publicDistribution does.
  • CommunityService, FlipClient.fetchCommunity(mint:owner:), a Community model and ErrorGetCommunity.
  • ErrorRemoveReaction.cannotRemoveBoosted (raw value 3, appended, so nothing renumbered), ReactionFailure.cannotRemoveBoosted, and ReactionUpdate.Action.boosted, which applies as an add.
  • boostUSD on Reactor/EmojiReaction and the stream reaction update (plus actorBoostUSD), Conversation.holdingsSummary, Activity.boostedReaction, and ChatPaymentMetadata.reactionBoost.

The multi-payment builder doesn't yet match Android's in its inputs or validation. iOS takes destinations and sends destination_owner only when set. Android takes owners, derives the vaults and always sends the owner. Each checks one rule the other doesn't. What goes on the wire agrees. Nothing calls either builder yet.

Left for the feature work: the boost payment flow, sorting by boostUSD, persisting holdingsSummary and boostedReaction (both read nil after a restore from the database), and a Community consumer.

…nges

Build against local client protocol checkouts; pins unchanged.

- ocp: add IntentMultiTransfer for SendPublicMultiPayment (one
  no-privacy transfer per payment) and Client.transferMultiple; handle
  the new Metadata case in IntentMetadata.
- flipcash2: add CommunityService and FlipClient.fetchCommunity for
  GetCommunity.
- Map ReactionUpdate.Action.BOOSTED and
  RemoveReactionResponse.Result.CANNOT_REMOVE_BOOSTED.
- Carry boost_usd on Reactor, EmojiReaction and ReactionUpdate, the chat
  holdings summary, the activity BoostedReaction and the
  ChatMetadata.reaction_boost case.
IntentMultiTransfer.Payment.destinationOwner is now non-optional and is
always written to the SendPublicMultiPayment metadata, since the server
requires it when a destination PRIMARY is auto-opened. Client.transferMultiple
takes a non-optional owner too.

The intent now also rejects a destination owner equal to the source authority
(destinationIsSource) and any payment whose native currency differs from the
verified rate's currency (currencyMismatch, compared case-insensitively).

Tests cover owner presence, appMetadata set/absent, duplicate owner, owner
equal to source authority, destination equal to source vault, mint mismatch,
and currency mismatch.
@bmc08gt
bmc08gt marked this pull request as ready for review October 16, 2026 21:59
Add MultiPaymentIntentVectorTests, which builds IntentMultiTransfer from
multi_payment_intent.json and asserts actions, compact messages, SHA-256,
ed25519 signatures, proto metadata, and the eight rejection cases.

The vectors expect destination == source vault and a repeated destination
owner to be distinct rules from the others, so IntentMultiTransfer.Error
gains duplicateDestinationOwner and a destination equal to the source vault
now throws destinationIsSource instead of duplicateDestination.

Add a repo-root .swift-version containing "xcode" so swiftly resolves to
the Xcode toolchain; a swiftly 6.2.1 toolchain fails to build
FlipcashCore/Package.swift against this Xcode's SDK.
@bmc08gt
bmc08gt merged commit ac4c59c into main Oct 19, 2026
3 checks passed
bmc08gt added a commit that referenced this pull request Oct 19, 2026
* origin/main:
  feat(chat): pick a new group's currency from a full-width row (#1084)
  fix(core): round Decimal.doubleValue correctly (#1082)
  feat(flipcash): adopt ocp 0.8.0 and flipcash2 0.20.0 contracts (#1078)
  chore: bump version to 2026.10.4 (#1086)
  chore: record 2026.10.3 as the production release (#1089)
  ci(release-manifest): record every TestFlight build when it processes (#1088)
  build: update release manifest
  test: stop four retry-only tests failing on a loaded runner (#1087)
  fix: clear the 2026.10.3 release test gate (#1085)
  build: update release manifest
  fix(chat): cap the attach card's corner radius at 40pt on iOS 26 (#1081)
  feat(update): check for an update every time the app returns from the background (#1080)
  build: update release manifest
  chore(chat): log where the inline photo picker flow stops (#1079)
  build: update release manifest
  fix(chat): open the author's profile from the avatar beside a photo (#1077)
  feat(chat): forward a message through the share sheet (#1076)
  feat(chat): draw message links as a message card (#1057)

# Conflicts:
#	FlipcashCoreVectors/Tests/FlipcashCoreVectorsTests/MultiPaymentIntentVectorTests.swift
@bmc08gt
bmc08gt deleted the chore/contract-ocp-0.8.0-flipcash2-0.20.0 branch October 23, 2026 16:07
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