Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loading tokens indicator #6681

Merged
merged 2 commits into from
May 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/dashboard/templates/onepager/send2.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ <h1>{% trans "Send Tip." %}</h1>
{% if fund_request.network == 'ETH' %}
<select id="token" style="width:100px; margin-bottom: 10px; display: inline;" data-token="{{ fund_request.token_name }}">
<option value="0x0">ETH</option>
<option value="" disabled="disabled" class="loading_tokens">(Loading Tokens from Web3 Wallet)</option>
</select>
{% else %}
<select id="token" style="width:100px; margin-bottom: 10px; display: inline;">
<option value="{{ fund_request.network }}">{{ fund_request.network }}</option>
<option value="" disabled="disabled" class="loading_tokens">(Loading Tokens from Web3 Wallet)</option>
</select>
{% endif %}
<input name="amount" type="text" placeholder="1.1" id="amount" value="{{ fund_request.amount }}" style="width: 170px; display: inline;">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ <h2 class="font-bigger-1 font-weight-bold pb-2">Suggest a Bounty</h2>
<div class="d-flex row mb-2">
<div class="col-12 col-md-3">
<div class="form__select2 font-smaller-1">
<select name='denomination' id='token'></select>
<select name='denomination' id='token'>
<option value="" disabled="disabled" class="loading_tokens">(Loading Tokens from Web3 Wallet)</option>
</select>
</div>
</div>
<div class="col-12 col-md-3">
Expand Down
1 change: 1 addition & 0 deletions app/dashboard/templates/request_payment.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ <h1>{% trans "Request money." %}</h1>
<label class="my-0 pl-0 col-3 text-left" style="height: 100%">{% trans "Amount of" %}</label>
<select class="col-4" id="token" class="mt-1 custom-select">
<option value="0x0">ETH</option>
<option value="" disabled="disabled" class="loading_tokens">(Loading Tokens from Web3 Wallet)</option>
</select>
<input class="ml-3 col-4" name="amount" type="text" placeholder="1.1" id="amount" value="">
</div>
Expand Down
4 changes: 3 additions & 1 deletion app/dashboard/templates/shared/pricing.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
<div class="col-12 col-md-3">
<label class="form__label" for="amount">{% trans "Denomination" %}</label>
<div class="form__select2">
<select name='denomination' id='token'></select>
<select name='denomination' id='token'>
<option value="" disabled="disabled" class="loading_tokens">(Loading Tokens from Web3 Wallet)</option>
</select>
</div>
</div>
<div class="col-12 col-md-3">
Expand Down
4 changes: 3 additions & 1 deletion app/grants/templates/grants/fund.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ <h2 class="font-title-lg my-4">{% if direction == '-' %} Negative {%endif%} {%
<label class="form__label" id="token_label">{% trans "Token" %}</label>
{% if grant_has_no_token %}
<div class="form__select2">
<select class='js-select2' name='denomination' id='js-token'> </select>
<select class='js-select2' name='denomination' id='js-token'>
<option value="" disabled="disabled" class="loading_tokens">(Loading Tokens from Web3 Wallet)</option>
</select>
</div>
{% else %}
<p class="my-2">{{ grant.token_symbol }}</p>
Expand Down
4 changes: 3 additions & 1 deletion app/grants/templates/grants/new.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ <h5 class="mt-4">Funding Information</h5>
<div class="col-12 col-md-12">
<label class="font-body">{% trans "Accepted Tokens" %}</label>
<div class="form__select2">
<select class='js-select2' name='denomination' id='js-token'></select>
<select class='js-select2' name='denomination' id='js-token'>
<option value="" disabled="disabled" class="loading_tokens">(Loading Tokens from Web3 Wallet)</option>
</select>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions app/retail/templates/settings/tokens.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ <h5>{% trans "Tokens" %}</h5>
<label for="token">{% trans "Token" %}:</label>
<div class="form__group-item">
<select class="js-select2" name='denomination' id='token'>
<option value="" disabled="disabled" class="loading_tokens">(Loading Tokens from Web3 Wallet)</option>
</select>
</div>
</div>
Expand Down
7 changes: 5 additions & 2 deletions app/retail/templates/tokens_js.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
var tokens = function(network_id) {
var _tokens = null;

if (network_id == 'mainnet') {
_tokens = [{% for token in mainnet_tokens %}{{token.to_json | safe}},{%endfor%}];
$(".loading_tokens").remove();
} else if (network_id == 'ropsten') { // ropsten
_tokens = [{% for token in ropsten_tokens %}{{token.to_json | safe}},{%endfor%}];
} else if (network_id == 'rinkeby') { // ropsten
$(".loading_tokens").remove();
} else if (network_id == 'rinkeby') { // rinkeby
_tokens = [{% for token in rinkeby_tokens %}{{token.to_json | safe}},{%endfor%}];
$(".loading_tokens").remove();
} else if (network_id == 'custom network') { // testrpc
_tokens = [{% for token in custom_tokens %}{{token.to_json | safe}},{%endfor%}];
$(".loading_tokens").remove();
} else {
_tokens = [{% for token in unknown_tokens %}{{token.to_json | safe}},{%endfor%}];
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/debug/check_approval_amount.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// on settings/token page

var from = '0x0583858adfe7d1d3DC7F8447301cf7B7b056d638';
var from = '0x7d96b5c4279e20bab1ca0043a65f2bb156b0c6eb';
var token_address = '0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359';// DAI
var to = '0x2af47a65da8cd66729b4209c22017d6a5c2d2400'; //stdbounties
var token_contract = web3.eth.contract(token_abi).at(token_address);
Expand Down