|
|
@ -1,6 +1,6 @@ |
|
|
|
import React, {useState, useEffect} from 'react' // eslint-disable-line
|
|
|
|
import React, {useState, useEffect} from 'react' // eslint-disable-line
|
|
|
|
import {FormattedMessage, useIntl} from 'react-intl' |
|
|
|
import {FormattedMessage, useIntl} from 'react-intl' |
|
|
|
import {ContractSelectionProps} from './types' |
|
|
|
import {ContractPropertyName, ContractSelectionProps} from './types' |
|
|
|
import {PublishToStorage} from '@remix-ui/publish-to-storage' // eslint-disable-line
|
|
|
|
import {PublishToStorage} from '@remix-ui/publish-to-storage' // eslint-disable-line
|
|
|
|
import {TreeView, TreeViewItem} from '@remix-ui/tree-view' // eslint-disable-line
|
|
|
|
import {TreeView, TreeViewItem} from '@remix-ui/tree-view' // eslint-disable-line
|
|
|
|
import {CopyToClipboard} from '@remix-ui/clipboard' // eslint-disable-line
|
|
|
|
import {CopyToClipboard} from '@remix-ui/clipboard' // eslint-disable-line
|
|
|
@ -122,7 +122,7 @@ export const ContractSelection = (props: ContractSelectionProps) => { |
|
|
|
return ret |
|
|
|
return ret |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const insertValue = (details, propertyName) => { |
|
|
|
const insertValue = (details, propertyName: ContractPropertyName) => { |
|
|
|
let node |
|
|
|
let node |
|
|
|
if (propertyName === 'web3Deploy' || propertyName === 'name' || propertyName === 'Assembly') { |
|
|
|
if (propertyName === 'web3Deploy' || propertyName === 'name' || propertyName === 'Assembly') { |
|
|
|
node = <pre>{details[propertyName]}</pre> |
|
|
|
node = <pre>{details[propertyName]}</pre> |
|
|
@ -197,7 +197,7 @@ export const ContractSelection = (props: ContractSelectionProps) => { |
|
|
|
const log = ( |
|
|
|
const log = ( |
|
|
|
<div className="remixui_detailsJSON"> |
|
|
|
<div className="remixui_detailsJSON"> |
|
|
|
<TreeView> |
|
|
|
<TreeView> |
|
|
|
{Object.keys(contractProperties).map((propertyName, index) => { |
|
|
|
{Object.keys(contractProperties).map((propertyName: ContractPropertyName, index) => { |
|
|
|
const copyDetails = ( |
|
|
|
const copyDetails = ( |
|
|
|
<span className="remixui_copyDetails"> |
|
|
|
<span className="remixui_copyDetails"> |
|
|
|
<CopyToClipboard tip={intl.formatMessage({id: 'solidity.copy'})} content={contractProperties[propertyName]} direction="top" /> |
|
|
|
<CopyToClipboard tip={intl.formatMessage({id: 'solidity.copy'})} content={contractProperties[propertyName]} direction="top" /> |
|
|
|