Commit d2527871 authored by Igor Stuev's avatar Igor Stuev Committed by GitHub

Merge pull request #1840 from blockscout/block-blob-fix

configure blob txs in block details
parents ed6bfac9 d84e7e00
import { test, expect } from '@playwright/experimental-ct-react';
import React from 'react';
import * as blockMock from 'mocks/blocks/block';
import contextWithEnvs from 'playwright/fixtures/contextWithEnvs';
import { test, expect } from 'playwright/lib';
import TestApp from 'playwright/TestApp';
import * as configs from 'playwright/utils/configs';
......@@ -51,7 +51,10 @@ test('genesis block', async({ mount, page }) => {
await expect(component).toHaveScreenshot();
});
test('with blob txs', async({ mount, page }) => {
test('with blob txs', async({ mount, page, mockEnvs }) => {
await mockEnvs([
[ 'NEXT_PUBLIC_DATA_AVAILABILITY_ENABLED', 'true' ],
]);
const query = {
data: blockMock.withBlobTxs,
isPending: false,
......
......@@ -127,7 +127,7 @@ const BlockDetails = ({ query }: Props) => {
</LinkInternal>
);
const blockBlobTxsNum = data.blob_tx_count ? (
const blockBlobTxsNum = (config.features.dataAvailability.isEnabled && data.blob_tx_count) ? (
<>
<span> and </span>
<LinkInternal href={ route({ pathname: '/block/[height_or_hash]', query: { height_or_hash: heightOrHash, tab: 'blob_txs' } }) }>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment