Skip to content
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

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

Asmadek
Copy link
Contributor

@Asmadek Asmadek commented Feb 7, 2025

  • refactor basket to operations features

Copy link
Contributor

github-actions bot commented Feb 7, 2025

Unit Test Results

  1 files  159 suites   6s ⏱️
633 tests 626 ✅ 6 💤 1 ❌
785 runs  778 ✅ 6 💤 1 ❌

For more details on these failures, see this check.

Results for commit 7f5fcde.

♻️ This comment has been updated with latest results.

src/renderer/aggregates/basket-operations/service.ts Outdated Show resolved Hide resolved
@@ -6,7 +6,7 @@ export type BasketTransaction = {
initiatorWallet: ID;
coreTx: Transaction;
txWrappers: TxWrapper[];
error?: BasketError;
error?: ChainError | ClientError;
Copy link
Contributor

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/common/types.ts Outdated Show resolved Hide resolved
const isSignAvailable = selectedTxs.length > 0;

useEffect(() => {
selectOperations.filterTxs(operations);
Copy link
Contributor

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) => {
Copy link
Contributor

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) => {
Copy link
Contributor

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';
Copy link
Contributor

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Basket. Refactor basket operation for further integration into the Fellowship
2 participants