Skip to content

Commit

Permalink
fix(suite): ignore rejected compose thunk
Browse files Browse the repository at this point in the history
  • Loading branch information
marekrjpolak committed Sep 3, 2024
1 parent 5c2cb7d commit 01610f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/suite/src/hooks/wallet/form/useCompose.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useEffect, useRef, useCallback, useState } from 'react';
import { FieldPath, UseFormReturn } from 'react-hook-form';
import { isFulfilled } from '@reduxjs/toolkit';

import { FeeLevel } from '@trezor/connect';
import { useDebounce } from '@trezor/react-utils';
Expand Down Expand Up @@ -88,7 +89,7 @@ export const useCompose = <TFieldValues extends FormState>({
formState,
composeContext: state,
}),
).unwrap();
).then(res => (isFulfilled(res) ? res.payload : undefined));
});

// RACE-CONDITION NOTE:
Expand Down

0 comments on commit 01610f0

Please sign in to comment.