WA-235 adding fetchThreshold action

This commit is contained in:
apanizo 2018-06-06 10:10:01 +02:00
parent fad5132a60
commit 5b4e0256f2
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
// @flow
import type { Dispatch as ReduxDispatch } from 'redux'
import { type GlobalState } from '~/store/index'
import { getSafeEthereumInstance } from '~/routes/safe/component/AddTransaction/createTransactions'
import updateThreshold from './updateThreshold'
export default (safeAddress: string) => async (dispatch: ReduxDispatch<GlobalState>) => {
const gnosisSafe = await getSafeEthereumInstance(safeAddress)
const actualThreshold = await gnosisSafe.getThreshold()
return dispatch(updateThreshold(safeAddress, actualThreshold))
}