Added FungiblesApi version 2 (#5687)

* Added FungiblesApi version 2

* Add exception to inspectType
This commit is contained in:
Branislav Kontur
2023-07-17 11:25:44 +03:00
committed by GitHub
parent 47df39e02d
commit a8b38b09d6
2 changed files with 18 additions and 1 deletions
@@ -126,7 +126,9 @@ describe('runtime definitions', (): void => {
for (const [key, { params, type }] of methodsEntries) {
describe(`${key}`, (): void => {
// Applied from runtime, used in Funglibles
if (type !== 'Result<Vec<XcmV3MultiAsset>, FungiblesAccessError>') {
const skipInspectType = type === 'Result<Vec<XcmV3MultiAsset>, FungiblesAccessError>' || type === 'Result<XcmVersionedMultiAssets, FungiblesAccessError>';
if (!skipInspectType) {
it(`output ${type} is known`, (): void => {
expect(() => inspectType(type)).not.toThrow();
});
@@ -19,6 +19,21 @@ export const runtime: DefinitionsCall = {
}
},
version: 1
},
{
methods: {
query_account_balances: {
description: 'Returns the list of all `MultiAsset` that an `AccountId` has',
params: [
{
name: 'account',
type: 'AccountId'
}
],
type: 'Result<XcmVersionedMultiAssets, FungiblesAccessError>'
}
},
version: 2
}
]
};