removed morphtoken
This commit is contained in:
parent
e59ab7ae6b
commit
5094489ee5
@ -8,7 +8,7 @@ class XMRData extends EventEmitter {
|
||||
}
|
||||
|
||||
get initial() {
|
||||
return { shapeshift: null, xmrto: null, shapeshift_xmr: null };
|
||||
return { binance: null, };
|
||||
}
|
||||
|
||||
start() {
|
||||
@ -22,28 +22,19 @@ class XMRData extends EventEmitter {
|
||||
fetch() {
|
||||
Promise.all([
|
||||
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)),
|
||||
]).then(resp => {
|
||||
let bitpay = null, morphtoken = null, binance = null, morphtoken_xmr = null;
|
||||
let bitpay = null, binance = null;
|
||||
|
||||
if (resp[0] != undefined) {
|
||||
bitpay = resp[0].data.rate;
|
||||
|
||||
if (resp[1] != undefined) {
|
||||
// console.log(resp[1]);
|
||||
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) + "€";
|
||||
binance = (Math.round((bitpay * resp[1].data.price) * 100) / 100) + "€";
|
||||
}
|
||||
}
|
||||
|
||||
this.emit("data", { morphtoken, binance, morphtoken_xmr });
|
||||
this.emit("data", { binance });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,10 +102,6 @@
|
||||
<div class="widget">
|
||||
<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">
|
||||
<img class="icon" src="img/binance.png"><div class="data d-monero-binance">---</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user