Skip to content

feat(tipping): tip-code payload + TippingCoordinator module - #1117

Merged
bmc08gt merged 1 commit into
code/cashfrom
feat/tipping-coordinator
Jul 22, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
feat/tipping-coordinator

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

What

Updates the tip-card scan code to carry the userID and not the username, which is what it carried in code.

Payload (services/opencode)

  • PayloadKind becomes a sealed interface where each kind owns its own encode/decode. Cash/MultiMintCash share a Payment base; Tip and Unknown are their own.
  • Tip codes now encode the recipient's 16-byte userId at offset 1 (kind 0x02), — replacing the outdated username encoding. No nonce, no rendezvous.
  • OpenCodePayload.encode() / fromList() delegate to the kind; existing when (kind) consumers are unchanged.

Tipping module (apps/flipcash/shared/tipping)

  • New shared module with TippingCoordinator: resolves a user's UserProfile (the current user, or a scanned counterparty) and assembles the scannable Scannable.TipCard — mirroring how the cash screen builds a bill to present.
  • Scannable.TipCard now carries the resolved UserProfile (was username: String); it has no consumers yet on code/cash.

Testing

  • ./gradlew :apps:flipcash:app:assembleDebug — BUILD SUCCESSFUL (built standalone off code/cash)
  • :apps:flipcash:shared:tipping unit tests pass
  • :services:opencode androidTest compiles (userId round-trip + offset assertions)

Port the tip code from the iOS app: PayloadKind becomes a sealed interface
where each kind owns its own encode/decode, and Tip encodes the recipient's
16-byte userId (kind 0x02 at offset 1) instead of a username. OpenCodePayload
delegates encoding to the kind.

Adds the shared/tipping module with a TippingCoordinator that resolves a
user's profile/userId and assembles the scannable Scannable.TipCard, which now
carries the resolved UserProfile.
@github-actions github-actions Bot added type: feature New functionality area: network gRPC, connectivity, API, exchange rates area: build-system Gradle, convention plugins, build-logic labels Jul 22, 2026
@bmc08gt
bmc08gt merged commit 67fea52 into code/cash Jul 22, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the feat/tipping-coordinator branch July 22, 2026 16:41
bmc08gt added a commit that referenced this pull request Jul 24, 2026
Port the tip code from the iOS app: PayloadKind becomes a sealed interface
where each kind owns its own encode/decode, and Tip encodes the recipient's
16-byte userId (kind 0x02 at offset 1) instead of a username. OpenCodePayload
delegates encoding to the kind.

Adds the shared/tipping module with a TippingCoordinator that resolves a
user's profile/userId and assembles the scannable Scannable.TipCard, which now
carries the resolved UserProfile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build-system Gradle, convention plugins, build-logic area: network gRPC, connectivity, API, exchange rates type: feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant