forked from mux-labs/mux-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecovery.ts
More file actions
171 lines (165 loc) · 4.42 KB
/
Copy pathrecovery.ts
File metadata and controls
171 lines (165 loc) · 4.42 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
import type { RecoveryTimeline, RecoveryTimelineEvent } from "@/types/recovery";
/**
* Mock recovery timeline events for demonstration
*/
export const mockRecoveryEvents: RecoveryTimelineEvent[] = [
{
id: "event-001",
type: "initiated",
status: "completed",
title: "Recovery Initiated",
description: "Wallet recovery process started",
timestamp: new Date("2025-01-20T10:00:00Z"),
details: "User initiated recovery from device loss",
},
{
id: "event-002",
type: "detection",
status: "completed",
title: "Issue Detection",
description: "System detected wallet access issue",
timestamp: new Date("2025-01-20T10:05:00Z"),
details: "Detected unauthorized access attempt on wallet",
},
{
id: "event-003",
type: "verification",
status: "completed",
title: "Identity Verification",
description: "User identity verified successfully",
timestamp: new Date("2025-01-20T10:15:00Z"),
details: "Multi-factor authentication completed",
},
{
id: "event-004",
type: "processing",
status: "completed",
title: "Recovery Processing",
description: "Wallet recovery in progress",
timestamp: new Date("2025-01-20T10:25:00Z"),
details: "Restoring wallet keys and data",
},
{
id: "event-005",
type: "completion",
status: "completed",
title: "Recovery Completed",
description: "Wallet successfully recovered",
timestamp: new Date("2025-01-20T10:35:00Z"),
details: "Wallet is now fully accessible and operational",
},
];
/**
* Mock recovery timeline with in-progress status
*/
export const mockRecoveryTimelineInProgress: RecoveryTimeline = {
id: "recovery-001",
walletId: "wallet-001",
startedAt: new Date("2025-01-20T10:00:00Z"),
status: "in_progress",
events: [
{
id: "event-001",
type: "initiated",
status: "completed",
title: "Recovery Initiated",
description: "Wallet recovery process started",
timestamp: new Date("2025-01-20T10:00:00Z"),
details: "User initiated recovery from device loss",
},
{
id: "event-002",
type: "detection",
status: "completed",
title: "Issue Detection",
description: "System detected wallet access issue",
timestamp: new Date("2025-01-20T10:05:00Z"),
details: "Detected unauthorized access attempt on wallet",
},
{
id: "event-003",
type: "verification",
status: "in_progress",
title: "Identity Verification",
description: "Verifying user identity",
timestamp: new Date("2025-01-20T10:15:00Z"),
details: "Multi-factor authentication in progress",
},
],
};
/**
* Mock recovery timeline with completed status
*/
export const mockRecoveryTimelineCompleted: RecoveryTimeline = {
id: "recovery-002",
walletId: "wallet-002",
startedAt: new Date("2025-01-19T14:00:00Z"),
completedAt: new Date("2025-01-19T14:35:00Z"),
status: "completed",
totalDuration: 35 * 60 * 1000, // 35 minutes in milliseconds
events: mockRecoveryEvents,
};
/**
* Mock recovery timeline with failed status
*/
export const mockRecoveryTimelineFailed: RecoveryTimeline = {
id: "recovery-003",
walletId: "wallet-003",
startedAt: new Date("2025-01-18T09:00:00Z"),
status: "failed",
events: [
{
id: "event-001",
type: "initiated",
status: "completed",
title: "Recovery Initiated",
description: "Wallet recovery process started",
timestamp: new Date("2025-01-18T09:00:00Z"),
},
{
id: "event-002",
type: "detection",
status: "completed",
title: "Issue Detection",
description: "System detected wallet access issue",
timestamp: new Date("2025-01-18T09:05:00Z"),
},
{
id: "event-003",
type: "verification",
status: "failed",
title: "Identity Verification Failed",
description: "Unable to verify user identity",
timestamp: new Date("2025-01-18T09:15:00Z"),
errorMessage: "Maximum verification attempts exceeded",
},
],
};
/**
* Mock recovery timeline with pending status
*/
export const mockRecoveryTimelinePending: RecoveryTimeline = {
id: "recovery-004",
walletId: "wallet-004",
startedAt: new Date("2025-01-21T08:00:00Z"),
status: "pending",
events: [
{
id: "event-001",
type: "initiated",
status: "pending",
title: "Recovery Initiated",
description: "Wallet recovery process queued",
timestamp: new Date("2025-01-21T08:00:00Z"),
},
],
};
/**
* Collection of all mock recovery timelines
*/
export const mockRecoveryTimelines: RecoveryTimeline[] = [
mockRecoveryTimelineCompleted,
mockRecoveryTimelineInProgress,
mockRecoveryTimelineFailed,
mockRecoveryTimelinePending,
];