Skip to content

fix(wallet): count all incoming money toward the "Add Money" milestone - #1279

Merged
bmc08gt merged 1 commit into
code/cashfrom
claude/add-money-tutorial-criteria-ac0782
Aug 20, 2026
Merged

fix(wallet): count all incoming money toward the "Add Money" milestone#1279
bmc08gt merged 1 commit into
code/cashfrom
claude/add-money-tutorial-criteria-ac0782

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Problem

The new-user tutorial's Add Money milestone only looked for a completed deposit or on-ramp buy:

metadata LIKE '%...MessageMetadata.DepositedCrypto%' OR
metadata LIKE '%...MessageMetadata.BoughtToken%'

So a user whose money arrived as a tip still saw "Add Money" as an outstanding step — and, because the same flag gates the wallet's 2x2 action grid, those tiles stayed hidden too.

Fix

Widen the criteria to every completed incoming feed entry — a buy, a deposit, or a tip received (ReceivedCrypto). That set is exactly the credit side of the feed, i.e. MessageMetadata.isOutgoing == false.

Swaps stay excluded: a swap debits the source mint rather than bringing new money in, consistent with how isOutgoing already classifies them.

The plumbing is renamed to match what it now measures — hasEverAddedMoney to hasEverReceivedMoney, State.hasAddedMoney to State.hasReceivedMoney. The user-facing TutorialItem.AddMoney label is unchanged.

Tests

New MessageDaoTest (Robolectric + in-memory Room), 7 cases covering the milestone:

  • no messages returns false
  • completed deposit / buy / received tip returns true
  • outgoing-only activity (sent, indirect, withdrawal, sold, swapped, paid) returns false
  • incoming but PENDING returns false
  • flips live as an incoming entry lands

:apps:flipcash:features:balance, :apps:flipcash:shared:transaction-history, and :apps:flipcash:shared:persistence:sources unit tests pass.

The onboarding milestone only looked for a completed deposit or on-ramp buy,
so a user who had been tipped — money that plainly arrived — was still shown
"Add Money" as an outstanding step, and the wallet's action tiles stayed
hidden.

Widen the criteria to every completed *incoming* feed entry: a buy, a deposit,
or a tip received. That is exactly the credit side of the feed
(MessageMetadata.isOutgoing == false). Swaps stay excluded — they debit the
source mint rather than bringing new money in.

Renames the plumbing (hasEverAddedMoney -> hasEverReceivedMoney, State
.hasAddedMoney -> .hasReceivedMoney) to match what it now measures; the
TutorialItem.AddMoney label is unchanged.
@github-actions github-actions Bot added the type: fix Bug fix label Aug 20, 2026
@bmc08gt
bmc08gt merged commit bdcefb6 into code/cash Aug 20, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the claude/add-money-tutorial-criteria-ac0782 branch August 20, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant