Skip to content

Commit 335921f

Browse files
committed
fix(hardware-ledger): fix signData payload size calculation
At this point payload was already converted to hex. It's not bytes anymore
1 parent 6de7e7e commit 335921f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/hardware-ledger/src/LedgerKeyAgent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ export class LedgerKeyAgent extends KeyAgentBase {
810810
}
811811

812812
async signCip8Data(request: cip8.Cip8SignDataContext): Promise<Cip30DataSignature> {
813-
const hashPayload = request.payload.length >= CIP08_SIGN_HASH_THRESHOLD;
813+
const hashPayload = request.payload.length / 2 >= CIP08_SIGN_HASH_THRESHOLD;
814814
try {
815815
const dRepPublicKey = await this.derivePublicKey(util.DREP_KEY_DERIVATION_PATH);
816816
const dRepKeyHashHex = (await Crypto.Ed25519PublicKey.fromHex(dRepPublicKey).hash()).hex();

0 commit comments

Comments
 (0)