Skip to content

Commit

Permalink
fix(manage-nominations): Revert changes behavior in Manage nominations (
Browse files Browse the repository at this point in the history
  • Loading branch information
frankli-dev authored Apr 11, 2024
1 parent 459da24 commit a5bc9e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/canvas/ManageNominations/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const ManageNominations = () => {
// Default nominators, from canvas options.
const [defaultNominations, setDefaultNominations] =
useState<NominationSelectionWithResetCounter>({
nominations: options?.nominated || [],
nominations: [...(options?.nominated || [])],
reset: 0,
});

Expand All @@ -70,7 +70,7 @@ export const ManageNominations = () => {

// Handler for reverting nomination updates.
const handleRevertChanges = () => {
setNewNominations({ nominations: defaultNominations.nominations });
setNewNominations({ nominations: [...defaultNominations.nominations] });
setDefaultNominations({
nominations: defaultNominations.nominations,
reset: defaultNominations.reset + 1,
Expand Down Expand Up @@ -194,7 +194,7 @@ export const ManageNominations = () => {
set: handleSetupUpdate,
},
]}
nominations={defaultNominations}
nominations={newNominations}
/>
</CanvasFullScreenWrapper>
<CanvasSubmitTxFooter>
Expand Down

0 comments on commit a5bc9e9

Please sign in to comment.