Merge pull request #1121 from ripple/fix_faucet_and_xrp_escrow

Template fixes: faucet, xrp overview
This commit is contained in:
Rome Reginelli
2021-07-12 16:42:13 -07:00
committed by GitHub
2 changed files with 27 additions and 34 deletions

View File

@@ -3,40 +3,18 @@
{% block bodyclasses %}page-test-net{% endblock %}
{% block right_sidebar %}
<div class="card">
<div class="card-header">
<h4>Testnet Servers</h4>
</div>
<div class="card-body">
<h4>WebSocket and RippleAPI</h4>
<div class="multicode" id="code-0">
<ul class="codetabs">
<li><a href="#code-0-0">Testnet</a></li>
<li><a href="#code-0-1">Devnet</a></li>
</ul>
<div class="code_sample" id="code-0-0">
<pre><code>wss://s.altnet.rippletest.net:51233</code></pre>
</div>
<div class="code_sample" id="code-0-1">
<pre><code>wss://s.devnet.rippletest.net:51233</code></pre>
</div>
</div>
<pre><code>// WebSocket
wss://s.altnet.rippletest.net:51233
<h4 id="json-rpc">JSON-RPC</h4>
<div class="multicode" id="code-1">
<ul class="codetabs">
<li><a href="#code-1-0">Testnet</a></li>
<li><a href="#code-1-1">Devnet</a></li>
</ul>
<div class="code_sample" id="code-1-0">
<pre><code>https://s.altnet.rippletest.net:51234</code></pre>
</div>
<div class="code_sample" id="code-1-1">
<pre><code>https://s.devnet.rippletest.net:51234</code></pre>
</div>
</div>
</div>
</div>
// JSON-RPC
https://s.altnet.rippletest.net:51234</code></pre>
<h4>Devnet Servers</h4>
<pre><code>// WebSocket
wss://s.devnet.rippletest.net:51233
// JSON-RPC
https://s.devnet.rippletest.net:51234</code></pre>
{% endblock %}
{% block main %}

View File

@@ -127,10 +127,25 @@
<div class="mt-10 p-10 br-8 bg-grey-800 text-center position-relative">
<img src="./img/backgrounds/cta-xrp-overview-green-2.svg" class="landing-bg cta cta-bottom-right">
<div class="z-index-1 position-relative">
<h3 class="h4">{% trans %}As of <span class="green-500">December 2017</span> <br/>
<span class="d-inline-flex"><img id="xrp-mark-overview" class="mw-100 mr-2" src="./img/logos/xrp-mark.svg" alt="XRP Logo Mark"> <span class="numbers green-500">55B</span></span><br/>
<h3 class="h4">{% trans %}As of <span class="green-500" id="ripple-escrow-as-of">December 2017</span> <br/>
<span class="d-inline-flex"><img id="xrp-mark-overview" class="mw-100 mr-2" src="./img/logos/xrp-mark.svg" alt="XRP Logo Mark"> <span class="numbers green-500" id="ripple-escrow-amount">55B</span></span><br/>
XRP remains in escrow{% endtrans %}</h3>
</div>
<script type="application/javascript">
$(document).ready(async() => {
let resp = await fetch("https://data.ripple.com/v2/network/xrp_distribution?descending=true&limit=1")
if (resp.ok) {
let j = await resp.json()
const exact_amt = j.rows[0].escrowed
const amt_billions = Math.floor(exact_amt / 1e9)
const when = new Date(j.rows[0].date)
$("#ripple-escrow-as-of").text(when.toLocaleDateString(undefined, {year: 'numeric', month:'short'}))
$("#ripple-escrow-amount").text(amt_billions + "B")
} else {
console.warn("Fetching data about Ripple's XRP escrow from the data API failed.")
}
})
</script>
</div>
</div>