Skip to content

Commit

Permalink
fix: main patch
Browse files Browse the repository at this point in the history
  • Loading branch information
TarikGul committed Nov 16, 2023
1 parent 1a249a3 commit b5d77c7
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { json } from 'express';

import packageJSON from '../package.json';
import App from './App';
import tempTypesBundle from './overrideTypes/typesBundle';
import { getControllersForSpec } from './chains-config';
import { consoleOverride } from './logging/consoleOverride';
import { Log } from './logging/Log';
Expand All @@ -50,7 +51,7 @@ async function main() {
: new WsProvider(config.SUBSTRATE.URL),
/* eslint-disable @typescript-eslint/no-var-requires */
typesBundle: TYPES_BUNDLE
? (require(TYPES_BUNDLE) as OverrideBundleType)
? (tempTypesBundle as OverrideBundleType)
: undefined,
typesChain: TYPES_CHAIN
? (require(TYPES_CHAIN) as Record<string, RegistryTypes>)
Expand Down
57 changes: 57 additions & 0 deletions src/overrideTypes/typesBundle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import { OverrideBundleDefinition } from "@polkadot/types/types";

const definitionsWestmint: OverrideBundleDefinition = {
types: [
{
minmax: [0, 9434],
types: {
TempAssetId: "Option<AssetId>"
},
},
{
minmax: [9435, undefined],
types: {
TempAssetId: "Option<MultiLocation>"
},
},
],
signedExtensions: {
ChargeAssetTxPayment: {
extrinsic: {
tip: 'Compact<Balance>',
// eslint-disable-next-line sort-keys
assetId: 'TempAssetId'
},
payload: {}
}
}
};

const definitionsStatemine: OverrideBundleDefinition = {
types: [
{
minmax: [0, 9999],
types: {
TempAssetId: "Option<AssetId>"
},
},
{
minmax: [10000, undefined],
types: {
TempAssetId: "Option<MultiLocation>"
},
},
],
signedExtensions: {
ChargeAssetTxPayment: {
extrinsic: {
tip: 'Compact<Balance>',
// eslint-disable-next-line sort-keys
assetId: 'TempAssetId'
},
payload: {}
}
}
};

export default { typesBundle: { spec: { "statemine": definitionsStatemine, "westmint": definitionsWestmint } } };

0 comments on commit b5d77c7

Please sign in to comment.