{"size": 809, "ext": "js", "max_stars_repo_path": "test/tx-data/edit-coin-owner.test.js", "max_stars_repo_name": "MinterTeam/minterjs-tx", "max_stars_repo_stars_event_min_datetime": "2019-03-30T16:10:57.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-28T20:44:05.000Z", "max_issues_repo_path": "test/tx-data/edit-coin-owner.test.js", "max_issues_repo_name": "MinterTeam/minterjs-tx", "max_issues_repo_issues_event_min_datetime": "2019-07-08T11:01:09.000Z", "max_issues_repo_issues_event_max_datetime": "2021-12-01T11:19:58.000Z", "max_forks_repo_path": "test/tx-data/edit-coin-owner.test.js", "max_forks_repo_name": "MinterTeam/minterjs-tx", "max_forks_repo_forks_event_min_datetime": "2019-07-08T10:54:07.000Z", "max_forks_repo_forks_event_max_datetime": "2020-02-25T22:51:01.000Z"}
{"max_stars_count": 7, "max_issues_count": 10, "max_forks_count": 2, "avg_line_length": 33.7083333333, "max_line_length": 104, "alphanum_fraction": 0.5908529048}
import {TxDataEditTickerOwner, coinToBuffer, TxData, TX_TYPE} from '~/src';
import decodeToArray from '../decode-to-array';

describe('TxDataEditTickerOwner', () => {
    const params = {
        symbol: coinToBuffer('MYCOIN'),
        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',
    };

    const serializedTxData = (new TxDataEditTickerOwner(params)).serialize();

    test('rlp encoded fields', () => {
        expect(decodeToArray(serializedTxData))
            .toEqual([
                [77, 89, 67, 79, 73, 78, 0, 0, 0, 0],
                [118, 51, 152, 12, 0, 1, 57, 221, 59, 210, 74, 63, 84, 224, 100, 116, 250, 148, 30, 22],
            ]);
    });

    test('TxData', () => {
        expect(TxData(params, TX_TYPE.EDIT_TICKER_OWNER).serialize()).toEqual(serializedTxData);
    });
});
