From 5d0e4e65d10076fd6bccc4d15a705cd3651910a6 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sat, 7 Mar 2026 12:14:29 -0800 Subject: [PATCH 1/9] Fix fiat pipe --- frontend/src/app/shared/pipes/fiat-currency.pipe.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/frontend/src/app/shared/pipes/fiat-currency.pipe.ts b/frontend/src/app/shared/pipes/fiat-currency.pipe.ts index ffaef26d3..b3f3cb193 100644 --- a/frontend/src/app/shared/pipes/fiat-currency.pipe.ts +++ b/frontend/src/app/shared/pipes/fiat-currency.pipe.ts @@ -21,17 +21,7 @@ export class FiatCurrencyPipe implements PipeTransform { } transform(num: number, ...args: any[]): unknown { - const digits = args[0] || 1; const currency = args[1] || this.currency || 'USD'; - - if (Math.abs(num) >= 1000) { - // Check if decimals are exactly 0 - if (num % 1 === 0) { - return new Intl.NumberFormat(this.locale, { style: 'currency', currency, maximumFractionDigits: 0 }).format(num); - } - return new Intl.NumberFormat(this.locale, { style: 'currency', currency, minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(num); - } else { - return new Intl.NumberFormat(this.locale, { style: 'currency', currency }).format(num); - } + return new Intl.NumberFormat(this.locale, { style: 'currency', currency }).format(num); } } From c756522bcdc2eebfc3ee50d193ec77040f5e09b2 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sat, 7 Mar 2026 12:40:39 -0800 Subject: [PATCH 2/9] Make calculator formatting based on locale settings --- .../calculator/calculator.component.ts | 41 ++++++++++++++++--- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/components/calculator/calculator.component.ts b/frontend/src/app/components/calculator/calculator.component.ts index d38039d37..bb54ef7b8 100644 --- a/frontend/src/app/components/calculator/calculator.component.ts +++ b/frontend/src/app/components/calculator/calculator.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; +import { ChangeDetectionStrategy, Component, Inject, LOCALE_ID, OnInit } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; import { combineLatest, Observable } from 'rxjs'; import { map, switchMap } from 'rxjs/operators'; @@ -20,12 +20,14 @@ export class CalculatorComponent implements OnInit { form: FormGroup; currentPrice = 0; isMaxSupply = false; + currentCurrency = 'USD'; currency$ = this.stateService.fiatCurrency$; price$: Observable; lastFiatPrice$: Observable; constructor( + @Inject(LOCALE_ID) private locale: string, private stateService: StateService, private formBuilder: FormBuilder, private websocketService: WebsocketService, @@ -47,6 +49,7 @@ export class CalculatorComponent implements OnInit { this.price$ = this.currency$.pipe( switchMap((result) => { currency = result; + this.currentCurrency = result; return this.stateService.conversions$.asObservable(); }), map((conversions) => { @@ -132,8 +135,11 @@ export class CalculatorComponent implements OnInit { if (name === 'bitcoin' && this.countDecimals(sanitizedValue) > 8) { sanitizedValue = this.toFixedWithoutRounding(sanitizedValue, 8); } - if (name === 'fiat' && this.countDecimals(sanitizedValue) > 2) { - sanitizedValue = this.toFixedWithoutRounding(sanitizedValue, 2); + if (name === 'fiat') { + const decimals = this.getCurrencyDecimals(); + if (this.countDecimals(sanitizedValue) > decimals) { + sanitizedValue = this.toFixedWithoutRounding(sanitizedValue, decimals); + } } if (sanitizedValue === '') { sanitizedValue = '0'; @@ -176,12 +182,20 @@ export class CalculatorComponent implements OnInit { } formatFiat(num: number): string | number { + // Get the number of decimal places for the current currency + const decimals = this.getCurrencyDecimals(); + + if (decimals === 0) { + return Math.round(num); + } + if (Math.abs(num) >= 1000) { - // For values >= 1000: show 2 decimals, or 0 if whole number + // For values >= 1000: show currency-specific decimals, or 0 if whole number if (num % 1 === 0) { return Math.round(num); } - return (Math.round(num * 100) / 100).toFixed(2); + const factor = Math.pow(10, decimals); + return (Math.round(num * factor) / factor).toFixed(decimals); } if (num % 1 === 0) { return Math.round(num); @@ -190,6 +204,21 @@ export class CalculatorComponent implements OnInit { if (Math.abs(num) < 1 && num !== 0) { return num.toFixed(8); } - return (Math.round(num * 100) / 100).toFixed(2); + const factor = Math.pow(10, decimals); + return (Math.round(num * factor) / factor).toFixed(decimals); + } + + getCurrencyDecimals(): number { + try { + const formatter = new Intl.NumberFormat(this.locale, { + style: 'currency', + currency: this.currentCurrency + }); + const parts = formatter.formatToParts(1.11); + const fractionPart = parts.find(part => part.type === 'fraction'); + return fractionPart ? fractionPart.value.length : 0; + } catch { + return 2; // Default to 2 decimal places + } } } From 0d0e64e1d4b676d515d4693639b044814b453f5d Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sat, 7 Mar 2026 12:41:00 -0800 Subject: [PATCH 3/9] Update calculator tests and add fiat coverage across the app --- .../cypress/e2e/mainnet/calculator.spec.ts | 32 +- .../mainnet/fiat-currency-formatting.spec.ts | 293 ++++++++++++++++++ 2 files changed, 317 insertions(+), 8 deletions(-) create mode 100644 frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts diff --git a/frontend/cypress/e2e/mainnet/calculator.spec.ts b/frontend/cypress/e2e/mainnet/calculator.spec.ts index b09dff154..6866873fe 100644 --- a/frontend/cypress/e2e/mainnet/calculator.spec.ts +++ b/frontend/cypress/e2e/mainnet/calculator.spec.ts @@ -83,22 +83,28 @@ describe('Calculator', () => { }); describe('bitcoin input updates fiat and sats', () => { - it('updates fiat and sats when entering 0.5 BTC', () => { - const expectedFiat = Math.round(MOCK_BTC_PRICE_USD * 0.5 * 100) / 100; - cy.get('input[formControlName="bitcoin"]').clear().type('0.5'); - cy.get('input[formControlName="satoshis"]').invoke('val').should('equal', '50000000'); + it('updates fiat and sats when entering 0.33 BTC', () => { + const expectedFiat = Math.round(MOCK_BTC_PRICE_USD * 0.33 * 100) / 100; // 40740.48 USD + cy.get('input[formControlName="bitcoin"]').clear().type('0.33'); + cy.get('input[formControlName="satoshis"]').invoke('val').should('equal', '33000000'); cy.get('input[formControlName="fiat"]').invoke('val').then((fiatVal) => { const fiat = parseFloat(String(fiatVal).replace(/,/g, '')); expect(fiat).to.equal(expectedFiat); }); + cy.get('.fiat-text').invoke('text').then((text) => { + expect(text.trim()).to.equal('$40,740.48'); + }); }); it('updates fiat and sats when entering 1 sat (0.00000001 BTC)', () => { - const expectedFiat = (MOCK_BTC_PRICE_USD / 100_000_000 * 100 / 100).toFixed(8); + const expectedFiat = (MOCK_BTC_PRICE_USD / 100_000_000 * 100 / 100); cy.get('input[formControlName="bitcoin"]').clear().type('0.00000001'); cy.get('input[formControlName="satoshis"]').invoke('val').should('equal', '1'); cy.get('input[formControlName="fiat"]').invoke('val').then((fiatVal) => { - expect(String(fiatVal)).to.equal(expectedFiat); + expect(String(fiatVal)).to.equal(String(expectedFiat)); + }); + cy.get('.fiat-text').invoke('text').then((text) => { + expect(text.trim()).to.equal('$0.00'); }); }); }); @@ -220,6 +226,9 @@ describe('Calculator', () => { cy.get('.symbol').invoke('text').then((text) => { expect(text.replace(/,/g, '')).to.include(String(MOCK_BTC_PRICE_JPY)); }); + cy.get('.fiat-text').invoke('text').then((text) => { + expect(text.trim()).to.equal('¥11,057,757'); + }); }); it('displays 1 BTC with correct sats and fiat in JPY', () => { @@ -234,13 +243,17 @@ describe('Calculator', () => { }); it('updates fiat and sats when entering 0.5 BTC in JPY', () => { - const expectedFiat = Math.round(MOCK_BTC_PRICE_JPY * 0.5 * 100) / 100; + const expectedFiat = Math.round(MOCK_BTC_PRICE_JPY * 0.5) cy.get('input[formControlName="bitcoin"]').clear().type('0.5'); cy.get('input[formControlName="satoshis"]').invoke('val').should('equal', '50000000'); cy.get('input[formControlName="fiat"]').invoke('val').then((fiatVal) => { const fiat = parseFloat(String(fiatVal).replace(/,/g, '')); expect(fiat).to.equal(expectedFiat); }); + cy.get('.fiat-text').invoke('text').then((text) => { + expect(text.trim()).to.equal('¥5,528,879'); + }); + }); it('updates BTC and sats when entering fiat value in JPY', () => { @@ -258,13 +271,16 @@ describe('Calculator', () => { it('updates BTC and fiat when entering 10000 sats in JPY', () => { const satsAmount = 10000; - const expectedFiat = Math.round((satsAmount / 100_000_000) * MOCK_BTC_PRICE_JPY * 100) / 100; + const expectedFiat = Math.round((satsAmount / 100_000_000) * MOCK_BTC_PRICE_JPY); cy.get('input[formControlName="satoshis"]').clear().type(String(satsAmount)); cy.get('input[formControlName="bitcoin"]').invoke('val').should('equal', '0.00010000'); cy.get('input[formControlName="fiat"]').invoke('val').then((fiatVal) => { const fiat = parseFloat(String(fiatVal).replace(/,/g, '')); expect(fiat).to.equal(expectedFiat); }); + cy.get('.fiat-text').invoke('text').then((text) => { + expect(text.trim()).to.equal('¥1,106'); + }); }); }); diff --git a/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts b/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts new file mode 100644 index 000000000..648c6a29e --- /dev/null +++ b/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts @@ -0,0 +1,293 @@ +const baseModule = Cypress.env('BASE_MODULE'); + +// Helper to select "Fiat" from the BTC/sats/Fiat amount selector dropdown +const selectFiatMode = () => { + cy.get('app-amount-selector').first().scrollIntoView(); + cy.get('app-amount-selector select').first().select('fiat'); +}; + +// Helper to select currency from the fiat selector dropdown +const selectCurrency = (currency: 'USD' | 'JPY') => { + cy.get('app-fiat-selector').first().scrollIntoView(); + cy.get('app-fiat-selector').first().click(); + cy.get('app-fiat-selector select').first().select(currency); +}; + +describe('Fiat Currency Formatting', () => { + + if (baseModule === 'mempool') { + + describe('Dashboard', () => { + beforeEach(() => { + cy.visit('/'); + cy.waitForSkeletonGone(); + selectFiatMode(); + cy.get('.latest-transactions', { timeout: 10000 }).should('exist'); + cy.get('.table-cell-fiat', { timeout: 10000 }).should('have.length.at.least', 1); + }); + + describe('USD formatting', () => { + beforeEach(() => { + selectCurrency('USD'); + }); + + it('displays USD values with correct currency symbol', () => { + cy.get('.table-cell-fiat').eq(1).invoke('text').then((text) => { + const trimmedText = text.trim(); + expect(trimmedText).to.include('$'); + }); + }); + + it('displays USD values with proper decimal format', () => { + cy.get('.table-cell-fiat').eq(1).invoke('text').then((text) => { + const trimmedText = text.trim(); + expect(trimmedText).to.match(/^\$[\d,]+(\.\d{2})?$/); + }); + }); + }); + + describe('JPY formatting', () => { + beforeEach(() => { + selectCurrency('JPY'); + cy.get('.table-cell-fiat').eq(1).should(($el) => { + expect($el.text()).to.include('¥'); + }); + }); + + it('displays JPY values with yen symbol', () => { + cy.get('.table-cell-fiat').eq(1).invoke('text').then((text) => { + const trimmedText = text.trim(); + expect(trimmedText).to.include('¥'); + }); + }); + + it('displays JPY values without decimal places', () => { + cy.get('.table-cell-fiat').eq(1).invoke('text').then((text) => { + const trimmedText = text.trim(); + expect(trimmedText).to.not.match(/\.\d+$/); + }); + }); + + it('formats all JPY values correctly without decimals', () => { + cy.get('.table-cell-fiat').each(($el) => { + const text = $el.text().trim(); + if (text.includes('¥')) { + expect(text).to.not.match(/\.\d+/); + } + }); + }); + }); + + describe('currency switching', () => { + it('correctly formats when switching from USD to JPY', () => { + selectCurrency('USD'); + cy.get('.table-cell-fiat').eq(1).invoke('text').then((usdText) => { + expect(usdText.trim()).to.include('$'); + }); + + selectCurrency('JPY'); + cy.get('.table-cell-fiat').eq(1).should(($el) => { + const text = $el.text().trim(); + expect(text).to.include('¥'); + expect(text).to.not.match(/\.\d+$/); + }); + }); + + it('correctly formats when switching from JPY back to USD', () => { + selectCurrency('JPY'); + cy.get('.table-cell-fiat').eq(1).should(($el) => { + expect($el.text()).to.include('¥'); + }); + + selectCurrency('USD'); + cy.get('.table-cell-fiat').eq(1).should(($el) => { + expect($el.text().trim()).to.include('$'); + }); + }); + }); + }); + + describe('Transaction Page', () => { + beforeEach(() => { + cy.visit('/tx/dd0faea1e9acd5bd812e5130c0912b62d6b63d04bac4558f2e07270ac613a8f2'); + cy.waitForSkeletonGone(); + }); + + it('displays USD fiat values with dollar symbol', () => { + selectCurrency('USD'); + selectFiatMode(); + + cy.get('app-transaction-details .fiat').invoke('text').then((text) => { + expect(text.trim()).to.include('$'); + }); + + cy.get('app-transactions-list .fiat', { timeout: 10000 }).first().invoke('text').then((text) => { + expect(text.trim()).to.include('$'); + }); + }); + + it('displays JPY fiat values without decimals', () => { + selectCurrency('JPY'); + selectFiatMode(); + + + cy.get('app-transaction-details .fiat').invoke('text').then((text) => { + const trimmedText = text.trim(); + expect(trimmedText).to.include('¥'); + expect(trimmedText).to.not.match(/\.\d+/); + }); + + cy.get('app-transactions-list .fiat').first().should(($el) => { + const text = $el.text().trim(); + expect(text).to.include('¥'); + expect(text).to.not.match(/\.\d+/); + }); + }); + }); + + describe('Block Page', () => { + beforeEach(() => { + cy.intercept('/api/v1/blocks/0').as('blocks-0'); + cy.intercept('/api/v1/blocks/10').as('blocks-10'); + cy.intercept('/api/v1/blocks/20').as('blocks-20'); + cy.intercept('/api/txs/outspends*').as('outspends'); + cy.visit('/block/0'); + }); + + it('displays USD fiat values in block reward with dollar symbol', () => { + + selectCurrency('USD'); + selectFiatMode(); + + cy.get(':nth-child(3) > .row > :nth-child(1) .fiat').eq(1).scrollIntoView(); + cy.get('app-amount .fiat').eq(1).scrollIntoView(); + + // transaction details + cy.get(':nth-child(3) > .row > :nth-child(1) .fiat').eq(1).scrollIntoView(); + cy.get(':nth-child(3) > .row > :nth-child(1) .fiat').eq(1).invoke('text').then((text) => { + expect(text.trim()).to.include('$'); + }); + + // block reward + cy.get('app-amount .fiat').eq(1).invoke('text').then((text) => { + expect(text.trim()).to.include('$'); + }); + + }); + + it('displays JPY fiat values without decimals', () => { + selectCurrency('JPY'); + selectFiatMode(); + + cy.get(':nth-child(3) > .row > :nth-child(1) .fiat').eq(1).scrollIntoView(); + cy.get('app-amount .fiat').eq(1).scrollIntoView(); + + cy.get(':nth-child(3) > .row > :nth-child(1) .fiat').eq(1).invoke('text').then((text) => { + expect(text.trim()).to.include('¥'); + expect(text).to.not.match(/\.\d+/); + }); + + // block reward + cy.get('app-amount .fiat').eq(1).scrollIntoView(); + cy.get('app-amount .fiat').first().should(($el) => { + const text = $el.text().trim(); + expect(text).to.include('¥'); + expect(text).to.not.match(/\.\d+/); + }); + }); + }); + + describe('Address Page', () => { + beforeEach(() => { + cy.visit('/address/1wizaAB16Wrua9V58uNvqktyq2LBLtYso'); + }); + + it('displays USD fiat values with dollar symbol', () => { + selectCurrency('USD'); + selectFiatMode(); + cy.get('app-amount .fiat', { timeout: 10000 }).first().invoke('text').then((text) => { + expect(text.trim()).to.include('$'); + }); + }); + + it('displays JPY fiat values without decimals', () => { + selectCurrency('JPY'); + selectFiatMode(); + cy.get('app-amount .fiat').first().should(($el) => { + const text = $el.text().trim(); + expect(text).to.include('¥'); + expect(text).to.not.match(/\.\d+/); + }); + }); + }); + + describe('Calculator Page', () => { + beforeEach(() => { + cy.visit('/tools/calculator'); + cy.waitForSkeletonGone(); + cy.get('input[formControlName="bitcoin"]', { timeout: 10000 }).should('be.visible'); + }); + + it('displays USD price with dollar symbol', () => { + selectCurrency('USD'); + cy.get('.symbol').invoke('text').then((text) => { + expect(text.trim()).to.include('$'); + }); + }); + + it('displays JPY price without decimals after switching currency', () => { + selectCurrency('JPY'); + cy.get('.symbol').should(($el) => { + const text = $el.text().trim(); + expect(text).to.include('¥'); + }); + + // Enter a value in BTC to see the fiat conversion + cy.get('input[formControlName="bitcoin"]').clear().type('1'); + + // Check that the fiat output doesn't have decimals for JPY + cy.get('input[formControlName="fiat"]').should(($el) => { + const value = $el.val() as string; + // JPY should not have decimal places in large values + expect(value).to.not.match(/\.\d+$/); + }); + }); + }); + + describe('Mempool Block Tooltip', () => { + beforeEach(() => { + cy.visit('/'); + cy.waitForSkeletonGone(); + selectFiatMode(); + }); + + it('displays USD fiat values in mempool block', () => { + selectCurrency('USD'); + cy.get('#mempool-block-0').scrollIntoView(); + cy.get('#mempool-block-0').click(); + + cy.waitForSkeletonGone(); + + cy.get('app-mempool-block .fiat').invoke('text').then((text) => { + expect(text.trim()).to.include('$'); + }); + }); + + it('displays JPY fiat values in mempool block', () => { + selectCurrency('JPY'); + cy.get('#mempool-block-0').scrollIntoView(); + cy.get('#mempool-block-0').click(); + + cy.waitForSkeletonGone(); + + cy.get('app-mempool-block .fiat').invoke('text').then((text) => { + expect(text.trim()).to.include('¥'); + expect(text).to.not.match(/\.\d+$/); + }); + }); + }); + + } else { + it.skip(`Tests cannot be run on the selected BASE_MODULE ${baseModule}`); + } +}); From 278b75df5e5e4c09b261ccbaff0f5063da5a5041 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sat, 7 Mar 2026 21:54:22 -0800 Subject: [PATCH 4/9] Address PR feedback --- .../components/calculator/calculator.component.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/components/calculator/calculator.component.ts b/frontend/src/app/components/calculator/calculator.component.ts index bb54ef7b8..5d749bc7b 100644 --- a/frontend/src/app/components/calculator/calculator.component.ts +++ b/frontend/src/app/components/calculator/calculator.component.ts @@ -21,6 +21,7 @@ export class CalculatorComponent implements OnInit { currentPrice = 0; isMaxSupply = false; currentCurrency = 'USD'; + currencyDecimals = 2; currency$ = this.stateService.fiatCurrency$; price$: Observable; @@ -50,6 +51,7 @@ export class CalculatorComponent implements OnInit { switchMap((result) => { currency = result; this.currentCurrency = result; + this.updateCurrencyDecimals(); return this.stateService.conversions$.asObservable(); }), map((conversions) => { @@ -208,17 +210,19 @@ export class CalculatorComponent implements OnInit { return (Math.round(num * factor) / factor).toFixed(decimals); } - getCurrencyDecimals(): number { + private updateCurrencyDecimals(): void { try { const formatter = new Intl.NumberFormat(this.locale, { style: 'currency', currency: this.currentCurrency }); - const parts = formatter.formatToParts(1.11); - const fractionPart = parts.find(part => part.type === 'fraction'); - return fractionPart ? fractionPart.value.length : 0; + this.currencyDecimals = formatter.resolvedOptions().maximumFractionDigits; } catch { - return 2; // Default to 2 decimal places + this.currencyDecimals = 2; // Default to 2 decimal places } } + + getCurrencyDecimals(): number { + return this.currencyDecimals; + } } From 1d09c154acd1538177093c28f29fcfc4ef7a36b8 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sat, 7 Mar 2026 22:15:30 -0800 Subject: [PATCH 5/9] Change block for test --- frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts b/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts index 648c6a29e..89c6cbf11 100644 --- a/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts +++ b/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts @@ -151,7 +151,7 @@ describe('Fiat Currency Formatting', () => { cy.intercept('/api/v1/blocks/10').as('blocks-10'); cy.intercept('/api/v1/blocks/20').as('blocks-20'); cy.intercept('/api/txs/outspends*').as('outspends'); - cy.visit('/block/0'); + cy.visit('/block/100000'); }); it('displays USD fiat values in block reward with dollar symbol', () => { From 63921f0c1ee247d95a0bdf2b175c8238fae219ed Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sun, 8 Mar 2026 09:08:07 -0700 Subject: [PATCH 6/9] Change screen size to force loading the block data --- .../mainnet/fiat-currency-formatting.spec.ts | 1 + frontend/package-lock.json | 241 ------------------ 2 files changed, 1 insertion(+), 241 deletions(-) diff --git a/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts b/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts index 89c6cbf11..7e82dd9b7 100644 --- a/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts +++ b/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts @@ -147,6 +147,7 @@ describe('Fiat Currency Formatting', () => { describe('Block Page', () => { beforeEach(() => { + cy.viewport(1080, 1920); // force taller screen to avoid scrollbars cy.intercept('/api/v1/blocks/0').as('blocks-0'); cy.intercept('/api/v1/blocks/10').as('blocks-10'); cy.intercept('/api/v1/blocks/20').as('blocks-20'); diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 45e88baf7..9a2cdc9df 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -350,22 +350,6 @@ } } }, - "node_modules/@angular-devkit/architect/node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "optional": true, - "peer": true, - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/@angular-devkit/architect/node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -382,20 +366,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/@angular-devkit/architect/node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "optional": true, - "peer": true, - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/@angular-devkit/architect/node_modules/source-map": { "version": "0.7.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", @@ -592,22 +562,6 @@ } } }, - "node_modules/@angular-devkit/build-angular/node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "optional": true, - "peer": true, - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/@angular-devkit/build-angular/node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -682,20 +636,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/@angular-devkit/build-angular/node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "optional": true, - "peer": true, - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/@angular-devkit/build-angular/node_modules/semver": { "version": "7.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", @@ -830,23 +770,6 @@ } } }, - "node_modules/@angular-devkit/schematics/node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/@angular-devkit/schematics/node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -865,21 +788,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/@angular-devkit/schematics/node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/@angular-devkit/schematics/node_modules/source-map": { "version": "0.7.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", @@ -1422,23 +1330,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@angular/cli/node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/@angular/cli/node_modules/cli-cursor": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", @@ -1608,21 +1499,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/@angular/cli/node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/@angular/cli/node_modules/restore-cursor": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", @@ -7075,23 +6951,6 @@ } } }, - "node_modules/@schematics/angular/node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/@schematics/angular/node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -7110,21 +6969,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/@schematics/angular/node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/@schematics/angular/node_modules/source-map": { "version": "0.7.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", @@ -18360,16 +18204,6 @@ "ajv": "^8.0.0" } }, - "chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "optional": true, - "peer": true, - "requires": { - "readdirp": "^4.0.1" - } - }, "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -18380,13 +18214,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==" }, - "readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "optional": true, - "peer": true - }, "source-map": { "version": "0.7.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", @@ -18488,16 +18315,6 @@ "ajv": "^8.0.0" } }, - "chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "optional": true, - "peer": true, - "requires": { - "readdirp": "^4.0.1" - } - }, "debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -18544,13 +18361,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==" }, - "readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "optional": true, - "peer": true - }, "semver": { "version": "7.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", @@ -18627,16 +18437,6 @@ "ajv": "^8.0.0" } }, - "chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "optional": true, - "peer": true, - "requires": { - "readdirp": "^4.0.1" - } - }, "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -18647,13 +18447,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==" }, - "readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "optional": true, - "peer": true - }, "source-map": { "version": "0.7.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", @@ -18951,16 +18744,6 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==" }, - "chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "optional": true, - "peer": true, - "requires": { - "readdirp": "^4.0.1" - } - }, "cli-cursor": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", @@ -19065,13 +18848,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==" }, - "readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "optional": true, - "peer": true - }, "restore-cursor": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", @@ -22113,16 +21889,6 @@ "ajv": "^8.0.0" } }, - "chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "optional": true, - "peer": true, - "requires": { - "readdirp": "^4.0.1" - } - }, "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -22133,13 +21899,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==" }, - "readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "optional": true, - "peer": true - }, "source-map": { "version": "0.7.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", From 01a3e9b54b2efb72dde201aef68ff855c8cd6d60 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sun, 8 Mar 2026 09:11:53 -0700 Subject: [PATCH 7/9] Revert "Change screen size to force loading the block data" This reverts commit 63921f0c1ee247d95a0bdf2b175c8238fae219ed. --- .../mainnet/fiat-currency-formatting.spec.ts | 1 - frontend/package-lock.json | 241 ++++++++++++++++++ 2 files changed, 241 insertions(+), 1 deletion(-) diff --git a/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts b/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts index 7e82dd9b7..89c6cbf11 100644 --- a/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts +++ b/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts @@ -147,7 +147,6 @@ describe('Fiat Currency Formatting', () => { describe('Block Page', () => { beforeEach(() => { - cy.viewport(1080, 1920); // force taller screen to avoid scrollbars cy.intercept('/api/v1/blocks/0').as('blocks-0'); cy.intercept('/api/v1/blocks/10').as('blocks-10'); cy.intercept('/api/v1/blocks/20').as('blocks-20'); diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 9a2cdc9df..45e88baf7 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -350,6 +350,22 @@ } } }, + "node_modules/@angular-devkit/architect/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "optional": true, + "peer": true, + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@angular-devkit/architect/node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -366,6 +382,20 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/@angular-devkit/architect/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "optional": true, + "peer": true, + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@angular-devkit/architect/node_modules/source-map": { "version": "0.7.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", @@ -562,6 +592,22 @@ } } }, + "node_modules/@angular-devkit/build-angular/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "optional": true, + "peer": true, + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@angular-devkit/build-angular/node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -636,6 +682,20 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/@angular-devkit/build-angular/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "optional": true, + "peer": true, + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@angular-devkit/build-angular/node_modules/semver": { "version": "7.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", @@ -770,6 +830,23 @@ } } }, + "node_modules/@angular-devkit/schematics/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@angular-devkit/schematics/node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -788,6 +865,21 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/@angular-devkit/schematics/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@angular-devkit/schematics/node_modules/source-map": { "version": "0.7.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", @@ -1330,6 +1422,23 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/@angular/cli/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@angular/cli/node_modules/cli-cursor": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", @@ -1499,6 +1608,21 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/@angular/cli/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@angular/cli/node_modules/restore-cursor": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", @@ -6951,6 +7075,23 @@ } } }, + "node_modules/@schematics/angular/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@schematics/angular/node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -6969,6 +7110,21 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/@schematics/angular/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@schematics/angular/node_modules/source-map": { "version": "0.7.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", @@ -18204,6 +18360,16 @@ "ajv": "^8.0.0" } }, + "chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "optional": true, + "peer": true, + "requires": { + "readdirp": "^4.0.1" + } + }, "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -18214,6 +18380,13 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==" }, + "readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "optional": true, + "peer": true + }, "source-map": { "version": "0.7.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", @@ -18315,6 +18488,16 @@ "ajv": "^8.0.0" } }, + "chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "optional": true, + "peer": true, + "requires": { + "readdirp": "^4.0.1" + } + }, "debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -18361,6 +18544,13 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==" }, + "readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "optional": true, + "peer": true + }, "semver": { "version": "7.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", @@ -18437,6 +18627,16 @@ "ajv": "^8.0.0" } }, + "chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "optional": true, + "peer": true, + "requires": { + "readdirp": "^4.0.1" + } + }, "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -18447,6 +18647,13 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==" }, + "readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "optional": true, + "peer": true + }, "source-map": { "version": "0.7.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", @@ -18744,6 +18951,16 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==" }, + "chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "optional": true, + "peer": true, + "requires": { + "readdirp": "^4.0.1" + } + }, "cli-cursor": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", @@ -18848,6 +19065,13 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==" }, + "readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "optional": true, + "peer": true + }, "restore-cursor": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", @@ -21889,6 +22113,16 @@ "ajv": "^8.0.0" } }, + "chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "optional": true, + "peer": true, + "requires": { + "readdirp": "^4.0.1" + } + }, "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -21899,6 +22133,13 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==" }, + "readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "optional": true, + "peer": true + }, "source-map": { "version": "0.7.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", From 9c2c86659a9ffd57f4b31cff845f9cfd968c370d Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sun, 8 Mar 2026 09:12:47 -0700 Subject: [PATCH 8/9] Change screen size to force loading the block data --- frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts b/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts index 89c6cbf11..7e82dd9b7 100644 --- a/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts +++ b/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts @@ -147,6 +147,7 @@ describe('Fiat Currency Formatting', () => { describe('Block Page', () => { beforeEach(() => { + cy.viewport(1080, 1920); // force taller screen to avoid scrollbars cy.intercept('/api/v1/blocks/0').as('blocks-0'); cy.intercept('/api/v1/blocks/10').as('blocks-10'); cy.intercept('/api/v1/blocks/20').as('blocks-20'); From 214a4883171fd7232b4fa6abb59c69b79204ecb2 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sun, 8 Mar 2026 09:59:28 -0700 Subject: [PATCH 9/9] Wait for outspends response before assertions --- .../mainnet/fiat-currency-formatting.spec.ts | 69 +++++++------------ 1 file changed, 25 insertions(+), 44 deletions(-) diff --git a/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts b/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts index 7e82dd9b7..90e17d032 100644 --- a/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts +++ b/frontend/cypress/e2e/mainnet/fiat-currency-formatting.spec.ts @@ -156,48 +156,29 @@ describe('Fiat Currency Formatting', () => { }); it('displays USD fiat values in block reward with dollar symbol', () => { - - selectCurrency('USD'); - selectFiatMode(); - - cy.get(':nth-child(3) > .row > :nth-child(1) .fiat').eq(1).scrollIntoView(); - cy.get('app-amount .fiat').eq(1).scrollIntoView(); - - // transaction details - cy.get(':nth-child(3) > .row > :nth-child(1) .fiat').eq(1).scrollIntoView(); - cy.get(':nth-child(3) > .row > :nth-child(1) .fiat').eq(1).invoke('text').then((text) => { - expect(text.trim()).to.include('$'); - }); - - // block reward - cy.get('app-amount .fiat').eq(1).invoke('text').then((text) => { - expect(text.trim()).to.include('$'); - }); - - }); - - it('displays JPY fiat values without decimals', () => { - selectCurrency('JPY'); - selectFiatMode(); - - cy.get(':nth-child(3) > .row > :nth-child(1) .fiat').eq(1).scrollIntoView(); - cy.get('app-amount .fiat').eq(1).scrollIntoView(); - - cy.get(':nth-child(3) > .row > :nth-child(1) .fiat').eq(1).invoke('text').then((text) => { - expect(text.trim()).to.include('¥'); - expect(text).to.not.match(/\.\d+/); - }); - - // block reward - cy.get('app-amount .fiat').eq(1).scrollIntoView(); - cy.get('app-amount .fiat').first().should(($el) => { - const text = $el.text().trim(); - expect(text).to.include('¥'); - expect(text).to.not.match(/\.\d+/); + cy.wait('@outspends').then(() => { + cy.waitUntil(() => cy.get('.fiat').each(($el) => $el.is(':visible') && $el.text().trim().includes('$'))); + selectCurrency('USD'); + selectFiatMode(); + cy.get('.fiat').each(($el) => { + expect($el.text().trim()).to.include('$'); + }); }); }); - }); - + + it('displays JPY fiat values without decimals', () => { + cy.wait('@outspends').then(() => { + cy.waitUntil(() => cy.get('.fiat').each(($el) => $el.is(':visible') && $el.text().trim().includes('$'))); + selectCurrency('JPY'); + selectFiatMode(); + cy.get('.fiat').each(($el) => { + expect($el.text().trim()).to.include('¥'); + expect($el.text().trim()).to.not.match(/\.\d+/); + }); + }); + }) + }); + describe('Address Page', () => { beforeEach(() => { cy.visit('/address/1wizaAB16Wrua9V58uNvqktyq2LBLtYso'); @@ -206,8 +187,8 @@ describe('Fiat Currency Formatting', () => { it('displays USD fiat values with dollar symbol', () => { selectCurrency('USD'); selectFiatMode(); - cy.get('app-amount .fiat', { timeout: 10000 }).first().invoke('text').then((text) => { - expect(text.trim()).to.include('$'); + cy.get('app-amount .fiat', { timeout: 10000 }).each(($el) => { + expect($el.text().trim()).to.include('$'); }); }); @@ -269,8 +250,8 @@ describe('Fiat Currency Formatting', () => { cy.waitForSkeletonGone(); - cy.get('app-mempool-block .fiat').invoke('text').then((text) => { - expect(text.trim()).to.include('$'); + cy.get('app-mempool-block .fiat').each(($el) => { + expect($el.text().trim()).to.include('$'); }); });