Skip to content

Commit

Permalink
add redirects config (#185)
Browse files Browse the repository at this point in the history
Co-authored-by: shan <[email protected]>
  • Loading branch information
shan-57blocks and shan57blocks authored Apr 8, 2024
1 parent 1f21871 commit 7631085
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
13 changes: 13 additions & 0 deletions packages/huma-shared/src/utils/pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ export enum POOL_TYPE {
ReceivableBackedCreditLine = 'ReceivableBackedCreditLine',
}

export enum REDIRECTS {
Jia = '/Jia',
Arf = '/Arf',
BSOS = '/BSOS',
ImpactMarket = '/impactMarket',
Rain = '/Rain',
}

export type PoolMapType = {
[poolType in POOL_TYPE]: {
[poolName in POOL_NAME]?: {
Expand Down Expand Up @@ -83,6 +91,7 @@ export type PoolInfoType = {
detailsPage?: boolean
}
isClosed?: boolean
redirect?: REDIRECTS
}

export type PoolInfo = {
Expand Down Expand Up @@ -251,6 +260,7 @@ export const PoolContractMap: PoolContractMapType = {
},
detailsPage: true,
},
redirect: REDIRECTS.Jia,
},
[POOL_NAME.ArfCreditPool1]: {
chainId: ChainEnum.Polygon,
Expand Down Expand Up @@ -306,6 +316,7 @@ export const PoolContractMap: PoolContractMapType = {
disableBorrow: true,
detailsPage: true,
},
redirect: REDIRECTS.BSOS,
},
[POOL_NAME.Raincards]: {
chainId: ChainEnum.Polygon,
Expand Down Expand Up @@ -333,6 +344,7 @@ export const PoolContractMap: PoolContractMapType = {
disableBorrow: true,
detailsPage: true,
},
redirect: REDIRECTS.Rain,
},
},
[POOL_TYPE.Stream]: {
Expand Down Expand Up @@ -476,6 +488,7 @@ export const PoolContractMap: PoolContractMapType = {
borrower: '0x10FB65dc26a7aCC7CFB4eA3b6E007c8C77591486',
rwrUploader: '0x4c6388346f2a3af2d64461339a5cdd3a3d63ccf5',
},
redirect: REDIRECTS.ImpactMarket,
},
[POOL_NAME.ArfCreditPool1]: {
chainId: ChainEnum.Celo,
Expand Down
3 changes: 2 additions & 1 deletion packages/huma-shared/src/v2/metadata/celo.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChainEnum } from '../../utils/chain'
import { POOL_NAME, POOL_TYPE } from '../../utils/pool'
import { POOL_NAME, POOL_TYPE, REDIRECTS } from '../../utils/pool'
import { FirstLossCoverIndex } from '../types'
import { PoolsInfoV2 } from '../utils'

Expand Down Expand Up @@ -28,5 +28,6 @@ export const CELO_METADATA: PoolsInfoV2 = {
title: 'Arf Credit Pool V2',
desc: 'Arf provides an innovative on-chain liquidity solution that simplifies cross-border payments by facilitating immediate USDC-based settlements and tokenizing payment orders, enhancing transparency in the process.',
supplyLink: 'https://uer4clyybno.typeform.com/arfcreditline',
redirect: REDIRECTS.Arf,
},
}
2 changes: 2 additions & 0 deletions packages/huma-shared/src/v2/utils/pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
POOL_NAME,
POOL_TYPE,
PoolVersion,
REDIRECTS,
} from '../../utils'
import { ALFAJORES_METADATA } from '../metadata/alfajores'
import { CELO_METADATA } from '../metadata/celo'
Expand Down Expand Up @@ -96,6 +97,7 @@ export type PoolInfoV2 = {
extra?: {
hidden?: boolean
}
redirect?: REDIRECTS
}

export type PoolsInfoV2 = {
Expand Down

0 comments on commit 7631085

Please sign in to comment.