Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
75f2a6a
feat: implement UI changes
Zishan-7 Oct 1, 2025
e84ad24
integrate API
Zishan-7 Oct 2, 2025
d55e833
feat: add calculate points endpoint
Zishan-7 Oct 2, 2025
47ef1f6
feat: calculate points in txn done flows
Zishan-7 Oct 2, 2025
cb23e54
add confetti
Zishan-7 Oct 2, 2025
50ea224
fix: coderabit suggestions
Zishan-7 Oct 2, 2025
a1b5a6d
fix: use usd amount
Zishan-7 Oct 3, 2025
f55d538
refactor: update queryKey in WithdrawBankPage and SuccessClaimLinkVie…
Zishan-7 Oct 6, 2025
3859b6d
feat: add error screen
Zishan-7 Oct 6, 2025
b6e7861
fix: improve error logging for points data loading
Zishan-7 Oct 6, 2025
9933112
refactor: use utility function to derive initials for transaction avatar
Zishan-7 Oct 6, 2025
115ae03
Merge pull request #1266 from peanutprotocol/feat/points-tier
Zishan-7 Oct 6, 2025
ebd4cf5
pts fixes
Hugo0 Oct 6, 2025
62aebd8
Merge branch 'feat/points-tier' of https://github.com/peanutprotocol/…
Hugo0 Oct 6, 2025
89fe0d3
Merge branch 'feat/points-tier' into feat/points
Hugo0 Oct 8, 2025
b3ce8f7
Merge remote-tracking branch 'origin/peanut-wallet-dev' into feat/points
Hugo0 Oct 8, 2025
e79c4b8
fixed tags
Hugo0 Oct 8, 2025
17c389d
Refactor PointsPage and QRPayPage components to enhance perk function…
Hugo0 Oct 12, 2025
81ec4d3
Merge peanut-wallet-dev into feat/points
Hugo0 Oct 12, 2025
687f16d
Points & Perks fully implemented!
Hugo0 Oct 13, 2025
abb978b
Merge peanut-wallet-dev: integrate SimpleFi with perk system
Hugo0 Oct 13, 2025
4917888
feat: perk system with optimistic claim and exclude dev pages from pr…
Hugo0 Oct 13, 2025
704e983
skip dev pages in prod compile
Hugo0 Oct 13, 2025
aa480e9
docs: clarify KYC optimization safety in payment lock fetch
Hugo0 Oct 13, 2025
eb724c4
hide dev pages in prod
Hugo0 Oct 13, 2025
0a9beb0
changelo
Hugo0 Oct 13, 2025
97f62f6
coderabbit fixes
Hugo0 Oct 14, 2025
b87f956
delete useless docs
Hugo0 Oct 14, 2025
7ef0a79
delete error supressor
Hugo0 Oct 14, 2025
b1f6889
Apply suggestion from @coderabbitai[bot]
Hugo0 Oct 14, 2025
02d0e4b
thx CR autocommit
Hugo0 Oct 14, 2025
1b29d85
fixed PR comments, merging
Hugo0 Oct 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
# @dev Add cursor rules here. This goes in the LLM context window on every query when using cursor.

## Random

- never open SVG files, it crashes you. Only read jpeg, png, gif, or webp.
Copy link
Contributor

Choose a reason for hiding this comment

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

<3

Copy link
Contributor Author

Choose a reason for hiding this comment

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

!

- never run jq command, it crashes you.

## Code quality

- Use explicit imports where possible
- Make a best effort to keep code quality high. Reuse existing components and functions, dont hardcode hacky solutions.
- When making changes, ensure you're not breaking existing functionality, and if there's a risk, explicitly WARN about it.
- If you notice an opportunity to refactor or improve existing code, mention it. DO NOT make any changes you were not explicitly told to do. Only mention the potential change to the user.
- Performance is important. Cache where possible, make sure to not make unnecessary re-renders or data fetching.
- Separate business logic from interface. This is important for readability, debugging and testability.

## Testing

- Where tests make sense, test new code. Especially with fast unit tests.
- tests should live where the code they test is, not in a separate folder

## Documentation

- document major changes in docs.md/CHANGELOG.md
- if you add any other documentation, the best place for it to live is usually docs/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ docs/PR.md

**.patch

PR.md

# dependencies
/node_modules
/.pnp
Expand Down
1 change: 1 addition & 0 deletions WARP.md
29 changes: 29 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Changelog

All notable changes should be documented in this file. Be concise.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- **Points System V2** with tier-based progression (0-4 Tier)
- **QR Payment Perks** with tier-based eligibility and merchant promotions
- Hold-to-claim interaction for perks with progressive screen shake animation
- PWA haptic feedback that intensifies during perk claiming
- Activity feed perk indicators with yellow star icons and strikethrough amounts
- Transaction details "Peanut got you!" banner for claimed perks
- Dev tools page (`/dev/shake-test`) for testing animations and haptics

### Changed
- QR payment flow now fetches payment locks in parallel with KYC checks for latency reduction
- Perk claiming uses optimistic UI updates for instant feedback (claim happens in background)
- Dev pages excluded from production builds for faster compile times
- Removed Points V1 legacy fields from `Account` and `IUserProfile` interfaces

### Fixed
- BigInt type handling in points balance calculations (backend)
Comment on lines +23 to +26
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Promote legacy field removal to a “Removed” section and mark as BREAKING.

Removing Points V1 fields is a breaking change for integrators. Move it out of “Changed”, add a “Removed” section, and note migration impact.

 ## [Unreleased]

 ### Added
@@
 ### Changed
- QR payment flow now fetches payment locks in parallel with KYC checks for latency reduction
- Perk claiming uses optimistic UI updates for instant feedback (claim happens in background)
- Dev pages excluded from production builds for faster compile times
- Removed Points V1 legacy fields from `Account` and `IUserProfile` interfaces
+ QR payment flow now fetches payment locks in parallel with KYC checks to reduce latency
+ Perk claiming uses optimistic UI updates for instant feedback (claim happens in the background)
+ Dev pages excluded from production builds for faster compile times
+
+### Removed
+- [BREAKING] Removed Points V1 legacy fields from `Account` and `IUserProfile` interfaces.
+  - Migration: update consumers to use Points V2 types and fields (e.g., TierInfo, balances). Add a short migration note or link.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In docs/CHANGELOG.md around lines 23 to 26, the removal of Points V1 legacy
fields is currently listed under "Changed" but is a breaking change; move that
bullet to a new "Removed" section and mark it as BREAKING (e.g., add a "Removed"
header above the item and prepend "BREAKING:" or similar to the bullet), and
update the note to mention migration impact for integrators so consumers know
they must adapt to the removal.

- Perk status now correctly reflects `PENDING_CLAIM` vs `CLAIMED` states in activity feed
- Modal focus outline artifacts on initial load
- `crypto.randomUUID` polyfill for older Node.js environments in SSR
80 changes: 0 additions & 80 deletions docs/consultant_feedback.md

This file was deleted.

192 changes: 0 additions & 192 deletions docs/create_new_flow.md

This file was deleted.

39 changes: 0 additions & 39 deletions docs/nextjs_api.md

This file was deleted.

10 changes: 10 additions & 0 deletions instrumentation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
// Polyfill crypto.randomUUID for Node.js SSR (required by DaimoPayProvider)
Copy link
Contributor

Choose a reason for hiding this comment

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

question: what does this have to do with points and perks?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i was getting errors, this solved it

no idea why this isnt an issue in other branches as well

const nodeCrypto = await import('crypto')
if (!globalThis.crypto) {
// @ts-ignore - polyfill for SSR
globalThis.crypto = nodeCrypto.webcrypto
}
if (!globalThis.crypto.randomUUID) {
globalThis.crypto.randomUUID = nodeCrypto.randomUUID
}

await import('./sentry.server.config')
}

Expand Down
Loading
Loading