Fix types

This commit is contained in:
Agustin Pane 2020-06-19 20:00:24 -03:00
parent caa94c879b
commit cc6aa13451
2 changed files with 9 additions and 3 deletions

View File

@ -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

View File

@ -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(),