This commit is contained in:
PhilReact 2024-12-26 05:55:36 +02:00
parent 1350ef44c6
commit 375b9f3a69

View File

@ -240,7 +240,7 @@ export const Header = ({ qortBalance, foreignCoinBalance }: any) => {
const sendCoin = async ()=> { const sendCoin = async ()=> {
try { try {
const coin = getCoinLabel() const coin = openCoinActionModal.coin === "QORT" ? 'QORT' : getCoinLabel()
if(!coin) return if(!coin) return
setOpen(true); setOpen(true);
setInfo({ setInfo({
@ -537,31 +537,7 @@ export const Header = ({ qortBalance, foreignCoinBalance }: any) => {
}} }}
/> />
</> </>
) : openCoinActionModal.type === "receive" && ) : null}
openCoinActionModal.coin === "QORT" ? (
<>
<SendFont>Receive {openCoinActionModal.coin}</SendFont>
<img
src={qortIcon}
style={{
height: "25px",
width: "auto",
}}
/>
</>
) : openCoinActionModal.type === "receive" &&
openCoinActionModal.coin !== "QORT" ? (
<>
<SendFont>Receive {openCoinActionModal.coin}</SendFont>
<img
src={getCoinIcon(getCoinLabel())}
style={{
height: "25px",
width: "auto",
}}
/>
</>
) : null}
</HeaderRow> </HeaderRow>
</CoinActionRow> </CoinActionRow>
<CoinActionRow> <CoinActionRow>
@ -570,12 +546,12 @@ export const Header = ({ qortBalance, foreignCoinBalance }: any) => {
style={{ flexGrow: 1 }} style={{ flexGrow: 1 }}
name={ name={
openCoinActionModal.type === "send" openCoinActionModal.type === "send"
? "Recipient Address" ? `${openCoinActionModal.coin === "QORT" ? 'Recipient Address or Name' : 'Recipient Address'}`
: "Receive Address" : "Receive Address"
} }
label={ label={
openCoinActionModal.type === "send" openCoinActionModal.type === "send"
? "Recipient Address" ? `${openCoinActionModal.coin === "QORT" ? 'Recipient Address or Name' : 'Recipient Address'}`
: "Receive Address" : "Receive Address"
} }
variant="filled" variant="filled"
@ -617,14 +593,14 @@ export const Header = ({ qortBalance, foreignCoinBalance }: any) => {
)} )}
</> : ( </> : (
<> <>
<ReceiveCoin setOpen={setOpen} setInfo={setInfo} coinAddresses={coinAddresses} setCoinAddresses={setCoinAddresses} selectedCoin={getCoinLabel()} /> <ReceiveCoin setOpen={setOpen} setInfo={setInfo} coinAddresses={coinAddresses} setCoinAddresses={setCoinAddresses} selectedCoin={openCoinActionModal.coin === "QORT" ? 'QORT' :getCoinLabel()} />
</> </>
)} )}
{openCoinActionModal.type === 'send' && ( {openCoinActionModal.type === 'send' && (
<CoinActionRow style={{gap: "10px"}}> <CoinActionRow style={{gap: "10px"}}>
<CoinCancelBtn onClick={() => setOpenCoinActionModal(null)}> {/* <CoinCancelBtn onClick={() => setOpenCoinActionModal(null)}>
Cancel Cancel
</CoinCancelBtn> </CoinCancelBtn> */}
<CoinConfirmSendBtn <CoinConfirmSendBtn
onClick={() => { onClick={() => {
if(openCoinActionModal.type === 'send'){ if(openCoinActionModal.type === 'send'){