diff --git a/app/assets/v2/js/pages/hackathon_new_bounty.js b/app/assets/v2/js/pages/hackathon_new_bounty.js index 259bd80f829..f08f3308a30 100644 --- a/app/assets/v2/js/pages/hackathon_new_bounty.js +++ b/app/assets/v2/js/pages/hackathon_new_bounty.js @@ -65,7 +65,11 @@ Vue.mixin({ getBinanceSelectedAccount: async function() { let vm = this; - vm.form.funderAddress = await binance_utils.getSelectedAccount(); + try { + vm.form.funderAddress = await binance_utils.getSelectedAccount(); + } catch (error) { + vm.funderAddressFallback = true; + } }, getAmount: function(token) { let vm = this; @@ -369,6 +373,11 @@ Vue.mixin({ if (!provider && val === '1') { await onConnect(); } + + if (val === '56') { + this.getBinanceSelectedAccount(); + } + this.getTokens(); await this.checkForm(); } @@ -387,6 +396,7 @@ if (document.getElementById('gc-hackathon-new-bounty')) { tokens: [], network: 'mainnet', chainId: '', + funderAddressFallback: false, terms: false, hackathonSlug: document.hackathon.slug, hackathonEndDate: document.hackathon.endDate, diff --git a/app/assets/v2/js/pages/new_bounty.js b/app/assets/v2/js/pages/new_bounty.js index b19ab7a21ef..1b9abadedb5 100644 --- a/app/assets/v2/js/pages/new_bounty.js +++ b/app/assets/v2/js/pages/new_bounty.js @@ -77,7 +77,11 @@ Vue.mixin({ getBinanceSelectedAccount: async function() { let vm = this; - vm.form.funderAddress = await binance_utils.getSelectedAccount(); + try { + vm.form.funderAddress = await binance_utils.getSelectedAccount(); + } catch (error) { + vm.funderAddressFallback = true; + } }, getAmount: function(token) { let vm = this; @@ -719,6 +723,7 @@ if (document.getElementById('gc-hackathon-new-bounty')) { tokens: [], network: 'mainnet', chainId: '', + funderAddressFallback: false, checkboxes: {'terms': false, 'termsPrivacy': false, 'neverExpires': true, 'hiringRightNow': false }, expandedGroup: {'reserve': [], 'featuredBounty': []}, errors: {}, diff --git a/app/dashboard/templates/bounty/new_bounty.html b/app/dashboard/templates/bounty/new_bounty.html index 57d47a8ef33..884cbb60ff6 100644 --- a/app/dashboard/templates/bounty/new_bounty.html +++ b/app/dashboard/templates/bounty/new_bounty.html @@ -417,12 +417,16 @@
Please enter your Binance Wallet address. We are unable to validate a Binance address. Please confirm that you are using the correct Binance address.
Please enter your Binance Wallet address. We are unable to validate a Binance address. Please confirm that you are using the correct Binance address.