From 000fcf22027340c8a5dccabefe206678a5a7c769 Mon Sep 17 00:00:00 2001 From: shan Date: Fri, 25 Oct 2024 17:51:31 +0800 Subject: [PATCH] update pool details page path --- packages/huma-shared/src/v2/types/index.ts | 7 +++++++ .../components/Lend/components/PersonaEvaluation.tsx | 3 ++- .../src/components/Lend/solanaSupply/5-Success.tsx | 9 +++++++-- .../components/Lend/solanaSupply/6-PointsEarned.tsx | 2 +- .../src/components/Lend/solanaSupply/index.tsx | 10 +++++----- .../src/components/Lend/supplyV2/2-Evaluation.tsx | 9 +++++++-- .../huma-widget/src/components/Lend/supplyV2/index.tsx | 7 +------ 7 files changed, 30 insertions(+), 17 deletions(-) diff --git a/packages/huma-shared/src/v2/types/index.ts b/packages/huma-shared/src/v2/types/index.ts index ea79155..1600cc3 100644 --- a/packages/huma-shared/src/v2/types/index.ts +++ b/packages/huma-shared/src/v2/types/index.ts @@ -1,4 +1,11 @@ +import { IdentityVerificationStatusV2 } from '../../services' + export enum FirstLossCoverIndex { borrower = 0, admin = 2, } + +export interface CloseModalOptions { + identityStatus?: IdentityVerificationStatusV2 + isSuccess?: boolean +} diff --git a/packages/huma-widget/src/components/Lend/components/PersonaEvaluation.tsx b/packages/huma-widget/src/components/Lend/components/PersonaEvaluation.tsx index 2c6de32..2142106 100644 --- a/packages/huma-widget/src/components/Lend/components/PersonaEvaluation.tsx +++ b/packages/huma-widget/src/components/Lend/components/PersonaEvaluation.tsx @@ -3,6 +3,7 @@ import { CampaignService, CHAIN_TYPE, checkIsDev, + CloseModalOptions, IdentityServiceV2, IdentityVerificationStatusV2, KYCCopy, @@ -22,7 +23,7 @@ import { BottomButton } from '../../BottomButton' import { ApproveLenderImg } from '../../images' import { LoadingModal } from '../../LoadingModal' import { WrapperModal } from '../../WrapperModal' -import { Campaign, CloseModalOptions } from '../supplyV2' +import { Campaign } from '../supplyV2' type LoadingType = 'verificationStatus' | 'startKYC' | 'approveLender' diff --git a/packages/huma-widget/src/components/Lend/solanaSupply/5-Success.tsx b/packages/huma-widget/src/components/Lend/solanaSupply/5-Success.tsx index c11ff11..abc21ed 100644 --- a/packages/huma-widget/src/components/Lend/solanaSupply/5-Success.tsx +++ b/packages/huma-widget/src/components/Lend/solanaSupply/5-Success.tsx @@ -1,9 +1,14 @@ -import { formatMoney, SolanaPoolInfo, timeUtil } from '@huma-finance/shared' +import { + CloseModalOptions, + formatMoney, + SolanaPoolInfo, + timeUtil, +} from '@huma-finance/shared' import { SolanaPoolState } from '@huma-finance/web-shared' import dayjs from 'dayjs' import React, { useCallback } from 'react' import { useDispatch } from 'react-redux' -import { Campaign, CloseModalOptions } from '.' +import { Campaign } from '.' import { useAppSelector } from '../../../hooks/useRedux' import { setStep } from '../../../store/widgets.reducers' import { selectWidgetState } from '../../../store/widgets.selectors' diff --git a/packages/huma-widget/src/components/Lend/solanaSupply/6-PointsEarned.tsx b/packages/huma-widget/src/components/Lend/solanaSupply/6-PointsEarned.tsx index d1fa8f5..50a4272 100644 --- a/packages/huma-widget/src/components/Lend/solanaSupply/6-PointsEarned.tsx +++ b/packages/huma-widget/src/components/Lend/solanaSupply/6-PointsEarned.tsx @@ -2,6 +2,7 @@ import { CampaignService, CHAIN_TYPE, checkIsDev, + CloseModalOptions, formatNumber, isEmpty, } from '@huma-finance/shared' @@ -16,7 +17,6 @@ import { useResetAtom } from 'jotai/utils' import React, { useCallback, useEffect, useState } from 'react' import { useDispatch } from 'react-redux' -import { CloseModalOptions } from '.' import { resetState, setError } from '../../../store/widgets.reducers' import { BottomButton } from '../../BottomButton' import { CongratulationsIcon, HumaPointsIcon, RibbonIcon } from '../../icons' diff --git a/packages/huma-widget/src/components/Lend/solanaSupply/index.tsx b/packages/huma-widget/src/components/Lend/solanaSupply/index.tsx index 380d040..4c9e0e8 100644 --- a/packages/huma-widget/src/components/Lend/solanaSupply/index.tsx +++ b/packages/huma-widget/src/components/Lend/solanaSupply/index.tsx @@ -1,4 +1,8 @@ -import { SolanaPoolInfo, TrancheType } from '@huma-finance/shared' +import { + CloseModalOptions, + SolanaPoolInfo, + TrancheType, +} from '@huma-finance/shared' import { SolanaPoolState, useLenderAccounts, @@ -25,10 +29,6 @@ export interface Campaign { campaignGroupId: string } -export interface CloseModalOptions { - isSuccess?: boolean -} - /** * Lend pool supply props * @typedef {Object} SolanaLendSupplyProps diff --git a/packages/huma-widget/src/components/Lend/supplyV2/2-Evaluation.tsx b/packages/huma-widget/src/components/Lend/supplyV2/2-Evaluation.tsx index e109ef4..e32b775 100644 --- a/packages/huma-widget/src/components/Lend/supplyV2/2-Evaluation.tsx +++ b/packages/huma-widget/src/components/Lend/supplyV2/2-Evaluation.tsx @@ -1,7 +1,12 @@ -import { CHAIN_TYPE, PoolInfoV2, TrancheType } from '@huma-finance/shared' +import { + CHAIN_TYPE, + CloseModalOptions, + PoolInfoV2, + TrancheType, +} from '@huma-finance/shared' import React from 'react' -import { Campaign, CloseModalOptions } from '.' +import { Campaign } from '.' import { PersonaEvaluation } from '../components/PersonaEvaluation' import { SecuritizeEvaluation } from '../components/SecuritizeEvaluation' diff --git a/packages/huma-widget/src/components/Lend/supplyV2/index.tsx b/packages/huma-widget/src/components/Lend/supplyV2/index.tsx index edd7cb5..7cd7b50 100644 --- a/packages/huma-widget/src/components/Lend/supplyV2/index.tsx +++ b/packages/huma-widget/src/components/Lend/supplyV2/index.tsx @@ -1,5 +1,5 @@ import { - IdentityVerificationStatusV2, + CloseModalOptions, openInNewTab, POOL_NAME, TrancheType, @@ -34,11 +34,6 @@ export interface Campaign { campaignGroupId: string } -export interface CloseModalOptions { - identityStatus?: IdentityVerificationStatusV2 - isSuccess?: boolean -} - /** * Lend pool supply props * @typedef {Object} LendSupplyPropsV2