Skip to content

Commit

Permalink
fix: keep type of edited Trove consistently as Trove
Browse files Browse the repository at this point in the history
  • Loading branch information
danielattilasimon committed Mar 9, 2021
1 parent 63363bc commit 8e01ae3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/dev-frontend/src/components/TroveManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ const reduce = (state: TroveManagerState, action: TroveManagerAction): TroveMana
};

case "revert":
return { ...state, edited: original, debtDirty: false, addedMinimumDebt: false };
return {
...state,
edited: new Trove(original.collateral, original.debt),
debtDirty: false,
addedMinimumDebt: false
};

case "updateStore": {
const {
Expand Down

0 comments on commit 8e01ae3

Please sign in to comment.