diff --git a/src/modules/blockchains/Buy/hooks/useCheckNodes.ts b/src/modules/blockchains/Buy/hooks/useCheckNodes.ts index f93ac2337..a2a823d7a 100644 --- a/src/modules/blockchains/Buy/hooks/useCheckNodes.ts +++ b/src/modules/blockchains/Buy/hooks/useCheckNodes.ts @@ -24,12 +24,14 @@ import { cloneDeep } from '../utils'; import { IModelOption } from '@/types/customize-model'; import { mouseDroppedPositionSignal } from '@/modules/blockchains/Buy/signals/useMouseDroppedPosition'; import useFormChain from './useFormChain'; +import { useAAModule } from '@/modules/blockchains/detail_v4/hook/useAAModule'; export default function useCheckNodes() { const { field } = useOrderFormStoreV3(); const { nodes, setNodes, edges, setEdges } = useFlowStore(); const { getCurrentFieldFromChain } = useFormChain(); const { lineBridgeStatus } = useBridgesModule(); + const { lineAAStatus } = useAAModule(); const { dapps } = useDappsStore(); const store = useStoreApi(); const { @@ -123,11 +125,11 @@ export default function useCheckNodes() { target: `account_abstraction`, targetHandle: `account_abstraction-t-${rootNode}`, type: 'customEdge', - label: handleStatusEdges('', lineBridgeStatus, 'account_abstraction') + label: handleStatusEdges('', lineAAStatus, 'account_abstraction') .icon, animated: handleStatusEdges( '', - lineBridgeStatus, + lineAAStatus, 'account_abstraction', ).animate, markerEnd: { diff --git a/src/utils/helpers.ts b/src/utils/helpers.ts index ab6fbc13a..8cfaa5321 100644 --- a/src/utils/helpers.ts +++ b/src/utils/helpers.ts @@ -262,39 +262,40 @@ export function isLocalhost() { function handleStatusEdgeByBox(status: any) { switch (status) { - case "draft": - case "setting_up": + case 'draft': + case 'setting_up': case EAirdropStatus.new: case '': //draft return { animate: true, icon: '', - } - // down - case "down": - case "run_out": + }; + // down + case 'down': + case 'run_out': case EAirdropStatus.ended: - case "stopped": + case 'stopped': return { animate: true, icon: 'true', - } - //run + }; + //run default: return { animate: false, icon: '', - } + }; } } export default function handleStatusEdges(statusDapp: any, status: aa, idNode: string) { - if(idNode === 'account-abstraction' || idNode === 'bridge_apps') { - return handleStatusEdgeByBox(status) + if (idNode === 'account_abstraction' || idNode === 'bridge_apps') { + console.log('status here', status); + return handleStatusEdgeByBox(status); } - return handleStatusEdgeByBox(statusDapp) + return handleStatusEdgeByBox(statusDapp); } -type aa = "draft" | "running" | "down" | 'setting_up' | EAirdropStatus +type aa = 'draft' | 'running' | 'down' | 'setting_up' | EAirdropStatus