Skip to content

Commit

Permalink
Fix settlement finalize display order (#48)
Browse files Browse the repository at this point in the history
* v2.1.1

* Remove ledger API

* Fix up helm chart

* Fix eslint config. Remove now-redundant ledger stuff.

* Fix progress indicator in settlement finalizing

* Reinstate ledger stuff that we were actually using.
  • Loading branch information
partiallyordered authored Sep 14, 2021
1 parent 9181269 commit 73a4afa
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions helm/finance-portal-v2-ui/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
appVersion: "v2.3.0"
appVersion: "v2.3.1"
description: Mojaloop Finance Portal UI v2
name: finance-portal-v2-ui
version: 2.3.0
version: 2.3.1
2 changes: 1 addition & 1 deletion helm/finance-portal-v2-ui/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ replicaCount: 1

image:
repository: ghcr.io/mojaloop/finance-portal-v2-ui
tag: v2.3.0
tag: v2.3.1
pullPolicy: IfNotPresent

imagePullCredentials:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "finance-portal-v2-ui",
"version": "2.3.0",
"version": "2.3.1",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/App/Settlements/SettlementFinalizingModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ const SettlementFinalizingModal: FC<ConnectorProps> = ({

const orderedStates = [
SettlementStatus.PendingSettlement,
SettlementStatus.PsTransfersReserved,
SettlementStatus.PsTransfersRecorded,
SettlementStatus.PsTransfersReserved,
SettlementStatus.PsTransfersCommitted,
SettlementStatus.Settling,
SettlementStatus.Settled,
Expand Down
10 changes: 4 additions & 6 deletions src/App/Settlements/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ function* finalizeSettlement(action: PayloadAction<Settlement>) {
}),
);
}
// Note the deliberate fall-through behaviour here, representing the expected state transitions
// eslint-ignore-next-line: no-fallthrough
case SettlementStatus.PsTransfersRecorded: {
yield put(
Expand All @@ -109,7 +108,6 @@ function* finalizeSettlement(action: PayloadAction<Settlement>) {
}),
);
}
// Note the deliberate fall-through behaviour here, representing the expected state transitions
// eslint-ignore-next-line: no-fallthrough
case SettlementStatus.PsTransfersReserved: {
yield put(
Expand All @@ -131,12 +129,10 @@ function* finalizeSettlement(action: PayloadAction<Settlement>) {
}),
);
}
// Note the deliberate fall-through behaviour here, representing the expected state transitions
// eslint-ignore-next-line: no-fallthrough
case SettlementStatus.PsTransfersCommitted:
// We could transition to PS_TRANSFERS_COMMITTED, but then we'd immediately transition to
// SETTLING anyway, so we do nothing here.
// Note the deliberate fall-through behaviour here, representing the expected state transitions
// eslint-ignore-next-line: no-fallthrough
case SettlementStatus.Settling: {
yield put(
Expand Down Expand Up @@ -183,7 +179,10 @@ function* finalizeSettlement(action: PayloadAction<Settlement>) {
const accountSettlementResults: { status: number; data: any }[] = yield all(
requests.map((r) => call(apis.settlementParticipantAccount.update, r.request)),
);
const requestResultZip = accountSettlementResults.map((res, i) => ({ req: requests[i], res }));
const requestResultZip = accountSettlementResults.map((res, i) => ({
req: requests[i],
res,
}));
const accountSettlementErrors = requestResultZip
.filter(({ res }) => res.status !== 200)
.map(({ req, res }) => {
Expand All @@ -210,7 +209,6 @@ function* finalizeSettlement(action: PayloadAction<Settlement>) {
result = yield call(apis.settlement.read, { settlementId: action.payload.id });
}
}
// Note the deliberate fall-through behaviour here, representing the expected state transitions
// eslint-ignore-next-line: no-fallthrough
case SettlementStatus.Settled:
yield put(
Expand Down

0 comments on commit 73a4afa

Please sign in to comment.