Fix custom names and buttonref
This commit is contained in:
parent
4a601d8355
commit
3f9222e137
|
@ -407,6 +407,7 @@ function ApproveSignatureForm({
|
|||
origin={origin}
|
||||
messages={messages}
|
||||
onApprove={onApprove}
|
||||
buttonRef={buttonRef}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -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 };
|
||||
|
|
Loading…
Reference in New Issue