mirror of
https://github.com/hanzonet/explore.git
synced 2026-10-30 18:16:57 +00:00
* noves integration * code refactored * PR changes added * Code set up for new proxy 'describeTxs' * minor fix * Rename Novestranslate.ts to NovesTranslate.ts * some quick stuff * partial fixes and commit for changing how useDescribeTxs and txsContent work (new GET endpoint) * Pending PR fixes * tx asset flows pageSize of 50 * PR comments fixes * rename expected api endpoint for the describe_txs endpoint, more accurate and descriptive * one final re-name for api endpoint (make it clear it's an object vs an action) * scrollRef fix * build error fix * design fixes * sub heading fix * Removed pagination in account history * remove duplicate route * updated table theme and icon gap * Removed wrong color in table * removed null validation in page params * updated margin * margin fix * add icons to contracts * Sub-heading interpretation simplified * token alignment fix * tests added for new functions * margin fix * remove divider on mobile asset flows --------- Co-authored-by: NahuelNoves <[email protected]> Co-authored-by: francisco-noves <[email protected]>
49 lines
1.2 KiB
TypeScript
49 lines
1.2 KiB
TypeScript
import * as transactionMock from 'mocks/noves/transaction';
|
|
|
|
import { generateFlowViewData } from './generateFlowViewData';
|
|
|
|
it('creates asset flows items', async() => {
|
|
const result = generateFlowViewData(transactionMock.transaction);
|
|
|
|
expect(result).toEqual(
|
|
[
|
|
{
|
|
action: {
|
|
label: 'Sent',
|
|
amount: '3000',
|
|
flowDirection: 'toRight',
|
|
token: {
|
|
address: '0x1bfe4298796198f8664b18a98640cec7c89b5baa',
|
|
decimals: 18,
|
|
name: 'PQR-Test',
|
|
symbol: 'PQR',
|
|
},
|
|
},
|
|
rightActor: {
|
|
address: '0xdD15D2650387Fb6FEDE27ae7392C402a393F8A37',
|
|
name: null,
|
|
},
|
|
accountAddress: '0xef6595a423c99f3f2821190a4d96fce4dcd89a80',
|
|
},
|
|
{
|
|
action: {
|
|
label: 'Paid Gas',
|
|
amount: '0.000395521502109448',
|
|
flowDirection: 'toRight',
|
|
token: {
|
|
address: 'ETH',
|
|
decimals: 18,
|
|
name: 'ETH',
|
|
symbol: 'ETH',
|
|
},
|
|
},
|
|
rightActor: {
|
|
address: '',
|
|
name: 'Validators',
|
|
},
|
|
accountAddress: '0xef6595a423c99f3f2821190a4d96fce4dcd89a80',
|
|
},
|
|
],
|
|
);
|
|
});
|