diff --git a/.changeset/nine-planets-burn.md b/.changeset/nine-planets-burn.md new file mode 100644 index 000000000000..bc6640f31830 --- /dev/null +++ b/.changeset/nine-planets-burn.md @@ -0,0 +1,5 @@ +--- +"@ledgerhq/live-common": patch +--- + +fix: hex signature diff --git a/libs/ledger-live-common/src/exchange/platform/transfer/completeExchange.ts b/libs/ledger-live-common/src/exchange/platform/transfer/completeExchange.ts index 71c131d3a233..e78e26089a86 100644 --- a/libs/ledger-live-common/src/exchange/platform/transfer/completeExchange.ts +++ b/libs/ledger-live-common/src/exchange/platform/transfer/completeExchange.ts @@ -182,9 +182,11 @@ const completeExchange = ( * @return {Buffer} The correct format Buffer for AppExchange call. */ function convertSignature(signature: string, exchangeType: ExchangeTypes): Buffer { - return isExchangeTypeNg(exchangeType) - ? Buffer.from(signature, "base64url") - : secp256k1.signatureExport(Buffer.from(signature, "hex")); + if (isExchangeTypeNg(exchangeType)) { + return Buffer.from(signature, "base64url"); + } + if (exchangeType === ExchangeTypes.Sell) return Buffer.from(signature, "hex"); + return secp256k1.signatureExport(Buffer.from(signature, "hex")); } export default completeExchange;