From 169974cbd76495f29fac9d950916e3e9fd7f3fd4 Mon Sep 17 00:00:00 2001 From: Caos Date: Tue, 26 Nov 2024 10:20:52 +0800 Subject: [PATCH] PKG -- [sdk] Fix prefix on payload signatures (#2025) --- packages/sdk/src/encode/encode.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sdk/src/encode/encode.ts b/packages/sdk/src/encode/encode.ts index aaeb7508b..3c9f31408 100644 --- a/packages/sdk/src/encode/encode.ts +++ b/packages/sdk/src/encode/encode.ts @@ -69,7 +69,7 @@ const preparePayloadSignatures = (tx: Transaction) => { return tx.payloadSigs ?.map((sig: Sig) => { return { - signerIndex: signers.get(sig.address) || "", + signerIndex: signers.get(sansPrefix(sig.address)) || "", keyId: sig.keyId, sig: sig.sig, } @@ -116,7 +116,7 @@ const prepareVoucher = (voucher: Voucher) => { const prepareSigs = (sigs: Sig[]) => { return sigs .map(({address, keyId, sig}) => { - return {signerIndex: signers.get(address) || "", keyId, sig} + return {signerIndex: signers.get(sansPrefix(address)) || "", keyId, sig} }) .sort((a, b) => { if (a.signerIndex > b.signerIndex) return 1