Page MenuHomePhorge

D15387.1765071629.diff
No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None

D15387.1765071629.diff

diff --git a/lib/backup/persist-shared-migrations.js b/lib/backup/persist-shared-migrations.js
--- a/lib/backup/persist-shared-migrations.js
+++ b/lib/backup/persist-shared-migrations.js
@@ -60,6 +60,39 @@
// don't support this message type.
return {};
}: SharedMigrationFunction),
+ [98]: (async (databaseIdentifier: DatabaseIdentifier) => {
+ const { sqliteAPI } = getConfig();
+
+ const clientStoreToMigrate =
+ await sqliteAPI.getClientDBStore(databaseIdentifier);
+
+ if (!clientStoreToMigrate.syncedMetadata) {
+ return {};
+ }
+
+ const alertStore = JSON.parse(
+ clientStoreToMigrate.syncedMetadata[syncedMetadataNames.ALERT_STORE],
+ );
+ const updatedAlertStore = {
+ ...alertStore,
+ alertInfos: {
+ ...alertStore.alertInfos,
+ [alertTypes.CONNECT_FARCASTER_DCS]: defaultAlertInfo,
+ },
+ };
+
+ const syncedMetadataStoreOperations: $ReadOnlyArray<ClientDBSyncedMetadataStoreOperation> =
+ [
+ createReplaceSyncedMetadataOperation(
+ syncedMetadataNames.ALERT_STORE,
+ JSON.stringify(updatedAlertStore),
+ ),
+ ];
+
+ return {
+ syncedMetadataStoreOperations,
+ };
+ }: SharedMigrationFunction),
};
export { sharedMigrations };
diff --git a/lib/types/alert-types.js b/lib/types/alert-types.js
--- a/lib/types/alert-types.js
+++ b/lib/types/alert-types.js
@@ -5,6 +5,7 @@
CONNECT_FARCASTER: 'connect-farcaster',
SIWE_BACKUP_MESSAGE: 'siwe-backup-message',
DISPLAY_DIRECTORY_PROMPT: 'display-directory-prompt',
+ CONNECT_FARCASTER_DCS: 'connect-farcaster-dcs',
});
type AlertType = $Values<typeof alertTypes>;
@@ -39,6 +40,7 @@
[alertTypes.CONNECT_FARCASTER]: defaultAlertInfo,
[alertTypes.SIWE_BACKUP_MESSAGE]: defaultAlertInfo,
[alertTypes.DISPLAY_DIRECTORY_PROMPT]: defaultAlertInfo,
+ [alertTypes.CONNECT_FARCASTER_DCS]: defaultAlertInfo,
});
const securityUpdateLogoutText: string =
diff --git a/native/redux/persist-constants.js b/native/redux/persist-constants.js
--- a/native/redux/persist-constants.js
+++ b/native/redux/persist-constants.js
@@ -5,6 +5,6 @@
// NOTE: renaming this constant requires updating
// `native/native_rust_library/build.rs` to correctly
// scrap Redux state version from this file.
-const storeVersion = 97;
+const storeVersion = 98;
export { rootKey, storeVersion };
diff --git a/native/redux/persist.js b/native/redux/persist.js
--- a/native/redux/persist.js
+++ b/native/redux/persist.js
@@ -1723,6 +1723,13 @@
ops,
};
}: MigrationFunction<NavInfo, AppState>),
+ [98]: (async (state: AppState) => {
+ const ops = await sharedMigrations[98](databaseIdentifier.MAIN);
+ return {
+ state,
+ ops,
+ };
+ }: MigrationFunction<NavInfo, AppState>),
});
const persistConfig = {
diff --git a/web/redux/persist-constants.js b/web/redux/persist-constants.js
--- a/web/redux/persist-constants.js
+++ b/web/redux/persist-constants.js
@@ -3,6 +3,6 @@
const rootKey = 'root';
const rootKeyPrefix = 'persist:';
const completeRootKey = `${rootKeyPrefix}${rootKey}`;
-const storeVersion = 97;
+const storeVersion = 98;
export { rootKey, rootKeyPrefix, completeRootKey, storeVersion };
diff --git a/web/redux/persist.js b/web/redux/persist.js
--- a/web/redux/persist.js
+++ b/web/redux/persist.js
@@ -932,6 +932,13 @@
ops,
};
}: MigrationFunction<WebNavInfo, AppState>),
+ [98]: (async (state: AppState) => {
+ const ops = await sharedMigrations[97](databaseIdentifier.MAIN);
+ return {
+ state,
+ ops,
+ };
+ }: MigrationFunction<WebNavInfo, AppState>),
};
const persistConfig: PersistConfig = {

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 7, 1:40 AM (14 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5842002
Default Alt Text
D15387.1765071629.diff (3 KB)

Event Timeline