Skip to content

feature: PiggyCards fixed denomination cards and version bump to 8.5.1#740

Merged
bfoss765 merged 2 commits intofeature/piggycardsfrom
feature/PC-fixed-card-fixes
Dec 3, 2025
Merged

feature: PiggyCards fixed denomination cards and version bump to 8.5.1#740
bfoss765 merged 2 commits intofeature/piggycardsfrom
feature/PC-fixed-card-fixes

Conversation

@bfoss765
Copy link
Copy Markdown
Contributor

Summary

  • Fix PiggyCards fixed denomination gift cards to show all available denominations (e.g., Netflix shows $20, $25, $50 instead of just $25)
  • Display per-card discount instead of highest discount across all cards
  • Show cost message with discount for fixed denomination cards
  • Fix percentage formatting to show decimals when needed (e.g., 13.5% instead of 14%)
  • Bump version to 8.5.1

Changes

DashSpendPayViewModel.swift

  • Aggregate denominations from ALL gift cards returned by PiggyCards API
  • Track discount per denomination using denominationDiscounts dictionary
  • Update savingsFraction when user selects a denomination
  • Fix showCost to display cost message for fixed denomination cards

DashSpendConfirmationDialog.swift

  • Use PercentageFormatter instead of .intValue for discount display

PercentageFormatter.swift

  • Show decimals when percentage value has a fractional part

project.pbxproj

  • Bump MARKETING_VERSION from 8.5.0 to 8.5.1 across all targets

Test plan

  • Verify Netflix shows $20, $25, $50 denomination buttons
  • Verify Amazon shows $50, $100, $500 denomination buttons
  • Verify eBay shows $50, $100, $500 denomination buttons
  • Verify DoorDash shows $50, $100 denomination buttons
  • Verify Uber shows $50, $100 denomination buttons
  • Verify Target shows $50, $100, $500 denomination buttons
  • Verify selecting different denominations updates the discount display
  • Verify cost message appears when denomination is selected
  • Verify percentage shows decimal (e.g., 13.5%) on enter amount screen
  • Verify percentage shows decimal on confirmation dialog

🤖 Generated with Claude Code

bfoss765 and others added 2 commits November 28, 2025 17:29
- Aggregate denominations from ALL gift cards returned by PiggyCards API
  (Netflix, Amazon, eBay, etc. return separate cards per denomination)
- Track discount per denomination instead of using highest discount
- Update savingsFraction when user selects a denomination
- Fix showCost to display cost message for fixed denomination cards
- Update PercentageFormatter to show decimals when value has fraction
- Fix confirmation dialog to use PercentageFormatter instead of intValue

Fixes issues where:
- Only one denomination showed (e.g., Netflix only $25 instead of $20/$25/$50)
- Wrong discount displayed (highest instead of per-card discount)
- Cost message not showing for fixed denomination cards
- Percentages rounded incorrectly (13.5% showing as 14% or 13%)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Nov 29, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/PC-fixed-card-fixes

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@bfoss765 bfoss765 changed the title fix: PiggyCards fixed denomination cards and version bump to 8.5.1 feature: PiggyCards fixed denomination cards and version bump to 8.5.1 Nov 29, 2025
Copy link
Copy Markdown
Contributor

@HashEngineering HashEngineering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bfoss765 bfoss765 merged commit b016167 into feature/piggycards Dec 3, 2025
2 of 3 checks passed
@bfoss765 bfoss765 deleted the feature/PC-fixed-card-fixes branch December 3, 2025 17:00
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.

2 participants