Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
compojoom committed Mar 8, 2024
1 parent 66b1f60 commit ffe8a88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
16 changes: 1 addition & 15 deletions src/components/swap/CowWidgetCommunicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,6 @@ export const CowWidgetCommunicator = ({ sell }: Params) => {
const dispatch = useAppDispatch()

const [toasts, setToasts] = useState<String[]>([])
const toast = toasts.length > 0 ? toasts[0] : undefined

const openToast = (message: string) => {
setToasts((t) => [...t, message])
}

const handleClose = (event: React.SyntheticEvent | Event, reason?: string) => {
if (reason === 'clickaway') {
return
}

setToasts((t) => t.slice(1))
}

const groupKey = 'swap-order-status'
const listeners = useMemo<CowEventListeners>(() => {
Expand Down Expand Up @@ -124,11 +111,10 @@ export const CowWidgetCommunicator = ({ sell }: Params) => {
)
break
}
openToast(event.message)
},
},
]
}, [openToast])
}, [dispatch])

const [params, setParams] = useState<CowSwapWidgetParams | null>(null)
useEffect(() => {
Expand Down
1 change: 1 addition & 0 deletions src/services/safe-wallet-provider/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export class SafeWalletProvider {
const tx = {
value: '0',
data: '0x',
// @ts-ignore
...(params[0] as { gas: string | number; to: string }),
}
return this.eth_sendTransaction(tx, appInfo)
Expand Down

0 comments on commit ffe8a88

Please sign in to comment.