diff --git a/projects/portal/src/app/models/yield-aggregators/yield-aggregator.service.ts b/projects/portal/src/app/models/yield-aggregators/yield-aggregator.service.ts index ba8918538..a4cdd3a8c 100644 --- a/projects/portal/src/app/models/yield-aggregators/yield-aggregator.service.ts +++ b/projects/portal/src/app/models/yield-aggregators/yield-aggregator.service.ts @@ -1,3 +1,4 @@ +import { DenomOnChain } from '../../pages/yieldaggregator/vaults/vault/vault.component'; import { Config, StrategyInfo } from '../config.service'; import { getDenomExponent } from '../cosmos/bank.model'; import { BankQueryService } from '../cosmos/bank.query.service'; @@ -259,4 +260,27 @@ export class YieldAggregatorService { poolInfos, }; } + + addOtherChainsTokens(denoms: DenomOnChain[], symbol: string): DenomOnChain[] { + if (symbol === 'ATOM') { + denoms.push({ + denom: 'uatom', + symbol: 'ATOM', + chain: 'Cosmos', + chainImg: + 'https://cdn.jsdelivr.net/gh/atomiclabs/cryptocurrency-icons@1a63530be6e374711a8554f31b17e4cb92c25fa5/svg/color/atom.svg', + ibc: true, + }); + } + if (symbol === 'OSMO') { + denoms.push({ + denom: 'uosmo', + symbol: 'OSMO', + chain: 'Osmosis', + chainImg: 'assets/osmosis-logo.svg', + ibc: true, + }); + } + return denoms; + } } diff --git a/projects/portal/src/app/pages/yieldaggregator/vaults/vault/vault.component.ts b/projects/portal/src/app/pages/yieldaggregator/vaults/vault/vault.component.ts index a8cdd8723..56691344b 100644 --- a/projects/portal/src/app/pages/yieldaggregator/vaults/vault/vault.component.ts +++ b/projects/portal/src/app/pages/yieldaggregator/vaults/vault/vault.component.ts @@ -27,6 +27,12 @@ import { Vault200Response, } from 'ununifi-client/esm/openapi'; +export type DenomOnChain = DenomInfos200ResponseInfoInner & { + chain: string; + chainImg: string; + ibc: boolean; +}; + @Component({ selector: 'app-vault', templateUrl: './vault.component.html', @@ -36,7 +42,7 @@ export class VaultComponent implements OnInit { address$: Observable; vault$: Observable; denom$: Observable; - availableDenoms$: Observable; + availableDenoms$: Observable; symbol$: Observable; denomBalancesMap$: Observable<{ [symbol: string]: cosmosclient.proto.cosmos.base.v1beta1.ICoin }>; denomMetadataMap$: Observable<{ @@ -85,7 +91,17 @@ export class VaultComponent implements OnInit { ); const denomInfos$ = this.iyaQuery.listDenomInfos$(); this.availableDenoms$ = combineLatest([this.symbol$, denomInfos$]).pipe( - map(([symbol, infos]) => infos.filter((info) => info.symbol === symbol)), + map(([symbol, infos]) => { + const denoms = infos + .filter((info) => info.symbol === symbol) + .map((info) => ({ + ...info, + chain: 'UnUniFi', + chainImg: 'assets/UnUniFi-logo.png', + ibc: false, + })); + return symbol ? this.iyaService.addOtherChainsTokens(denoms, symbol) : denoms; + }), ); const timer$ = timer(0, 1000 * 60); diff --git a/projects/portal/src/app/views/yieldaggregator/vaults/vault/vault.component.html b/projects/portal/src/app/views/yieldaggregator/vaults/vault/vault.component.html index d3691af02..c2777a519 100644 --- a/projects/portal/src/app/views/yieldaggregator/vaults/vault/vault.component.html +++ b/projects/portal/src/app/views/yieldaggregator/vaults/vault/vault.component.html @@ -220,38 +220,7 @@

What is the withdrawal reserve rate?

-
- - - - - -

Chain that you deposit from

- -
- - - -
- - -
-
-
+