From 66e697cb77f5f3ac1495f55d0222af57079c07c2 Mon Sep 17 00:00:00 2001 From: Johnathan White Date: Thu, 27 Oct 2022 21:54:01 -0400 Subject: [PATCH] Revert "[FIX] get contact name function" --- src/navigation/wallet/components/MultipleOutputsTx.tsx | 2 +- src/store/wallet/effects/transactions/transactions.ts | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/navigation/wallet/components/MultipleOutputsTx.tsx b/src/navigation/wallet/components/MultipleOutputsTx.tsx index d4f5e2535..30cf29d3f 100644 --- a/src/navigation/wallet/components/MultipleOutputsTx.tsx +++ b/src/navigation/wallet/components/MultipleOutputsTx.tsx @@ -116,7 +116,7 @@ const MultipleOutputsTx = ({tx}: {tx: any}) => { output.addressToShow = addressToShow === 'false' ? t('Unparsed address') : addressToShow; - output.contactName = GetContactName(outputAddr, chain, contactList); + output.contactName = GetContactName(outputAddr, contactList); }); const getDesc = () => { diff --git a/src/store/wallet/effects/transactions/transactions.ts b/src/store/wallet/effects/transactions/transactions.ts index b232836c4..9eefa9e64 100644 --- a/src/store/wallet/effects/transactions/transactions.ts +++ b/src/store/wallet/effects/transactions/transactions.ts @@ -546,15 +546,13 @@ export const EditTxNote = (wallet: Wallet, args: NoteArgs): Promise => { export const GetContactName = ( address: string | undefined, - chain: string, contactList: any[] = [], ) => { if (!address || !contactList.length) { return null; } const existsContact = contactList.find( - contact => - contact.address === address && contact.chain === chain.toLowerCase(), + contact => contact.address === address, ); if (existsContact) { return existsContact.name; @@ -625,7 +623,6 @@ export const BuildUiFriendlyList = ( note, message, creatorName, - chain, } = transaction || {}; const { service: customDataService, @@ -640,9 +637,9 @@ export const BuildUiFriendlyList = ( if ( contactList?.length && outputs?.length && - GetContactName(outputs[0]?.address, chain, contactList) + GetContactName(outputs[0]?.address, contactList) ) { - contactName = GetContactName(outputs[0]?.address, chain, contactList); + contactName = GetContactName(outputs[0]?.address, contactList); } const isSent = IsSent(action);