mirror of
https://github.com/Qortal/q-shop.git
synced 2025-01-30 14:52:20 +00:00
change positioning
This commit is contained in:
parent
98c5e7d37d
commit
912b0adddc
@ -189,6 +189,32 @@ export const Store = () => {
|
||||
: currentViewedStore
|
||||
}, [username, user?.name, currentStore, currentViewedStore])
|
||||
|
||||
const calculateARRRExchangeRate = async()=> {
|
||||
try {
|
||||
const url = '/crosschain/price/PIRATECHAIN?maxtrades=10&inverse=true'
|
||||
const info = await fetch(url, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
const responseDataStore = await info.text();
|
||||
|
||||
const ratio = +responseDataStore /100000000
|
||||
if(isNaN(ratio)) throw new Error('Cannot get exchange rate')
|
||||
setExchangeRate(ratio)
|
||||
} catch (error) {
|
||||
dispatch(setPreferredCoin(CoinFilter.qort))
|
||||
dispatch(
|
||||
setNotification({
|
||||
alertType: "error",
|
||||
msg: "Cannot get exchange rate- reverted to QORT",
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const switchCoin = async ()=> {
|
||||
dispatch(setIsLoadingGlobal(true));
|
||||
|
||||
@ -623,31 +649,7 @@ export const Store = () => {
|
||||
|
||||
|
||||
|
||||
const calculateARRRExchangeRate = async()=> {
|
||||
try {
|
||||
const url = '/crosschain/price/PIRATECHAIN?maxtrades=10&inverse=true'
|
||||
const info = await fetch(url, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
const responseDataStore = await info.text();
|
||||
|
||||
const ratio = +responseDataStore /100000000
|
||||
if(isNaN(ratio)) throw new Error('Cannot get exchange rate')
|
||||
setExchangeRate(ratio)
|
||||
} catch (error) {
|
||||
dispatch(setPreferredCoin(CoinFilter.qort))
|
||||
dispatch(
|
||||
setNotification({
|
||||
alertType: "error",
|
||||
msg: "Cannot get exchange rate- reverted to QORT",
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user