A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
ciphermask/ui/helpers/utils/tx-helper.test.js

18 lines
604 B

import { CHAIN_IDS, NETWORK_IDS } from '../../../shared/constants/network';
import txHelper from './tx-helper';
describe('txHelper', () => {
it('always shows the oldest tx first', () => {
const metamaskNetworkId = NETWORK_IDS.MAINNET;
const chainId = CHAIN_IDS.MAINNET;
const txs = {
a: { metamaskNetworkId, time: 3 },
b: { metamaskNetworkId, time: 1 },
c: { metamaskNetworkId, time: 2 },
};
const sorted = txHelper(txs, null, null, metamaskNetworkId, chainId);
expect(sorted[0].time).toStrictEqual(1);
expect(sorted[2].time).toStrictEqual(3);
});
});