WA-238 DailyLimit Record types
This commit is contained in:
parent
aa93a8301b
commit
3cba259fc1
|
@ -1,7 +1,8 @@
|
|||
// @flow
|
||||
import { List } from 'immutable'
|
||||
import { createAction } from 'redux-actions'
|
||||
import { makeDailyLimit, type DailyLimit, type SafeProps } from '~/routes/safe/store/model/safe'
|
||||
import { makeDailyLimit, type DailyLimit } from '~/routes/safe/store/model/dailyLimit'
|
||||
import { type SafeProps } from '~/routes/safe/store/model/safe'
|
||||
import { makeOwner, type Owner } from '~/routes/safe/store/model/owner'
|
||||
|
||||
export const ADD_SAFE = 'ADD_SAFE'
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
// @flow
|
||||
import { Record } from 'immutable'
|
||||
import type { RecordFactory, RecordOf } from 'immutable'
|
||||
|
||||
export type DailyLimitProps = {
|
||||
value: number,
|
||||
spentToday: number,
|
||||
}
|
||||
|
||||
export const makeDailyLimit: RecordFactory<DailyLimitProps> = Record({
|
||||
value: 0,
|
||||
spentToday: 0,
|
||||
})
|
||||
|
||||
export type DailyLimit = RecordOf<DailyLimitProps>
|
|
@ -1,26 +1,15 @@
|
|||
// @flow
|
||||
import { List, Record } from 'immutable'
|
||||
import type { RecordFactory, RecordOf } from 'immutable'
|
||||
import { type DailyLimit, makeDailyLimit } from '~/routes/safe/store/model/dailyLimit'
|
||||
import type { Owner } from '~/routes/safe/store/model/owner'
|
||||
|
||||
export type DailyLimitProps = {
|
||||
value: number,
|
||||
spentToday: number,
|
||||
}
|
||||
|
||||
export const makeDailyLimit: RecordFactory<DailyLimitProps> = Record({
|
||||
value: 0,
|
||||
spentToday: 0,
|
||||
})
|
||||
|
||||
export type DailyLimit = RecordOf<DailyLimitProps>
|
||||
|
||||
export type SafeProps = {
|
||||
name: string,
|
||||
address: string,
|
||||
confirmations: number,
|
||||
owners: List<Owner>,
|
||||
dailyLimit: number,
|
||||
dailyLimit: DailyLimit,
|
||||
}
|
||||
|
||||
export const makeSafe: RecordFactory<SafeProps> = Record({
|
||||
|
|
Loading…
Reference in New Issue