removed morphtoken

This commit is contained in:
Jan Scheiper 2022-05-13 11:35:57 +02:00
parent e59ab7ae6b
commit 5094489ee5
2 changed files with 4 additions and 17 deletions

View File

@ -8,7 +8,7 @@ class XMRData extends EventEmitter {
} }
get initial() { get initial() {
return { shapeshift: null, xmrto: null, shapeshift_xmr: null }; return { binance: null, };
} }
start() { start() {
@ -22,28 +22,19 @@ class XMRData extends EventEmitter {
fetch() { fetch() {
Promise.all([ Promise.all([
axios.get("https://bitpay.com/api/rates/eur").catch(err => log.error(err.config.url, err.message)), axios.get("https://bitpay.com/api/rates/eur").catch(err => log.error(err.config.url, err.message)),
// axios.get("https://shapeshift.io/marketinfo/btc_xmr").catch(err => log.error(err.config.url, err.message)),
axios.get("https://api.morphtoken.com/rates").catch(err => log.error(err.config.url, err.message)),
// axios.get("https://xmr.to/api/v2/xmr2btc/order_parameter_query/").catch(err => log.error(err.config.url, err.message)),
axios.get("https://api.binance.com/api/v3/ticker/price?symbol=XMRBTC").catch(err => log.error(err.config.url, err.message)), axios.get("https://api.binance.com/api/v3/ticker/price?symbol=XMRBTC").catch(err => log.error(err.config.url, err.message)),
]).then(resp => { ]).then(resp => {
let bitpay = null, morphtoken = null, binance = null, morphtoken_xmr = null; let bitpay = null, binance = null;
if (resp[0] != undefined) { if (resp[0] != undefined) {
bitpay = resp[0].data.rate; bitpay = resp[0].data.rate;
if (resp[1] != undefined) { if (resp[1] != undefined) {
// console.log(resp[1]); binance = (Math.round((bitpay * resp[1].data.price) * 100) / 100) + "€";
morphtoken_xmr = (Math.round(resp[1].data.data.BTC.XMR * 100) / 100) + "XMR";
morphtoken = (Math.round((bitpay / resp[1].data.data.BTC.XMR) * 100) / 100) + "€";
}
if (resp[2] != undefined) {
binance = (Math.round((bitpay * resp[2].data.price) * 100) / 100) + "€";
} }
} }
this.emit("data", { morphtoken, binance, morphtoken_xmr }); this.emit("data", { binance });
}); });
} }
} }

View File

@ -102,10 +102,6 @@
<div class="widget"> <div class="widget">
<div class="title">Monero</div> <div class="title">Monero</div>
<div class="databox">
<img class="icon" src="img/morphtoken.png"><div class="data d-monero-morphtoken">---</div> <div class="data parentheses d-monero-morphtoken_xmr">---</div>
</div>
<div class="databox"> <div class="databox">
<img class="icon" src="img/binance.png"><div class="data d-monero-binance">---</div> <img class="icon" src="img/binance.png"><div class="data d-monero-binance">---</div>
</div> </div>