Skip to content

Commit

Permalink
Update eth-ledger-keyring.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
heisenberg-2077 committed Dec 6, 2024
1 parent 2fcc0e0 commit 1af17f4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/background/service/keyring/eth-ledger-keyring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as ethUtil from 'ethereumjs-util';
import * as sigUtil from 'eth-sig-util';
import TransportWebHID from '@ledgerhq/hw-transport-webhid';
import Transport from '@ledgerhq/hw-transport';
import LedgerEth from '@ledgerhq/hw-app-eth';
import LedgerEth, { ledgerService } from '@ledgerhq/hw-app-eth';
import { is1559Tx } from '@/utils/transaction';
import {
TransactionFactory,
Expand Down Expand Up @@ -317,7 +317,12 @@ class LedgerBridgeKeyring {
const hdPath = await this.unlockAccountByAddress(address);
await this.makeApp(true);
try {
const res = await this.app!.signTransaction(hdPath, rawTxHex);
const resolution = await ledgerService.resolveTransaction(
rawTxHex,
{},
{}
);
const res = await this.app!.signTransaction(hdPath, rawTxHex, resolution);
const newOrMutatedTx = handleSigning(res);
const valid = newOrMutatedTx.verifySignature();
if (valid) {
Expand Down

0 comments on commit 1af17f4

Please sign in to comment.