Skip to content

Commit

Permalink
Make signer a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
arhtudormorar committed Sep 23, 2024
1 parent 5162515 commit 404fefa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
5 changes: 3 additions & 2 deletions src/hwProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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
});

Expand Down

0 comments on commit 404fefa

Please sign in to comment.