Skip to content

Commit 854b279

Browse files
committed
fix(sdk-coin-icp): validate pubkey only when set
TICKET: WIN-5189
1 parent ac236eb commit 854b279

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/sdk-coin-icp/src/lib/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ export class Utils implements BaseUtils {
347347
throw new ParseTransactionError('Transaction data is missing.');
348348
}
349349
const { senderPublicKeyHex, senderAddress, receiverAddress } = transactionData;
350-
if (!this.isValidPublicKey(senderPublicKeyHex)) {
350+
if (senderPublicKeyHex && !this.isValidPublicKey(senderPublicKeyHex)) {
351351
throw new ParseTransactionError('Sender public key is invalid.');
352352
}
353353
if (!this.isValidAddress(senderAddress)) {

0 commit comments

Comments
 (0)