Add code formatting
This commit is contained in:
parent
08bcdbb1b0
commit
9b19ca1274
|
@ -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: Token): AddTokenProps => ({
|
}))
|
||||||
token,
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
|
|
|
@ -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,
|
||||||
(tokens: Map<string, Token>): TokenProps => ({
|
}))
|
||||||
tokens,
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
|
|
||||||
export default addTokens
|
export default addTokens
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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: Safe): ActionReturn => ({
|
}))
|
||||||
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>,
|
||||||
|
|
Loading…
Reference in New Issue