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

29 lines
585 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: string;
txId: string;
amount: string;
dateCreated: number;
status: 'PENDING' | 'CONFIRMED';
}
export interface ContributionWithAddresses extends Contribution {
addresses: {
sprout: string;
transparent: string;
memo: string;
};
}
2019-01-09 12:48:41 -08:00
export interface ContributionWithUser extends Contribution {
user: User;
}
export interface UserContribution extends Omit<Contribution, 'amount' | 'txId'> {
amount: Zat;
txId?: string;
proposal: Proposal;
}