txDetails(event, tx)}>
diff --git a/libs/remix-ui/terminal/src/lib/components/Table.tsx b/libs/remix-ui/terminal/src/lib/components/Table.tsx
index 03748fe110..5aa3823f00 100644
--- a/libs/remix-ui/terminal/src/lib/components/Table.tsx
+++ b/libs/remix-ui/terminal/src/lib/components/Table.tsx
@@ -1,8 +1,8 @@
import React from 'react' // eslint-disable-line
-import {FormattedMessage, useIntl} from 'react-intl'
+import { FormattedMessage, useIntl } from 'react-intl'
import {CopyToClipboard} from '@remix-ui/clipboard' // eslint-disable-line
-import {shortenHexData} from '@remix-ui/helper'
-import {execution} from '@remix-project/remix-lib'
+import { shortenHexData } from '@remix-ui/helper'
+import { execution } from '@remix-project/remix-lib'
const typeConversion = execution.typeConversion
const showTable = (opts, showTableHash) => {
@@ -17,17 +17,17 @@ const showTable = (opts, showTableHash) => {
}
let callWarning = ''
if (opts.isCall) {
- callWarning = intl.formatMessage({id: 'terminal.callWarning'})
+ callWarning = intl.formatMessage({ id: 'terminal.callWarning' })
}
if (!opts.isCall) {
if (opts.status !== undefined && opts.status !== null) {
if (opts.status === 0 || opts.status === '0x0' || opts.status === false) {
- msg = intl.formatMessage({id: 'terminal.msg1'})
+ msg = intl.formatMessage({ id: 'terminal.msg1' })
} else if (opts.status === 1 || opts.status === '0x1' || opts.status === true) {
- msg = intl.formatMessage({id: 'terminal.msg2'})
+ msg = intl.formatMessage({ id: 'terminal.msg2' })
}
} else {
- msg = intl.formatMessage({id: 'terminal.msg3'})
+ msg = intl.formatMessage({ id: 'terminal.msg3' })
}
}
diff --git a/libs/remix-ui/terminal/src/lib/components/remix-ui-terminal-bar.tsx b/libs/remix-ui/terminal/src/lib/components/remix-ui-terminal-bar.tsx
index b8de5fbace..a51bb33e61 100644
--- a/libs/remix-ui/terminal/src/lib/components/remix-ui-terminal-bar.tsx
+++ b/libs/remix-ui/terminal/src/lib/components/remix-ui-terminal-bar.tsx
@@ -28,7 +28,7 @@ export const RemixUITerminalBar = (props: RemixUiTerminalProps) => {
data-id="terminalToggleMenu"
>
- {platform === appPlatformTypes.desktop ?
+ {platform === appPlatformTypes.desktop ?
{xtermState.showOutput? : }
diff --git a/libs/remix-ui/terminal/src/lib/components/remix-ui-terminal-menu.tsx b/libs/remix-ui/terminal/src/lib/components/remix-ui-terminal-menu.tsx
index 3feb16ecb1..f412130026 100644
--- a/libs/remix-ui/terminal/src/lib/components/remix-ui-terminal-menu.tsx
+++ b/libs/remix-ui/terminal/src/lib/components/remix-ui-terminal-menu.tsx
@@ -14,7 +14,7 @@ export const RemixUITerminalMenu = (props: RemixUiTerminalProps) => {
}, [terminalState.isOpen])
function handleClearConsole(event: any): void {
- dispatch({ type: 'clearconsole', payload: [] })
+ dispatch({ type: 'clearconsole', payload: []})
}
function listenOnNetwork(event: any): void {
diff --git a/libs/remix-ui/terminal/src/lib/custom-hooks/useKeyPress.tsx b/libs/remix-ui/terminal/src/lib/custom-hooks/useKeyPress.tsx
index 2accab436d..f64dd8d9d3 100644
--- a/libs/remix-ui/terminal/src/lib/custom-hooks/useKeyPress.tsx
+++ b/libs/remix-ui/terminal/src/lib/custom-hooks/useKeyPress.tsx
@@ -4,13 +4,13 @@ export const useKeyPress = (targetKey: string): boolean => {
// State for keeping track of whether key is pressed
const [keyPressed, setKeyPressed] = useState(false)
// If pressed key is our target key then set to true
- function downHandler({key}): void {
+ function downHandler({ key }): void {
if (key === targetKey) {
setKeyPressed(true)
}
}
// If released key is our target key then set to false
- const upHandler = ({key}): void => {
+ const upHandler = ({ key }): void => {
if (key === targetKey) {
setKeyPressed(false)
}
diff --git a/libs/remix-ui/terminal/src/lib/reducers/terminalReducer.ts b/libs/remix-ui/terminal/src/lib/reducers/terminalReducer.ts
index ea76680775..4143e518b5 100644
--- a/libs/remix-ui/terminal/src/lib/reducers/terminalReducer.ts
+++ b/libs/remix-ui/terminal/src/lib/reducers/terminalReducer.ts
@@ -1,11 +1,11 @@
-import {CLEAR_CONSOLE, CMD_HISTORY, EMPTY_BLOCK, ERROR, HTML, INFO, KNOWN_TRANSACTION, LISTEN_ON_NETWORK, LOG, TYPEWRITERLOG, TYPEWRITERWARNING, AITYPEWRITERWARNING, TYPEWRITERSUCCESS, NEW_TRANSACTION, SCRIPT, UNKNOWN_TRANSACTION, WARN, TOGGLE, SEARCH, SET_ISVM, SET_OPEN} from '../types/terminalTypes'
+import { CLEAR_CONSOLE, CMD_HISTORY, EMPTY_BLOCK, ERROR, HTML, INFO, KNOWN_TRANSACTION, LISTEN_ON_NETWORK, LOG, TYPEWRITERLOG, TYPEWRITERWARNING, AITYPEWRITERWARNING, TYPEWRITERSUCCESS, NEW_TRANSACTION, SCRIPT, UNKNOWN_TRANSACTION, WARN, TOGGLE, SEARCH, SET_ISVM, SET_OPEN } from '../types/terminalTypes'
export const initialState = {
journalBlocks: [],
data: {
// lineLength: props.options.lineLength || 80,
session: [],
- activeFilters: {commands: {}, input: ''},
+ activeFilters: { commands: {}, input: '' },
filterFns: {},
},
_commandHistory: [],
@@ -32,14 +32,14 @@ export const registerCommandReducer = (state, action) => {
...state,
_commands: Object.assign(initialState._commands, action.payload._commands),
commands: Object.assign(initialState.commands, action.payload.commands),
- data: Object.assign(initialState.data, {...action.payload.data}),
+ data: Object.assign(initialState.data, { ...action.payload.data }),
}
case LOG:
return {
...state,
_commands: Object.assign(initialState._commands, action.payload._commands),
commands: Object.assign(initialState.commands, action.payload.commands),
- data: Object.assign(initialState.data, {...action.payload.data}),
+ data: Object.assign(initialState.data, { ...action.payload.data }),
}
case INFO:
return {
@@ -97,7 +97,7 @@ export const registerCommandReducer = (state, action) => {
case LISTEN_ON_NETWORK:
return {
...state,
- journalBlocks: initialState.journalBlocks.push({message: action.payload.message, style: 'text-log'}),
+ journalBlocks: initialState.journalBlocks.push({ message: action.payload.message, style: 'text-log' }),
}
case SET_ISVM:
@@ -106,7 +106,7 @@ export const registerCommandReducer = (state, action) => {
isVM: action.payload,
}
default:
- return {state}
+ return { state }
}
}
@@ -138,7 +138,7 @@ export const registerFilterReducer = (state, action) => {
data: Object.assign(initialState.data.filterFns, action.payload.data.filterFns),
}
default:
- return {state}
+ return { state }
}
}
@@ -150,7 +150,7 @@ export const addCommandHistoryReducer = (state, action) => {
_commandHistory: initialState._commandHistory.unshift(action.payload.script),
}
default:
- return {state}
+ return { state }
}
}
@@ -169,17 +169,17 @@ export const registerScriptRunnerReducer = (state, action) => {
case HTML:
return {
...state,
- journalBlocks: initialState.journalBlocks.push({message: action.payload.message, style: 'text-log', provider: action.payload.provider}),
+ journalBlocks: initialState.journalBlocks.push({ message: action.payload.message, style: 'text-log', provider: action.payload.provider }),
}
case LOG:
return {
...state,
- journalBlocks: initialState.journalBlocks.push({message: action.payload.message, style: 'text-log', provider: action.payload.provider}),
+ journalBlocks: initialState.journalBlocks.push({ message: action.payload.message, style: 'text-log', provider: action.payload.provider }),
}
case TYPEWRITERLOG:
return {
...state,
- journalBlocks: initialState.journalBlocks.push({message: action.payload.message, typewriter: true, style: 'text-log', provider: action.payload.provider}),
+ journalBlocks: initialState.journalBlocks.push({ message: action.payload.message, typewriter: true, style: 'text-log', provider: action.payload.provider }),
}
case AITYPEWRITERWARNING:
return {
@@ -189,52 +189,52 @@ export const registerScriptRunnerReducer = (state, action) => {
case TYPEWRITERWARNING:
return {
...state,
- journalBlocks: initialState.journalBlocks.push({message: action.payload.message, typewriter: true, style: 'text-warning', provider: action.payload.provider}),
+ journalBlocks: initialState.journalBlocks.push({ message: action.payload.message, typewriter: true, style: 'text-warning', provider: action.payload.provider }),
}
case TYPEWRITERSUCCESS:
return {
...state,
- journalBlocks: initialState.journalBlocks.push({message: action.payload.message, typewriter: true, style: 'text-success', provider: action.payload.provider}),
+ journalBlocks: initialState.journalBlocks.push({ message: action.payload.message, typewriter: true, style: 'text-success', provider: action.payload.provider }),
}
case INFO:
return {
...state,
- journalBlocks: initialState.journalBlocks.push({message: action.payload.message, style: 'text-success', provider: action.payload.provider}),
+ journalBlocks: initialState.journalBlocks.push({ message: action.payload.message, style: 'text-success', provider: action.payload.provider }),
}
case WARN:
return {
...state,
- journalBlocks: initialState.journalBlocks.push({message: action.payload.message, style: 'text-warning', provider: action.payload.provider}),
+ journalBlocks: initialState.journalBlocks.push({ message: action.payload.message, style: 'text-warning', provider: action.payload.provider }),
}
case ERROR:
return {
...state,
- journalBlocks: initialState.journalBlocks.push({message: action.payload.message, style: 'text-danger', provider: action.payload.provider}),
+ journalBlocks: initialState.journalBlocks.push({ message: action.payload.message, style: 'text-danger', provider: action.payload.provider }),
}
case SCRIPT:
return {
...state,
- journalBlocks: initialState.journalBlocks.push({message: action.payload.message, style: 'text-log', provider: action.payload.provider}),
+ journalBlocks: initialState.journalBlocks.push({ message: action.payload.message, style: 'text-log', provider: action.payload.provider }),
}
case KNOWN_TRANSACTION:
return {
...state,
- journalBlocks: initialState.journalBlocks.push({message: action.payload.message, style: '', name: 'knownTransaction', provider: action.payload.provider}),
+ journalBlocks: initialState.journalBlocks.push({ message: action.payload.message, style: '', name: 'knownTransaction', provider: action.payload.provider }),
}
case UNKNOWN_TRANSACTION:
return {
...state,
- journalBlocks: initialState.journalBlocks.push({message: action.payload.message, style: '', name: 'unknownTransaction', provider: action.payload.provider}),
+ journalBlocks: initialState.journalBlocks.push({ message: action.payload.message, style: '', name: 'unknownTransaction', provider: action.payload.provider }),
}
case EMPTY_BLOCK:
return {
...state,
- journalBlocks: initialState.journalBlocks.push({message: action.payload.message, style: '', name: 'emptyBlock', provider: action.payload.provider}),
+ journalBlocks: initialState.journalBlocks.push({ message: action.payload.message, style: '', name: 'emptyBlock', provider: action.payload.provider }),
}
case NEW_TRANSACTION:
return {
...state,
- journalBlocks: initialState.journalBlocks.push({message: action.payload.message, style: '', provider: action.payload.provider}),
+ journalBlocks: initialState.journalBlocks.push({ message: action.payload.message, style: '', provider: action.payload.provider }),
}
}
}
diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx
index ab0a7a768f..b5edd8a425 100644
--- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx
+++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx
@@ -122,7 +122,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
}
scriptRunnerDispatch({
type: message.type ? message.type : 'log',
- payload: { message: [message.value] },
+ payload: { message: [message.value]},
})
},
})
@@ -205,7 +205,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
const _shell = async (script, scopedCommands, done) => {
// default shell
if (script.indexOf('remix:') === 0) {
- return done(null, intl.formatMessage({id: 'terminal.text1'}))
+ return done(null, intl.formatMessage({ id: 'terminal.text1' }))
}
if (script.indexOf('remix.') === 0) {
// we keep the old feature. This will basically only be called when the command is querying the "remix" object.
@@ -243,7 +243,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
call('terminal', 'log',{ type: 'warn', value: `> ${script}` })
await call('solcoder', 'solidity_answer', script)
_paq.push(['trackEvent', 'ai', 'solcoder', 'askFromTerminal'])
- }else {
+ } else {
await call('scriptRunner', 'execute', script)
}
done()
@@ -401,7 +401,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
}
useEffect(() => {
- if(terminalState.clearConsole){
+ if (terminalState.clearConsole){
typeWriterIndexes.current = []
inputEl.current.focus()
}
@@ -433,7 +433,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
if (textList.length === 1) {
setAutoCompleteState((prevState) => ({
...prevState,
- data: { _options: [] },
+ data: { _options: []},
}))
const result = Objectfilter(allPrograms, autoCompletState.userInput)
setAutoCompleteState((prevState) => ({
@@ -443,7 +443,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
} else {
setAutoCompleteState((prevState) => ({
...prevState,
- data: { _options: [] },
+ data: { _options: []},
}))
const result = Objectfilter(allCommands, autoCompletState.userInput)
setAutoCompleteState((prevState) => ({
@@ -591,7 +591,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
} catch (e) {
console.error(e)
return true
- }
+ }
}
return (
@@ -773,13 +773,13 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
cancelFn={modalState.cancelFn}
handleHide={handleHideModal}
/>
- {toaster && }
- {toastProvider.show && }
+ {toaster && }
+ {toastProvider.show && }
))
}
-const typewrite = (elementsRef, message, callback) => {
+const typewrite = (elementsRef, message, callback) => {
(() => {
let count = 0
const id = setInterval(() => {
diff --git a/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx b/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx
index 3531b9ede2..7fb7dbea23 100644
--- a/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx
+++ b/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx
@@ -1,7 +1,7 @@
import React, {useEffect} from 'react' // eslint-disable-line
-import {FormattedMessage} from 'react-intl'
+import { FormattedMessage } from 'react-intl'
-const TerminalWelcomeMessage = ({packageJson, storage}) => {
+const TerminalWelcomeMessage = ({ packageJson, storage }) => {
return (
diff --git a/libs/remix-ui/theme-module/src/lib/remix-ui-theme-module.tsx b/libs/remix-ui/theme-module/src/lib/remix-ui-theme-module.tsx
index e2f2246698..30ee5efcdf 100644
--- a/libs/remix-ui/theme-module/src/lib/remix-ui-theme-module.tsx
+++ b/libs/remix-ui/theme-module/src/lib/remix-ui-theme-module.tsx
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
-import React, {useEffect, useState} from 'react'
-import {FormattedMessage} from 'react-intl'
-import {ThemeModule} from '../../types/theme-module'
+import React, { useEffect, useState } from 'react'
+import { FormattedMessage } from 'react-intl'
+import { ThemeModule } from '../../types/theme-module'
import './remix-ui-theme-module.module.css'
/* eslint-disable-next-line */
@@ -9,7 +9,7 @@ export interface RemixUiThemeModuleProps {
themeModule: ThemeModule
}
-export function RemixUiThemeModule({themeModule}: RemixUiThemeModuleProps) {
+export function RemixUiThemeModule({ themeModule }: RemixUiThemeModuleProps) {
const [themeName, setThemeName] = useState('')
useEffect(() => {
diff --git a/libs/remix-ui/toaster/src/lib/toaster.tsx b/libs/remix-ui/toaster/src/lib/toaster.tsx
index 85eb2a4fb0..32a68e005e 100644
--- a/libs/remix-ui/toaster/src/lib/toaster.tsx
+++ b/libs/remix-ui/toaster/src/lib/toaster.tsx
@@ -34,7 +34,7 @@ export const Toaster = (props: ToasterProps) => {
if (props.message) {
const timeOutId = setTimeout(() => {
setState((prevState) => {
- return {...prevState, hiding: true}
+ return { ...prevState, hiding: true }
})
}, state.timeOut)
@@ -74,14 +74,14 @@ export const Toaster = (props: ToasterProps) => {
const showFullMessage = () => {
setState((prevState) => {
- return {...prevState, showModal: true}
+ return { ...prevState, showModal: true }
})
}
const hideFullMessage = () => {
//eslint-disable-line
setState((prevState) => {
- return {...prevState, showModal: false}
+ return { ...prevState, showModal: false }
})
}
@@ -107,7 +107,7 @@ export const Toaster = (props: ToasterProps) => {
clearTimeout(state.timeOutId)
}
setState((prevState) => {
- return {...prevState, timeOutId: null}
+ return { ...prevState, timeOutId: null }
})
}
@@ -115,12 +115,12 @@ export const Toaster = (props: ToasterProps) => {
if (!state.timeOutId) {
const timeOutId = setTimeout(() => {
setState((prevState) => {
- return {...prevState, hiding: true}
+ return { ...prevState, hiding: true }
})
}, state.timeOut)
setState((prevState) => {
- return {...prevState, timeOutId}
+ return { ...prevState, timeOutId }
})
}
}
@@ -138,12 +138,12 @@ export const Toaster = (props: ToasterProps) => {
{state.message}
{state.showFullBtn && (
-
-
+
diff --git a/libs/remix-ui/tooltip-popup/src/lib/tooltip-popup.tsx b/libs/remix-ui/tooltip-popup/src/lib/tooltip-popup.tsx
index ea6f875141..ab4512c1e0 100644
--- a/libs/remix-ui/tooltip-popup/src/lib/tooltip-popup.tsx
+++ b/libs/remix-ui/tooltip-popup/src/lib/tooltip-popup.tsx
@@ -1,6 +1,6 @@
-import React, {useState} from 'react'
-import {OverlayTrigger, Popover} from 'react-bootstrap'
-import {TooltipPopupProps} from '../types'
+import React, { useState } from 'react'
+import { OverlayTrigger, Popover } from 'react-bootstrap'
+import { TooltipPopupProps } from '../types'
import './tooltip-popup.module.css'
const popover = (title?: string, content?: string | React.ReactNode) => (
diff --git a/libs/remix-ui/tree-view/src/lib/remix-ui-tree-view.tsx b/libs/remix-ui/tree-view/src/lib/remix-ui-tree-view.tsx
index fe7749e4ea..173d48baca 100644
--- a/libs/remix-ui/tree-view/src/lib/remix-ui-tree-view.tsx
+++ b/libs/remix-ui/tree-view/src/lib/remix-ui-tree-view.tsx
@@ -1,10 +1,10 @@
import React, { useEffect } from 'react' // eslint-disable-line
-import {TreeViewProps} from '../types'
+import { TreeViewProps } from '../types'
import './remix-ui-tree-view.css'
export const TreeView = (props: TreeViewProps) => {
- const {children, id, ...otherProps} = props
+ const { children, id, ...otherProps } = props
return (
diff --git a/libs/remix-ui/tree-view/src/lib/tree-view-item/tree-view-item.tsx b/libs/remix-ui/tree-view/src/lib/tree-view-item/tree-view-item.tsx
index 33c0469073..40bef87205 100644
--- a/libs/remix-ui/tree-view/src/lib/tree-view-item/tree-view-item.tsx
+++ b/libs/remix-ui/tree-view/src/lib/tree-view-item/tree-view-item.tsx
@@ -1,10 +1,10 @@
import React, {useState, useEffect} from 'react' // eslint-disable-line
-import {TreeViewItemProps} from '../../types'
+import { TreeViewItemProps } from '../../types'
import './tree-view-item.css'
export const TreeViewItem = (props: TreeViewItemProps) => {
- const {id, children, label, labelClass, expand, iconX = 'fas fa-caret-right', iconY = '', icon, controlBehaviour = false, innerRef, showIcon = true, ...otherProps} = props
+ const { id, children, label, labelClass, expand, iconX = 'fas fa-caret-right', iconY = '', icon, controlBehaviour = false, innerRef, showIcon = true, ...otherProps } = props
const [isExpanded, setIsExpanded] = useState(false)
useEffect(() => {
@@ -20,7 +20,7 @@ export const TreeViewItem = (props: TreeViewItemProps) => {
onClick={() => !controlBehaviour && setIsExpanded(!isExpanded)}
>
{children && showIcon ? (
-
+
) : icon ? (
) : null}
diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/components/Badge.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/components/Badge.tsx
index 77505133a9..81597d56a6 100644
--- a/libs/remix-ui/vertical-icons-panel/src/lib/components/Badge.tsx
+++ b/libs/remix-ui/vertical-icons-panel/src/lib/components/Badge.tsx
@@ -1,16 +1,16 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-non-null-assertion */
-import React, {useEffect} from 'react'
-import {BadgeStatus} from './Icon'
-import {CustomTooltip} from '@remix-ui/helper'
-import {FormattedMessage} from 'react-intl'
+import React, { useEffect } from 'react'
+import { BadgeStatus } from './Icon'
+import { CustomTooltip } from '@remix-ui/helper'
+import { FormattedMessage } from 'react-intl'
interface BadgeProps {
badgeStatus?: BadgeStatus
}
// eslint-disable-next-line no-undef
// eslint-disable-next-line @typescript-eslint/no-unused-vars
-function Badge({badgeStatus}: BadgeProps) {
+function Badge({ badgeStatus }: BadgeProps) {
/**
* resolve a classes list for @arg key
* @param {Object} key
diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/components/BasicLogo.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/components/BasicLogo.tsx
index 76d42eec3a..620e749cb4 100644
--- a/libs/remix-ui/vertical-icons-panel/src/lib/components/BasicLogo.tsx
+++ b/libs/remix-ui/vertical-icons-panel/src/lib/components/BasicLogo.tsx
@@ -4,7 +4,7 @@ interface BasicLogoProps {
solid?: boolean
}
-function BasicLogo({classList = '', solid = true}: BasicLogoProps) {
+function BasicLogo({ classList = '', solid = true }: BasicLogoProps) {
if (solid) {
return (
)
} else {
- return
+ return
}
}
diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/components/Chevron.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/components/Chevron.tsx
index fe8b6a5ef6..68a6785986 100644
--- a/libs/remix-ui/vertical-icons-panel/src/lib/components/Chevron.tsx
+++ b/libs/remix-ui/vertical-icons-panel/src/lib/components/Chevron.tsx
@@ -1,5 +1,5 @@
/* eslint-disable no-use-before-define */
-import React, {MutableRefObject} from 'react'
+import React, { MutableRefObject } from 'react'
export interface ChevronProps {
divElementRef: MutableRefObject
@@ -10,9 +10,9 @@ export interface ChevronProps {
function Chevron(props: ChevronProps) {
const click = () => {
if (props.direction === 'down') {
- props.divElementRef.current.scrollBy({top: 40, behavior: 'smooth'})
+ props.divElementRef.current.scrollBy({ top: 40, behavior: 'smooth' })
} else {
- props.divElementRef.current.scrollBy({top: -40, behavior: 'smooth'})
+ props.divElementRef.current.scrollBy({ top: -40, behavior: 'smooth' })
}
}
@@ -25,4 +25,4 @@ function Chevron(props: ChevronProps) {
)
}
-export {Chevron}
+export { Chevron }
diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/components/Home.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/components/Home.tsx
index 38514d149d..5a3e9e1789 100644
--- a/libs/remix-ui/vertical-icons-panel/src/lib/components/Home.tsx
+++ b/libs/remix-ui/vertical-icons-panel/src/lib/components/Home.tsx
@@ -1,4 +1,4 @@
-import {CustomTooltip} from '@remix-ui/helper'
+import { CustomTooltip } from '@remix-ui/helper'
import React from 'react'
import { FormattedMessage } from 'react-intl'
import BasicLogo from './BasicLogo'
@@ -6,13 +6,13 @@ interface HomeProps {
verticalIconPlugin: any
}
-function Home({verticalIconPlugin}: HomeProps) {
+function Home({ verticalIconPlugin }: HomeProps) {
return (
}>
await verticalIconPlugin.activateHome()}
- {...{plugin: 'home'}}
+ {...{ plugin: 'home' }}
data-id="verticalIconsHomeIcon"
id="verticalIconsHomeIcon"
>
diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx
index 73f11e72fb..00fb539fa6 100644
--- a/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx
+++ b/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx
@@ -1,12 +1,12 @@
import VerticalIconsContextMenu from '../vertical-icons-context-menu'
// eslint-disable-next-line no-use-before-define
-import React, {Fragment, SyntheticEvent, useEffect, useReducer, useRef, useState} from 'react'
-import {useIntl} from 'react-intl'
+import React, { Fragment, SyntheticEvent, useEffect, useReducer, useRef, useState } from 'react'
+import { useIntl } from 'react-intl'
import Badge from './Badge'
-import {iconBadgeReducer, IconBadgeReducerAction} from '../reducers/iconBadgeReducer'
-import {Plugin} from '@remixproject/engine'
-import {IconRecord} from '../types'
-import {CustomTooltip} from '@remix-ui/helper'
+import { iconBadgeReducer, IconBadgeReducerAction } from '../reducers/iconBadgeReducer'
+import { Plugin } from '@remixproject/engine'
+import { IconRecord } from '../types'
+import { CustomTooltip } from '@remix-ui/helper'
export interface IconStatus {
key: string
@@ -34,11 +34,11 @@ const initialState = {
pluginName: ''
}
-const Icon = ({iconRecord, verticalIconPlugin, contextMenuAction, theme}: IconProps) => {
+const Icon = ({ iconRecord, verticalIconPlugin, contextMenuAction, theme }: IconProps) => {
const intl = useIntl()
- const {displayName, name, icon, documentation} = iconRecord.profile
+ const { displayName, name, icon, documentation } = iconRecord.profile
const [title] = useState(() => {
- const temp = name ? intl.formatMessage({id: `${name}.displayName`, defaultMessage: displayName || name}) : null
+ const temp = name ? intl.formatMessage({ id: `${name}.displayName`, defaultMessage: displayName || name }) : null
return temp.replace(/^\w/, (word: string) => word.toUpperCase())
})
const [links, setLinks] = useState<{
@@ -57,9 +57,9 @@ const Icon = ({iconRecord, verticalIconPlugin, contextMenuAction, theme}: IconPr
const handleContextMenu = (e: SyntheticEvent & PointerEvent) => {
const deactivationState = iconRecord.canbeDeactivated
if (documentation && documentation.length > 0 && deactivationState) {
- setLinks({Documentation: documentation, CanDeactivate: deactivationState})
+ setLinks({ Documentation: documentation, CanDeactivate: deactivationState })
} else {
- setLinks({Documentation: documentation, CanDeactivate: deactivationState})
+ setLinks({ Documentation: documentation, CanDeactivate: deactivationState })
}
setShowContext(false)
setPageX(e.pageX)
@@ -75,7 +75,7 @@ const Icon = ({iconRecord, verticalIconPlugin, contextMenuAction, theme}: IconPr
iconStatus.pluginName = name
const action: IconBadgeReducerAction = {
type: name,
- payload: {status: iconStatus, verticalIconPlugin: verticalIconPlugin}
+ payload: { status: iconStatus, verticalIconPlugin: verticalIconPlugin }
}
dispatchStatusUpdate(action)
})
@@ -84,26 +84,25 @@ const Icon = ({iconRecord, verticalIconPlugin, contextMenuAction, theme}: IconPr
}
}, [])
-
const stylePC = iconRecord.active ? 'flex-start' : 'center'
return (
<>
-
+
{iconRecord.active &&
}
{
;(verticalIconPlugin as any).toggle(name)
}}
- {...{plugin: name}}
+ {...{ plugin: name }}
onContextMenu={(e: any) => {
e.preventDefault()
e.stopPropagation()
diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/components/IconList.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/components/IconList.tsx
index d621ed2eb5..50636fb1ce 100644
--- a/libs/remix-ui/vertical-icons-panel/src/lib/components/IconList.tsx
+++ b/libs/remix-ui/vertical-icons-panel/src/lib/components/IconList.tsx
@@ -1,8 +1,8 @@
/* eslint-disable no-use-before-define */
/* eslint-disable @typescript-eslint/no-unused-vars */
-import React, {useEffect} from 'react'
-import {Plugin} from '@remixproject/engine'
-import {IconRecord} from '../types'
+import React, { useEffect } from 'react'
+import { Plugin } from '@remixproject/engine'
+import { IconRecord } from '../types'
import Icon from './Icon'
interface OtherIconsProps {
verticalIconsPlugin: Plugin
@@ -11,7 +11,7 @@ interface OtherIconsProps {
theme: string
}
-function IconList({verticalIconsPlugin, itemContextAction, icons, theme}: OtherIconsProps) {
+function IconList({ verticalIconsPlugin, itemContextAction, icons, theme }: OtherIconsProps) {
return (
{icons.map((p) => (
diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.tsx
index e19bcb0681..ffb7d3bae5 100644
--- a/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.tsx
+++ b/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.tsx
@@ -8,7 +8,7 @@ import { Chevron } from './components/Chevron'
import { IconRecord } from './types'
import { onLineContext } from '@remix-ui/app'
import { CustomTooltip } from '@remix-ui/helper'
-import {Registry} from '@remix-project/remix-lib'
+import { Registry } from '@remix-project/remix-lib'
export interface RemixUiVerticalIconsPanelProps {
verticalIconsPlugin: Plugin
diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/vertical-icons-context-menu.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/vertical-icons-context-menu.tsx
index 66cb24ef7a..8d8ca86986 100644
--- a/libs/remix-ui/vertical-icons-panel/src/lib/vertical-icons-context-menu.tsx
+++ b/libs/remix-ui/vertical-icons-panel/src/lib/vertical-icons-context-menu.tsx
@@ -1,6 +1,6 @@
-import {Plugin} from '@remixproject/engine'
-import React, {Fragment, useEffect, useRef} from 'react'
-import {FormattedMessage} from 'react-intl'
+import { Plugin } from '@remixproject/engine'
+import React, { Fragment, useEffect, useRef } from 'react'
+import { FormattedMessage } from 'react-intl'
export interface VerticalIconsContextMenuProps extends React.DetailedHTMLProps
, HTMLDivElement> {
pageX: number
@@ -66,7 +66,7 @@ const VerticalIconsContextMenu = (props: VerticalIconsContextMenuProps) => {
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
-const MenuForLinks = ({listItems, hide, profileName, contextMenuAction}: MenuLinksProps) => {
+const MenuForLinks = ({ listItems, hide, profileName, contextMenuAction }: MenuLinksProps) => {
return (
{listItems.CanDeactivate ? (
diff --git a/libs/remix-ui/vyper-compile-details/src/lib/vyper-compile-details.tsx b/libs/remix-ui/vyper-compile-details/src/lib/vyper-compile-details.tsx
index c1f9d40c17..f10a7b7bed 100644
--- a/libs/remix-ui/vyper-compile-details/src/lib/vyper-compile-details.tsx
+++ b/libs/remix-ui/vyper-compile-details/src/lib/vyper-compile-details.tsx
@@ -2,7 +2,6 @@ import React from 'react'
import VyperCompile from './vyperCompile'
import { ThemeKeys, ThemeObject } from '@microlink/react-json-view'
-
interface RemixUiVyperCompileDetailsProps {
payload: any
theme?: ThemeKeys | ThemeObject
@@ -21,7 +20,7 @@ export function RemixUiVyperCompileDetails({ payload, theme, themeStyle }: Remix
return (
<>
diff --git a/libs/remix-ui/vyper-compile-details/src/lib/vyperCompile.tsx b/libs/remix-ui/vyper-compile-details/src/lib/vyperCompile.tsx
index fc08430b50..c148e2232a 100644
--- a/libs/remix-ui/vyper-compile-details/src/lib/vyperCompile.tsx
+++ b/libs/remix-ui/vyper-compile-details/src/lib/vyperCompile.tsx
@@ -36,7 +36,7 @@ type tabContentType = {
evmVersion?: string
}
-export default function VyperCompile({result, theme, themeStyle}: VyperCompileProps) {
+export default function VyperCompile({ result, theme, themeStyle }: VyperCompileProps) {
const [active, setActive] = useState('abi')
const tabContent: tabContentType[] = [
{
@@ -83,7 +83,7 @@ export default function VyperCompile({result, theme, themeStyle}: VyperCompilePr
{content.eventKey === 'abi' ? (
{JSON.stringify(content?.tabPayload)?.length > 1 ? : null}
diff --git a/libs/remix-ui/workspace/src/lib/actions/events.ts b/libs/remix-ui/workspace/src/lib/actions/events.ts
index b6e7200cc8..74f8bad6b5 100644
--- a/libs/remix-ui/workspace/src/lib/actions/events.ts
+++ b/libs/remix-ui/workspace/src/lib/actions/events.ts
@@ -126,7 +126,7 @@ export const listenOnProviderEvents = (provider) => (reducerDispatch: React.Disp
if (config.get('currentFile') === path) {
// if it's the current file and the content is different:
- if(showAlert){
+ if (showAlert){
dispatch(displayNotification(
path + ' changed',
'This file has been changed outside of Remix IDE.',
@@ -134,7 +134,7 @@ export const listenOnProviderEvents = (provider) => (reducerDispatch: React.Disp
() => {
editor.setText(path, content)
}
- ))}else{
+ ))} else {
editor.setText(path, content)
}
} else {
@@ -181,7 +181,7 @@ const fileAdded = async (filePath: string) => {
if (!isExpanded) return
}
-
+
await dispatch(fileAddedSuccess(filePath))
if (filePath.includes('_test.sol')) {
plugin.emit('newTestFileCreated', filePath)
@@ -195,7 +195,7 @@ const folderAdded = async (folderPath: string) => {
const isExpanded = await plugin.call('filePanel', 'isExpanded', path)
if (!isExpanded) return
}
-
+
const promise: Promise = new Promise((resolve) => {
provider.resolveDirectory(path, (error, fileTree: FileTree) => {
if (error) console.error(error)
@@ -219,7 +219,7 @@ const fileRemoved = async (removePath: string) => {
const fileRenamed = async (oldPath: string) => {
const provider = plugin.fileManager.currentFileProvider()
const path = extractParentFromKey(oldPath) || ROOT_PATH
-
+
const promise: Promise = new Promise((resolve) => {
provider.resolveDirectory(path, (error, fileTree: FileTree) => {
if (error) console.error(error)
diff --git a/libs/remix-ui/workspace/src/lib/actions/index.ts b/libs/remix-ui/workspace/src/lib/actions/index.ts
index 249db2fe47..d15cfea28b 100644
--- a/libs/remix-ui/workspace/src/lib/actions/index.ts
+++ b/libs/remix-ui/workspace/src/lib/actions/index.ts
@@ -61,7 +61,7 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React.
let workspaces = []
plugin.on('editor', 'editorMounted', async () => {
editorMounted = true
- if(filePathToOpen){
+ if (filePathToOpen){
setTimeout(async () => {
await plugin.fileManager.openFile(filePathToOpen)
filePathToOpen = null
@@ -83,11 +83,11 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React.
plugin.setWorkspace({ name: 'code-sample', isLocalhost: false })
dispatch(setCurrentWorkspace({ name: 'code-sample', isGitRepo: false }))
const filePath = await loadWorkspacePreset('code-template')
- plugin.on('filePanel', 'workspaceInitializationCompleted', async () => {
+ plugin.on('filePanel', 'workspaceInitializationCompleted', async () => {
if (editorMounted){
setTimeout(async () => {
await plugin.fileManager.openFile(filePath)}, 1000)
- }else{
+ } else {
filePathToOpen = filePath
}
})
@@ -116,7 +116,7 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React.
if (editorMounted){
setTimeout(async () => {
await plugin.fileManager.openFile(filePath)}, 1000)
- }else{
+ } else {
filePathToOpen = filePath
}
})
@@ -168,11 +168,11 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React.
await workspaceProvider.set(filePath, data.compilationTargets[filePath]['content'])
}
- plugin.on('filePanel', 'workspaceInitializationCompleted', async () => {
+ plugin.on('filePanel', 'workspaceInitializationCompleted', async () => {
if (editorMounted){
setTimeout(async () => {
await plugin.fileManager.openFile(filePath)}, 1000)
- }else{
+ } else {
filePathToOpen = filePath
}
})
@@ -190,7 +190,7 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React.
const currentPath = await plugin.call('fs', 'getWorkingDir')
dispatch(setCurrentLocalFilePath(currentPath))
plugin.setWorkspace({ name: 'electron', isLocalhost: false })
-
+
dispatch(setCurrentWorkspace({ name: 'electron', isGitRepo: false }))
electrOnProvider.init()
listenOnProviderEvents(electrOnProvider)(dispatch)
@@ -263,7 +263,7 @@ export type SolidityConfiguration = {
export const publishToGist = async (path?: string) => {
// If 'id' is not defined, it is not a gist update but a creation so we have to take the files from the browser explorer.
const folder = path || '/'
-
+
try {
let id
if (path) {
@@ -432,7 +432,7 @@ export const copyShareURL = async (path: string) => {
const ipfs = IpfsHttpClient({ port, host, protocol
, headers: {
// authorization: auth
- }
+ }
})
const fileContent = await fileManager.readFile(path)
diff --git a/libs/remix-ui/workspace/src/lib/actions/workspace.ts b/libs/remix-ui/workspace/src/lib/actions/workspace.ts
index c931a3dd1c..fd79dd961c 100644
--- a/libs/remix-ui/workspace/src/lib/actions/workspace.ts
+++ b/libs/remix-ui/workspace/src/lib/actions/workspace.ts
@@ -85,7 +85,7 @@ export const setPlugin = (filePanelPlugin, reducerDispatch) => {
await getGitConfig()
})
plugin.on('fileManager', 'fileAdded', async (filePath: string) => {
- if(filePath.includes('.gitmodules')) {
+ if (filePath.includes('.gitmodules')) {
await checkGit()
}
})
@@ -187,7 +187,7 @@ export const createWorkspace = async (
}
}
}
- if (metadata && metadata.type === 'plugin') {
+ if (metadata && metadata.type === 'plugin') {
plugin.call('notification', 'toast', 'Please wait while the workspace is being populated with the template.')
dispatch(cloneRepositoryRequest())
setTimeout(() => {
@@ -196,8 +196,8 @@ export const createWorkspace = async (
}).catch((e) => {
dispatch(cloneRepositorySuccess())
plugin.call('notification', 'toast', 'error adding template ' + e.message || e)
- })
- }, 5000)
+ })
+ }, 5000)
} else if (!isEmpty && !(isGitRepo && createCommit)) await loadWorkspacePreset(workspaceTemplateName, opts)
cb && cb(null, workspaceName)
if (isGitRepo) {
@@ -224,7 +224,7 @@ export const createWorkspaceTemplate = async (workspaceName: string, template: W
if ((await workspaceExists(workspaceName)) && template === 'remixDefault') throw new Error('workspace already exists')
else if (metadata && metadata.type === 'git') {
dispatch(cloneRepositoryRequest())
- await plugin.call('dGitProvider', 'clone', {url: metadata.url, branch: metadata.branch}, workspaceName)
+ await plugin.call('dGitProvider', 'clone', { url: metadata.url, branch: metadata.branch }, workspaceName)
dispatch(cloneRepositorySuccess())
} else {
const workspaceProvider = plugin.fileProviders.workspace
@@ -270,7 +270,7 @@ export const loadWorkspacePreset = async (template: WorkspaceTemplate = 'remixDe
const ipfs = IpfsHttpClient({ port, host, protocol
, headers: {
// authorization: auth
- }
+ }
})
const hashed = bytesToHex(hash.keccakFromString(params.shareCode))
@@ -603,7 +603,7 @@ export const getWorkspaces = async (): Promise<{ name: string; isGitRepo: boolea
const workspaces: { name: string; isGitRepo: boolean; hasGitSubmodules: boolean; branches?: { remote: any; name: string }[]; currentBranch?: string }[] = await new Promise((resolve, reject) => {
const workspacesPath = plugin.fileProviders.workspace.workspacesPath
plugin.fileProviders.browser.resolveDirectory('/' + workspacesPath, (error, items) => {
-
+
if (error) {
return reject(error)
}
@@ -686,7 +686,7 @@ export const cloneRepository = async (url: string) => {
const cloneModal = {
id: 'cloneGitRepository',
title: 'Clone Git Repository',
- message:
+ message:
'An error occurred: Please check that you have the correct URL for the repo. If the repo is private, you need to add your github credentials (with the valid token permissions) in Settings plugin',
modalType: 'modal',
okLabel: plugin.registry.get('platform').api.isDesktop() ? 'Select or create folder':'OK',
diff --git a/libs/remix-ui/workspace/src/lib/components/electron-menu.tsx b/libs/remix-ui/workspace/src/lib/components/electron-menu.tsx
index b5b4eff32b..a5239c4bd4 100644
--- a/libs/remix-ui/workspace/src/lib/components/electron-menu.tsx
+++ b/libs/remix-ui/workspace/src/lib/components/electron-menu.tsx
@@ -5,8 +5,6 @@ import { FormattedMessage } from "react-intl"
import '../css/electron-menu.css'
import { CustomTooltip } from '@remix-ui/helper'
-
-
export const ElectronMenu = () => {
const platform = useContext(platformContext)
const global = useContext(FileSystemContext)
diff --git a/libs/remix-ui/workspace/src/lib/components/electron-workspace-name.tsx b/libs/remix-ui/workspace/src/lib/components/electron-workspace-name.tsx
index 96f59a16fe..e7aafb644e 100644
--- a/libs/remix-ui/workspace/src/lib/components/electron-workspace-name.tsx
+++ b/libs/remix-ui/workspace/src/lib/components/electron-workspace-name.tsx
@@ -2,7 +2,6 @@ import { CustomTooltip } from "@remix-ui/helper"
import React from "react"
import path from 'path'
-
interface ElectronWorkspaceNameProps {
path: string
plugin: any
@@ -10,8 +9,8 @@ interface ElectronWorkspaceNameProps {
export const ElectronWorkspaceName = (props: ElectronWorkspaceNameProps) => {
const { path: dir } = props
-
- const parsePath = () => {
+
+ const parsePath = () => {
const pathArray = dir.split(path.posix.sep)
return pathArray[pathArray.length - 1]
}
diff --git a/libs/remix-ui/workspace/src/lib/components/file-explorer-context-menu.tsx b/libs/remix-ui/workspace/src/lib/components/file-explorer-context-menu.tsx
index 08659f64e8..1024821340 100644
--- a/libs/remix-ui/workspace/src/lib/components/file-explorer-context-menu.tsx
+++ b/libs/remix-ui/workspace/src/lib/components/file-explorer-context-menu.tsx
@@ -1,9 +1,9 @@
import React, {useRef, useEffect, useState, useContext} from 'react' // eslint-disable-line
-import {useIntl} from 'react-intl'
-import {action, FileExplorerContextMenuProps} from '../types'
+import { useIntl } from 'react-intl'
+import { action, FileExplorerContextMenuProps } from '../types'
import '../css/file-explorer-context-menu.css'
-import {customAction} from '@remixproject/plugin-api'
+import { customAction } from '@remixproject/plugin-api'
import UploadFile from './upload-file'
import { appPlatformTypes, platformContext } from '@remix-ui/app'
@@ -85,7 +85,7 @@ export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) =>
}
const itemMatchesCondition = (item: action, itemType: string, itemPath: string) => {
- if( platform === appPlatformTypes.desktop && item.platform && item.platform === appPlatformTypes.web) return false
+ if ( platform === appPlatformTypes.desktop && item.platform && item.platform === appPlatformTypes.web) return false
else if (item.type && Array.isArray(item.type) && (item.type.findIndex(name => name === itemType) !== -1)) return true
else if (item.path && Array.isArray(item.path) && (item.path.findIndex(key => key === itemPath) !== -1)) return true
else if (item.extension && Array.isArray(item.extension) && (item.extension.findIndex(ext => itemPath.endsWith(ext)) !== -1)) return true
@@ -231,7 +231,7 @@ export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) =>
break
default:
_paq.push(['trackEvent', 'fileExplorer', 'contextMenu', `${item.id}/${item.name}`])
- emit && emit({...item, path: [path]} as customAction)
+ emit && emit({ ...item, path: [path]} as customAction)
break
}
hideContextMenu()
@@ -251,7 +251,7 @@ export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) =>