Add code formatting

This commit is contained in:
Germán Martínez 2019-05-22 12:51:02 +02:00
parent 08bcdbb1b0
commit 9b19ca1274
4 changed files with 11 additions and 25 deletions

View File

@ -8,9 +8,6 @@ type AddTokenProps = {
token: Token, token: Token,
} }
export const addToken = createAction<string, *, *>( export const addToken = createAction<string, *, *>(ADD_TOKEN, (token: Token): AddTokenProps => ({
ADD_TOKEN,
(token: Token): AddTokenProps => ({
token, token,
}), }))
)

View File

@ -9,11 +9,8 @@ type TokenProps = {
tokens: Map<string, Token>, tokens: Map<string, Token>,
} }
const addTokens = createAction<string, *, *>( const addTokens = createAction<string, *, *>(ADD_TOKENS, (tokens: Map<string, Token>): TokenProps => ({
ADD_TOKENS,
(tokens: Map<string, Token>): TokenProps => ({
tokens, tokens,
}), }))
)
export default addTokens export default addTokens

View File

@ -17,13 +17,8 @@ export const getNamesFrom = (values: Object): string[] => {
return accounts.map(account => values[account]).slice(0, values.owners) return accounts.map(account => values[account]).slice(0, values.owners)
} }
export const getOwnersFrom = ( export const getOwnersFrom = (names: string[], addresses: string[]): Array<string, string> => {
names: string[], const owners = names.map((name: string, index: number) => makeOwner({ name, address: addresses[index] }))
addresses: string[],
): Array<string, string> => {
const owners = names.map((name: string, index: number) => makeOwner(
{ name, address: addresses[index] },
))
return owners return owners
} }

View File

@ -18,12 +18,9 @@ type ActionReturn = {
safe: Safe, safe: Safe,
} }
export const addSafe = createAction<string, Function, ActionReturn>( export const addSafe = createAction<string, Function, ActionReturn>(ADD_SAFE, (safe: Safe): ActionReturn => ({
ADD_SAFE,
(safe: Safe): ActionReturn => ({
safe, safe,
}), }))
)
const saveSafe = (name: string, address: string, threshold: number, ownersName: string[], ownersAddress: string[]) => ( const saveSafe = (name: string, address: string, threshold: number, ownersName: string[], ownersAddress: string[]) => (
dispatch: ReduxDispatch<GlobalState>, dispatch: ReduxDispatch<GlobalState>,