forked from StellarSplit/StellarSplit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwizard.ts
More file actions
52 lines (46 loc) · 1.29 KB
/
Copy pathwizard.ts
File metadata and controls
52 lines (46 loc) · 1.29 KB
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
export type SplitMethod = 'equal' | 'itemized' | 'percentage' | 'custom';
export interface WizardParticipant {
id: string;
name: string;
walletAddress?: string;
email?: string;
percentage?: number;
customAmount?: number;
}
export interface WizardItem {
id: string;
name: string;
price: number;
assignedTo: string[];
}
export interface WizardState {
title: string;
currency: string;
totalAmount: number;
splitMethod: SplitMethod;
participants: WizardParticipant[];
items: WizardItem[];
taxAmount: number;
tipAmount: number;
}
export const WIZARD_DRAFT_KEY = 'splitwizard_draft';
export const INITIAL_WIZARD_STATE: WizardState = {
title: '',
currency: 'USD',
totalAmount: 0,
splitMethod: 'equal',
participants: [],
items: [],
taxAmount: 0,
tipAmount: 0,
};
export const SUPPORTED_CURRENCIES = [
{ code: 'USD', label: 'USD – US Dollar' },
{ code: 'EUR', label: 'EUR – Euro' },
{ code: 'GBP', label: 'GBP – British Pound' },
{ code: 'JPY', label: 'JPY – Japanese Yen' },
{ code: 'CAD', label: 'CAD – Canadian Dollar' },
{ code: 'AUD', label: 'AUD – Australian Dollar' },
{ code: 'NGN', label: 'NGN – Nigerian Naira' },
{ code: 'XLM', label: 'XLM – Stellar Lumens' },
];