Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc authored Jun 12, 2019
2 parents e4bd443 + 0a83ed3 commit 5d0d8b2
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 11 deletions.
14 changes: 8 additions & 6 deletions app/assets/v2/js/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,14 @@ $(document).ready(function() {
element.toggleClass('active');
let panel = element[0].nextElementSibling;

if (panel.style.maxHeight) {
panel.style.maxHeight = null;
panel.style.marginBottom = 0 + 'px';
} else {
panel.style.maxHeight = panel.scrollHeight + 'px';
panel.style.marginBottom = 10 + 'px';
if (panel) {
if (panel.style.maxHeight) {
panel.style.maxHeight = null;
panel.style.marginBottom = 0 + 'px';
} else {
panel.style.maxHeight = panel.scrollHeight + 'px';
panel.style.marginBottom = 10 + 'px';
}
}
});
});
Expand Down
2 changes: 1 addition & 1 deletion app/assets/v2/js/grants/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ $(document).ready(function() {
}
}

compiledSplitter = compiledSplitter0;
compiledSplitter = compiledSplitter0 ? compiledSplitter0 : null;

const listen_web3_1_changes = () => {
if (typeof web3 == 'undefined' || typeof web3.eth.getCoinbase() == 'undefined') {
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 @@ -1414,7 +1414,7 @@ const process_activities = function(result, bounty_activities) {
extend_expiration: gettext('Extended Bounty Expiration')
};

const now = new Date(result['now']);
const now = result['now'] ? new Date(result['now']) : new Date();
const is_open = result['is_open'];
const _result = [];

Expand Down
2 changes: 2 additions & 0 deletions app/assets/v2/js/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ var get_updated_metamask_conf_time_and_cost = function(gasPrice) {
usdAmount = Math.round(100 * eth_amount_unrounded * document.eth_usd_conv_rate) / 100;
}

if (typeof document.conf_time_spread == 'undefined') return;

for (var i = 0; i < document.conf_time_spread.length - 1; i++) {
var this_ele = (document.conf_time_spread[i]);
var next_ele = (document.conf_time_spread[i + 1]);
Expand Down
10 changes: 8 additions & 2 deletions app/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1910,6 +1910,11 @@ def profile(request, handle):
sent_kudos = None
handle = handle.replace("@", "")

if not settings.DEBUG:
network = 'mainnet'
else:
network = 'rinkeby'

try:
if not handle and not request.user.is_authenticated:
return redirect('funder_bounties')
Expand Down Expand Up @@ -2013,15 +2018,16 @@ def profile(request, handle):
context['verification'] = profile.get_my_verified_check
context['avg_rating'] = profile.get_average_star_rating

context['unrated_funded_bounties'] = Bounty.objects.prefetch_related('fulfillments', 'interested', 'interested__profile', 'feedbacks') \
context['unrated_funded_bounties'] = Bounty.objects.current().prefetch_related('fulfillments', 'interested', 'interested__profile', 'feedbacks') \
.filter(
bounty_owner_github_username__iexact=profile.handle,
network=network,
).exclude(
feedbacks__feedbackType='approver',
feedbacks__sender_profile=profile,
)

context['unrated_contributed_bounties'] = Bounty.objects.current().prefetch_related('feedbacks').filter(interested__profile=profile) \
context['unrated_contributed_bounties'] = Bounty.objects.current().prefetch_related('feedbacks').filter(interested__profile=profile, network=network,) \
.filter(interested__status='okay') \
.filter(interested__pending=False).filter(idx_status='done') \
.exclude(
Expand Down
2 changes: 1 addition & 1 deletion app/grants/templates/grants/shared/shared_scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@

<script src="{% static "v2/js/lib/web3.min.js" %}"></script>
<script>
var web3 = new Web3(Web3.givenProvider || "ws://localhost:8546");
var web3 = Web3 ? new Web3(Web3.givenProvider || "ws://localhost:8546") : null;
</script>

0 comments on commit 5d0d8b2

Please sign in to comment.