mirror of
https://github.com/Qortal/chrome-extension.git
synced 2025-03-28 16:25:54 +00:00
add QR code for QORT and generalize code
This commit is contained in:
parent
ac5a6b251b
commit
7b89ad19f0
@ -88,7 +88,7 @@ import { executeEvent, subscribeToEvent, unsubscribeFromEvent } from "./utils/ev
|
|||||||
import { requestQueueCommentCount, requestQueuePublishedAccouncements } from "./components/Chat/GroupAnnouncements";
|
import { requestQueueCommentCount, requestQueuePublishedAccouncements } from "./components/Chat/GroupAnnouncements";
|
||||||
import { requestQueueGroupJoinRequests } from "./components/Group/GroupJoinRequests";
|
import { requestQueueGroupJoinRequests } from "./components/Group/GroupJoinRequests";
|
||||||
import { DrawerComponent } from "./components/Drawer/Drawer";
|
import { DrawerComponent } from "./components/Drawer/Drawer";
|
||||||
import { LitecoinQRCode } from "./components/LitecoinQRCode";
|
import { AddressQRCode } from "./components/AddressQRCode";
|
||||||
import { Settings } from "./components/Group/Settings";
|
import { Settings } from "./components/Group/Settings";
|
||||||
import { MainAvatar } from "./components/MainAvatar";
|
import { MainAvatar } from "./components/MainAvatar";
|
||||||
|
|
||||||
@ -1260,7 +1260,7 @@ function App() {
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
<LitecoinQRCode ltcAddress={rawWallet?.ltcAddress} />
|
<AddressQRCode targetAddress={rawWallet?.ltcAddress} />
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
@ -1346,6 +1346,7 @@ function App() {
|
|||||||
>
|
>
|
||||||
Transfer QORT
|
Transfer QORT
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
|
<AddressQRCode targetAddress={rawWallet?.address0} />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<TextP
|
<TextP
|
||||||
|
@ -4,7 +4,7 @@ import QRCode from 'react-qr-code';
|
|||||||
import { TextP } from '../App-styles';
|
import { TextP } from '../App-styles';
|
||||||
import { Box } from '@mui/material';
|
import { Box } from '@mui/material';
|
||||||
|
|
||||||
export const LitecoinQRCode = ({ ltcAddress }) => {
|
export const AddressQRCode = ({ targetAddress }) => {
|
||||||
return (
|
return (
|
||||||
<Box sx={{
|
<Box sx={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
@ -22,10 +22,10 @@ export const LitecoinQRCode = ({ ltcAddress }) => {
|
|||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Your LTC address
|
Your address
|
||||||
</TextP>
|
</TextP>
|
||||||
<QRCode
|
<QRCode
|
||||||
value={ltcAddress} // Your LTC address here
|
value={targetAddress} // Your address here
|
||||||
size={180} // Adjust size as needed
|
size={180} // Adjust size as needed
|
||||||
level="M" // Error correction level (L, M, Q, H)
|
level="M" // Error correction level (L, M, Q, H)
|
||||||
bgColor="#FFFFFF" // Background color (white)
|
bgColor="#FFFFFF" // Background color (white)
|
Loading…
x
Reference in New Issue
Block a user