UNPKG

@ledgerhq/coin-tezos

Version:
18 lines (14 loc) 601 B
// SPDX-FileCopyrightText: © 2026 LEDGER SAS // SPDX-License-Identifier: Apache-2.0 import { combine } from './combine' describe('combine', () => { it('concatenates transaction and signature and strips the leading 2 chars', () => { // slice(2) removes the first byte (magic byte) from the concatenated hex string expect(combine('03aabbcc', ['ddeeff'])).toBe('aabbccddeeff') }) it('throws when more than one signature is provided', () => { expect(() => combine('0xdeadbeef', ['0xsig0', '0xsig1'])).toThrow( 'Tezos combine expects exactly one signature, got 2' ) }) })