From 2663a4259cf4855c67d5339b43190b05c377651b Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Thu, 14 Nov 2019 18:52:01 +0100 Subject: [PATCH 001/308] Bump API, display vested (#1883) * Bump API, display vested * Add isVesting to constants --- package.json | 6 +- packages/app-contracts/package.json | 2 +- packages/react-api/package.json | 2 +- packages/react-components/src/AddressInfo.tsx | 15 +++- packages/react-signer/src/Checks/constants.ts | 1 + yarn.lock | 90 +++++++++---------- 6 files changed, 64 insertions(+), 52 deletions(-) diff --git a/package.json b/package.json index 30f6d844e0b1..7c79b2ded12f 100644 --- a/package.json +++ b/package.json @@ -10,10 +10,10 @@ "packages/*" ], "resolutions": { - "@polkadot/api": "^0.97.0-beta.5", - "@polkadot/api-contract": "^0.97.0-beta.5", + "@polkadot/api": "^0.97.0-beta.8", + "@polkadot/api-contract": "^0.97.0-beta.8", "@polkadot/keyring": "^1.7.0-beta.7", - "@polkadot/types": "^0.97.0-beta.5", + "@polkadot/types": "^0.97.0-beta.8", "@polkadot/util": "^1.7.0-beta.7", "@polkadot/util-crypto": "^1.7.0-beta.7", "babel-core": "^7.0.0-bridge.0", diff --git a/packages/app-contracts/package.json b/packages/app-contracts/package.json index 00920dd3642d..9111823f8852 100644 --- a/packages/app-contracts/package.json +++ b/packages/app-contracts/package.json @@ -11,7 +11,7 @@ "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.7.2", - "@polkadot/api-contract": "^0.97.0-beta.5", + "@polkadot/api-contract": "^0.97.0-beta.8", "@polkadot/react-components": "^0.37.0-beta.82" } } diff --git a/packages/react-api/package.json b/packages/react-api/package.json index edd6f293a89c..3c70596ff72d 100644 --- a/packages/react-api/package.json +++ b/packages/react-api/package.json @@ -31,7 +31,7 @@ "homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-reactive#readme", "dependencies": { "@babel/runtime": "^7.7.2", - "@polkadot/api": "^0.97.0-beta.5", + "@polkadot/api": "^0.97.0-beta.8", "@polkadot/extension-dapp": "^0.14.0-beta.5", "edgeware-node-types": "^1.0.10", "rxjs-compat": "^6.5.3" diff --git a/packages/react-components/src/AddressInfo.tsx b/packages/react-components/src/AddressInfo.tsx index fa7e1def5f2a..29d952db09a6 100644 --- a/packages/react-components/src/AddressInfo.tsx +++ b/packages/react-components/src/AddressInfo.tsx @@ -28,6 +28,7 @@ export interface BalanceActiveType { reserved?: boolean; total?: boolean; unlocking?: boolean; + vested?: boolean; } export interface CryptoActiveType { @@ -60,7 +61,8 @@ const DEFAULT_BALANCES: BalanceActiveType = { redeemable: true, reserved: true, total: true, - unlocking: true + unlocking: true, + vested: true }; const DEFAULT_EXTENDED = { crypto: true, @@ -77,7 +79,7 @@ function skipBalancesIf ({ withBalance = true, withExtended = false }: Props): b return false; } else if (isObject(withBalance)) { // these all pull from the all balances - if (withBalance.available || withBalance.locked || withBalance.reserved || withBalance.total) { + if (withBalance.available || withBalance.locked || withBalance.reserved || withBalance.total || withBalance.vested) { return false; } } else if (isObject(withExtended)) { @@ -254,6 +256,15 @@ function renderBalances (props: Props): React.ReactNode { /> )} + {balancesAll && balanceDisplay.vested && balancesAll.isVesting && ( + <> +