linting fix

pull/4735/head
aniket-engg 6 months ago committed by Aniket
parent 23e60f2858
commit a775800acd
  1. 56
      libs/remix-ui/run-tab/src/lib/components/solScanTable.tsx
  2. 24
      libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx

@ -6,33 +6,33 @@ interface SolScanTableProps {
}
export function SolScanTable(props: SolScanTableProps) {
const {scanDetails} = props
const { scanDetails } = props
return (
<table className="table h6 table-sm">
<thead>
<tr>
<td scope="col">ID</td>
<td scope="col">NAME</td>
<td scope="col">SEVERITY</td>
<td scope="col">DESCRIPTION</td>
</tr>
</thead>
<tbody>
{
Array.from(scanDetails, (template) => {
return (
<tr>
<td scope="col">{template.template_details.issue_id}</td>
<td scope="col">{template.template_details.issue_name}</td>
<td scope="col">{template.template_details.issue_severity}</td>
<td scope="col">{template.template_details.static_issue_description}</td>
</tr>
)
})
}
</tbody>
</table>
)
return (
<table className="table h6 table-sm">
<thead>
<tr>
<td scope="col">ID</td>
<td scope="col">NAME</td>
<td scope="col">SEVERITY</td>
<td scope="col">DESCRIPTION</td>
</tr>
</thead>
<tbody>
{
Array.from(scanDetails, (template) => {
return (
<tr>
<td scope="col">{template.template_details.issue_id}</td>
<td scope="col">{template.template_details.issue_name}</td>
<td scope="col">{template.template_details.issue_severity}</td>
<td scope="col">{template.template_details.static_issue_description}</td>
</tr>
)
})
}
</tbody>
</table>
)
}

@ -227,13 +227,13 @@ export function UniversalDappUI(props: UdappProps) {
const filePath = `.workspaces/${fileName}`
const file = await props.plugin.call('fileManager', 'readFile', filePath)
const urlResponse = await axios.post(`https://solidityscan.remixproject.org/uploadFile`, { file, fileName})
const urlResponse = await axios.post(`https://solidityscan.remixproject.org/uploadFile`, { file, fileName })
if (urlResponse.data.status === 'success') {
const ws = new WebSocket('wss://solidityscan.remixproject.org/solidityscan')
ws.addEventListener('error', console.error);
ws.addEventListener('open', async (event) => {
await props.plugin.call('notification', 'toast', 'Initiating scan...')
})
@ -246,14 +246,14 @@ export function UniversalDappUI(props: UdappProps) {
const reqToInitScan = {
"action": "message",
"payload": {
"type": "private_project_scan_initiate",
"body": {
"file_urls": [
urlResponse.data.result.url
],
"project_name": "RemixProject",
"project_type": "new"
}
"type": "private_project_scan_initiate",
"body": {
"file_urls": [
urlResponse.data.result.url
],
"project_name": "RemixProject",
"project_type": "new"
}
}
}
ws.send(JSON.stringify(reqToInitScan))
@ -273,7 +273,7 @@ export function UniversalDappUI(props: UdappProps) {
console.log('data.payload--->', data.payload)
const url = data.payload.scan_details.link
const {data: scanData} = await axios.post('https://solidityscan.remixproject.org/downloadResult', { url })
const { data: scanData } = await axios.post('https://solidityscan.remixproject.org/downloadResult', { url })
const scanDetails: Record<string, any>[] = scanData.scan_report.multi_file_scan_details
const modal: AppModal = {
@ -284,7 +284,7 @@ export function UniversalDappUI(props: UdappProps) {
}
await props.plugin.call('notification', 'modal', modal)
}
})
}
}

Loading…
Cancel
Save