Repository navigation
Conversation
Select People lists the sender first as "You", unchecked. Checking it splits the entered total one more way and the sender keeps their part, which is always the last share so it never takes a leftover cent. You + 4 on $5.00 pays $1.00 to each of the 4. GroupSendSplit.split takes includesSender, and GroupSendPlan.Pay carries the kept part. The 10 cap, the "Each" label and its "~", and the too-small check count the sender's share; "Send to N People" counts only the members paid, and Confirm still shows the entered total. test-vectors/group-send-split.json is the orchestrator's copy with the includesSender vectors.
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.
Implements "Including yourself" from the group-send spec (code-payments/flipcash-client-orchestrator#83). The sender can check a "You" row on Select People to split the total with themselves and keep their part.
GroupSendSplit.splittakesincludesSender. The sender's part is the last share, so it never takes a leftover cent, andGroupSendPlan.Pay.keptholds it. Onlypartsis paid: You + 4 on $5.00 is aSendPublicMultiPaymentof $1.00 to each of the 4, and You + 1 is aSendPublicPaymentof half.GroupSendPaymentDelegateis unchanged.", and the too-small alert all count the sender's share.$0.01 each" even though both paid parts are 2¢. The fixture has no vector for that case, so a unit test covers it directly.isEvenandsmallestlook at every share, the kept one included, so 5¢ between You and 2 people reads "test-vectors/group-send-split.jsonis copied from the orchestrator branchdocs/group-send-self-share.GroupSendSplitVectorsTestnow checkskeptandsentand runs the 9 newincludesSendervectors.ChatGroupCashLinkTestadds three cases: You + 4 pays four parts and keeps one, You counts toward the 10, and You alone sends nothing.