Skip to content

Conversation

@jlm0
Copy link
Collaborator

@jlm0 jlm0 commented Oct 23, 2025

No description provided.

jlm0 added 20 commits October 22, 2025 15:30
- Reduce panel width from 340-448px to 320-400px for cleaner layout
- Reduce heading size from text-2xl to text-xl (24px → 20px)
- Reduce activity amounts from text-lg to text-base (18px → 16px)
- Reduce body text from text-sm to text-xs (14px → 12px)
- Improves information density while maintaining readability
- Replace mintTokensEvent with manualMintTokensEvent to show only manual mints
- Replace burnEvent with manualBurnEvent to show only manual burns
- This reduces noise by excluding automated mints from payments and automated burns from cash outs
- Updated GraphQL queries, event types, transform logic, and presentation layers
- Regenerated GraphQL types to include new Bendystraw event types

Per Peri and Jango's request to consolidate events and reduce activity feed noise by showing only intentional administrative actions.
- Add "Add NFT Tier" button for project owners and revnet operators
- Show "Create NFT Rewards" button in empty state for authorized users
- Permission check: project owner OR revnet operator can access
- Button navigates to /settings/nfts for NFT management
- Foundation for future NFT shop/store organization features

Per Jango's request to provide quicker entry point for project owners to post new NFTs for sale.
- Replace hardcoded '/settings/nfts' with useSettingsPagePath('nfts')
- Ensures proper routing like /v5/op:9/settings/nfts instead of /settings/nfts
- Adds null check for nftSettingsPath before rendering buttons
- Add logoUri to activityEvents GraphQL query
- Pass projectLogoUri through event transformation pipeline
- Use logoUri from Bendystraw API instead of Supabase fallback
- Ensures correct project logos display for both testnet and mainnet events
- Only include twitterCreator field when metadata.twitter exists
- Fixes Next.js serialization error for projects without Twitter metadata
- Affects base:5, base:6, base:9 and other projects missing twitter field
- Store panel open/closed state in localStorage
- Initialize from localStorage on mount
- Defaults to open if no previous state exists
- State persists when navigating between pages (home, explore, etc.)
- Add project token, currency, and decimals fields to activityEvents GraphQL query
- Pass currency info through event transformation pipeline
- Add currency symbol mapping for USDC (Base) and ETH
- Update protocol activity and project activity displays to show correct currency
- Fixes base:6 Artizen and other USDC projects showing "ETH" instead of "USDC"
- Currency field in GraphQL is stored as bigint, not hex string
- Convert bigint to 0x-prefixed hex address format (40 chars padded)
- Normalize address to lowercase for case-insensitive lookup
- Ensures USDC address 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 is properly detected
- Currency field is an ID/enum (e.g., 3181390099), not token address
- Token field contains the actual token address already in hex format
- For Artizen: token="0x833589fcd6edb6e08f4c7c32d4f71b54bda02913" (USDC)
- Verified against actual Bendystraw API response for base:6
- Add decimals parameter to formatActivityAmount (default 18)
- Use formatUnits with project decimals instead of fromWad
- Pass projectDecimals through protocol and project activity displays
- Fixes USDC amounts showing as 0.0000 instead of proper values like 1.00 USDC
- Add token and decimals fields to Project GraphQL query
- Pass projectToken and projectDecimals through useV4V5ProjectHeader
- Convert USDC volume from token decimals (6) to WAD (18) for display
- Treat USDC volume as USD (1 USDC ≈ $1 USD)
- Fixes total raised showing $0 for USDC projects like base:6 Artizen

Note: volumeUsd from Bendystraw is "0" for non-ETH tokens because
it only converts ETH to USD. For USDC, we calculate USD directly
from the volume field which is stored in token decimals.
…C projects

- Add formatVolumeValue helper to convert from token decimals to float
- Return projectToken and projectDecimals from useV4V5ProjectTimeline hook
- Pass token/decimals through VolumeChart to TimelineChart
- Display correct currency symbol (USDC vs ETH) on Y-axis and tooltips
- Update V4V5AnalyticsPanel to pass token info to all charts
- Fixes analytics showing nearly $0 for USDC projects like base:6 Artizen

Analytics charts (Volume, In Juicebox, Trending) now show correct values
and currency symbols for non-ETH tokens.
… USDC projects

- Create formatCurrencyAmount utility with currency symbol mapping
- Query project token and decimals in useV4V5TreasuryStats hook
- Use formatCurrencyAmount for USDC, keep AmountInCurrency for ETH
- Update all treasury displays: total balance, surplus, available to payout
- Update per-chain balance display in V4V5PayoutsSubPanel
- Fixes Rulesets & Funds showing "ETH 0.00001" instead of "USDC 1,234.56"

All currency amounts now display correctly for both ETH and USDC-based projects.
SDK hooks (useSuckersNativeTokenBalance, useSuckersNativeTokenSurplus)
return balances in wei format (18 decimals) regardless of the token's
native decimals. Updated formatCurrencyAmount calls to use 18 decimals
instead of projectDecimals for correct display.

Fixes Rulesets & Funds showing 0 USDC instead of actual balance.
…ting in V4V5PayoutsSubPanel to use project decimals
The caller field is not present in all event types (e.g., manualBurnEvent),
so it needs to be optional. Fallback to the 'from' address when caller is undefined.
@jlm0 jlm0 changed the title fix: balance handling fix: coin denomination Oct 24, 2025
jlm0 added 3 commits October 23, 2025 19:25
Replace the generic zero address (0x00...00) with the official Juicebox
ETH token address (0x00...eeee) from JBTokens.sol in currency mappings.
This ensures consistency with Juicebox protocol standards across the app.
Replace hardcoded Base USDC address with USDC_ADDRESSES from juice-sdk-core,
which includes USDC addresses for all supported chains:
- Ethereum mainnet (0xA0b86991...)
- Arbitrum (0xaf88d065...)
- Optimism (0x0b2C639c...)
- Base (0x833589fC...)
- All testnets

This ensures consistent USDC handling across the entire Juicebox ecosystem.
@mejango mejango merged commit a7f640a into dev Oct 24, 2025
3 of 4 checks passed
@mejango mejango deleted the fix-balance-handling branch October 24, 2025 01:51
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.

3 participants