From 03cc47eae0ad39049f7b02ef3fc686ce5a2d2f16 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 24 Aug 2025 14:31:36 -0600 Subject: [PATCH 1/4] chore: Bump version to 1.1.0-beta (to be above anything from the master-patch branch) --- BUILDING.md | 11 ++--------- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index f5deaa2f..a1bb026e 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -344,17 +344,10 @@ current version to test DB migrations. [online](https://gitea.anomalistdesign.com/trent_larson/crowd-funder-for-time-pwa/releases) or `git tag 1.0.2 && git push origin 1.0.2`. -- For test, build the app (because test server is not yet set up to build): +- For test, build the app: ```bash -TIME_SAFARI_APP_TITLE="TimeSafari_Test" \ -VITE_APP_SERVER=https://test.timesafari.app \ -VITE_BVC_MEETUPS_PROJECT_CLAIM_ID=https://endorser.ch/entity/01HWE8FWHQ1YGP7GFZYYPS272F \ -VITE_DEFAULT_ENDORSER_API_SERVER=https://test-api.endorser.ch \ -VITE_DEFAULT_IMAGE_API_SERVER=https://test-image-api.timesafari.app \ -VITE_DEFAULT_PARTNER_API_SERVER=https://test-partner-api.endorser.ch \ -VITE_DEFAULT_PUSH_SERVER=https://test.timesafari.app \ -VITE_PASSKEYS_ENABLED=true npm run build:web +npm run build:web:test ``` ... and transfer to the test server: diff --git a/package-lock.json b/package-lock.json index 3b1b7baa..fea161a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "timesafari", - "version": "1.0.8-beta", + "version": "1.1.0-beta", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "timesafari", - "version": "1.0.8-beta", + "version": "1.1.0-beta", "dependencies": { "@capacitor-community/electron": "^5.0.1", "@capacitor-community/sqlite": "6.0.2", diff --git a/package.json b/package.json index c756dacb..78226938 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "timesafari", - "version": "1.0.8-beta", + "version": "1.1.0-beta", "description": "Time Safari Application", "author": { "name": "Time Safari Team" From 270e7ec8eb9a557f8de8da5a36aae31c7682ebb2 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 24 Aug 2025 16:10:50 -0600 Subject: [PATCH 2/4] fix: On test page, switch back to the current user (and not User 0). --- src/libs/util.ts | 4 ++-- src/services/PlatformService.ts | 4 ++-- src/services/platforms/CapacitorPlatformService.ts | 2 +- src/services/platforms/WebPlatformService.ts | 2 +- src/test/index.ts | 13 ++++++++++++- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/libs/util.ts b/src/libs/util.ts index c65f2f8a..e21d1932 100644 --- a/src/libs/util.ts +++ b/src/libs/util.ts @@ -657,7 +657,7 @@ export async function saveNewIdentity( await platformService.updateDefaultSettings({ activeDid: identity.did }); - await platformService.insertDidSpecificSettings(identity.did); + await platformService.insertNewDidIntoSettings(identity.did); } catch (error) { logger.error("Failed to update default settings:", error); throw new Error( @@ -954,7 +954,7 @@ export async function importFromMnemonic( try { // First, ensure the DID-specific settings record exists - await platformService.insertDidSpecificSettings(newId.did); + await platformService.insertNewDidIntoSettings(newId.did); // Then update with Test User #0 specific settings await platformService.updateDidSpecificSettings(newId.did, { diff --git a/src/services/PlatformService.ts b/src/services/PlatformService.ts index a3dbff6a..ede6a5b0 100644 --- a/src/services/PlatformService.ts +++ b/src/services/PlatformService.ts @@ -175,11 +175,11 @@ export interface PlatformService { updateDefaultSettings(settings: Record): Promise; /** - * Inserts DID-specific settings into the database. + * Inserts a new DID into the settings table. * @param did - The DID to associate with the settings * @returns Promise that resolves when the insertion is complete */ - insertDidSpecificSettings(did: string): Promise; + insertNewDidIntoSettings(did: string): Promise; /** * Updates DID-specific settings in the database. diff --git a/src/services/platforms/CapacitorPlatformService.ts b/src/services/platforms/CapacitorPlatformService.ts index bd22ef8d..c1374f25 100644 --- a/src/services/platforms/CapacitorPlatformService.ts +++ b/src/services/platforms/CapacitorPlatformService.ts @@ -1319,7 +1319,7 @@ export class CapacitorPlatformService implements PlatformService { await this.dbExec(sql, params); } - async insertDidSpecificSettings(did: string): Promise { + async insertNewDidIntoSettings(did: string): Promise { await this.dbExec("INSERT INTO settings (accountDid) VALUES (?)", [did]); } diff --git a/src/services/platforms/WebPlatformService.ts b/src/services/platforms/WebPlatformService.ts index a731ee22..fb15b1b6 100644 --- a/src/services/platforms/WebPlatformService.ts +++ b/src/services/platforms/WebPlatformService.ts @@ -681,7 +681,7 @@ export class WebPlatformService implements PlatformService { await this.dbExec(sql, params); } - async insertDidSpecificSettings(did: string): Promise { + async insertNewDidIntoSettings(did: string): Promise { await this.dbExec("INSERT INTO settings (accountDid) VALUES (?)", [did]); } diff --git a/src/test/index.ts b/src/test/index.ts index 0e92c6f8..914cb2be 100644 --- a/src/test/index.ts +++ b/src/test/index.ts @@ -50,6 +50,10 @@ export async function testServerRegisterUser() { "@/db/databaseUtil" ); const settings = await retrieveSettingsForActiveAccount(); + const currentDid = settings?.activeDid; + if (!currentDid) { + throw new Error("No active DID found"); + } // Make a claim const vcClaim = { @@ -57,7 +61,7 @@ export async function testServerRegisterUser() { "@type": "RegisterAction", agent: { identifier: identity0.did }, object: SERVICE_ID, - participant: { identifier: settings.activeDid }, + participant: { identifier: currentDid }, }; // Make a payload for the claim @@ -94,5 +98,12 @@ export async function testServerRegisterUser() { const resp = await axios.post(url, payload, { headers }); logger.log("User registration result:", resp); + + const platformService = await PlatformServiceFactory.getInstance(); + await platformService.updateDefaultSettings({ activeDid: currentDid }); + await platformService.updateDidSpecificSettings(currentDid!, { + isRegistered: true, + }); + return resp; } From d2d64cf1d921d7738de1ebb8317bd367a269432e Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 24 Aug 2025 16:36:32 -0600 Subject: [PATCH 3/4] fix: replace the confusing phrase "Unnamed/Unknown" verbiage with "Not Named" --- src/libs/endorserServer.ts | 2 +- src/views/ContactGiftingView.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/endorserServer.ts b/src/libs/endorserServer.ts index 735252f7..a543ea8d 100644 --- a/src/libs/endorserServer.ts +++ b/src/libs/endorserServer.ts @@ -309,7 +309,7 @@ export function didInfoForContact( showDidForVisible: boolean = false, // eslint-disable-next-line @typescript-eslint/no-explicit-any ): { known: boolean; displayName: string; profileImageUrl?: string } { - if (!did) return { displayName: "Someone Unnamed/Unknown", known: false }; + if (!did) return { displayName: "Someone Not Named", known: false }; if (did === activeDid) { return { displayName: "You", known: true }; } else if (contact) { diff --git a/src/views/ContactGiftingView.vue b/src/views/ContactGiftingView.vue index 91d10c9c..403a1fbe 100644 --- a/src/views/ContactGiftingView.vue +++ b/src/views/ContactGiftingView.vue @@ -24,7 +24,7 @@ icon="circle-question" class="text-slate-400 text-4xl" /> - (Unnamed/Unknown) + (Not Named)