Skip to content

Commit

Permalink
fix: Use useMemo with Receive Modal
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwing committed Mar 8, 2025
1 parent 48ef8da commit 7392979
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ui/components/multichain/receive-modal/receive-modal.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { useMemo } from 'react';
import { useSelector } from 'react-redux';
import PropTypes from 'prop-types';
import {
Expand All @@ -22,6 +22,7 @@ export const ReceiveModal = ({ address, onClose }) => {
const {
metadata: { name },
} = useSelector((state) => getInternalAccountByAddress(state, address));
const data = useMemo(() => ({ data: address }), [address]);

return (
<Modal isOpen onClose={onClose}>
Expand All @@ -37,7 +38,7 @@ export const ReceiveModal = ({ address, onClose }) => {
paddingInlineEnd={4}
paddingInlineStart={4}
>
<QrCodeView Qr={{ data: address }} accountName={name} />
<QrCodeView Qr={data} accountName={name} />
</Box>
</ModalContent>
</Modal>
Expand Down

0 comments on commit 7392979

Please sign in to comment.