Skip to content

feat(tipping): honour the recipient's minimum on the tip that opens a DM - #693

Merged
bmc08gt merged 1 commit into
mainfrom
feat/tip-minimum-recipient
Aug 28, 2026
Merged

feat(tipping): honour the recipient's minimum on the tip that opens a DM#693
bmc08gt merged 1 commit into
mainfrom
feat/tip-minimum-recipient

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

A user can set a fee to be written to, but nothing on iOS read it — every tip was measured against the server's regional preset instead. The fee buys the conversation, so it applies to exactly one payment: the tip that opens the DM.

entry no DM yet DM exists
in-chat recipient's fee (regional preset if they charge none) no minimum
tip card / custom amount recipient's fee system minimum

TipFloor holds the two floors — the recipient's fee and the server's regional preset — and enforces the one it was handed, comparing at display precision. SendAmountViewModel.opensTipDM decides which applies, using the rule ConversationScreen.chatExists already draws for a tip DM: the feed holding the locally-derived id. That keeps the decision in one place and adds no network call. The recipient's profile comes from the cache at init, with a best-effort fetch for the in-chat path, which — unlike the tip card path — has no resolved card to have cached one.

Two consequences follow from the rule:

  • The swipe reads "Swipe to Tip" only for the opening payment, and reverts to "Swipe to Send" once the thread exists.
  • A preset chip below the floor isn't offered, and TipFlow.selectedAmount re-checks it, because the recipient's fee resolves after the sheet is already up and a chip never passes through the amount entry.

A fee is restated in the entry currency through USD, the way the rate table is keyed. When either leg has no rate it falls back to the regional preset rather than state a floor in a currency the entry isn't using.

No copy changed — code-android-app#1366 moved Android's wording onto what iOS already shows.

Ports code-payments/code-android-app#1366.

A user can set a fee to be written to, but nothing on iOS read it — every
tip was measured against the server's regional preset instead. The fee buys
the conversation, so it applies to exactly one payment: the tip that opens
the DM.

  entry      | no DM yet                            | DM exists
  -----------|--------------------------------------|-----------------
  in-chat    | recipient's fee, preset if they      | no minimum
             | charge none                          |
  tip card   | recipient's fee                      | system minimum

`TipFloor` holds the two floors and enforces the one it was handed, at
display precision. `SendAmountViewModel.opensTipDM` decides which applies,
using the rule `ConversationScreen.chatExists` already draws for a tip DM —
the feed holding the locally-derived id — so no network call is added.

Two consequences follow. The swipe reads "Swipe to Tip" only for the opening
payment and reverts to "Swipe to Send" afterwards. A preset chip below the
floor is not offered, and `selectedAmount` re-checks it, because the
recipient's fee resolves after the sheet is already up.

A fee is restated in the entry currency through USD, the way the rate table
is keyed. When either leg has no rate it falls back to the regional preset
rather than state a floor in a currency the entry isn't using.

Ports code-android-app#1366.
@bmc08gt bmc08gt self-assigned this Aug 28, 2026
@bmc08gt
bmc08gt merged commit a5a5db5 into main Aug 28, 2026
@bmc08gt
bmc08gt deleted the feat/tip-minimum-recipient branch August 28, 2026 21:27
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