switched from shapeshift to morphtoken for xmr
This commit is contained in:
parent
27ec18cf7a
commit
cd1b9dd071
@ -22,17 +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://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)),
|
||||
]).then(resp => {
|
||||
let bitpay = null, shapeshift = null, xmrto = null, shapeshift_xmr = null;
|
||||
let bitpay = null, morphtoken = null, xmrto = null, morphtoken_xmr = null;
|
||||
|
||||
if (resp[0] != undefined) {
|
||||
bitpay = resp[0].data.rate;
|
||||
|
||||
if (resp[1] != undefined) {
|
||||
shapeshift_xmr = (Math.round(resp[1].data.rate * 100) / 100) + "XMR";
|
||||
shapeshift = (Math.round((bitpay / resp[1].data.rate) * 100) / 100) + "€";
|
||||
// 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) {
|
||||
@ -40,7 +42,7 @@ class XMRData extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
this.emit("data", { shapeshift, xmrto, shapeshift_xmr });
|
||||
this.emit("data", { morphtoken, xmrto, morphtoken_xmr });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
BIN
page/img/morphtoken.png
Normal file
BIN
page/img/morphtoken.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
@ -103,7 +103,7 @@
|
||||
<div class="title">Monero</div>
|
||||
|
||||
<div class="databox">
|
||||
<img class="icon" src="img/shapeshift.png"><div class="data d-monero-shapeshift">---</div> <div class="data parentheses d-monero-shapeshift_xmr">---</div>
|
||||
<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">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user