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