@zeniai/client-epic-state 4.19.49-betaJK1 → 4.19.50

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.
@@ -58,7 +58,7 @@ const saveReconciliationReviewEpic = (actions$, state$, zeniAPI) => actions$.pip
58
58
  payload = getPayloadForBankTransfer(updatedTransaction, localData);
59
59
  break;
60
60
  case 'record_cc_payment':
61
- payload = getPayloadForCCPayment(updatedTransaction, localData);
61
+ payload = getPayloadForCCPayment(updatedTransaction, localData, reconciliationData?.account.accountType);
62
62
  break;
63
63
  case 'record_deposit':
64
64
  payload = getPayloadForDeposit(updatedTransaction, localData);
@@ -189,9 +189,11 @@ function getPayloadForBankTransfer(updatedTransaction, localData) {
189
189
  currency_code: updatedTransaction.amount.currencyCode,
190
190
  };
191
191
  }
192
- function getPayloadForCCPayment(updatedTransaction, localData) {
192
+ function getPayloadForCCPayment(updatedTransaction, localData, accountType) {
193
193
  return {
194
- account_id: localData.creditCardId,
194
+ account_id: accountType === 'credit_card'
195
+ ? localData.bankAccountId
196
+ : localData.creditCardId,
195
197
  amount: updatedTransaction.amount.amount,
196
198
  transaction_memo: updatedTransaction.memo,
197
199
  line_description: localData.memo,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.19.49-betaJK1",
3
+ "version": "4.19.50",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",