mirror of
https://github.com/Qortal/q-trade.git
synced 2025-06-21 21:41:21 +00:00
refetch unsigned fees api
This commit is contained in:
parent
1e711443d2
commit
00634bca04
@ -570,7 +570,6 @@ export const TradeOffers: React.FC<any> = ({
|
|||||||
acctName: item.acctName
|
acctName: item.acctName
|
||||||
}));
|
}));
|
||||||
|
|
||||||
console.log('data', data)
|
|
||||||
offeringTrades.current = [
|
offeringTrades.current = [
|
||||||
...transformed?.filter(
|
...transformed?.filter(
|
||||||
(coin) => coin?.foreignBlockchain === selectedCoin && coin?.mode === 'OFFERING'
|
(coin) => coin?.foreignBlockchain === selectedCoin && coin?.mode === 'OFFERING'
|
||||||
|
@ -364,7 +364,6 @@ const StuckOrders = ({setOpenStuckOrders})=> {
|
|||||||
return timestampB - timestampA; // Newest first
|
return timestampB - timestampA; // Newest first
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log('filteredByAddress', filteredByAddress)
|
|
||||||
return (
|
return (
|
||||||
<BootstrapDialog
|
<BootstrapDialog
|
||||||
aria-labelledby="customized-dialog-title"
|
aria-labelledby="customized-dialog-title"
|
||||||
|
@ -48,7 +48,24 @@ export default function UnsignedFees({ qortAddress }) {
|
|||||||
}
|
}
|
||||||
}, [qortAddress]);
|
}, [qortAddress]);
|
||||||
|
|
||||||
|
const getUnsignedFees = useCallback(async (address)=> {
|
||||||
|
try {
|
||||||
|
const url = `/crosschain/unsignedfees/${address}`
|
||||||
|
const res = await fetch(url)
|
||||||
|
const data = await res.json()
|
||||||
|
if(data && data.length > 0){
|
||||||
|
setIsPositive(true)
|
||||||
|
} else {
|
||||||
|
setIsPositive(false)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
|
||||||
const restartUnsignedFeeSocket = () => {
|
const restartUnsignedFeeSocket = () => {
|
||||||
|
getUnsignedFees()
|
||||||
setTimeout(() => initUnsignedFeeSocket(true), 50);
|
setTimeout(() => initUnsignedFeeSocket(true), 50);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -100,20 +117,6 @@ export default function UnsignedFees({ qortAddress }) {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const getUnsignedFees = useCallback(async (address)=> {
|
|
||||||
try {
|
|
||||||
const url = `/crosschain/unsignedfees/${address}`
|
|
||||||
const res = await fetch(url)
|
|
||||||
const data = await res.json()
|
|
||||||
if(data && data.length > 0){
|
|
||||||
setIsPositive(true)
|
|
||||||
} else {
|
|
||||||
setIsPositive(false)
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error)
|
|
||||||
}
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!qortAddress) return;
|
if (!qortAddress) return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user