mirror of
https://github.com/status-im/safe-react.git
synced 2025-02-24 15:38:07 +00:00
WA-235 adding fetchThreshold action
This commit is contained in:
parent
fad5132a60
commit
5b4e0256f2
12
src/routes/safe/store/actions/fetchThreshold.js
Normal file
12
src/routes/safe/store/actions/fetchThreshold.js
Normal 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))
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user