fix errors in remix-lib logsManager and txFormat after rebase

pull/3081/head
Joseph Izang 2 years ago
parent 9bafed26a8
commit 21fbcee6df
  1. 2
      libs/remix-lib/src/execution/logsManager.ts
  2. 1
      libs/remix-lib/src/execution/txFormat.ts
  3. 27
      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) { checkBlock (blockNumber, block, web3) {
eachOf(block.transactions, (tx, i, next) => { eachOf(block.transactions, (tx: any, i, next) => {
const txHash = '0x' + tx.hash().toString('hex') const txHash = '0x' + tx.hash().toString('hex')
web3.eth.getTransactionReceipt(txHash, (_error, receipt) => { web3.eth.getTransactionReceipt(txHash, (_error, receipt) => {

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

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

@ -1,3 +1,4 @@
import { CustomTooltip } from '@remix-ui/helper';
import React from 'react' //eslint-disable-line import React from 'react' //eslint-disable-line
interface ErrorRendererProps { 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><a href={opt.item.more} target='_blank'>more</a></span>
: <span> </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> </span>
</div> </div>
</div> </div>

@ -8,8 +8,8 @@ import { RemixUiCheckbox } from '@remix-ui/checkbox' // eslint-disable-line
import ErrorRenderer from './ErrorRenderer' // eslint-disable-line import ErrorRenderer from './ErrorRenderer' // eslint-disable-line
import { compilation } from './actions/staticAnalysisActions' import { compilation } from './actions/staticAnalysisActions'
import { initialState, analysisReducer } from './reducers/staticAnalysisReducer' import { initialState, analysisReducer } from './reducers/staticAnalysisReducer'
import { OverlayTrigger, Tooltip } from 'react-bootstrap'// eslint-disable-line
import { CodeAnalysis } from '@remix-project/remix-analyzer' import { CodeAnalysis } from '@remix-project/remix-analyzer'
import { CustomTooltip } from '@remix-ui/helper'
declare global { declare global {
interface Window { 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'}> <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={ <CustomTooltip
<Tooltip className="text-nowrap" id="overlay-tooltip"> placement={'right'}
<span className="border bg-light text-dark p-1 pr-3" style={{minWidth: '230px' }}>Learn how to use Slither Analysis</span> tooltipClasses="text-nowrap"
</Tooltip> 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> <i style={{ fontSize: 'medium' }} className={'fal fa-info-circle ml-3'} aria-hidden="true"></i>
</OverlayTrigger> </CustomTooltip>
</a> </a>
</div> </div>
} }

43497
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -250,6 +250,7 @@
"@nrwl/web": "12.3.6", "@nrwl/web": "12.3.6",
"@nrwl/workspace": "12.3.6", "@nrwl/workspace": "12.3.6",
"@testing-library/react": "10.4.1", "@testing-library/react": "10.4.1",
"@types/async": "^3.2.15",
"@types/axios": "^0.14.0", "@types/axios": "^0.14.0",
"@types/chai": "^4.3.3", "@types/chai": "^4.3.3",
"@types/fs-extra": "^9.0.1", "@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" resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-4.2.2.tgz#ed4e0ad92306a704f9fb132a0cfcf77486dbe2bc"
integrity sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig== 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": "@types/axios@^0.14.0":
version "0.14.0" version "0.14.0"
resolved "https://registry.yarnpkg.com/@types/axios/-/axios-0.14.0.tgz#ec2300fbe7d7dddd7eb9d3abf87999964cafce46" resolved "https://registry.yarnpkg.com/@types/axios/-/axios-0.14.0.tgz#ec2300fbe7d7dddd7eb9d3abf87999964cafce46"

Loading…
Cancel
Save