BlockNumber/Index as u32 default (#1493)

* BlockNumber/Index as u32 default

* Adjust message

* Remove extra createType (prefer primitives)

* Bump API

* Bump API, EventRecord injection
This commit is contained in:
Jaco Greeff 2019-08-11 19:33:15 +02:00 committed by GitHub
parent 367229a9bd
commit cb2d0b6bfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 59 additions and 59 deletions

View File

@ -10,10 +10,10 @@
"packages/*"
],
"resolutions": {
"@polkadot/api": "^0.90.0-beta.38",
"@polkadot/api-contract": "^0.90.0-beta.38",
"@polkadot/api": "^0.90.0-beta.40",
"@polkadot/api-contract": "^0.90.0-beta.40",
"@polkadot/keyring": "^1.1.1",
"@polkadot/types": "^0.90.0-beta.38",
"@polkadot/types": "^0.90.0-beta.40",
"@polkadot/util": "^1.1.1",
"@polkadot/util-crypto": "^1.1.1",
"@types/styled-components": "4.1.8",

View File

@ -11,7 +11,7 @@
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.5.5",
"@polkadot/api-contract": "^0.90.0-beta.38",
"@polkadot/api-contract": "^0.90.0-beta.40",
"@polkadot/ui-app": "^0.34.0-beta.117"
}
}

View File

@ -3,11 +3,11 @@
// of the Apache-2.0 license. See the LICENSE file for details.
import { DerivedElectionsInfo } from '@polkadot/api-derive/types';
import { BlockNumber, SetIndex, VoteIndex } from '@polkadot/types/interfaces';
import { ComponentProps as Props } from './types';
import BN from 'bn.js';
import React from 'react';
import { createType } from '@polkadot/types';
import { withCalls } from '@polkadot/ui-api';
import { Button } from '@polkadot/ui-app';
@ -21,10 +21,10 @@ const NULL_INFO: DerivedElectionsInfo = {
candidates: [],
candidateCount: new BN(0),
desiredSeats: new BN(0),
nextVoterSet: createType('SetIndex'),
termDuration: createType('BlockNumber'),
voteCount: createType('VoteIndex'),
voterCount: createType('SetIndex')
nextVoterSet: new BN(0) as SetIndex,
termDuration: new BN(0) as BlockNumber,
voteCount: new BN(0) as VoteIndex,
voterCount: new BN(0) as SetIndex
};
class Overview extends React.PureComponent<Props> {

View File

@ -28,7 +28,7 @@ const rootElement = document.getElementById(rootId);
// - http://localhost:3000/?rpc=wss://substrate-rpc.parity.io/#/explorer
// - http://localhost:3000/#/explorer?rpc=wss://substrate-rpc.parity.io
const urlOptions = queryString.parse(location.href.split('?')[1]);
const wsEndpoint = urlOptions.rpc || process.env.WS_URL || settings.apiUrl || undefined;
const wsEndpoint = urlOptions.rpc || process.env.WS_URL || settings.apiUrl;
if (Array.isArray(wsEndpoint)) {
throw new Error('Invalid WS endpoint specified');

View File

@ -31,7 +31,7 @@
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-reactive#readme",
"dependencies": {
"@babel/runtime": "^7.5.5",
"@polkadot/api": "^0.90.0-beta.38",
"@polkadot/api": "^0.90.0-beta.40",
"@polkadot/extension-dapp": "^0.7.0-beta.1",
"rxjs-compat": "^6.4.0"
}

View File

@ -2,14 +2,14 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { AccountId, Index } from '@polkadot/types/interfaces';
import { DerivedFees, DerivedBalances, DerivedContractFees } from '@polkadot/api-derive/types';
import BN from 'bn.js';
import { createType } from '@polkadot/types';
const ZERO_BALANCE: DerivedBalances = {
accountId: createType('AccountId'),
accountNonce: createType('Index'),
accountId: new Uint8Array(32) as AccountId,
accountNonce: new BN(0) as Index,
availableBalance: new BN(0),
lockedBalance: new BN(0),
freeBalance: new BN(0),

View File

@ -1931,44 +1931,44 @@
universal-user-agent "^3.0.0"
url-template "^2.0.8"
"@polkadot/api-contract@^0.90.0-beta.38":
version "0.90.0-beta.38"
resolved "https://registry.yarnpkg.com/@polkadot/api-contract/-/api-contract-0.90.0-beta.38.tgz#8ed4492a256b543aede2500c562c4fc7197828b2"
integrity sha512-234CIHVX8OnIeu+tCXHOjfP7AURLvc7SPg5pDDILDyQvIj+oGz18YX7J238gdoAfYkb9iQsETJ8kFY1iOaxOag==
"@polkadot/api-contract@^0.90.0-beta.40":
version "0.90.0-beta.40"
resolved "https://registry.yarnpkg.com/@polkadot/api-contract/-/api-contract-0.90.0-beta.40.tgz#11a52f635edce32e8d052e53f31447ddb4a4d5b4"
integrity sha512-ewotZ+zn6a34GXd7HcR+QU7GregGb/x0tQoCOb3O4vs79cm3lZK994pgM2e1HNnqhF38gmtFabGuhLFxeD/QUg==
dependencies:
"@babel/runtime" "^7.5.5"
"@polkadot/types" "^0.90.0-beta.38"
"@polkadot/types" "^0.90.0-beta.40"
"@polkadot/api-derive@^0.90.0-beta.38":
version "0.90.0-beta.38"
resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-0.90.0-beta.38.tgz#5e1c2ec56ccff041cb157d5d8299268e0743003a"
integrity sha512-1jHABdDNfVsP5yeCOFPOGqyTuh7I9PQEVN13vt2VI64TjiMVlllkuAbfrg8WdPZHtxHZQGQpmKkNEnT/Zv0Q5w==
"@polkadot/api-derive@^0.90.0-beta.40":
version "0.90.0-beta.40"
resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-0.90.0-beta.40.tgz#fef744f03e1bcfc0fbda5658bb71ea890ac39d00"
integrity sha512-N6Sz9ZzxZI7F0I6da2rOFFAOD7wJ9vqurc+6g/hculp1Reh5OJL/BE9Ue4ZGxdFFI9xtTBsfpq1uD6ve6AorzA==
dependencies:
"@babel/runtime" "^7.5.5"
"@polkadot/api" "^0.90.0-beta.38"
"@polkadot/types" "^0.90.0-beta.38"
"@polkadot/api" "^0.90.0-beta.40"
"@polkadot/types" "^0.90.0-beta.40"
"@polkadot/api-metadata@^0.90.0-beta.38":
version "0.90.0-beta.38"
resolved "https://registry.yarnpkg.com/@polkadot/api-metadata/-/api-metadata-0.90.0-beta.38.tgz#7a91d8184f3cf568a66f15f5021716cb5dc0e218"
integrity sha512-tCyHBA5zkYgWufFwROLCBbFZn8lmKDjqLb2igx4Aa7H7clLgJ4KKRb7NAdRJ29Crsi3f+/LsmwqTFn2GFXi0KA==
"@polkadot/api-metadata@^0.90.0-beta.40":
version "0.90.0-beta.40"
resolved "https://registry.yarnpkg.com/@polkadot/api-metadata/-/api-metadata-0.90.0-beta.40.tgz#a6aca2c13e68068c510cf41469a8173b7532d2d2"
integrity sha512-RhwcPmj/oenVw8MZw5dSpqDS4mIGCBlAVJtgpNw78HxeRObM7zmTo5FgQpikSO2SHnRzsxHd05cxaGw6oQEjsQ==
dependencies:
"@babel/runtime" "^7.5.5"
"@polkadot/types" "^0.90.0-beta.38"
"@polkadot/types" "^0.90.0-beta.40"
"@polkadot/util" "^1.1.1"
"@polkadot/util-crypto" "^1.1.1"
"@polkadot/api@^0.90.0-beta.38":
version "0.90.0-beta.38"
resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-0.90.0-beta.38.tgz#0b2dc1a58a2327755b90cf22b03e3cef367425f9"
integrity sha512-JkXtSZBDyxTliB2JLUbO7nqy5MB+dz7KfeN+lh/dp/nnVbvgRGGpg7T9IYjDezOVpSZ0mCWsDUZrp3elWS5gCg==
"@polkadot/api@^0.90.0-beta.40":
version "0.90.0-beta.40"
resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-0.90.0-beta.40.tgz#e3b3965bbd00c8a8b23204757669a53802b58f1c"
integrity sha512-6PbrQigmQOHS6lKAE26U1dP+gkOvbx1CAb+FL4Ts6tWnZwD6IuahJCMNXZ2QVcVUG2BPKXSQT/7Ya8cEVQnXdg==
dependencies:
"@babel/runtime" "^7.5.5"
"@polkadot/api-derive" "^0.90.0-beta.38"
"@polkadot/api-metadata" "^0.90.0-beta.38"
"@polkadot/rpc-core" "^0.90.0-beta.38"
"@polkadot/rpc-provider" "^0.90.0-beta.38"
"@polkadot/types" "^0.90.0-beta.38"
"@polkadot/api-derive" "^0.90.0-beta.40"
"@polkadot/api-metadata" "^0.90.0-beta.40"
"@polkadot/rpc-core" "^0.90.0-beta.40"
"@polkadot/rpc-provider" "^0.90.0-beta.40"
"@polkadot/types" "^0.90.0-beta.40"
"@polkadot/util-crypto" "^1.1.1"
"@polkadot/dev-react@^0.31.0-beta.1":
@ -2071,10 +2071,10 @@
dependencies:
"@babel/runtime" "^7.5.5"
"@polkadot/jsonrpc@^0.90.0-beta.38":
version "0.90.0-beta.38"
resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.90.0-beta.38.tgz#33d4a13ce8d36dcdbcb64c76e69a6155716356b0"
integrity sha512-BoPzmoRNY/FblUZM1MyXFV9qh0nxhGOX7wqZIkVTYgME/kY5QqisXvPsS2Zf0iau+RJBda9yqQ07qL/W5tz6Dw==
"@polkadot/jsonrpc@^0.90.0-beta.40":
version "0.90.0-beta.40"
resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.90.0-beta.40.tgz#d5fb18b15e00d21694e658160b8b1cc3f46036bb"
integrity sha512-hARH54iLFdU/WQ2DJs1Uism0F/GvJ2eQwHV7tZA+LgxQkROcqd/OE1zdpG4EhfDO8bxarA2b+ZNTXwvdbsQ1pA==
dependencies:
"@babel/runtime" "^7.5.5"
@ -2102,25 +2102,25 @@
react-copy-to-clipboard "^5.0.1"
styled-components "^4.3.1"
"@polkadot/rpc-core@^0.90.0-beta.38":
version "0.90.0-beta.38"
resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-0.90.0-beta.38.tgz#2dc88abaf2723603a536f7e09c5002c0afb90fda"
integrity sha512-Qw5n7hXin9vLrUAVCuQKjxZDncyKlKY7A2IGqwqHue5XQ2Ftp7BcyKvzCy2ydUY8LXxOIx3XLsdfpkombQqm2Q==
"@polkadot/rpc-core@^0.90.0-beta.40":
version "0.90.0-beta.40"
resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-0.90.0-beta.40.tgz#3d779355558e1fad3ecffba2b489a62d0ef56a20"
integrity sha512-Iw7LZHo3kaEstRu3iDyT2N9JrGj30VJr0my1TkziAstlZzxuvgNibcmUxAfYlM4Izh8SXghnwzIWe31Btcag3w==
dependencies:
"@babel/runtime" "^7.5.5"
"@polkadot/jsonrpc" "^0.90.0-beta.38"
"@polkadot/rpc-provider" "^0.90.0-beta.38"
"@polkadot/types" "^0.90.0-beta.38"
"@polkadot/jsonrpc" "^0.90.0-beta.40"
"@polkadot/rpc-provider" "^0.90.0-beta.40"
"@polkadot/types" "^0.90.0-beta.40"
"@polkadot/util" "^1.1.1"
rxjs "^6.5.2"
"@polkadot/rpc-provider@^0.90.0-beta.38":
version "0.90.0-beta.38"
resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-0.90.0-beta.38.tgz#8e52330502c6680e3c030452361900926868ec4d"
integrity sha512-dBYZBpSM54gjb+zPbc2vRaqkrUgHGcbZcOUpFjyb5Jhd+2DPnV5Z0QR4cD1duYBATtG1n7CP4aXZycJKztAFkw==
"@polkadot/rpc-provider@^0.90.0-beta.40":
version "0.90.0-beta.40"
resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-0.90.0-beta.40.tgz#8e7db2ef81d5ac5e9ea99c77c98824233545b7fe"
integrity sha512-SA0NWA0zLLzy6n0aK0GZpwdJAVksM4Ha+M3MzQE2QkbZfyXscLsDE5g+FkdFGXM98bbOw6/2O1B1rBKjh5bVoA==
dependencies:
"@babel/runtime" "^7.5.5"
"@polkadot/api-metadata" "^0.90.0-beta.38"
"@polkadot/api-metadata" "^0.90.0-beta.40"
"@polkadot/util" "^1.1.1"
"@polkadot/util-crypto" "^1.1.1"
"@types/nock" "^10.0.3"
@ -2135,10 +2135,10 @@
dependencies:
"@types/chrome" "^0.0.86"
"@polkadot/types@^0.90.0-beta.38":
version "0.90.0-beta.38"
resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-0.90.0-beta.38.tgz#75ee0ff4c146ee0bafb257a4fb343ff8cd0ac0df"
integrity sha512-7kg8hcUQRJONw4IhZm+0lmsj8kgm+RuzUbSoxrb0SukOhgG6OzueHGV3LPbpmICAec85a0DAjLdkyivMm7yScA==
"@polkadot/types@^0.90.0-beta.40":
version "0.90.0-beta.40"
resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-0.90.0-beta.40.tgz#5a4acc9543844d13e3fe5dbcd3237f6f06470eba"
integrity sha512-tCfARPCEqXTLUsgj+Sy53p4SbgElHC3mo5M6jByTI1QYMNfilIfVSXW35Q7W4wJF+6mixEOeq+cTYJwjgdZLVA==
dependencies:
"@babel/runtime" "^7.5.5"
"@polkadot/util" "^1.1.1"