fix errors in remix-lib logsManager and txFormat after rebase

pull/3037/head
Joseph Izang 2 years ago
parent 5d4e6e3dce
commit e41a42075a
  1. 2
      libs/remix-lib/src/execution/logsManager.ts
  2. 1
      libs/remix-lib/src/execution/txFormat.ts
  3. 35
      libs/remix-ui/static-analyser/src/lib/Button/StaticAnalyserButton.tsx
  4. 10
      libs/remix-ui/static-analyser/src/lib/ErrorRenderer.tsx
  5. 15
      libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx
  6. 43497
      package-lock.json
  7. 1
      package.json
  8. 5
      yarn.lock

@ -17,7 +17,7 @@ export class LogsManager {
}
checkBlock (blockNumber, block, web3) {
eachOf(block.transactions, (tx, i, next) => {
eachOf(block.transactions, (tx: any, i, next) => {
const txHash = '0x' + tx.hash().toString('hex')
web3.eth.getTransactionReceipt(txHash, (_error, receipt) => {

@ -265,6 +265,7 @@ export function linkBytecodeStandard (contract, contracts, callback, callbackSte
cbLibDeployed()
}, callbackStep, callbackDeployLibrary)
} else {
//@ts-ignore
cbLibDeployed('Cannot find compilation data of library ' + libName)
}
}, (error) => {

@ -1,5 +1,5 @@
import { CustomTooltip } from '@remix-ui/helper'
import React from 'react' //eslint-disable-line
import { OverlayTrigger, Tooltip } from 'react-bootstrap'
interface StaticAnalyserButtonProps {
onClick: (event) => void
@ -16,21 +16,30 @@ const StaticAnalyserButton = ({
}: StaticAnalyserButtonProps) => {
let classList = "btn btn-sm w-25 btn-primary"
classList += disabled ? " disabled" : ""
const colorDisabled = "#007aa6"
const alternateColor = "#005e80"
const run = (e) => {
e.preventDefault()
e.stopPropagation()
}
return (
<button className={classList} disabled={disabled} onClick={onClick}>
<OverlayTrigger
<CustomTooltip
placement="bottom-start"
overlay={
<Tooltip id="ssaRunButtonTooltip" className="text-nowrap">
<span>{title}</span>
</Tooltip>
}
tooltipId="ssaRunButtonTooltip"
tooltipClasses="text-nowrap"
tooltipText={title}
>
<span>
{buttonText}
</span>
</OverlayTrigger>
</button>
<div data-id="staticAnalyserButton" className={classList} onClick={(e) => {
disabled ? run(e) : onClick(e)
}} style={{ backgroundColor: disabled ? alternateColor : colorDisabled, borderColor: disabled ? alternateColor : colorDisabled,
}}>
<button className="btn btn-link text-decoration-none" disabled={disabled} onClick={onClick} style={{ pointerEvents: "none"}} id="staticAnalyserButton" data-id="staticAnalyserButton">
<span>
{buttonText}
</span>
</button>
</div>
</CustomTooltip>
)
}

@ -1,3 +1,4 @@
import { CustomTooltip } from '@remix-ui/helper';
import React from 'react' //eslint-disable-line
interface ErrorRendererProps {
@ -53,7 +54,14 @@ const ErrorRenderer = ({ message, opt, editor, name }: ErrorRendererProps) => {
? <span><a href={opt.item.more} target='_blank'>more</a></span>
: <span> </span>
}
<span title={`Position in ${opt.errFile}`}>Pos: {opt.locationString}</span>
<CustomTooltip
placement="right"
tooltipId="errorTooltip"
tooltipText={`Position in ${opt.errFile}`}
tooltipClasses="text-nowrap"
>
<span>Pos: {opt.locationString}</span>
</CustomTooltip>
</span>
</div>
</div>

@ -8,8 +8,8 @@ import { RemixUiCheckbox } from '@remix-ui/checkbox' // eslint-disable-line
import ErrorRenderer from './ErrorRenderer' // eslint-disable-line
import { compilation } from './actions/staticAnalysisActions'
import { initialState, analysisReducer } from './reducers/staticAnalysisReducer'
import { OverlayTrigger, Tooltip } from 'react-bootstrap'// eslint-disable-line
import { CodeAnalysis } from '@remix-project/remix-analyzer'
import { CustomTooltip } from '@remix-ui/helper'
declare global {
interface Window {
@ -521,13 +521,14 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
/>
<a className="mt-1 text-nowrap" href='https://remix-ide.readthedocs.io/en/latest/slither.html#enable-slither-analysis' target={'_blank'}>
<OverlayTrigger placement={'right'} overlay={
<Tooltip className="text-nowrap" id="overlay-tooltip">
<span className="border bg-light text-dark p-1 pr-3" style={{minWidth: '230px' }}>Learn how to use Slither Analysis</span>
</Tooltip>
}>
<CustomTooltip
placement={'right'}
tooltipClasses="text-nowrap"
tooltipId="overlay-tooltip"
tooltipText={<span className="border bg-light text-dark p-1 pr-3" style={{minWidth: '230px' }}>Learn how to use Slither Analysis</span>}
>
<i style={{ fontSize: 'medium' }} className={'fal fa-info-circle ml-3'} aria-hidden="true"></i>
</OverlayTrigger>
</CustomTooltip>
</a>
</div>
}

43497
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -249,6 +249,7 @@
"@nrwl/web": "12.3.6",
"@nrwl/workspace": "12.3.6",
"@testing-library/react": "10.4.1",
"@types/async": "^3.2.15",
"@types/axios": "^0.14.0",
"@types/chai": "^4.3.3",
"@types/fs-extra": "^9.0.1",

@ -4276,6 +4276,11 @@
resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-4.2.2.tgz#ed4e0ad92306a704f9fb132a0cfcf77486dbe2bc"
integrity sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==
"@types/async@^3.2.15":
version "3.2.15"
resolved "https://registry.yarnpkg.com/@types/async/-/async-3.2.15.tgz#26d4768fdda0e466f18d6c9918ca28cc89a4e1fe"
integrity sha512-PAmPfzvFA31mRoqZyTVsgJMsvbynR429UTTxhmfsUCrWGh3/fxOrzqBtaTPJsn4UtzTv4Vb0+/O7CARWb69N4g==
"@types/axios@^0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@types/axios/-/axios-0.14.0.tgz#ec2300fbe7d7dddd7eb9d3abf87999964cafce46"

Loading…
Cancel
Save