@zeniai/client-epic-state 4.19.77-betaAK1 → 4.19.77-betaAK3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of @zeniai/client-epic-state might be problematic. Click here for more details.

@@ -43,8 +43,13 @@ export const fetchTransactionDetailEpic = (actions$, state$, zeniAPI) => actions
43
43
  // If the transaction already exists in the entity store (e.g. fetched by the
44
44
  // list page), initialize local data immediately so the UI can render whatever
45
45
  // data is available while the full detail fetch completes in parallel.
46
+ //
47
+ // NOTE: The list page saves transactions under the full zeni ID (e.g.
48
+ // "tran_abc:37034") while the detail saves under the detail key (e.g.
49
+ // "37034_expense"). We try both to find the list-cached version.
46
50
  if (cacheOverride !== true) {
47
- const existingTransaction = getSupportedTransactionById(state$.value.transactionState, detailKey);
51
+ const existingTransaction = getSupportedTransactionById(state$.value.transactionState, detailKey) ??
52
+ getSupportedTransactionById(state$.value.transactionState, transactionId.id);
48
53
  if (existingTransaction != null) {
49
54
  transactionActions.push(initializeTransactionDetailLocalData({
50
55
  transactionId,