Skip to content

Commit

Permalink
Upgrade to polkadot/api-v9.2.2 (#209)
Browse files Browse the repository at this point in the history
* Upgrade polkadot packages

* Fetch latest metadata

* Regenerate types

* Ignore init runtime decorate error

* Fix multiple version issue with @polkadot/util/cjs
  • Loading branch information
saboonikhil committed Aug 25, 2022
1 parent 43ae5c5 commit a531d0c
Show file tree
Hide file tree
Showing 7 changed files with 677 additions and 613 deletions.
8 changes: 4 additions & 4 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"author": "Zeitgeist PM <contact@zeitgeist.pm>",
"license": "GPL-3.0",
"dependencies": {
"@polkadot/api": "^8.7.1",
"@polkadot/keyring": "^9.4.1",
"@polkadot/util": "^9.4.1",
"@polkadot/util-crypto": "^9.4.1",
"@polkadot/api": "^9.2.2",
"@polkadot/keyring": "^10.1.4",
"@polkadot/util": "^10.1.4",
"@polkadot/util-crypto": "^10.1.4",
"@zeitgeistpm/type-defs": "^0.7.0",
"@zeitgeistpm/types": "^0.7.0",
"commander": "^7.2.0",
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/src/util/polkadot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const typesFromDefs = (

export const constructApiOptions = (provider: WsProvider) => ({
provider,
noInitWarn: true,
rpc: {
predictionMarkets: {
marketOutcomeShareId: {
Expand Down
4 changes: 2 additions & 2 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"author": "Zeitgeist PM <contact@zeitgeist.pm>",
"license": "GPL-3.0",
"devDependencies": {
"@polkadot/typegen": "8.7.1"
"@polkadot/typegen": "9.2.2"
},
"dependencies": {
"@polkadot/types": "8.7.1",
"@polkadot/types": "9.2.2",
"@zeitgeistpm/type-defs": "^0.7.0",
"axios": "^0.21.1"
},
Expand Down
28 changes: 26 additions & 2 deletions packages/types/src/interfaces/augment-api-errors.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */

import type { ApiTypes } from '@polkadot/api-base/types';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/errors';

import type { ApiTypes, AugmentedError } from '@polkadot/api-base/types';

export type __AugmentedError<ApiType extends ApiTypes> = AugmentedError<ApiType>;

declare module '@polkadot/api-base/types/errors' {
export interface AugmentedErrors<ApiType extends ApiTypes> {
interface AugmentedErrors<ApiType extends ApiTypes> {
advisoryCommittee: {
/**
* Members are already initialized!
Expand Down Expand Up @@ -791,6 +797,20 @@ declare module '@polkadot/api-base/types/errors' {
**/
[key: string]: AugmentedError<ApiType>;
};
styx: {
/**
* Account does not have enough balance to cross.
**/
FundDoesNotHaveEnoughFreeBalance: AugmentedError<ApiType>;
/**
* Account has already crossed.
**/
HasAlreadyCrossed: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
sudo: {
/**
* Sender must be the Sudo account
Expand Down Expand Up @@ -908,6 +928,10 @@ declare module '@polkadot/api-base/types/errors' {
* The pool in question does not exist.
**/
PoolDoesNotExist: AugmentedError<ApiType>;
/**
* A pool balance dropped below the allowed minimum.
**/
PoolDrain: AugmentedError<ApiType>;
/**
* The pool in question is inactive.
**/
Expand Down
98 changes: 82 additions & 16 deletions packages/types/src/interfaces/augment-types.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/types/src/metadata/static-latest.ts

Large diffs are not rendered by default.

Loading

0 comments on commit a531d0c

Please sign in to comment.