Skip to content

Commit

Permalink
Fix contract_owner_button onClick indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
PierrickGT committed Jul 31, 2019
1 parent cb76e6d commit 3a57279
Showing 1 changed file with 26 additions and 28 deletions.
54 changes: 26 additions & 28 deletions app/assets/v2/js/grants/detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,35 +178,33 @@ $(document).ready(function() {
let deployedSubscription = new web3.eth.Contract(compiledSubscription.abi, contract_address);

web3.eth.getAccounts(function(err, accounts) {
deployedSubscription.methods
.changeOwnership(contract_owner_address)
.send({
from: accounts[0],
gasPrice: 8000000000
})
.on('transactionHash', function(transactionHash) {
const linkURL = get_etherscan_url(transactionHash);

document.issueURL = linkURL;
$('#transaction_url').attr('href', linkURL);
$('.modal .close').trigger('click');
enableWaitState('#grants-details');
})
.on('confirmation', function(confirmationNumber, receipt) {
$.ajax({
type: 'post',
url: '',
data: {
'contract_owner_address': contract_owner_address
},
success: function(json) {
window.location.reload(false);
},
error: function() {
_alert({ message: gettext('Changing the contract owner address failed to save. Please try again.') }, 'error');
}
});
deployedSubscription.methods.changeOwnership(
contract_owner_address
).send({
from: accounts[0],
gasPrice: 8000000000
}).on('transactionHash', function(transactionHash) {
const linkURL = get_etherscan_url(transactionHash);

document.issueURL = linkURL;
$('#transaction_url').attr('href', linkURL);
$('.modal .close').trigger('click');
enableWaitState('#grants-details');
}).on('confirmation', function(confirmationNumber, receipt) {
$.ajax({
type: 'post',
url: '',
data: {
'contract_owner_address': contract_owner_address
},
success: function(json) {
window.location.reload(false);
},
error: function() {
_alert({ message: gettext('Changing the contract owner address failed to save. Please try again.') }, 'error');
}
});
});
});
});

Expand Down

0 comments on commit 3a57279

Please sign in to comment.