mirror of
https://github.com/hanzonet/explore.git
synced 2026-11-02 12:03:14 +00:00
* txn withdrawals page stub * add base page layout * add ConnectWallet alert * save search term in page query param * add links to the new page * add functionality to claim button * combine "Connect wallet" and "Claim" buttons * Refactor rollup configuration to introduce ParentChain structure and deprecate legacy environment variables * handle txn claim * allow to pass array of RPC urls for parent chain config * display token value and completion tx hash * fix csp * write tests for arbitrum l2 txn withdrawals * fix ts * review fixes * update screenshots and hide button if the txn is not confirmed yet
29 lines
883 B
TypeScript
29 lines
883 B
TypeScript
import { Box } from '@chakra-ui/react';
|
|
import React from 'react';
|
|
|
|
import type { OptimisticL2WithdrawalStatus } from 'types/api/optimisticL2';
|
|
|
|
import { ENVS_MAP } from 'playwright/fixtures/mockEnvs';
|
|
import { test, expect } from 'playwright/lib';
|
|
|
|
import TxDetailsWithdrawalStatusOptimistic from './TxDetailsWithdrawalStatusOptimistic';
|
|
|
|
const statuses: Array<OptimisticL2WithdrawalStatus> = [
|
|
'Waiting for state root',
|
|
'Ready for relay',
|
|
'Relayed',
|
|
];
|
|
|
|
statuses.forEach((status) => {
|
|
test(`status="${ status }"`, async({ render, mockEnvs }) => {
|
|
await mockEnvs(ENVS_MAP.optimisticRollup);
|
|
const component = await render(
|
|
<Box p={ 2 }>
|
|
<TxDetailsWithdrawalStatusOptimistic status={ status } l1TxHash="0x7d93a59a228e97d084a635181c3053e324237d07566ec12287eae6da2bcf9456"/>
|
|
</Box>,
|
|
);
|
|
|
|
await expect(component).toHaveScreenshot();
|
|
});
|
|
});
|