Skip to content

Commit e843dc8

Browse files
authored
Merge pull request #1389 from PhilippeR26/Ledger231
feat: handling of Ledger Starknet APP v2.3.1
2 parents d834f1b + 8a4fabb commit e843dc8

File tree

4 files changed

+515
-11
lines changed

4 files changed

+515
-11
lines changed

src/signer/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ export {
88
getLedgerPathBuffer111 as getLedgerPathBuffer,
99
} from './ledgerSigner111';
1010
export { LedgerSigner221, getLedgerPathBuffer221 } from './ledgerSigner221';
11+
export { LedgerSigner231 } from './ledgerSigner231';

src/signer/ledgerSigner221.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export class LedgerSigner221<Transport extends Record<any, any> = any>
134134
const ledgerResponse = await this.signTxV1(det, transactions);
135135
assert(
136136
toBigInt(msgHash) === ledgerResponse.hash,
137-
'The transaction hash calculated by Starknet.js is different from the one calculated by the Ledger.'
137+
'The V1 transaction hash calculated by Starknet.js is different from the one calculated by the Ledger.'
138138
); // probably non compatibility with Cairo 0
139139
return ledgerResponse.signature;
140140
}
@@ -151,7 +151,7 @@ export class LedgerSigner221<Transport extends Record<any, any> = any>
151151
const ledgerResponse = await this.signTxV3(det, transactions);
152152
assert(
153153
toBigInt(msgHash) === ledgerResponse.hash,
154-
'The transaction hash calculated by Starknet.js is different from the one calculated by the Ledger.'
154+
'The V3 transaction hash calculated by Starknet.js is different from the one calculated by the Ledger.'
155155
); // probably non compatibility with Cairo 0
156156
return ledgerResponse.signature;
157157
}

0 commit comments

Comments
 (0)