Unifying use of clientID utils

Summary:
Fixes a couple of typo's and merges two very similar functions into one.
Now that there's a single way to create a clientID, we can get more strict about what it is and what it isn't.

Reviewed By: passy

Differential Revision: D18809741

fbshipit-source-id: 9a68e45bead38cc2917a6d4cd2cf461c309f3ede
This commit is contained in:
John Knox
2019-12-04 08:38:41 -08:00
committed by Facebook Github Bot
parent e1e2978b19
commit c95ecf6b3e
3 changed files with 31 additions and 29 deletions

View File

@@ -41,7 +41,7 @@ import {
SupportFormRequestDetailsState,
} from '../reducers/supportForm';
import {setSelectPluginsToExportActiveSheet} from '../reducers/application';
import {getCurrentAppName} from '../utils/clientUtils';
import {deconstructClientId} from '../utils/clientUtils';
export const IMPORT_FLIPPER_TRACE_EVENT = 'import-flipper-trace';
export const EXPORT_FLIPPER_TRACE_EVENT = 'export-flipper-trace';
@@ -547,7 +547,10 @@ export function exportStore(
if (exportData != null) {
exportData.supportRequestDetails = {
...state.supportForm?.supportFormV2,
appName: getCurrentAppName(state.connections.selectedApp),
appName:
state.connections.selectedApp == null
? ''
: deconstructClientId(state.connections.selectedApp).app,
};
statusUpdate && statusUpdate('Serializing Flipper data...');