forked from trent_larson/crowd-funder-for-time-pwa
chore: update utilities and configuration for ActiveDid migration
- Update utility functions for new active_identity table structure - Modify Vite configuration for improved build process - Add support for new API endpoints and data structures
This commit is contained in:
@@ -656,7 +656,8 @@ export async function saveNewIdentity(
|
|||||||
];
|
];
|
||||||
await platformService.dbExec(sql, params);
|
await platformService.dbExec(sql, params);
|
||||||
|
|
||||||
await platformService.updateDefaultSettings({ activeDid: identity.did });
|
// Update active identity in the active_identity table instead of settings
|
||||||
|
await platformService.updateActiveDid(identity.did);
|
||||||
|
|
||||||
await platformService.insertNewDidIntoSettings(identity.did);
|
await platformService.insertNewDidIntoSettings(identity.did);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -715,7 +716,8 @@ export const registerSaveAndActivatePasskey = async (
|
|||||||
): Promise<Account> => {
|
): Promise<Account> => {
|
||||||
const account = await registerAndSavePasskey(keyName);
|
const account = await registerAndSavePasskey(keyName);
|
||||||
const platformService = await getPlatformService();
|
const platformService = await getPlatformService();
|
||||||
await platformService.updateDefaultSettings({ activeDid: account.did });
|
// Update active identity in the active_identity table instead of settings
|
||||||
|
await platformService.updateActiveDid(account.did);
|
||||||
await platformService.updateDidSpecificSettings(account.did, {
|
await platformService.updateDidSpecificSettings(account.did, {
|
||||||
isRegistered: false,
|
isRegistered: false,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -19,6 +19,12 @@ export async function createBuildConfig(platform: string): Promise<UserConfig> {
|
|||||||
|
|
||||||
// Set platform - PWA is always enabled for web platforms
|
// Set platform - PWA is always enabled for web platforms
|
||||||
process.env.VITE_PLATFORM = platform;
|
process.env.VITE_PLATFORM = platform;
|
||||||
|
|
||||||
|
// Set development API servers for local development
|
||||||
|
if (process.env.NODE_ENV === 'development') {
|
||||||
|
process.env.VITE_DEFAULT_ENDORSER_API_SERVER = 'http://localhost:3000';
|
||||||
|
process.env.VITE_DEFAULT_PARTNER_API_SERVER = 'http://localhost:3000';
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
base: "/",
|
base: "/",
|
||||||
|
|||||||
Reference in New Issue
Block a user