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

identify trust wallet #882

Merged
merged 1 commit into from Apr 13, 2018
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions app/assets/v2/js/pages/wallet_estimate.js
@@ -0,0 +1,7 @@
window.addEventListener('load', function() {
if (web3.currentProvider.isTrust) {
$('#trust_label').show();
} else {
$('#metamask_label').show();
}
});
2 changes: 1 addition & 1 deletion app/dashboard/templates/fulfill_bounty.html
Expand Up @@ -56,7 +56,7 @@ <h3>{% trans "Submit Work" %}</h3>
<label class="form__label" for="terms">{% url "terms" as termsurl %}{% blocktrans %}I have read, understand, and agree to, the <a href="{{ termsurl }}" target="_blank" rel="noopener noreferrer">Terms of Service</a>:{% endblocktrans %}</label>
</div>
</div>
{% include 'shared/metamask_estimate.html' %}
{% include 'shared/wallet_estimate.html' %}
<div class="form__footer form__footer--right">
<button class="button button--primary js-submit" role="button" href="#">{% trans "Submit Work" %}</button>
<br />
Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/templates/increase_bounty.html
Expand Up @@ -73,7 +73,7 @@ <h3>Increase Funding</h3>
<label class="form__label" for=terms>I have read, understand, and agree to, the <a href="{% url "terms" %}" target=new>Terms of Service</a>:</label>
</div>
</div>
{% include 'shared/metamask_estimate.html' %}
{% include 'shared/wallet_estimate.html' %}
<div class="form__footer form__footer--right">
<button class="button button--primary" type="submit" id="submitBounty">Increase Funding</button>
<br />
Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/templates/kill_bounty.html
Expand Up @@ -53,7 +53,7 @@ <h5>{% trans "(Issue Submitters only)" %}</h5>
<label required class="form__label" for="terms">{% url "terms" as termsurl %}{% blocktrans %}I have read, understand, and agree to, the <a href="{{ termsurl }}" target="_blank" rel="noopener noreferrer">Terms of Service</a>:{% endblocktrans %}</label>
</div>
</div>
{% include 'shared/metamask_estimate.html' %}
{% include 'shared/wallet_estimate.html' %}
<div class="form__footer form__footer--right">
<button class="button button--primary js-submit">{% trans "Kill Bounty" %}</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/templates/process_bounty.html
Expand Up @@ -57,7 +57,7 @@ <h3>{% trans "Accept Bounty Fulfillment" %}</h3>
<input name='terms' id='terms' type="checkbox" value=1 />
<label for=terms>{% url "terms" as termsurl %}{% blocktrans %}I have read, understand, and agree to, the <a href="{{ termsurl }}" target="_blank" rel="noopener noreferrer">Terms of Service</a>:{% endblocktrans %}</label>
</div>
{% include 'shared/metamask_estimate.html' %}
{% include 'shared/wallet_estimate.html' %}
<div class="w-100 mt-2">
<a id="acceptBounty" class="btn btn-sm btn-info mt-3 mb-2 pulseClick submitBounty" name="submit" style="width: 100%; text-transform: uppercase; color: white;">
{% trans "Accept" %}
Expand Down
Expand Up @@ -14,12 +14,14 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
{% endcomment %}
{% load i18n %}
{% load i18n static %}
<div class="w-100 mt-2 p-2" id="metamask_context">
{% if recommend_gas_price > 30 %}
<div class="warning mb-2">{% trans "Warning: the ethereum network is quite congested at the moment." %} <a href="{% url "gas" %}" target="_blank" rel="noopener noreferrer">[{% trans "Stats" %}]</a></div>
{% endif %}
<label><img src="{% url "avatar" %}?repo=https://github.com/MetaMask&v=3" width="20px" height="20px">{% blocktrans %}The following MetaMask settings should give a <span id="confTime">5</span> min confirmation for <span id="ethAmount">unknown</span> ETH (<span id="usdAmount">unknown</span> USD){% endblocktrans %} <a href="{% url "gas" %}" target="_blank" rel="noopener noreferrer">[{% trans "view graph" %}]</a> :
<label id="metamask_label" style="display:none"><img src="{% url "avatar" %}?repo=https://github.com/MetaMask&v=3" width="20px" height="20px">{% blocktrans %}The following MetaMask settings should give a <span id="confTime">5</span> min confirmation for <span id="ethAmount">unknown</span> ETH (<span id="usdAmount">unknown</span> USD){% endblocktrans %} <a href="{% url "gas" %}" target="_blank" rel="noopener noreferrer">[{% trans "view graph" %}]</a> :
</label>
<label id="trust_label" style="display:none"><img src="{% url "avatar" %}?repo=https://github.com/TrustWallet&v=3" width="20px" height="20px">{% blocktrans %}The following Trust settings should give a <span id="confTime">5</span> min confirmation for <span id="ethAmount">unknown</span> ETH (<span id="usdAmount">unknown</span> USD){% endblocktrans %} <a href="{% url "gas" %}" target="_blank" rel="noopener noreferrer">[{% trans "view graph" %}]</a> :
</label>
<br>
<div class="metamask_recc">
Expand Down Expand Up @@ -49,3 +51,4 @@
document.eth_usd_conv_rate = {{ eth_usd_conv_rate }};
document.conf_time_spread = {{ conf_time_spread | safe }};
</script>
<script src="{% static "v2/js/pages/wallet_estimate.js" %}"></script>
2 changes: 1 addition & 1 deletion app/dashboard/templates/submit_bounty.html
Expand Up @@ -136,7 +136,7 @@ <h3>{% trans "Fund an Issue" %}</h3>
<label class="form__label" for=terms>{% url "terms" as termsurl %}{% blocktrans %}I have read, understand, and agree to, the <a href="{{ termsurl }}" target="_blank" rel="noopener noreferrer">Terms of Service</a>:{% endblocktrans %}</label>
</div>
</div>
{% include 'shared/metamask_estimate.html' %}
{% include 'shared/wallet_estimate.html' %}
<div class="form__footer form__footer--right">
<button class="button button--primary js-submit" type="submit">{% trans "Fund Issue" %}</button>
<br />
Expand Down