diff --git a/packages/ledger-icrc/src/utils/ledger.utils.ts b/packages/ledger-icrc/src/utils/ledger.utils.ts index b7968d93a..62c3049c5 100644 --- a/packages/ledger-icrc/src/utils/ledger.utils.ts +++ b/packages/ledger-icrc/src/utils/ledger.utils.ts @@ -29,7 +29,7 @@ export const encodeIcrcAccount = ({ const removeLeadingZeros = (text: string): string => text.replace(/^0+/, ""); const subaccountText = removeLeadingZeros( - uint8ArrayToHexString(Uint8Array.from(subaccount)), + uint8ArrayToHexString(Uint8Array.from(subaccount ?? [])), ); if (subaccountText.length === 0) {