From f7bd13b9f8f5697a06675df0ec95672c95246b8a Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 1 Oct 2024 15:43:31 +0200 Subject: [PATCH] linting --- apps/remix-ide/src/blockchain/providers/vm.ts | 4 ++-- .../run-tab/src/lib/components/account.tsx | 16 ++++++++-------- .../remix-ui/workspace/src/lib/actions/index.tsx | 6 +++--- .../components/file-explorer-context-menu.tsx | 6 +++--- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/apps/remix-ide/src/blockchain/providers/vm.ts b/apps/remix-ide/src/blockchain/providers/vm.ts index 21d087cb96..a6614682c7 100644 --- a/apps/remix-ide/src/blockchain/providers/vm.ts +++ b/apps/remix-ide/src/blockchain/providers/vm.ts @@ -39,8 +39,8 @@ export class VMProvider { return new Promise((resolve, reject) => { this.worker.addEventListener('message', (msg) => { if (msg.data.cmd === 'sendAsyncResult' && stamps[msg.data.stamp]) { - let result = msg.data.result - if (stamps[msg.data.stamp].request && msg.data.result) result = msg.data.result.result + const result = msg.data.result + // if (stamps[msg.data.stamp].request && msg.data.result) result = msg.data.result.result if (stamps[msg.data.stamp].callback) { stamps[msg.data.stamp].callback(msg.data.error, result) diff --git a/libs/remix-ui/run-tab/src/lib/components/account.tsx b/libs/remix-ui/run-tab/src/lib/components/account.tsx index 087bd132b1..27b3b7264d 100644 --- a/libs/remix-ui/run-tab/src/lib/components/account.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/account.tsx @@ -178,19 +178,19 @@ export function AccountUI(props: AccountProps) {
otherwise
, intl.formatMessage({ id: 'udapp.EIP712-create-template' }), () => { props.addFile('EIP-712-data.json', JSON.stringify(EIP712_Example, null, '\t')) }, - intl.formatMessage({ id: 'udapp.EIP712-close' }), + intl.formatMessage({ id: 'udapp.EIP712-close' }), () => {}) }}>Sign with EIP 712 diff --git a/libs/remix-ui/workspace/src/lib/actions/index.tsx b/libs/remix-ui/workspace/src/lib/actions/index.tsx index bec7039e6a..9781a77e76 100644 --- a/libs/remix-ui/workspace/src/lib/actions/index.tsx +++ b/libs/remix-ui/workspace/src/lib/actions/index.tsx @@ -512,21 +512,21 @@ export const runScript = async (path: string) => { export const signTypedData = async (path: string) => { const typedData = await plugin.call('fileManager', 'readFile', path) const web3 = await plugin.call('blockchain', 'web3') - const settings = await plugin.call('udapp', 'getSettings') + const settings = await plugin.call('udapp', 'getSettings') let parsed try { parsed = JSON.parse(typedData) } catch (err) { dispatch(displayPopUp(`${path} isn't a valid JSON.`)) return - } + } try { const result = await web3.currentProvider.request({ method: 'eth_signTypedData', params: [settings.selectedAccount, parsed] }) - + plugin.call('terminal', 'log', { type: 'log', value: `${path} signature using ${settings.selectedAccount} : ${result}` }) } catch (e) { console.error(e) 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 0f408066aa..58969c959d 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 @@ -234,11 +234,11 @@ export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) => case 'Publish Workspace to Gist': _paq.push(['trackEvent', 'fileExplorer', 'contextMenu', 'publishWorkspace']) publishFolderToGist(path) - break - case 'Sign Typed Data': + break + case 'Sign Typed Data': _paq.push(['trackEvent', 'fileExplorer', 'contextMenu', 'signTypedData']) signTypedData(path) - break + break default: _paq.push(['trackEvent', 'fileExplorer', 'contextMenu', `${item.id}/${item.name}`]) emit && emit({ ...item, path: [path]} as customAction)