mirror of
https://github.com/pezkuwichain/pezkuwi-extension.git
synced 2026-06-11 23:31:07 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user