Fix types
This commit is contained in:
parent
caa94c879b
commit
cc6aa13451
|
@ -20,6 +20,12 @@ import { Dispatch } from 'redux'
|
|||
import { SafeOwner, SafeRecordProps } from '../../safe/store/models/safe'
|
||||
import { List } from 'immutable'
|
||||
|
||||
type RecordPropType = Partial<SafeRecordProps>
|
||||
|
||||
type StoredSafesType = {
|
||||
[address: string]: RecordPropType
|
||||
}
|
||||
|
||||
export const loadSafe = async (
|
||||
safeName: string,
|
||||
safeAddress: string,
|
||||
|
@ -29,7 +35,7 @@ export const loadSafe = async (
|
|||
const safeProps = await buildSafe(safeAddress, safeName)
|
||||
safeProps.owners = owners
|
||||
|
||||
const storedSafes: SafeRecordProps = (await loadFromStorage(SAFES_KEY)) || {}
|
||||
const storedSafes: StoredSafesType = (await loadFromStorage(SAFES_KEY)) || {}
|
||||
|
||||
storedSafes[safeAddress] = safeProps
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ export type SafeRecordProps = {
|
|||
name: string
|
||||
address: string
|
||||
threshold: number
|
||||
ethBalance: number
|
||||
ethBalance: string
|
||||
owners: List<{ name: string; address: string }>
|
||||
activeTokens: Set<string>
|
||||
activeAssets: Set<string>
|
||||
|
@ -28,7 +28,7 @@ const makeSafe = Record<SafeRecordProps>({
|
|||
name: '',
|
||||
address: '',
|
||||
threshold: 0,
|
||||
ethBalance: 0,
|
||||
ethBalance: '0',
|
||||
owners: List([]),
|
||||
activeTokens: Set(),
|
||||
activeAssets: Set(),
|
||||
|
|
Loading…
Reference in New Issue