|
|
@ -23,23 +23,27 @@ function transformState(state) { |
|
|
|
state?.IncomingTransactionsController?.incomingTransactions; |
|
|
|
state?.IncomingTransactionsController?.incomingTransactions; |
|
|
|
if (Array.isArray(transactions)) { |
|
|
|
if (Array.isArray(transactions)) { |
|
|
|
transactions.forEach((transaction) => { |
|
|
|
transactions.forEach((transaction) => { |
|
|
|
if ( |
|
|
|
if (transaction) { |
|
|
|
transaction.type !== TRANSACTION_TYPES.RETRY && |
|
|
|
if ( |
|
|
|
transaction.type !== TRANSACTION_TYPES.CANCEL |
|
|
|
transaction.type !== TRANSACTION_TYPES.RETRY && |
|
|
|
) { |
|
|
|
transaction.type !== TRANSACTION_TYPES.CANCEL |
|
|
|
transaction.type = transaction.transactionCategory; |
|
|
|
) { |
|
|
|
|
|
|
|
transaction.type = transaction.transactionCategory; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
delete transaction.transactionCategory; |
|
|
|
} |
|
|
|
} |
|
|
|
delete transaction.transactionCategory; |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
if (incomingTransactions) { |
|
|
|
if (incomingTransactions) { |
|
|
|
const incomingTransactionsEntries = Object.entries(incomingTransactions); |
|
|
|
const incomingTransactionsEntries = Object.entries(incomingTransactions); |
|
|
|
incomingTransactionsEntries.forEach(([key, transaction]) => { |
|
|
|
incomingTransactionsEntries.forEach(([key, transaction]) => { |
|
|
|
delete transaction.transactionCategory; |
|
|
|
if (transaction) { |
|
|
|
state.IncomingTransactionsController.incomingTransactions[key] = { |
|
|
|
delete transaction.transactionCategory; |
|
|
|
...transaction, |
|
|
|
state.IncomingTransactionsController.incomingTransactions[key] = { |
|
|
|
type: TRANSACTION_TYPES.INCOMING, |
|
|
|
...transaction, |
|
|
|
}; |
|
|
|
type: TRANSACTION_TYPES.INCOMING, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
return state; |
|
|
|
return state; |
|
|
|