zcash-grant-system/frontend/types/contribution.ts

34 lines
763 B
TypeScript
Raw Normal View History

import { Zat } from 'utils/units';
2019-01-09 12:48:41 -08:00
import { Proposal, User } from 'types';
export interface Contribution {
id: number;
txId: string;
amount: string;
dateCreated: number;
status: 'PENDING' | 'CONFIRMED';
isAnonymous: boolean;
}
export interface ContributionWithAddresses extends Contribution {
addresses: {
transparent: string;
// NOTE: Add sapling and memo in when ready
2019-02-23 12:19:33 -08:00
// sprout: string;
// memo: string;
};
}
2019-01-09 12:48:41 -08:00
export interface ContributionWithUser extends Contribution {
user: User;
}
export type ContributionWithAddressesAndUser = ContributionWithAddresses &
ContributionWithUser;
export interface UserContribution extends Omit<Contribution, 'amount' | 'txId'> {
amount: Zat;
txId?: string;
proposal: Proposal;
}