Skip to content

Commit 3ef4b58

Browse files
committed
cleanup
1 parent 17a39f6 commit 3ef4b58

4 files changed

Lines changed: 8 additions & 12 deletions

File tree

app/components/Views/UnifiedTransactionsView/UnifiedTransactionsView.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ describe('UnifiedTransactionsView with transactions', () => {
422422
accounts: {
423423
'evm-account-id': {
424424
id: 'evm-account-id',
425-
type: 'eip155:eoa',
425+
type: 'eip155:eoa' as const,
426426
address: ACTIVE_EVM_ADDRESS,
427427
options: {},
428428
methods: [],
@@ -448,7 +448,7 @@ describe('UnifiedTransactionsView with transactions', () => {
448448
from: ACTIVE_EVM_ADDRESS,
449449
to: '0x1111111111111111111111111111111111111111',
450450
value: '0x0',
451-
nonce: 1,
451+
nonce: '0x1',
452452
},
453453
},
454454
],

app/components/Views/UnifiedTransactionsView/helpers/adapters.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ function resolveTransactionMetaType(
2626
return TransactionType.incoming;
2727
}
2828

29-
const data = transaction.methodId?.toLowerCase();
29+
const rawData = transaction.methodId?.toLowerCase();
30+
// Treat '0x' (empty calldata) the same as no methodId, since the API
31+
// returns '0x' for simple ETH sends.
32+
const data = rawData && rawData !== '0x' ? rawData : undefined;
3033

3134
if (data && !transaction.to) {
3235
return TransactionType.deployContract;

app/components/Views/UnifiedTransactionsView/helpers/transformations.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ describe('selectTransactions', () => {
2828
to: otherAddress,
2929
from: address,
3030
...overrides,
31-
} as unknown as V1TransactionByHashResponse);
31+
}) as unknown as V1TransactionByHashResponse;
3232

3333
const buildData = (
3434
transactions: V1TransactionByHashResponse[],
3535
): InfiniteData<V4MultiAccountTransactionsResponse> =>
3636
({
3737
pages: [{ data: transactions } as V4MultiAccountTransactionsResponse],
3838
pageParams: [undefined],
39-
} as InfiniteData<V4MultiAccountTransactionsResponse>);
39+
}) as InfiniteData<V4MultiAccountTransactionsResponse>;
4040

4141
it('transforms transactions into view models with id and transactionMeta', () => {
4242
const tx = buildTransaction();

tests/helpers/swap/bridge-mocks.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,4 @@ export const testSpecificMock: TestSpecificMock = async (
126126
response: BRIDGE_TX_STATUS_COMPLETE,
127127
responseCode: 200,
128128
});
129-
130-
await setupMockRequest(mockServer, {
131-
requestMethod: 'GET',
132-
url: /api\.myx\.finance\/openapi\/gateway\/scan\/market/i,
133-
response: {},
134-
responseCode: 200,
135-
});
136129
};

0 commit comments

Comments
 (0)