mirror of
https://github.com/status-im/safe-react.git
synced 2025-02-17 12:07:09 +00:00
fix 'non-empty-pattern' ts warning
This commit is contained in:
parent
7dfa7af41d
commit
95a753cbe5
@ -4,7 +4,7 @@ export interface InterfaceParams {
|
|||||||
type: string
|
type: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ContractInterface {
|
export interface MethodInterface {
|
||||||
constant: boolean
|
constant: boolean
|
||||||
inputs: InterfaceParams[]
|
inputs: InterfaceParams[]
|
||||||
name: string
|
name: string
|
||||||
@ -14,12 +14,12 @@ export interface ContractInterface {
|
|||||||
type: string
|
type: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ExtendedContractInterface extends ContractInterface {
|
export interface ExtendedContractInterface extends MethodInterface {
|
||||||
action: string
|
action: string
|
||||||
methodSignature: string
|
methodSignature: string
|
||||||
signatureHash: string
|
signatureHash: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ABI = ContractInterface[]
|
export type ABI = MethodInterface[]
|
||||||
|
|
||||||
export type ExtendedABI = ExtendedContractInterface[]
|
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 { useDropdownStyles } from 'src/routes/safe/components/CurrencyDropdown/style'
|
||||||
import { DropdownListTheme } from 'src/theme/mui'
|
import { DropdownListTheme } from 'src/theme/mui'
|
||||||
import { extractUsefulMethods } from 'src/logic/contractInteraction/sources/ABIService'
|
import { extractUsefulMethods } from 'src/logic/contractInteraction/sources/ABIService'
|
||||||
|
import { MethodInterface } from 'src/logic/contractInteraction/sources/ABIService/types'
|
||||||
|
|
||||||
const MENU_WIDTH = '452px'
|
const MENU_WIDTH = '452px'
|
||||||
|
|
||||||
interface MethodsDropdownProps {
|
interface MethodsDropdownProps {
|
||||||
onChange: ({}) => void
|
onChange: (method: MethodInterface) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
const MethodsDropdown = ({ onChange }: MethodsDropdownProps) => {
|
const MethodsDropdown = ({ onChange }: MethodsDropdownProps) => {
|
||||||
@ -60,7 +61,7 @@ const MethodsDropdown = ({ onChange }: MethodsDropdownProps) => {
|
|||||||
setAnchorEl(null)
|
setAnchorEl(null)
|
||||||
}
|
}
|
||||||
|
|
||||||
const onMethodSelectedChanged = (chosenMethod) => {
|
const onMethodSelectedChanged = (chosenMethod: MethodInterface) => {
|
||||||
setSelectedMethod(chosenMethod)
|
setSelectedMethod(chosenMethod)
|
||||||
onChange(chosenMethod)
|
onChange(chosenMethod)
|
||||||
handleClose()
|
handleClose()
|
||||||
|
@ -33,7 +33,7 @@ export interface ContractInteractionProps {
|
|||||||
contractAddress: string
|
contractAddress: string
|
||||||
initialValues: { contractAddress?: string }
|
initialValues: { contractAddress?: string }
|
||||||
onClose: () => void
|
onClose: () => void
|
||||||
onNext: ({}: CreatedTx) => void
|
onNext: (tx: CreatedTx) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
const ContractInteraction = ({ contractAddress, initialValues, onClose, onNext }: ContractInteractionProps) => {
|
const ContractInteraction = ({ contractAddress, initialValues, onClose, onNext }: ContractInteractionProps) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user