Skip to content

Commit 63647bf

Browse files
authored
Fix/group chat fix (#300)
* fix: pictique group chat * chore: add mobile detection * chore: fix group thing * fix: group listing * chore: fix group adapter eVoting * feat: eVoting group thing done * fix: pictique groups * chore: add cron thing * chore: fix migration * fix: evoting cron * fix: DMs as group issue * chore: fix retry * chore: add missing files * fix: issue with resolution of external IPs * fix: add http prefix
1 parent 828ac4d commit 63647bf

File tree

143 files changed

+7113
-1020
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+7113
-1020
lines changed

infrastructure/eid-wallet/src-tauri/gen/android/.idea/gradle.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
-15.1 MB
Binary file not shown.
-1.71 KB
Binary file not shown.
-1.63 KB
Binary file not shown.

infrastructure/eid-wallet/src-tauri/gen/android/app/arm64/release/output-metadata.json

Lines changed: 0 additions & 37 deletions
This file was deleted.

infrastructure/eid-wallet/src/routes/(app)/settings/+page.svelte

Lines changed: 118 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,100 @@
11
<script lang="ts">
2-
import { goto } from "$app/navigation";
3-
import { SettingsNavigationBtn } from "$lib/fragments";
4-
import type { GlobalState } from "$lib/global";
5-
import { runtime } from "$lib/global/runtime.svelte";
6-
import { ButtonAction, Drawer } from "$lib/ui";
7-
import {
8-
Key01Icon,
9-
LanguageSquareIcon,
10-
Link02Icon,
11-
PinCodeIcon,
12-
Shield01Icon,
13-
} from "@hugeicons/core-free-icons";
14-
import { getContext } from "svelte";
15-
16-
const globalState = getContext<() => GlobalState>("globalState")();
17-
18-
let isDeleteConfirmationOpen = $state(false);
19-
let isFinalConfirmationOpen = $state(false);
20-
21-
function showDeleteConfirmation() {
22-
isDeleteConfirmationOpen = true;
23-
}
24-
25-
function confirmDelete() {
26-
isDeleteConfirmationOpen = false;
27-
isFinalConfirmationOpen = true;
28-
}
29-
30-
function nukeWallet() {
31-
globalState.userController.user = undefined;
32-
globalState.securityController.clearPin();
33-
isFinalConfirmationOpen = false;
34-
goto("/onboarding");
35-
}
36-
37-
function cancelDelete() {
38-
isDeleteConfirmationOpen = false;
39-
isFinalConfirmationOpen = false;
40-
}
41-
42-
$effect(() => {
43-
runtime.header.title = "Settings";
44-
});
2+
import { goto } from "$app/navigation";
3+
import { SettingsNavigationBtn } from "$lib/fragments";
4+
import type { GlobalState } from "$lib/global";
5+
import { runtime } from "$lib/global/runtime.svelte";
6+
import { ButtonAction, Drawer } from "$lib/ui";
7+
import {
8+
Key01Icon,
9+
LanguageSquareIcon,
10+
Link02Icon,
11+
PinCodeIcon,
12+
Shield01Icon,
13+
} from "@hugeicons/core-free-icons";
14+
import { getContext } from "svelte";
15+
16+
const globalState = getContext<() => GlobalState>("globalState")();
17+
18+
let isDeleteConfirmationOpen = $state(false);
19+
let isFinalConfirmationOpen = $state(false);
20+
21+
// Hidden eVault profile retry functionality
22+
let tapCount = $state(0);
23+
let lastTapTime = $state(0);
24+
let isRetrying = $state(false);
25+
let retryMessage = $state("");
26+
27+
function showDeleteConfirmation() {
28+
isDeleteConfirmationOpen = true;
29+
}
30+
31+
function confirmDelete() {
32+
isDeleteConfirmationOpen = false;
33+
isFinalConfirmationOpen = true;
34+
}
35+
36+
function nukeWallet() {
37+
globalState.userController.user = undefined;
38+
globalState.securityController.clearPin();
39+
isFinalConfirmationOpen = false;
40+
goto("/onboarding");
41+
}
42+
43+
function cancelDelete() {
44+
isDeleteConfirmationOpen = false;
45+
isFinalConfirmationOpen = false;
46+
}
47+
48+
async function handleVersionTap() {
49+
const now = Date.now();
50+
51+
// Reset counter if more than 3 seconds between taps
52+
if (now - lastTapTime > 3000) {
53+
tapCount = 0;
54+
}
55+
56+
tapCount++;
57+
lastTapTime = now;
58+
59+
// Show tap count feedback (only visible to user)
60+
if (tapCount >= 5) {
61+
retryMessage = `Taps: ${tapCount}/10`;
62+
}
63+
64+
// Trigger eVault profile retry after 10 taps
65+
if (tapCount === 10) {
66+
isRetrying = true;
67+
retryMessage = "Retrying eVault profile setup...";
68+
69+
try {
70+
await globalState.vaultController.retryProfileCreation();
71+
retryMessage =
72+
"✅ eVault profile setup completed successfully!";
73+
74+
// Reset after success
75+
setTimeout(() => {
76+
tapCount = 0;
77+
retryMessage = "";
78+
isRetrying = false;
79+
}, 3000);
80+
} catch (error) {
81+
console.error("Failed to retry eVault profile setup:", error);
82+
retryMessage =
83+
"❌ Failed to setup eVault profile. Check console for details.";
84+
85+
// Reset after error
86+
setTimeout(() => {
87+
tapCount = 0;
88+
retryMessage = "";
89+
isRetrying = false;
90+
}, 5000);
91+
}
92+
}
93+
}
94+
95+
$effect(() => {
96+
runtime.header.title = "Settings";
97+
});
4598
</script>
4699

47100
<main>
@@ -66,7 +119,28 @@ $effect(() => {
66119
>Delete Account</ButtonAction
67120
>
68121

69-
<p class="w-full py-10 text-center">Version v0.1.8.1</p>
122+
<!-- Hidden eVault profile retry - tap version 10 times -->
123+
<div class="w-full py-10 text-center">
124+
<button
125+
class="text-gray-500 hover:text-gray-700 transition-colors cursor-pointer select-none"
126+
on:click={handleVersionTap}
127+
disabled={isRetrying}
128+
>
129+
Version v0.1.8.1
130+
</button>
131+
132+
{#if retryMessage}
133+
<div
134+
class="mt-2 text-sm {isRetrying
135+
? 'text-blue-600'
136+
: retryMessage.includes('')
137+
? 'text-green-600'
138+
: 'text-red-600'}"
139+
>
140+
{retryMessage}
141+
</div>
142+
{/if}
143+
</div>
70144
</main>
71145

72146
<!-- First Confirmation Drawer -->

infrastructure/evault-core/src/evault.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class EVault {
3131
this.w3id = process.env.W3ID || null;
3232
const dbService = new DbService(driver);
3333
this.logService = new LogService(driver);
34-
this.graphqlServer = new GraphQLServer(dbService, this.publicKey, this.w3id);
34+
this.graphqlServer = new GraphQLServer(dbService, this.publicKey, this.w3id, this);
3535
this.server = fastify({
3636
logger: true,
3737
});

infrastructure/evault-core/src/protocol/graphql-server.ts

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ export class GraphQLServer {
1919
server?: Server;
2020
private evaultPublicKey: string | null;
2121
private evaultW3ID: string | null;
22+
private evaultInstance: any; // Reference to the eVault instance
2223

23-
constructor(db: DbService, evaultPublicKey?: string | null, evaultW3ID?: string | null) {
24+
constructor(db: DbService, evaultPublicKey?: string | null, evaultW3ID?: string | null, evaultInstance?: any) {
2425
this.db = db;
2526
this.accessGuard = new VaultAccessGuard(db);
2627
this.evaultPublicKey = evaultPublicKey || process.env.EVAULT_PUBLIC_KEY || null;
2728
this.evaultW3ID = evaultW3ID || process.env.W3ID || null;
29+
this.evaultInstance = evaultInstance;
2830
}
2931

3032
public getSchema(): GraphQLSchema {
@@ -110,6 +112,17 @@ export class GraphQLServer {
110112
}
111113
}
112114

115+
/**
116+
* Gets the current eVault W3ID dynamically from the eVault instance
117+
* @returns string | null - The current eVault W3ID
118+
*/
119+
private getCurrentEvaultW3ID(): string | null {
120+
if (this.evaultInstance && this.evaultInstance.w3id) {
121+
return this.evaultInstance.w3id;
122+
}
123+
return this.evaultW3ID;
124+
}
125+
113126
init() {
114127
const resolvers = {
115128
JSON: require("graphql-type-json"),
@@ -170,7 +183,7 @@ export class GraphQLServer {
170183
context.tokenPayload?.platform || null;
171184
const webhookPayload = {
172185
id: result.metaEnvelope.id,
173-
w3id: this.evaultW3ID,
186+
w3id: this.getCurrentEvaultW3ID(),
174187
evaultPublicKey: this.evaultPublicKey,
175188
data: input.payload,
176189
schemaId: input.ontology,
@@ -228,7 +241,7 @@ export class GraphQLServer {
228241
context.tokenPayload?.platform || null;
229242
const webhookPayload = {
230243
id: id,
231-
w3id: this.evaultW3ID,
244+
w3id: this.getCurrentEvaultW3ID(),
232245
evaultPublicKey: this.evaultPublicKey,
233246
data: input.payload,
234247
schemaId: input.ontology,
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from "./mapping.db";
2+
//# sourceMappingURL=index.d.ts.map

infrastructure/web3-adapter/src/db/index.d.ts.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)