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

Opera bounties #5503

Merged
merged 4 commits into from
Nov 20, 2019
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
3 changes: 2 additions & 1 deletion app/assets/v2/js/pages/bulk_payout.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ $(document).ready(function($) {
bounty.killBounty(
$('#standard_bounties_id').val(),
gas_dict,
{from: web3.eth.accounts[0]},
callback
);

Expand Down Expand Up @@ -448,4 +449,4 @@ $(document).on('click', '.user-fulfiller', function(event) {

$('input[type=radio][name=pay_with]').on('change', event => {
update_registry();
});
});
5 changes: 4 additions & 1 deletion app/assets/v2/js/pages/fulfill_bounty.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ window.onload = function() {
txid: result
});

localStorage['pendingProject'] = true;
if (document.eventTag) {
localStorage['pendingProject'] = true;
}

var finishedComment = function() {
dataLayer.push({ event: 'claimissue' });
Expand Down Expand Up @@ -162,6 +164,7 @@ window.onload = function() {
bountyId,
document.ipfsDataHash,
{
from: web3.eth.accounts[0],
gasPrice: web3.toHex($('#gasPrice').val() * Math.pow(10, 9))
},
web3Callback
Expand Down
5 changes: 4 additions & 1 deletion app/assets/v2/js/pages/kudos_send.js
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ function sendKudos(email, github_url, from_name, username, amountInEth, comments
var total_send = ((gas_money + kudosGasEstimateInWei + kudosPriceInWei.toNumber()) * new web3.BigNumber(num_redemptions)).toString();

web3.eth.sendTransaction({
from: account,
to: destinationAccount,
// Add gas_money + gas cost for kudos contract transaction + cost of kudos token (Gitcoin keeps this amount?)
value: total_send,
Expand Down Expand Up @@ -644,7 +645,9 @@ function sendKudos(email, github_url, from_name, username, amountInEth, comments
// web3.currentProvider.publicConfigStore.on('update', function(e) {
var error;

window.ethereum.publicConfigStore.on('update', checkNetwork);
if (window.ethereum.publicConfigStore) {
window.ethereum.publicConfigStore.on('update', checkNetwork);
}
function checkNetwork(e) {
if (error) {
return;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/v2/js/pages/process_bounty.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ window.onload = function() {
};
// just sent payout
var send_payout = function() {
bounty.acceptFulfillment(bountyId, fulfillmentId, {gasPrice: web3.toHex($('#gasPrice').val() * Math.pow(10, 9))}, final_callback);
bounty.acceptFulfillment(bountyId, fulfillmentId, {gasPrice: web3.toHex($('#gasPrice').val() * Math.pow(10, 9)), from: web3.eth.accounts[0]}, final_callback);
};

// send both tip and payout
Expand Down
6 changes: 5 additions & 1 deletion app/dashboard/templates/bounty/fulfill.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,15 @@ <h1 class="text-center title">{% trans "Submit Work" %}</h1>
{% include 'shared/analytics.html' %}
{% include 'shared/footer_scripts.html' %}
{% include 'shared/footer.html' %}

</body>
<script>
$('[data-toggle="popover"]').popover()
$('[data-toggle="tooltip"]').bootstrapTooltip();

{% if bounty.event %}
document.eventTag = '{{ bounty.event.slug }}';
{% endif %}
</script>
<script src="{% static "v2/js/pages/wallet_estimate.js" %}"></script>
<script src="{% static "v2/js/rating.js" %}"></script>
Expand Down
5 changes: 4 additions & 1 deletion app/retail/templates/shared/footer_scripts_lite.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@

<script src="{% static "cookielaw/js/cl.js" %}"></script>
<script defer src="{% static "v2/js/work_with_gitcoin.js" %}"></script>
{% if not ignore_inject_web3 %}
{% include 'shared/shared_scripts.html' %}
{% endif %}

<script>
var host = ("{{ ipfs_config.host }}" == "ipfs" ? "localhost" : "{{ ipfs_config.host }}");
Expand Down Expand Up @@ -78,4 +81,4 @@
startTimer();
</script>
{% endif %}
{% include 'shared/messages.html' %}
{% include 'shared/messages.html' %}