Skip to content

Commit

Permalink
[SWA-46] Update unused variable to fix type checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Wixzi committed Jun 17, 2023
1 parent 77e6c07 commit cad6291
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
12 changes: 5 additions & 7 deletions src/pages/Swap/LimitOrder/LimitOrder.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import dayjs from 'dayjs'
import { parseUnits } from 'ethers/lib/utils'
import { useCallback, useEffect, useRef, useState } from 'react'
import { useEffect, useRef, useState } from 'react'
import { Flex } from 'rebass'

import { AutoColumn } from '../../../components/Column'
Expand All @@ -21,13 +19,13 @@ export default function LimitOrderUI() {

const { chainId, account, library } = useActiveWeb3React()

const [protocol, setProtocol] = useState(limitSdk.getactiveProtocol())
const [protocol, setProtocol] = useState(limitSdk.getActiveProtocol())
const [fetchMarketPrice, setFetchMarketPrice] = useState<boolean>(true)

useEffect(() => {
async function updateSigner(signerData: LimitOrderChangeHandler) {
await limitSdk.updateSigner(signerData)
setProtocol(limitSdk.getactiveProtocol())
setProtocol(limitSdk.getActiveProtocol())
}
if (chainId && account && library) {
updateSigner({ activeChainId: chainId, account, activeProvider: library })
Expand Down Expand Up @@ -62,7 +60,7 @@ export default function LimitOrderUI() {
<CurrencyInputPanel
id="limit-order-sell-currency"
value="0"
onUserInput={function (value: string): void {
onUserInput={function (_value: string): void {
throw new Error('Function not implemented.')
}}
showNativeCurrency={false}
Expand All @@ -71,7 +69,7 @@ export default function LimitOrderUI() {
<CurrencyInputPanel
id="limit-order-buy-currency"
value="0"
onUserInput={function (value: string): void {
onUserInput={function (_value: string): void {
throw new Error('Function not implemented.')
}}
showNativeCurrency={false}
Expand Down
2 changes: 1 addition & 1 deletion src/services/LimitOrders/CoW/CoW.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class CoW extends LimitOrderBase {
this.kind = kind
}

async setToMarket(sellPricePercentage: number, buyPricePercentage: number): Promise<void> {
async setToMarket(_sellPricePercentage: number, _buyPricePercentage: number): Promise<void> {
const sellToken = this.sellToken
const buyToken = this.buyToken
if (!sellToken || !buyToken) {
Expand Down
2 changes: 1 addition & 1 deletion src/services/LimitOrders/LimitOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class LimitOrder {
)
}

getactiveProtocol = () => {
getActiveProtocol = () => {
console.log('LimitOrder getactiveProtocols')
this.activeProtocol = this.#protocols.find(
protocol => protocol.activeChainId && protocol.supportedChanins.includes(protocol.activeChainId)
Expand Down

0 comments on commit cad6291

Please sign in to comment.