fixed linting for vyper and walletconnect

pull/4771/head
lianahus 7 months ago
parent e0a2012a78
commit dde16c2bd4
  1. 4
      apps/vyper/project.json
  2. 4
      apps/vyper/src/app/utils/types.ts
  3. 4
      apps/walletconnect/project.json
  4. 16
      apps/walletconnect/src/services/WalletConnectRemixClient.ts

@ -42,8 +42,8 @@
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/vyper/**/*.ts"],
"eslintConfig": "libs/vyper/.eslintrc"
"lintFilePatterns": ["apps/vyper/**/*.ts"],
"eslintConfig": "apps/vyper/.eslintrc"
}
},
"serve": {

@ -1,4 +1,4 @@
import {CompilationResult, ABIDescription} from '@remixproject/plugin-api'
import { CompilationResult, ABIDescription } from '@remixproject/plugin-api'
export interface VyperCompilationResult {
status: 'success'
@ -18,7 +18,6 @@ export interface VyperCompilationError {
message: string
}
export type VyperCompilationResultType = {
buildDependencies: any
compilers: [
@ -448,7 +447,6 @@ deployments: {
[contractName: string]: ContractInstanceObject
}
}
export type CompilerInformationObject = {

@ -39,8 +39,8 @@
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/walletconnect/**/*.ts"],
"eslintConfig": "libs/walletconnect/.eslintrc"
"lintFilePatterns": ["apps/walletconnect/**/*.ts"],
"eslintConfig": "apps/walletconnect/.eslintrc"
}
},
"serve": {

@ -1,9 +1,9 @@
import {PluginClient} from '@remixproject/plugin'
import {createClient} from '@remixproject/plugin-webview'
import { PluginClient } from '@remixproject/plugin'
import { createClient } from '@remixproject/plugin-webview'
import { createWeb3Modal, defaultConfig } from '@web3modal/ethers5/react'
import { constants } from '../utils/constants'
import EventManager from 'events'
import {PROJECT_ID as projectId, METADATA as metadata} from './constant'
import { PROJECT_ID as projectId, METADATA as metadata } from './constant'
import { Chain, RequestArguments } from '../types'
export class WalletConnectRemixClient extends PluginClient {
@ -50,7 +50,7 @@ export class WalletConnectRemixClient extends PluginClient {
subscribeToEvents() {
this.web3modal.subscribeProvider(({ address, isConnected, chainId })=>{
if(isConnected){
if (isConnected){
if (address !== this.currentAccount) {
this.currentAccount = address
this.emit('accountsChanged', [address])
@ -59,7 +59,7 @@ export class WalletConnectRemixClient extends PluginClient {
this.currentChain = chainId
this.emit('chainChanged', chainId)
}
}else{
} else {
this.emit('accountsChanged', [])
this.currentAccount = ''
this.emit('chainChanged', 0)
@ -114,16 +114,16 @@ export class WalletConnectRemixClient extends PluginClient {
} else {
try {
const message = await provider.request(data)
return {jsonrpc: '2.0', result: message, id: data.id}
return { jsonrpc: '2.0', result: message, id: data.id }
} catch (e) {
return {jsonrpc: '2.0', error: { message: e.message, code: -32603 }, id: data.id}
return { jsonrpc: '2.0', error: { message: e.message, code: -32603 }, id: data.id }
}
}
}
} else {
const err = `Cannot make ${data.method} request. Remix client is not connected to walletconnect client`
console.error(err)
return {jsonrpc: '2.0', error: { message: err, code: -32603 }, id: data.id}
return { jsonrpc: '2.0', error: { message: err, code: -32603 }, id: data.id }
}
}

Loading…
Cancel
Save