From 404fefa1a1558d452e13eb5820fb70068172c9cb Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Mon, 23 Sep 2024 12:31:07 +0300 Subject: [PATCH] Make signer a constant --- src/constants.ts | 2 ++ src/hwProvider.ts | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 1532c81..16744e3 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -7,3 +7,5 @@ export const LEDGER_TX_GUARDIAN_MIN_VERSION = "1.0.22"; export const TRANSACTION_VERSION_WITH_OPTIONS = 2; export const TRANSACTION_OPTIONS_TX_HASH_SIGN = 0b0001; export const TRANSACTION_OPTIONS_TX_GUARDED = 0b0010; + +export const SIGNER = 'ledger'; \ No newline at end of file diff --git a/src/hwProvider.ts b/src/hwProvider.ts index 0732b27..50d3dd6 100644 --- a/src/hwProvider.ts +++ b/src/hwProvider.ts @@ -8,7 +8,8 @@ import { LEDGER_TX_HASH_SIGN_MIN_VERSION, TRANSACTION_OPTIONS_TX_GUARDED, TRANSACTION_OPTIONS_TX_HASH_SIGN, - TRANSACTION_VERSION_WITH_OPTIONS + TRANSACTION_VERSION_WITH_OPTIONS, + SIGNER } from "./constants"; import { ErrNotInitialized } from "./errors"; import { IHWWalletApp } from "./interface"; @@ -368,7 +369,7 @@ export class HWProvider { const message = new Message({ data: Buffer.from(messageToSign.data), address: messageToSign.address ?? Address.fromBech32(this._account.address), - signer: 'ledger', + signer: SIGNER, version: messageToSign.version });