fix 'non-empty-pattern' ts warning
This commit is contained in:
parent
7dfa7af41d
commit
95a753cbe5
|
@ -4,7 +4,7 @@ export interface InterfaceParams {
|
|||
type: string
|
||||
}
|
||||
|
||||
export interface ContractInterface {
|
||||
export interface MethodInterface {
|
||||
constant: boolean
|
||||
inputs: InterfaceParams[]
|
||||
name: string
|
||||
|
@ -14,12 +14,12 @@ export interface ContractInterface {
|
|||
type: string
|
||||
}
|
||||
|
||||
export interface ExtendedContractInterface extends ContractInterface {
|
||||
export interface ExtendedContractInterface extends MethodInterface {
|
||||
action: string
|
||||
methodSignature: string
|
||||
signatureHash: string
|
||||
}
|
||||
|
||||
export type ABI = ContractInterface[]
|
||||
export type ABI = MethodInterface[]
|
||||
|
||||
export type ExtendedABI = ExtendedContractInterface[]
|
||||
|
|
|
@ -16,11 +16,12 @@ import CheckIcon from 'src/routes/safe/components/CurrencyDropdown/img/check.svg
|
|||
import { useDropdownStyles } from 'src/routes/safe/components/CurrencyDropdown/style'
|
||||
import { DropdownListTheme } from 'src/theme/mui'
|
||||
import { extractUsefulMethods } from 'src/logic/contractInteraction/sources/ABIService'
|
||||
import { MethodInterface } from 'src/logic/contractInteraction/sources/ABIService/types'
|
||||
|
||||
const MENU_WIDTH = '452px'
|
||||
|
||||
interface MethodsDropdownProps {
|
||||
onChange: ({}) => void
|
||||
onChange: (method: MethodInterface) => void
|
||||
}
|
||||
|
||||
const MethodsDropdown = ({ onChange }: MethodsDropdownProps) => {
|
||||
|
@ -60,7 +61,7 @@ const MethodsDropdown = ({ onChange }: MethodsDropdownProps) => {
|
|||
setAnchorEl(null)
|
||||
}
|
||||
|
||||
const onMethodSelectedChanged = (chosenMethod) => {
|
||||
const onMethodSelectedChanged = (chosenMethod: MethodInterface) => {
|
||||
setSelectedMethod(chosenMethod)
|
||||
onChange(chosenMethod)
|
||||
handleClose()
|
||||
|
|
|
@ -33,7 +33,7 @@ export interface ContractInteractionProps {
|
|||
contractAddress: string
|
||||
initialValues: { contractAddress?: string }
|
||||
onClose: () => void
|
||||
onNext: ({}: CreatedTx) => void
|
||||
onNext: (tx: CreatedTx) => void
|
||||
}
|
||||
|
||||
const ContractInteraction = ({ contractAddress, initialValues, onClose, onNext }: ContractInteractionProps) => {
|
||||
|
|
Loading…
Reference in New Issue