Skip to content

Fix receipt totals for mixed priced events#1045

Open
decofe wants to merge 1 commit into
mainfrom
centaur/1780571329-17813-8216
Open

Fix receipt totals for mixed priced events#1045
decofe wants to merge 1 commit into
mainfrom
centaur/1780571329-17813-8216

Conversation

@decofe

@decofe decofe commented Jun 4, 2026

Copy link
Copy Markdown
Member

Summary

  • use priced known-event amounts only when a receipt has any priced events
  • preserve the existing raw total fallback when no event has pricing
  • keep the currency prefix decision aligned with the priced-only total inputs
  • add regression coverage for mixed priced/unpriced totals

Tests

  • corepack pnpm --dir apps/explorer exec vitest run --config vitest.node.config.ts test/known-event-totals.node.test.ts
  • corepack pnpm --dir apps/explorer exec biome check src/routes/_layout/receipt/$hash.tsx src/lib/domain/known-event-totals.ts test/known-event-totals.node.test.ts

Prompted by: @Slokh

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

Bundle Size Report

Metric Size Δ Change
Total 5.1 MB +844.4 KB (+19.5%)
Gzip 1.5 MB +238.7 KB (+19.1%)
Brotli 1.3 MB +209.0 KB (+19.2%)
Chunk changes (>1KB)
Chunk Change
assets/chains.js (removed) -360.7 KB
assets/export-rate-limit.js (removed) -177.3 KB
assets/decodeAbiParameters.js (removed) -71.7 KB
assets/AbiItem.js (removed) -27.1 KB
assets/Bytes.js (removed) -25.8 KB
assets/env.js -9.5 KB
assets/validators.js (removed) -5.1 KB
assets/wagmi.config.js -4.4 KB
assets/readContracts.js (removed) -2.7 KB
assets/_hash.js +1.1 KB
assets/.js +1.6 KB
assets/queryOptions.js +1.9 KB
assets/tokenlist.js +1.9 KB
assets/router.js +2.0 KB
assets/_address.js +2.0 KB
assets/known-event-totals.js (new) +2.5 KB
assets/Address.js +3.4 KB
assets/Errors.js (new) +3.9 KB
assets/call.js +4.2 KB
assets/sha3.js (new) +5.2 KB
...and 12 more

Compared against main branch (baseline from 4/27/2026, 4:02:54 PM)

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

Cloudflare Deployments

App Environment Status Preview
explorer devnet [OK] Deployed View Preview
explorer mainnet [OK] Deployed View Preview
explorer nextfork [OK] Deployed View Preview
explorer testnet [OK] Deployed View Preview
fee-payer devnet [>>] Skipped No changes
fee-payer moderato [>>] Skipped No changes
fee-payer privy [>>] Skipped No changes
og - [>>] Skipped No changes
reth-snapshots-viewer - [>>] Skipped No changes
tempo-snapshots-viewer - [>>] Skipped No changes
tokenlist - [>>] Skipped No changes

@decofe decofe force-pushed the centaur/1780571329-17813-8216 branch from 573b405 to 3ae0a1b Compare June 4, 2026 11:23
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