mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-06-12 10:01:18 +00:00
fix: add AuthorizeCall signed extension for PezkuwiChain transactions
PezkuwiChain requires AuthorizeCall as the first signed extension in all transactions. Without this extension properly configured, transactions fail with "bad signature" errors. Added signedExtensions configuration to: - ApiPromise.create() in Api.tsx - getApi() in StakingAsync.tsx - Test API creation functions This fix enables proper transaction signing for PezkuwiChain mainnet and teyrchains (Asset Hub, People Chain).
This commit is contained in:
@@ -12,9 +12,18 @@ import { useApi } from '@pezkuwi/react-hooks';
|
||||
|
||||
const allEndPoints = createWsEndpoints((k, v) => v?.toString() || k);
|
||||
|
||||
// PezkuwiChain requires AuthorizeCall signed extension for all transactions
|
||||
const PEZKUWI_SIGNED_EXTENSIONS = {
|
||||
AuthorizeCall: {
|
||||
extrinsic: {},
|
||||
payload: {}
|
||||
}
|
||||
};
|
||||
|
||||
export const getApi = async (url: string[]|string) => {
|
||||
const api = await ApiPromise.create({
|
||||
provider: new WsProvider(url)
|
||||
provider: new WsProvider(url),
|
||||
signedExtensions: PEZKUWI_SIGNED_EXTENSIONS
|
||||
});
|
||||
|
||||
await api.isReadyOrError;
|
||||
|
||||
Reference in New Issue
Block a user