fix: add AuthorizeCall user extension to signing registry

Added PEZKUWI_USER_EXTENSIONS with AuthorizeCall to the signing request
registry. This ensures proper transaction signing for PezkuwiChain
networks even when chain metadata is not available.

Without this fix, transactions fail with "bad signature" errors
because the AuthorizeCall extension is not properly included in
the signed payload.
This commit is contained in:
2026-02-02 17:43:29 +03:00
parent a0bd0e2b3f
commit 6e5ff295d9
@@ -39,6 +39,14 @@ export const CMD_SIGN_MESSAGE = 3;
// keep it global, we can and will re-use this across requests
const registry = new TypeRegistry();
// PezkuwiChain requires AuthorizeCall signed extension for all transactions
const PEZKUWI_USER_EXTENSIONS = {
AuthorizeCall: {
extrinsic: {},
payload: {}
}
};
function isRawPayload (payload: SignerPayloadJSON | SignerPayloadRaw): payload is SignerPayloadRaw {
return !!(payload as SignerPayloadRaw).data;
}
@@ -67,7 +75,8 @@ export default function Request ({ account: { accountIndex, addressOffset, genes
payload: null
});
} else {
registry.setSignedExtensions(payload.signedExtensions);
// Always include PezkuwiChain user extensions
registry.setSignedExtensions(payload.signedExtensions, PEZKUWI_USER_EXTENSIONS);
setData({
hexBytes: null,