WA-235 adding fetchThreshold action
This commit is contained in:
parent
fad5132a60
commit
5b4e0256f2
|
@ -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))
|
||||
}
|
Loading…
Reference in New Issue