API bumps & small block display adjustment (#3025)

* API bumps & small block display adjustment

* Adjust for new multisig metadata

* Staking table badge class
This commit is contained in:
Jaco Greeff 2020-06-22 12:10:56 +02:00 committed by GitHub
parent 951c8c4caf
commit 176c7e9e8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 684 additions and 172 deletions

View File

@ -33,12 +33,12 @@
"afterSign": "electron-builder-notarize"
},
"resolutions": {
"@polkadot/api": "^1.20.0-beta.7",
"@polkadot/api-contract": "^1.20.0-beta.7",
"@polkadot/keyring": "^2.15.0-beta.0",
"@polkadot/types": "^1.20.0-beta.7",
"@polkadot/util": "^2.15.0-beta.0",
"@polkadot/util-crypto": "^2.15.0-beta.0",
"@polkadot/api": "^1.20.0-beta.8",
"@polkadot/api-contract": "^1.20.0-beta.8",
"@polkadot/keyring": "^2.15.1",
"@polkadot/types": "^1.20.0-beta.8",
"@polkadot/util": "^2.15.1",
"@polkadot/util-crypto": "^2.15.1",
"babel-core": "^7.0.0-bridge.0"
},
"scripts": {
@ -80,7 +80,7 @@
"@babel/register": "^7.10.1",
"@babel/runtime": "^7.10.2",
"@pinata/sdk": "^1.1.10",
"@polkadot/dev": "^0.55.10",
"@polkadot/dev": "^0.55.11",
"@polkadot/ts": "^0.3.26",
"@types/bn.js": "^4.11.6",
"@types/chart.js": "^2.9.21",

View File

@ -5,7 +5,7 @@
"version": "0.46.0-beta.44",
"dependencies": {
"@babel/polyfill": "^7.10.1",
"@polkadot/dev": "^0.55.10",
"@polkadot/dev": "^0.55.11",
"@polkadot/react-components": "0.46.0-beta.44",
"electron-updater": "^4.3.1"
},

View File

@ -15,7 +15,7 @@
"dependencies": {
"@babel/polyfill": "^7.10.1",
"@babel/runtime": "^7.10.2",
"@polkadot/dev": "^0.55.10",
"@polkadot/dev": "^0.55.11",
"@polkadot/react-components": "0.46.0-beta.44",
"@polkadot/react-signer": "0.46.0-beta.44",
"query-string": "^6.13.1"

View File

@ -106,15 +106,15 @@ function MultisigApprove ({ className = '', onClose, ongoing, threshold, who }:
? isMultiCall && isCallOverride
? callData
? multiMod.asMulti.meta.args.length === 6
? multiMod.asMulti(threshold, others, multisig.when, callData.toHex(), false, callWeight)
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore (We are doing toHex here since we have a Vec<u8> input)
? multiMod.asMulti(threshold, others, multisig.when, callData.toHex(), false, callWeight)
: multiMod.asMulti(threshold, others, multisig.when, callData)
: null
: multiMod.approveAsMulti.meta.args.length === 5
? multiMod.approveAsMulti(threshold, others, multisig.when, hash, callWeight)
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
? multiMod.approveAsMulti(threshold, others, multisig.when, hash, callWeight)
: multiMod.approveAsMulti(threshold, others, multisig.when, hash)
: multiMod.cancelAsMulti(threshold, others, multisig.when, hash)
: null

View File

@ -12,6 +12,6 @@
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.10.2",
"@polkadot/api-contract": "^1.20.0-beta.7"
"@polkadot/api-contract": "^1.20.0-beta.8"
}
}

View File

@ -8,7 +8,7 @@ import { KeyedEvent } from '../types';
import React from 'react';
import { Link } from 'react-router-dom';
import { HeaderExtended } from '@polkadot/api-derive';
import { AddressMini, Columar, Column, LinkExternal, Table } from '@polkadot/react-components';
import { AddressSmall, Columar, Column, LinkExternal, Table } from '@polkadot/react-components';
import { useApi, useCall } from '@polkadot/react-hooks';
import { formatNumber } from '@polkadot/util';
@ -60,7 +60,7 @@ function BlockByHash ({ className = '', value }: Props): React.ReactElement<Prop
<tr>
<td className='address'>
{getHeader.author && (
<AddressMini value={getHeader.author} />
<AddressSmall value={getHeader.author} />
)}
</td>
<td className='hash overflow'>{getHeader.hash.toHex()}</td>

View File

@ -16,7 +16,7 @@ interface Props {
function Status ({ isElected, numNominators, onlineCount, onlineMessage }: Props): React.ReactElement<Props> {
return (
<td className='together'>
<td className='badge together'>
{isElected && (
<Badge
color='blue'

View File

@ -31,7 +31,7 @@
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-reactive#readme",
"dependencies": {
"@babel/runtime": "^7.10.2",
"@polkadot/api": "^1.20.0-beta.7",
"@polkadot/api": "^1.20.0-beta.8",
"@polkadot/extension-dapp": "^0.26.0-beta.26",
"rxjs-compat": "^6.5.5"
}

View File

@ -11,7 +11,7 @@
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.10.2",
"@polkadot/keyring": "^2.15.0-beta.0",
"@polkadot/keyring": "^2.15.1",
"@polkadot/react-api": "0.46.0-beta.44",
"@polkadot/react-identicon": "^0.54.1",
"@polkadot/react-query": "0.46.0-beta.44",

View File

@ -64,6 +64,8 @@ export default React.memo(styled(AddressSmall)`
}
.nameInfo {
overflow: hidden;
&.withSidebar {
cursor: help;
}

View File

@ -119,14 +119,15 @@ async function wrapTx (api: ApiPromise, currentItem: QueueTx, { isMultiCall, mul
tx = isMultiCall
? api.tx[multiModule].asMulti.meta.args.length === 6
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore (We are doing toHex here since we have a Vec<u8> input)
// We are doing toHex here since we have a Vec<u8> input
? api.tx[multiModule].asMulti(threshold, others, timepoint, tx.method.toHex(), false, weight)
: api.tx[multiModule].asMulti(threshold, others, timepoint, tx.method)
: api.tx[multiModule].approveAsMulti.meta.args.length === 5
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
: api.tx[multiModule].asMulti(threshold, others, timepoint, tx.method)
: api.tx[multiModule].approveAsMulti.meta.args.length === 5
? api.tx[multiModule].approveAsMulti(threshold, others, timepoint, tx.method.hash, weight)
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
: api.tx[multiModule].approveAsMulti(threshold, others, timepoint, tx.method.hash);
}

811
yarn.lock

File diff suppressed because it is too large Load Diff