Skip to content

Commit

Permalink
bug: supress multiple alert when owner is logged out (#5032)
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc authored Aug 19, 2019
1 parent 6d4c706 commit 534d559
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/assets/v2/js/grants/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,16 @@ var waitingStateActive = function() {
* @param {string} message
*/
const notifyOwnerAddressMismatch = (username, address, button, message) => {
if (!web3 || !web3.eth)

if (!web3 || !web3.eth || !username || !document.contxt.github_handle) {
return;
}

web3.eth.getAccounts((error, accounts) => {
if (document.contxt.github_handle == username && accounts[0] &&
accounts[0] != address) {
if (
document.contxt.github_handle == username &&
accounts[0] && accounts[0] != address
) {
if ($(button).attr('disabled') != 'disabled') {
$(button).attr('disabled', 'disabled');
_alert({
Expand Down

0 comments on commit 534d559

Please sign in to comment.