diff --git a/packages/hardware-trezor/src/transformers/tx.ts b/packages/hardware-trezor/src/transformers/tx.ts index f84751d66d4..1fb735100af 100644 --- a/packages/hardware-trezor/src/transformers/tx.ts +++ b/packages/hardware-trezor/src/transformers/tx.ts @@ -11,7 +11,7 @@ import { mapTxIns } from './txIn'; * this function to the Transformer interface like in the * hardware-ledger package) */ -const ledgerTxTransformer = async ( +const trezorTxTransformer = async ( body: Cardano.TxBody, context: TrezorTxTransformerContext ): Promise> => ({ @@ -36,7 +36,7 @@ export const txToTrezor = async (props: TxToTrezorProps): Promise, context? ) => ({ path: (await resolvePaymentKeyPathForTxIn(txIn, context)) ?? undefined, - prev_hash: Buffer.from(txIn.txId).toString('hex'), + prev_hash: txIn.txId, prev_index: txIn.index }); diff --git a/packages/hardware-trezor/test/transformers/txIn.test.ts b/packages/hardware-trezor/test/transformers/txIn.test.ts index d0eb0ca70d5..fb537ffe5da 100644 --- a/packages/hardware-trezor/test/transformers/txIn.test.ts +++ b/packages/hardware-trezor/test/transformers/txIn.test.ts @@ -29,7 +29,7 @@ describe('tx-inputs', () => { for (const input of txIns) { expect(input).toEqual({ path: knownAddressKeyPath, - prev_hash: Buffer.from(txIn.txId).toString('hex'), + prev_hash: txIn.txId, prev_index: txIn.index }); }