Skip to content

Commit

Permalink
updating GTC token balance
Browse files Browse the repository at this point in the history
  • Loading branch information
nopslip committed Feb 22, 2021
1 parent a39a84b commit 38b5eed
Showing 1 changed file with 17 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{% endcomment %}
{% load i18n static %}


{% block 'content' %}
<div id="wallet-provider">

<div class="header" id="close-wallet-provider">
Expand All @@ -37,11 +37,9 @@

<!-- wallet accounts -->
<span id="wallet-accounts"></span>

<!-- current GTC amount -->
<!-- @zach : need to get the real value in here in the span -->

<div id="current_gtc"><span>xxxxx</span> GTC</div>

<!-- GTC token balance-->
<div ><span id="current_gtc"></span> GTC</div>


</div>
Expand All @@ -57,10 +55,6 @@

</div>





<!-- cleaned out rest of gitcoins working wallet code
that seems to be mandatory to work ...
most of it could be transported to my menu ...
Expand Down Expand Up @@ -89,31 +83,23 @@
</template>
</div>




{% endblock %}
{% block 'scripts' %}
<script src="{% static "v2/js/abi.js" %}"></script>
<script>

/*
fetch token amount from adress to show current
@zach's task list :)
*/

document.addEventListener("DOMContentLoaded",function(){

// wallet found
window.addEventListener("dataWalletReady", () => {
const current_gtc = document.querySelector("#current_gtc span");
getTokenBalances(gtc_address()).then(function(result) {
current_gtc.innerHTML = result.balance;
});

document.addEventListener("DOMContentLoaded",function(){
// wallet found
window.addEventListener("dataWalletReady", () => {
const current_gtc = document.querySelector("#current_gtc");
getTokenBalances(gtc_address()).then(function(result) {
current_gtc.innerHTML = result.balance;
});
});
});

});

</script>

{% endblock %}




Expand Down

0 comments on commit 38b5eed

Please sign in to comment.