- {requestDetails.map(({ name, value, breakWord }) => (
-
-
{name}:
-
- {value}
-
-
- ))}
-
- );
-};
-
-export default RequestDetails;
diff --git a/packages/ui/src/components/pages/Request/RequestTransactionApproval/__tests__/RequestTransactionApproval.spec.tsx b/packages/ui/src/components/pages/Request/RequestTransactionApproval/__tests__/RequestTransactionApproval.spec.tsx
deleted file mode 100644
index e758c5ab..00000000
--- a/packages/ui/src/components/pages/Request/RequestTransactionApproval/__tests__/RequestTransactionApproval.spec.tsx
+++ /dev/null
@@ -1,179 +0,0 @@
-import { defaultNetwork, newWalletErrorResponse, newWalletRequest } from '@coong/base';
-import { WalletRequestMessage } from '@coong/base/types';
-import Keyring from '@coong/keyring';
-import { AccountInfo } from '@coong/keyring/types';
-import { SpyInstance } from '@vitest/spy';
-import {
- initializeKeyring,
- newUser,
- PASSWORD,
- render,
- RouterWrapper,
- screen,
- setupAuthorizedApps,
- UserEvent,
- waitFor,
-} from '__tests__/testUtils';
-import { Mock } from 'vitest';
-import Request from '../../index';
-
-const newPayload = (address: string) => {
- return {
- specVersion: '0x00002490',
- transactionVersion: '0x00000013',
- address,
- blockHash: '0x740c0ff582a5f5ed089a83afe396be64db42486397ee23611811e123a70bd63f',
- blockNumber: '0x00dd836d',
- era: '0xd502',
- genesisHash: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3',
- method: '0x050000004769bbe59968882c1597ec1151621f0193547285125f1c1337371c013ff61f02890700',
- nonce: '0x00000000',
- signedExtensions: [
- 'CheckNonZeroSender',
- 'CheckSpecVersion',
- 'CheckTxVersion',
- 'CheckGenesis',
- 'CheckMortality',
- 'CheckNonce',
- 'CheckWeight',
- 'ChargeTransactionPayment',
- 'PrevalidateAttests',
- ],
- tip: '0x00000000000000000000000000000000',
- version: 4,
- };
-};
-
-describe('RequestTransactionApproval', () => {
- const preloadedState = { app: { seedReady: true, addressPrefix: defaultNetwork.prefix } };
- let windowClose: SpyInstance,
- postMessage: Mock,
- requestUrl: string,
- user: UserEvent,
- requestAccessMessage: WalletRequestMessage,
- account01: AccountInfo,
- keyring: Keyring;
-
- beforeEach(async () => {
- windowClose = vi.spyOn(window, 'close').mockImplementation(() => vi.fn());
-
- postMessage = vi.fn();
- window.opener = { postMessage };
-
- keyring = await initializeKeyring();
- account01 = await keyring.createNewAccount('Account 01', PASSWORD);
-
- requestAccessMessage = newWalletRequest({ name: 'tab/signExtrinsic', body: newPayload(account01.address) });
- const queryParam = new URLSearchParams({
- message: JSON.stringify(requestAccessMessage),
- }).toString();
- requestUrl = `/request?${queryParam}`;
-
- user = newUser();
- });
-
- describe('app is not authorized', () => {
- it('should reject request & close window', async () => {
- render(
-