-
-
Notifications
You must be signed in to change notification settings - Fork 126
fix: coin denomination #4695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
fix: coin denomination #4695
Conversation
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
- 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.
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.
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.
No description provided.