Skip to content

Commit

Permalink
bug: fix grant owner address etherscan link (#4854)
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc authored and danlipert committed Jul 24, 2019
1 parent ce2e23f commit 35cd543
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 16 deletions.
20 changes: 13 additions & 7 deletions app/assets/v2/js/abi.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/assets/v2/js/grants/cancel_subscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $(document).ready(() => {
deployedToken.methods.approve(data.contract_address, web3.utils.toTwosComplement(0)).send({from: accounts[0], gasPrice: realGasPrice})
.on('transactionHash', function(transactionHash) {
$('#sub_end_approve_tx_id').val(transactionHash);
const linkURL = etherscan_tx_url(transactionHash);
const linkURL = get_etherscan_url(transactionHash);

document.issueURL = linkURL;
$('#transaction_url').attr('href', linkURL);
Expand Down
4 changes: 2 additions & 2 deletions app/assets/v2/js/grants/detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ $(document).ready(function() {
gasPrice: web3.utils.toHex($('#gasPrice').val() * Math.pow(10, 9))
}).on('transactionHash', function(transactionHash) {
grant_cancel_tx_id = $('#grant_cancel_tx_id').val();
const linkURL = etherscan_tx_url(transactionHash);
const linkURL = get_etherscan_url(transactionHash);

document.issueURL = linkURL;
$('#transaction_url').attr('href', linkURL);
Expand Down Expand Up @@ -182,7 +182,7 @@ $(document).ready(function() {
from: accounts[0],
gasPrice: 8000000000
}).on('transactionHash', function(transactionHash) {
const linkURL = etherscan_tx_url(transactionHash);
const linkURL = get_etherscan_url(transactionHash);

document.issueURL = linkURL;
$('#transaction_url').attr('href', linkURL);
Expand Down
4 changes: 2 additions & 2 deletions app/assets/v2/js/grants/fund.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ const donationPayment = (token, account, donationAmountString) => {
const subscribeToGrant = (transactionHash) => {
web3.eth.getAccounts(function(err, accounts) {
deployedToken.methods.decimals().call(function(err, decimals) {
const linkURL = etherscan_tx_url(transactionHash);
const linkURL = get_etherscan_url(transactionHash);
let token_address = $('#js-token').length ? $('#js-token').val() : $('#sub_token_address').val();
let data = {
'contributor_address': $('#contributor_address').val(),
Expand Down Expand Up @@ -393,7 +393,7 @@ const splitPayment = (account, toFirst, toSecond, valueFirst, valueSecond) => {
window.location = redirectURL;
});

const linkURL = etherscan_tx_url(transactionHash);
const linkURL = get_etherscan_url(transactionHash);

document.issueURL = linkURL;

Expand Down
2 changes: 1 addition & 1 deletion app/assets/v2/js/grants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $(document).ready(() => {

const etherscanUrlConvert = (elem, network) => {
elem.each(function() {
$(this).attr('href', etherscan_tx_url($(this).attr('href'), network));
$(this).attr('href', get_etherscan_url($(this).attr('href'), network));
});
};

Expand Down
2 changes: 1 addition & 1 deletion app/assets/v2/js/grants/new.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const init = () => {
}).on('transactionHash', function(transactionHash) {
console.log('2', transactionHash);
$('#transaction_hash').val(transactionHash);
const linkURL = etherscan_tx_url(transactionHash);
const linkURL = get_etherscan_url(transactionHash);
let file = $('#img-project')[0].files[0];
let formData = new FormData();

Expand Down
2 changes: 1 addition & 1 deletion app/assets/v2/js/pages/bounty_details.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ var showWarningMessage = function(txid) {
if (typeof txid != 'undefined' && txid.indexOf('0x') != -1) {
waitforWeb3(function() {
clearInterval(interval);
var link_url = etherscan_tx_url(txid);
var link_url = get_etherscan_url(txid);

$('#transaction_url').attr('href', link_url);
});
Expand Down
7 changes: 6 additions & 1 deletion app/grants/templates/grants/detail/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,12 @@
<script src="{% static "v2/js/waiting_room_entertainment.js" %}"></script>
<script>
$('#wallet-address').attr(
'href', etherscan_tx_url($('#wallet-address').text().trim(), '{{ grant.network }}')
'href',
get_etherscan_url(
$('#wallet-address').text().trim(),
'{{ grant.network }}',
'address'
)
);

{% if change_ownership == 'Y' %}
Expand Down

0 comments on commit 35cd543

Please sign in to comment.