-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: basket feature refactoring #3117
base: dev
Are you sure you want to change the base?
Conversation
Asmadek
commented
Feb 7, 2025
- refactor basket to operations features
Unit Test Results 1 files 159 suites 6s ⏱️ For more details on these failures, see this check. Results for commit 7f5fcde. ♻️ This comment has been updated with latest results. |
@@ -6,7 +6,7 @@ export type BasketTransaction = { | |||
initiatorWallet: ID; | |||
coreTx: Transaction; | |||
txWrappers: TxWrapper[]; | |||
error?: BasketError; | |||
error?: ChainError | ClientError; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You want to store error in DB? why?
src/renderer/features/basket-filter/model/baket-filter-model.ts
Outdated
Show resolved
Hide resolved
const isSignAvailable = selectedTxs.length > 0; | ||
|
||
useEffect(() => { | ||
selectOperations.filterTxs(operations); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can filter operations inside effector
|
||
export const operationTitleSlot = createSlot<SlotProps>(); | ||
|
||
export const Operation = ({ operation }: Props) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need separated component for this? use <Slot id={operationTitleSlot} props={{ operation }}/>
in parent component
export const confirmTitleSlot = createSlot<SlotProps>(); | ||
export const confirmDetailsSlot = createSlot<SlotProps>(); | ||
|
||
export const OperationConfirm = ({ operation }: Props) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
|
||
import { WalletType } from '@/shared/core'; | ||
import { useSlot } from '@/shared/di'; | ||
import { useModalClose } from '@/shared/lib/hooks'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need it anymore
} | ||
|
||
return ( | ||
<BaseModal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's refactor it, use Modal
instead