Fix breakages
This commit is contained in:
parent
71be716d76
commit
23a46bdcfb
|
@ -5,10 +5,10 @@ export type Txn = {
|
|||
createdTime: number
|
||||
|
||||
fromId: string
|
||||
fromType: source_type
|
||||
fromType: SourceType
|
||||
|
||||
toId: string
|
||||
toType: source_type
|
||||
toType: SourceType
|
||||
|
||||
amount: number
|
||||
token: 'M$' // | 'USD' | MarketOutcome
|
||||
|
@ -18,4 +18,4 @@ export type Txn = {
|
|||
description?: string
|
||||
}
|
||||
|
||||
export type source_type = 'user' | 'contract' | 'charity' | 'bank'
|
||||
export type SourceType = 'USER' | 'CONTRACT' | 'CHARITY' | 'BANK'
|
||||
|
|
|
@ -151,9 +151,11 @@ function DonationBox(props: { user?: User | null; charity: Charity }) {
|
|||
await transact({
|
||||
amount,
|
||||
fromId: user.id,
|
||||
fromType: 'user',
|
||||
fromType: 'USER',
|
||||
toId: charity.id,
|
||||
toType: 'charity',
|
||||
toType: 'CHARITY',
|
||||
token: 'M$',
|
||||
category: 'CHARITY',
|
||||
description: `${user.name} donated M$ ${amount} to ${charity.name}`,
|
||||
}).catch((err) => console.log('Error', err))
|
||||
setIsSubmitting(false)
|
||||
|
|
Loading…
Reference in New Issue
Block a user