Repository navigation
feat(chat): show the received bill when cash arrives in the open chat - #1245
Merged
Merged
Conversation
A cash message on the live stream that pays me, in the chat on screen with nothing over it, now presents the received bill (no deposit toast, Put in Wallet stays in the chat). The keyboard is lowered for the bill and raised again when it closes, unless the app was backgrounded. The decision is a pure function in FlipcashCore (ChatCashBill). A second payment is dropped while one bill is preparing or showing. The chat's receive haptic is skipped for the billed message. Behind the Chat Cash Bill beta flag, public and on by default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When someone sends me cash while the chat is open, the received bill now appears over the chat. Until now the cash only landed as a bubble in the thread.
A cash message qualifies when it arrives on the live stream, I am a receiver and not the sender, and the chat is in the foreground with nothing presented over it. That covers 1:1 sends, my share of a group send, tips, request payments and Send Back returns. The amount shown is my share. Catch-up, GetDelta and the initial load never raise a bill.
Chat Cash Billin Beta Features, public and on by default, so it can be turned off.The trigger decision is a pure function in FlipcashCore (
ChatCashBill), withChatCashBillControllerin the app handling phase, keyboard and the bill. A DEBUG-only trigger feeds a synthetic $1.00 payment into the open chat:xcrun simctl spawn <udid> notifyutil -p flipcash.debug.chatCashBill. It is never stored and is compiled out of release builds.The shared spec is
docs/specs/chat-cash-bill.mdin the orchestrator repo.