From 3f9222e1370f830ec7e7095bc064ec7d9c922461 Mon Sep 17 00:00:00 2001 From: armaniferrante Date: Wed, 17 Mar 2021 18:20:40 -0700 Subject: [PATCH] Fix custom names and buttonref --- src/pages/PopupPage.js | 1 + src/utils/tokens/names.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/PopupPage.js b/src/pages/PopupPage.js index d1a29a9..ea9ce1a 100644 --- a/src/pages/PopupPage.js +++ b/src/pages/PopupPage.js @@ -407,6 +407,7 @@ function ApproveSignatureForm({ origin={origin} messages={messages} onApprove={onApprove} + buttonRef={buttonRef} /> ); }; diff --git a/src/utils/tokens/names.js b/src/utils/tokens/names.js index f6a422c..03aec0d 100644 --- a/src/utils/tokens/names.js +++ b/src/utils/tokens/names.js @@ -291,13 +291,14 @@ export function getTokenInfo(mint, endpoint, tokenInfos) { let match = tokenInfos?.find( (tokenInfo) => tokenInfo.address === mint.toBase58(), ); + if (match) { if (!info) { info = { ...match, logoUri: match.logoURI }; } // The user has overridden a name locally. else { - info = { ...info, logoUri: match.logoURI }; + info = { ...match, ...info, logoUri: match.logoURI }; } } return { ...info };