@ledgerhq/coin-ton
Version:
16 lines • 913 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const cryptoassets_1 = require("@ledgerhq/cryptoassets");
const logic_1 = require("../../logic");
describe("getSyncHash", () => {
const currency = (0, cryptoassets_1.getCryptoCurrencyById)("ton");
it("should provide a valid hex hash", () => {
// mumurhash is always returning a 32bits uint, so a 4 bytes hexa string
expect((0, logic_1.getSyncHash)(currency, [])).toStrictEqual(expect.stringMatching(/^0x[A-Fa-f0-9]{8}$/));
});
it("should provide a new hash if a token is added to the blacklistedTokenIds", () => {
const token = (0, cryptoassets_1.getTokenById)("ton/jetton/eqcxe6mutqjkfngfarotkot1lzbdiix1kcixrv7nw2id_sds");
expect((0, logic_1.getSyncHash)(currency, [])).not.toEqual((0, logic_1.getSyncHash)(currency, [token.id]));
});
});
//# sourceMappingURL=logic.unit.test.js.map