mirror of
https://github.com/Qortal/q-trade.git
synced 2025-06-19 04:31:21 +00:00
fixes
This commit is contained in:
parent
d79e26da4b
commit
74ef469224
@ -824,7 +824,8 @@ export const TradeOffers: React.FC<any> = ({
|
||||
gridRef.current.api.refreshCells({ force: true });
|
||||
}
|
||||
}, [signedUnlockingFees, fee]);
|
||||
if (!signedUnlockingFees || (!fee && selectedCoin !== "PIRATECHAIN"))
|
||||
|
||||
if (!signedUnlockingFees || ((fee === undefined || fee === null) && selectedCoin !== "PIRATECHAIN"))
|
||||
return null;
|
||||
|
||||
return (
|
||||
|
@ -86,7 +86,8 @@ export const FeeManager = ({ selectedCoin, setFee, fee }) => {
|
||||
},
|
||||
1800000
|
||||
);
|
||||
if (response && !isNaN(+response)) {
|
||||
console.log('response', response)
|
||||
if ((response !== null && response !== undefined) && !isNaN(+response)) {
|
||||
setFee(response);
|
||||
}
|
||||
|
||||
@ -120,6 +121,17 @@ export const FeeManager = ({ selectedCoin, setFee, fee }) => {
|
||||
return recommendedFeeData[coin][recommendedFee];
|
||||
}, [recommendedFeeData, recommendedFee, selectedCoin]);
|
||||
|
||||
const hideRecommendations = useMemo(()=> {
|
||||
if(selectedCoin === 'LITECOIN' || selectedCoin === 'BITCOIN' || selectedCoin === 'DOGECOIN') return false
|
||||
return true
|
||||
}, [selectedCoin])
|
||||
|
||||
useEffect(()=> {
|
||||
if(hideRecommendations){
|
||||
setRecommendedFee('custom')
|
||||
}
|
||||
}, [hideRecommendations])
|
||||
|
||||
const updateFee = async () => {
|
||||
const typeRequest = "feerequired";
|
||||
|
||||
@ -183,7 +195,9 @@ export const FeeManager = ({ selectedCoin, setFee, fee }) => {
|
||||
getLatestFees();
|
||||
}, [getLatestFees]);
|
||||
|
||||
if (!fee) return;
|
||||
console.log('fee', fee)
|
||||
|
||||
if (fee === null || fee === undefined) return;
|
||||
return (
|
||||
<>
|
||||
<ButtonBase
|
||||
@ -249,7 +263,7 @@ export const FeeManager = ({ selectedCoin, setFee, fee }) => {
|
||||
alignItems: 'center'
|
||||
}}>
|
||||
<CustomLabel htmlFor="standard-adornment-name">
|
||||
Recommended fee selection
|
||||
Recommended fee selection ( in sats)
|
||||
</CustomLabel>
|
||||
|
||||
<Spacer height="10px" />
|
||||
@ -260,9 +274,14 @@ export const FeeManager = ({ selectedCoin, setFee, fee }) => {
|
||||
onChange={handleChange}
|
||||
aria-label="Platform"
|
||||
>
|
||||
{!hideRecommendations && (
|
||||
<>
|
||||
<ToggleButton value="l">Low</ToggleButton>
|
||||
<ToggleButton value="m">Medium</ToggleButton>
|
||||
<ToggleButton value="h">High</ToggleButton>
|
||||
</>
|
||||
)}
|
||||
|
||||
<ToggleButton value="custom">Custom</ToggleButton>
|
||||
</ToggleButtonGroup>
|
||||
</Box>
|
||||
|
Loading…
x
Reference in New Issue
Block a user