Skip to content

Commit

Permalink
Handle error code 21781
Browse files Browse the repository at this point in the history
  • Loading branch information
filip-neti committed Dec 11, 2024
1 parent e78e5d1 commit 01f622c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib/wallet/LedgerWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ export class LedgerWallet extends BaseWallet {
const version = await this.ledgerApp.getVersion()

if (
version.return_code === 65535 &&
version.error_message.includes('LockedDeviceError') === true
version.return_code === 65535 || version.return_code === 21781
) {
throw new Error('Ledger locked. Please, unlock it.')
}
Expand Down

0 comments on commit 01f622c

Please sign in to comment.