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 });
|
gridRef.current.api.refreshCells({ force: true });
|
||||||
}
|
}
|
||||||
}, [signedUnlockingFees, fee]);
|
}, [signedUnlockingFees, fee]);
|
||||||
if (!signedUnlockingFees || (!fee && selectedCoin !== "PIRATECHAIN"))
|
|
||||||
|
if (!signedUnlockingFees || ((fee === undefined || fee === null) && selectedCoin !== "PIRATECHAIN"))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -86,7 +86,8 @@ export const FeeManager = ({ selectedCoin, setFee, fee }) => {
|
|||||||
},
|
},
|
||||||
1800000
|
1800000
|
||||||
);
|
);
|
||||||
if (response && !isNaN(+response)) {
|
console.log('response', response)
|
||||||
|
if ((response !== null && response !== undefined) && !isNaN(+response)) {
|
||||||
setFee(response);
|
setFee(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,6 +121,17 @@ export const FeeManager = ({ selectedCoin, setFee, fee }) => {
|
|||||||
return recommendedFeeData[coin][recommendedFee];
|
return recommendedFeeData[coin][recommendedFee];
|
||||||
}, [recommendedFeeData, recommendedFee, selectedCoin]);
|
}, [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 updateFee = async () => {
|
||||||
const typeRequest = "feerequired";
|
const typeRequest = "feerequired";
|
||||||
|
|
||||||
@ -183,7 +195,9 @@ export const FeeManager = ({ selectedCoin, setFee, fee }) => {
|
|||||||
getLatestFees();
|
getLatestFees();
|
||||||
}, [getLatestFees]);
|
}, [getLatestFees]);
|
||||||
|
|
||||||
if (!fee) return;
|
console.log('fee', fee)
|
||||||
|
|
||||||
|
if (fee === null || fee === undefined) return;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ButtonBase
|
<ButtonBase
|
||||||
@ -249,7 +263,7 @@ export const FeeManager = ({ selectedCoin, setFee, fee }) => {
|
|||||||
alignItems: 'center'
|
alignItems: 'center'
|
||||||
}}>
|
}}>
|
||||||
<CustomLabel htmlFor="standard-adornment-name">
|
<CustomLabel htmlFor="standard-adornment-name">
|
||||||
Recommended fee selection
|
Recommended fee selection ( in sats)
|
||||||
</CustomLabel>
|
</CustomLabel>
|
||||||
|
|
||||||
<Spacer height="10px" />
|
<Spacer height="10px" />
|
||||||
@ -260,9 +274,14 @@ export const FeeManager = ({ selectedCoin, setFee, fee }) => {
|
|||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
aria-label="Platform"
|
aria-label="Platform"
|
||||||
>
|
>
|
||||||
|
{!hideRecommendations && (
|
||||||
|
<>
|
||||||
<ToggleButton value="l">Low</ToggleButton>
|
<ToggleButton value="l">Low</ToggleButton>
|
||||||
<ToggleButton value="m">Medium</ToggleButton>
|
<ToggleButton value="m">Medium</ToggleButton>
|
||||||
<ToggleButton value="h">High</ToggleButton>
|
<ToggleButton value="h">High</ToggleButton>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
<ToggleButton value="custom">Custom</ToggleButton>
|
<ToggleButton value="custom">Custom</ToggleButton>
|
||||||
</ToggleButtonGroup>
|
</ToggleButtonGroup>
|
||||||
</Box>
|
</Box>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user