Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Commit

Permalink
Fixes hw-app-tezos to error on empty answer
Browse files Browse the repository at this point in the history
  • Loading branch information
gre committed Sep 7, 2021
1 parent d694b9f commit 6292556
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/hw-app-tezos/src/Tezos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ export default class Tezos {
});
const payload = await this.transport.send(cla, ins, p1, p2, buffer);
const publicKeyLength = payload[0];
if (!publicKeyLength) {
// it seems to be a bug that apps returns empty answer
throw new Error("invalid public key");
}
const publicKey = payload.slice(1, 1 + publicKeyLength);
const res: GetAddressResult = {
publicKey: publicKey.toString("hex"),
Expand Down

0 comments on commit 6292556

Please sign in to comment.