Skip to content

Commit

Permalink
Fix Equilibrium not building
Browse files Browse the repository at this point in the history
  • Loading branch information
stwiname committed Oct 9, 2023
1 parent 7bc9bfe commit 138b8ac
Showing 1 changed file with 31 additions and 30 deletions.
61 changes: 31 additions & 30 deletions Equilibrium/equilibrium-starter/src/chaintypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,42 @@ import type { OverrideBundleDefinition } from "@polkadot/types/types";

/* eslint-disable sort-keys */

/* Not sure where `equilibrium` comes from so disabling for now */
const definitions: OverrideBundleDefinition = {
derives: {
...equilibrium.instances.balances.reduce(
(all, cur) => ({
...all,
[cur]: {
customAccount: createCustomAccount(cur, (currency: string, api?: ApiInterfaceRx) => {
let assetsEnabled = true;
// derives: {
// ...equilibrium.instances.balances.reduce(
// (all, cur) => ({
// ...all,
// [cur]: {
// customAccount: createCustomAccount(cur, (currency: string, api?: ApiInterfaceRx) => {
// let assetsEnabled = true;

try {
api?.registry.createType('AssetIdInnerType' as any);
} catch (_) {
assetsEnabled = false;
}
// try {
// api?.registry.createType('AssetIdInnerType' as any);
// } catch (_) {
// assetsEnabled = false;
// }

return assetsEnabled ? { 0: u64FromCurrency(currency) } : currency;
})
}
}),
{}
)
},
// return assetsEnabled ? { 0: u64FromCurrency(currency) } : currency;
// })
// }
// }),
// {}
// )
// },

instances: equilibrium.instances,
// instances: equilibrium.instances,

types: [
{
minmax: [0, 264],
types: equilibrium.types
},
{
minmax: [265, undefined],
types: equilibriumNext.types
}
]
// types: [
// {
// minmax: [0, 264],
// types: equilibrium.types
// },
// {
// minmax: [265, undefined],
// types: equilibriumNext.types
// }
// ]
};

export default { typesBundle: { spec: { equilibrum: definitions } } };

0 comments on commit 138b8ac

Please sign in to comment.