forked from DA0-DA0/dao-dao-ui
-
Notifications
You must be signed in to change notification settings - Fork 1
/
me.ts
59 lines (52 loc) · 1.46 KB
/
me.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import { ComponentType, ReactNode } from 'react'
import { UseFormReturn } from 'react-hook-form'
import {
ActionCategoryWithLabel,
LoadedActions,
PartialCategorizedActionKeyAndData,
} from './actions'
import {
LoadingData,
SuspenseLoaderProps,
WalletProfileHeaderProps,
} from './components'
import { CosmosMsgFor_Empty } from './contracts'
export type MeTransactionForm = {
actions: PartialCategorizedActionKeyAndData[]
}
export type MeTransactionSave = MeTransactionForm & {
name: string
description?: string
}
// Value goes in URL hash.
export enum MeTabId {
Balances = 'balances',
Daos = 'daos',
TransactionBuilder = 'tx',
}
export type MeTab = {
id: MeTabId
label: string
Component: ComponentType
}
export type MeProps = {
rightSidebarContent: ReactNode
MeBalances: ComponentType
MeTransactionBuilder: ComponentType
MeDaos: ComponentType
ChainSwitcher: ComponentType<any>
} & Omit<WalletProfileHeaderProps, 'editable' | 'className'>
export type MeTransactionBuilderProps = {
categories: ActionCategoryWithLabel[]
loadedActions: LoadedActions
formMethods: UseFormReturn<MeTransactionForm, object>
execute: (messages: CosmosMsgFor_Empty[]) => Promise<void>
loading: boolean
SuspenseLoader: ComponentType<SuspenseLoaderProps>
error?: string
txHash?: string
saves: LoadingData<MeTransactionSave[]>
save: (save: MeTransactionSave) => Promise<boolean>
deleteSave: (save: MeTransactionSave) => Promise<boolean>
saving: boolean
}