Skip to content

Commit

Permalink
fix(app-shell): delete protocols across both protocol storages (#13561)
Browse files Browse the repository at this point in the history
Closes RQA-1600

Remove protocol files from both versions of the app to prevent protocol re-migration upon navigation
to the ProtocolDashboard.
  • Loading branch information
mjhuff authored Sep 15, 2023
1 parent d9f202d commit bee19c6
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions app-shell/src/protocol-storage/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,22 @@ export function registerProtocolStorage(dispatch: Dispatch): Dispatch {
})
break
}

// TODO(jh, 2023-09-15): remove the secondary removeProtocolByKey() after
// OT-2 parity work is completed.
case ProtocolStorageActions.REMOVE_PROTOCOL: {
FileSystem.removeProtocolByKey(
action.payload.protocolKey,
FileSystem.PROTOCOLS_DIRECTORY_PATH
).then(() =>
fetchProtocols(dispatch, ProtocolStorageActions.PROTOCOL_ADDITION)
)
.then(() =>
fetchProtocols(dispatch, ProtocolStorageActions.PROTOCOL_ADDITION)
)
.then(() =>
FileSystem.removeProtocolByKey(
action.payload.protocolKey,
FileSystem.OLD_PROTOCOLS_DIRECTORY_PATH
)
)
break
}

Expand Down

0 comments on commit bee19c6

Please sign in to comment.