From b47fb525f56310e2c18c7cf0c7fe53c537e24077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Thu, 12 Sep 2019 17:25:25 +0200 Subject: [PATCH] Fix types --- src/components/forms/validator.js | 2 +- src/routes/safe/components/Balances/SendModal/index.jsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/forms/validator.js b/src/components/forms/validator.js index 284c90e5..422016f7 100644 --- a/src/components/forms/validator.js +++ b/src/components/forms/validator.js @@ -66,7 +66,7 @@ export const mustBeEthereumAddress = simpleMemoize((address: Field) => { return isAddress ? undefined : 'Address should be a valid Ethereum address or ENS name' }) -export const mustBeEthereumContractAddress = simpleMemoize(async (address: Field) => { +export const mustBeEthereumContractAddress = simpleMemoize(async (address: string) => { const contractCode: string = await getWeb3().eth.getCode(address) return (!contractCode || contractCode.replace('0x', '').replace(/0/g, '') === '') diff --git a/src/routes/safe/components/Balances/SendModal/index.jsx b/src/routes/safe/components/Balances/SendModal/index.jsx index ba0f93bb..e87c4416 100644 --- a/src/routes/safe/components/Balances/SendModal/index.jsx +++ b/src/routes/safe/components/Balances/SendModal/index.jsx @@ -11,6 +11,8 @@ import ReviewTx from './screens/ReviewTx' import SendCustomTx from './screens/SendCustomTx' import ReviewCustomTx from './screens/ReviewCustomTx' +type ActiveScreen = 'chooseTxType' | 'sendFunds' | 'reviewTx' | 'sendCustomTx' | 'reviewCustomTx' + type Props = { onClose: () => void, classes: Object, @@ -22,11 +24,9 @@ type Props = { tokens: List, selectedToken: string, createTransaction: Function, - activeScreenType: string + activeScreenType: ActiveScreen } -type ActiveScreen = 'chooseTxType' | 'sendFunds' | 'reviewTx' | 'sendCustomTx' | 'reviewCustomTx' - type TxStateType = | { token: Token,