This commit is contained in:
Jaco 2021-07-28 17:30:38 +03:00 committed by GitHub
parent bc59761bec
commit 5430223613
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 365 additions and 372 deletions

View File

@ -12,15 +12,15 @@
"packages/*"
],
"resolutions": {
"@polkadot/api": "^5.1.2-7",
"@polkadot/api-contract": "^5.1.2-7",
"@polkadot/hw-ledger": "^7.0.3-0",
"@polkadot/keyring": "^7.0.3-0",
"@polkadot/networks": "^7.0.3-0",
"@polkadot/api": "^5.2.2-4",
"@polkadot/api-contract": "^5.2.2-4",
"@polkadot/hw-ledger": "^7.0.3",
"@polkadot/keyring": "^7.0.3",
"@polkadot/networks": "^7.0.3",
"@polkadot/phishing": "^0.6.234",
"@polkadot/types": "^5.1.2-7",
"@polkadot/util": "^7.0.3-0",
"@polkadot/util-crypto": "^7.0.3-0",
"@polkadot/types": "^5.2.2-4",
"@polkadot/util": "^7.0.3",
"@polkadot/util-crypto": "^7.0.3",
"@polkadot/wasm-crypto": "^4.1.2",
"babel-core": "^7.0.0-bridge.0",
"styled-components": "^5.2.0",

View File

@ -20,7 +20,7 @@
"@kiltprotocol/type-definitions": "0.1.8",
"@laminar/type-definitions": "0.3.1",
"@phala/typedefs": "0.2.1",
"@polkadot/networks": "^7.0.3-0",
"@polkadot/networks": "^7.0.3",
"@polymathnetwork/polymesh-types": "0.0.2",
"@snowfork/snowbridge-types": "0.2.3",
"@sora-substrate/type-definitions": "1.3.34",

View File

@ -8,7 +8,7 @@
"@babel/runtime": "^7.14.6",
"@polkadot/phishing": "^0.6.234",
"@polkadot/react-components": "^0.94.2-92",
"@polkadot/vanitygen": "^0.42.1",
"@polkadot/vanitygen": "^0.43.1",
"detect-browser": "^5.2.0",
"file-saver": "^2.0.5"
},

View File

@ -6,6 +6,6 @@
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.14.6",
"@polkadot/api-contract": "^5.1.2-7"
"@polkadot/api-contract": "^5.2.2-4"
}
}

View File

@ -7,6 +7,7 @@ import React from 'react';
import styled from 'styled-components';
import { Icon, Tooltip } from '@polkadot/react-components';
import { useApi } from '@polkadot/react-hooks';
import { encodeTypeDef } from '@polkadot/types/create';
import { useTranslation } from '../translate';
@ -29,6 +30,7 @@ function truncate (param: string): string {
function MessageSignature ({ className, message: { args, isConstructor, isMutating, method, returnType }, params = [], withTooltip = false }: Props): React.ReactElement<Props> {
const { t } = useTranslation();
const { api } = useApi();
return (
<div className={className}>
@ -41,7 +43,7 @@ function MessageSignature ({ className, message: { args, isConstructor, isMutati
<span className='ui--MessageSignature-type'>
{params && params[index]
? <b>{truncate((params as string[])[index].toString())}</b>
: encodeTypeDef(type)
: encodeTypeDef(api.registry, type)
}
</span>
{index < (args.length) - 1 && ', '}
@ -53,7 +55,7 @@ function MessageSignature ({ className, message: { args, isConstructor, isMutati
:
{' '}
<span className='ui--MessageSignature-returnType'>
{encodeTypeDef(returnType)}
{encodeTypeDef(api.registry, returnType)}
</span>
</>
)}

View File

@ -6,7 +6,7 @@
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.14.6",
"@polkadot/api": "^5.1.2-7",
"@polkadot/api": "^5.2.2-4",
"@polkadot/extension-dapp": "^0.39.2-0",
"@substrate/connect": "^0.3.16",
"fflate": "^0.7.1",

View File

@ -9,15 +9,15 @@
"@fortawesome/fontawesome-svg-core": "^1.2.35",
"@fortawesome/free-solid-svg-icons": "^5.15.3",
"@fortawesome/react-fontawesome": "^0.1.14",
"@polkadot/keyring": "^7.0.3-0",
"@polkadot/keyring": "^7.0.3",
"@polkadot/react-api": "^0.94.2-92",
"@polkadot/react-identicon": "^0.84.1",
"@polkadot/react-qr": "^0.84.1",
"@polkadot/react-identicon": "^0.84.2",
"@polkadot/react-qr": "^0.84.2",
"@polkadot/react-query": "^0.94.2-92",
"@polkadot/ui-keyring": "^0.84.1",
"@polkadot/ui-settings": "^0.84.1",
"@polkadot/util": "^7.0.3-0",
"@polkadot/util-crypto": "^7.0.3-0",
"@polkadot/ui-keyring": "^0.84.2",
"@polkadot/ui-settings": "^0.84.2",
"@polkadot/util": "^7.0.3",
"@polkadot/util-crypto": "^7.0.3",
"chart.js": "^2.9.4",
"codeflask": "^1.4.1",
"i18next": "^19.9.2",

View File

@ -19,9 +19,9 @@ function Param ({ className = '', defaultValue, isDisabled, isInOption, isOption
const label = useMemo(
() => isUndefined(name)
? `${isDisabled && isInOption ? 'Option<' : ''}${encodeTypeDef(type)}${isDisabled && isInOption ? '>' : ''}`
: `${name}: ${isDisabled && isInOption ? 'Option<' : ''}${encodeTypeDef(type)}${isDisabled && isInOption ? '>' : ''}`,
[isDisabled, isInOption, name, type]
? `${isDisabled && isInOption ? 'Option<' : ''}${encodeTypeDef(registry, type)}${isDisabled && isInOption ? '>' : ''}`
: `${name}: ${isDisabled && isInOption ? 'Option<' : ''}${encodeTypeDef(registry, type)}${isDisabled && isInOption ? '>' : ''}`,
[isDisabled, isInOption, name, registry, type]
);
if (!Component) {

687
yarn.lock

File diff suppressed because it is too large Load Diff