Acala upgrade testnet (#3857)
* upgrade acala types * upgrade to acala tc5 * fix lint * delete acala typesspec * use singlequote quotes
This commit is contained in:
parent
509bf04a7d
commit
c08f874962
@ -11,7 +11,7 @@
|
||||
"contributors": [],
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@acala-network/type-definitions": "^0.4.0-beta.4",
|
||||
"@acala-network/type-definitions": "^0.4.0-beta.13",
|
||||
"@babel/runtime": "^7.11.2",
|
||||
"@edgeware/node-types": "^3.0.4",
|
||||
"@laminar/type-definitions": "^0.2.0-beta.141",
|
||||
|
||||
6
packages/apps-config/src/api/bundle/index.ts
Normal file
6
packages/apps-config/src/api/bundle/index.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// Copyright 2017-2020 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import spec from './spec';
|
||||
|
||||
export default { spec };
|
||||
7
packages/apps-config/src/api/bundle/spec/acala.ts
Normal file
7
packages/apps-config/src/api/bundle/spec/acala.ts
Normal file
@ -0,0 +1,7 @@
|
||||
// Copyright 2017-2020 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { typesBundleForPolkadot } from '@acala-network/type-definitions';
|
||||
import { OverrideBundleDefinition } from '@polkadot/types/types';
|
||||
|
||||
export default typesBundleForPolkadot.spec.acala as OverrideBundleDefinition;
|
||||
8
packages/apps-config/src/api/bundle/spec/index.ts
Normal file
8
packages/apps-config/src/api/bundle/spec/index.ts
Normal file
@ -0,0 +1,8 @@
|
||||
// Copyright 2017-2020 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import acala from './acala';
|
||||
|
||||
export default {
|
||||
acala
|
||||
};
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
import typesChain from './chain';
|
||||
import typesSpec from './spec';
|
||||
import typesBundle from './bundle';
|
||||
|
||||
export function getChainTypes (specName: string, chainName: string): Record<string, string | Record<string, unknown>> {
|
||||
return {
|
||||
@ -13,5 +14,6 @@ export function getChainTypes (specName: string, chainName: string): Record<stri
|
||||
|
||||
export {
|
||||
typesChain,
|
||||
typesSpec
|
||||
typesSpec,
|
||||
typesBundle
|
||||
};
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
// Copyright 2017-2020 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import * as acalaDefinitions from '@acala-network/type-definitions';
|
||||
|
||||
import { typesFromDefs } from '../util';
|
||||
|
||||
const acaTypes = typesFromDefs(acalaDefinitions);
|
||||
|
||||
export default acaTypes;
|
||||
@ -1,7 +1,6 @@
|
||||
// Copyright 2017-2020 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import acala from './acala';
|
||||
import canvas from './canvas';
|
||||
import centrifugeChain from './centrifuge-chain';
|
||||
import crab from './crab';
|
||||
@ -28,7 +27,6 @@ import subsocial from './subsocial';
|
||||
export default {
|
||||
Crab: crab,
|
||||
Equilibrium: equilibrium,
|
||||
acala,
|
||||
canvas,
|
||||
'centrifuge-chain': centrifugeChain,
|
||||
crust,
|
||||
|
||||
@ -10,7 +10,7 @@ import React, { useContext, useEffect, useMemo, useState } from 'react';
|
||||
import store from 'store';
|
||||
import ApiPromise from '@polkadot/api/promise';
|
||||
import { setDeriveCache, deriveMapCache } from '@polkadot/api-derive/util';
|
||||
import { typesChain, typesSpec } from '@polkadot/apps-config/api';
|
||||
import { typesChain, typesSpec, typesBundle } from '@polkadot/apps-config/api';
|
||||
import { POLKADOT_DENOM_BLOCK, POLKADOT_GENESIS } from '@polkadot/apps-config/api/constants';
|
||||
import { web3Accounts, web3Enable } from '@polkadot/extension-dapp';
|
||||
import { WsProvider } from '@polkadot/rpc-provider';
|
||||
@ -184,7 +184,7 @@ function Api ({ children, store, url }: Props): React.ReactElement<Props> | null
|
||||
const signer = new ApiSigner(queuePayload, queueSetTxStatus);
|
||||
const types = getDevTypes();
|
||||
|
||||
api = new ApiPromise({ provider, registry, signer, types, typesChain, typesSpec });
|
||||
api = new ApiPromise({ provider, registry, signer, types, typesBundle, typesChain, typesSpec });
|
||||
|
||||
api.on('connected', () => setIsApiConnected(true));
|
||||
api.on('disconnected', () => setIsApiConnected(false));
|
||||
|
||||
21
yarn.lock
21
yarn.lock
@ -12,12 +12,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@acala-network/type-definitions@npm:^0.4.0-beta.4":
|
||||
version: 0.4.0-beta.9
|
||||
resolution: "@acala-network/type-definitions@npm:0.4.0-beta.9"
|
||||
"@acala-network/type-definitions@npm:^0.4.0-beta.13":
|
||||
version: 0.4.0-beta.13
|
||||
resolution: "@acala-network/type-definitions@npm:0.4.0-beta.13"
|
||||
dependencies:
|
||||
"@open-web3/orml-type-definitions": ^0.6.0-beta.19
|
||||
checksum: 61ffc33852ba60efc480a2e7287a3b39cdc1300a9e883582fb91a0b63918c434261f61a030b385ed7dd0a666953ff769747aa9e686176d1e7d1f49092c8d3eb5
|
||||
"@open-web3/orml-type-definitions": ^0.6.0-beta.26
|
||||
checksum: ea440dcdffa0b831bace4ac976c1140d318afa300f08b5941b3341c8ffd235620210775cf8887a3a6b6cf1b9c62c4e2edbbe0039d27af0c431d8e45d9993b8c8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -2019,7 +2019,14 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@open-web3/orml-type-definitions@npm:^0.6.0-beta.19, @open-web3/orml-type-definitions@npm:^0.6.0-beta.6":
|
||||
"@open-web3/orml-type-definitions@npm:^0.6.0-beta.26":
|
||||
version: 0.6.0-beta.26
|
||||
resolution: "@open-web3/orml-type-definitions@npm:0.6.0-beta.26"
|
||||
checksum: 68e4069b6d2bd1bed75e4e2924bac7a338ecb86517c7a5a981db497457158efcabef02f4f8c1a84c8545e39008aa74fb1dbb4cbc34dc8ebaf46b9a848fd25980
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@open-web3/orml-type-definitions@npm:^0.6.0-beta.6":
|
||||
version: 0.6.0-beta.19
|
||||
resolution: "@open-web3/orml-type-definitions@npm:0.6.0-beta.19"
|
||||
checksum: f5c44b4df282a18fa0d7408aae0080c9330494b27fbffb7e4828a2bcfca48acce0ea6caf8a1523bbc0ea2977a814cc95c0da44dd19716728b8a20beaa008847a
|
||||
@ -2319,7 +2326,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@polkadot/apps-config@workspace:packages/apps-config"
|
||||
dependencies:
|
||||
"@acala-network/type-definitions": ^0.4.0-beta.4
|
||||
"@acala-network/type-definitions": ^0.4.0-beta.13
|
||||
"@babel/runtime": ^7.11.2
|
||||
"@edgeware/node-types": ^3.0.4
|
||||
"@laminar/type-definitions": ^0.2.0-beta.141
|
||||
|
||||
Loading…
Reference in New Issue
Block a user