From fbf5862121ea11d9a0e3b42be1fd7b685d34feba Mon Sep 17 00:00:00 2001 From: Ilja Date: Fri, 25 Feb 2022 17:05:44 +0200 Subject: [PATCH] Add cosmos to session proposal modal --- wallets/react-wallet-v2/src/data/COSMOSData.ts | 5 +++++ .../react-wallet-v2/src/views/SessionProposalModal.tsx | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/wallets/react-wallet-v2/src/data/COSMOSData.ts b/wallets/react-wallet-v2/src/data/COSMOSData.ts index d10d943..ae0d4aa 100644 --- a/wallets/react-wallet-v2/src/data/COSMOSData.ts +++ b/wallets/react-wallet-v2/src/data/COSMOSData.ts @@ -1,3 +1,8 @@ +/** + * Types + */ +export type TCosmosChain = keyof typeof COSMOS_MAINNET_CHAINS + /** * Chains */ diff --git a/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx b/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx index 8f31fa0..baed015 100644 --- a/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx +++ b/wallets/react-wallet-v2/src/views/SessionProposalModal.tsx @@ -1,3 +1,4 @@ +import { COSMOS_MAINNET_CHAINS, TCosmosChain } from '@/data/COSMOSData' import { EIP155_CHAINS, TEIP155Chain } from '@/data/EIP155Data' import ModalStore from '@/store/ModalStore' import { eip155Addresses } from '@/utils/EIP155WalletUtil' @@ -98,7 +99,12 @@ export default function SessionProposalModal() { Blockchains {chains - .map(chain => EIP155_CHAINS[chain as TEIP155Chain]?.name ?? chain) + .map( + chain => + EIP155_CHAINS[chain as TEIP155Chain]?.name ?? + COSMOS_MAINNET_CHAINS[chain as TCosmosChain]?.name ?? + chain + ) .join(', ')}