We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 998a0a9 commit 23cae10Copy full SHA for 23cae10
packages/claims-controller/src/ClaimsController.ts
@@ -232,18 +232,19 @@ export class ClaimsController extends BaseController<
232
);
233
234
if (isExistingDraft) {
235
+ const updatedAt = new Date().toISOString();
236
this.update((state) => {
237
state.drafts = state.drafts.map((existingDraft) =>
238
existingDraft.draftId === draft.draftId
239
? {
240
...existingDraft,
241
...draft,
- updatedAt: new Date().toISOString(),
242
+ updatedAt,
243
}
244
: existingDraft,
245
246
});
- return draft as ClaimDraft;
247
+ return { ...draft, updatedAt } as ClaimDraft;
248
249
250
// generate a new draft id, name and add it to the state
0 commit comments