Skip to content

Commit ddac4bd

Browse files
committed
Merge remote-tracking branch 'origin/stable'
2 parents 77126d1 + b6dad7f commit ddac4bd

17 files changed

Lines changed: 58 additions & 23 deletions

File tree

app/assets/v2/css/gitcoin.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,4 +929,9 @@ textarea.status-textarea {
929929

930930
.dark-mode .bg-light {
931931
background-color: var(--bg-shade-0)!important;
932-
}
932+
}
933+
934+
.svg-animated-logo {
935+
height: 42px;
936+
max-width: 100%;
937+
}

app/assets/v2/js/metamask-approval.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ async function metamaskApproval() {
99
is_metamask_unlocked = await window.ethereum._metamask.isUnlocked();
1010

1111
try {
12-
if (is_metamask_unlocked && is_metamask_approved) {
12+
if (!is_metamask_unlocked || !is_metamask_approved) {
1313
var start_time = ((new Date()).getTime() / 1000);
1414

1515
await ethereum.enable();

app/dashboard/utils.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,16 @@ def build_profile_pairs(bounty):
583583
if fulfillment.profile and fulfillment.profile.handle.strip() and fulfillment.profile.absolute_url:
584584
profile_handles.append((fulfillment.profile.handle, fulfillment.profile.absolute_url))
585585
else:
586-
addr = f"https://etherscan.io/address/{fulfillment.fulfiller_address}"
586+
if bounty.tenant == 'ETH':
587+
addr = f"https://etherscan.io/address/{fulfillment.fulfiller_address}"
588+
elif bounty.tenant == 'ZIL':
589+
addr = f"https://viewblock.io/zilliqa/address/{fulfillment.fulfiller_address}"
590+
elif bounty.tenant == 'CELO':
591+
addr = f"https://alfajores-blockscout.celo-testnet.org/address/{fulfillment.fulfiller_address}"
592+
elif bounty.tenant == 'ETC':
593+
addr = f"https://blockscout.com/etc/mainnet/address/{fulfillment.fulfiller_address}"
594+
else:
595+
addr = None
587596
profile_handles.append((fulfillment.fulfiller_address, addr))
588597
return profile_handles
589598

app/dashboard/views.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@
6565
from dashboard.context import quickstart as qs
6666
from dashboard.tasks import increment_view_count
6767
from dashboard.utils import (
68-
ProfileHiddenException, ProfileNotFoundException, get_bounty_from_invite_url, get_orgs_perms, profile_helper,
68+
ProfileHiddenException, ProfileNotFoundException, build_profile_pairs, get_bounty_from_invite_url, get_orgs_perms,
69+
profile_helper,
6970
)
7071
from economy.utils import ConversionRateNotFoundError, convert_amount, convert_token_to_usdt
7172
from eth_utils import to_checksum_address, to_normalized_address
@@ -4874,9 +4875,7 @@ def create_bounty_v1(request):
48744875
event_name = 'new_bounty'
48754876
record_bounty_activity(bounty, user, event_name)
48764877
maybe_market_to_email(bounty, event_name)
4877-
4878-
# maybe_market_to_slack(bounty, event_name)
4879-
# maybe_market_to_user_slack(bounty, event_name)
4878+
maybe_market_to_github(bounty, event_name)
48804879

48814880
response = {
48824881
'status': 204,
@@ -4938,9 +4937,8 @@ def cancel_bounty_v1(request):
49384937

49394938
event_name = 'killed_bounty'
49404939
record_bounty_activity(bounty, user, event_name)
4941-
# maybe_market_to_email(bounty, event_name)
4942-
# maybe_market_to_slack(bounty, event_name)
4943-
# maybe_market_to_user_slack(bounty, event_name)
4940+
maybe_market_to_email(bounty, event_name)
4941+
maybe_market_to_github(bounty, event_name)
49444942

49454943
bounty.bounty_state = 'cancelled'
49464944
bounty.idx_status = 'cancelled'
@@ -5029,8 +5027,8 @@ def fulfill_bounty_v1(request):
50295027
event_name = 'work_submitted'
50305028
record_bounty_activity(bounty, user, event_name)
50315029
maybe_market_to_email(bounty, event_name)
5032-
# maybe_market_to_slack(bounty, event_name)
5033-
# maybe_market_to_user_slack(bounty, event_name)
5030+
profile_pairs = build_profile_pairs(bounty)
5031+
maybe_market_to_github(bounty, event_name, profile_pairs)
50345032

50355033
if bounty.bounty_state != 'work_submitted':
50365034
bounty.bounty_state = 'work_submitted'
@@ -5269,6 +5267,8 @@ def close_bounty_v1(request, bounty_id):
52695267

52705268
event_name = 'work_done'
52715269
record_bounty_activity(bounty, user, event_name)
5270+
maybe_market_to_email(bounty, event_name)
5271+
maybe_market_to_github(bounty, event_name)
52725272

52735273
bounty.bounty_state = 'done'
52745274
bounty.idx_status = 'done' # TODO: RETIRE

app/grants/templates/grants/nav.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
</a>
2323
<i class="white font-bigger-2 d-none d-md-block fa fa-angle-right"></i>
2424
<a class="navbar-brand ml-2 py-0" href="{% url 'grants:grants' %}">
25-
<img class="mw-100 logo-static" src="{% static "v2/images/top-bar/grants-neg.svg" %}" alt="Grants" height="35">
26-
<!-- <img class="mw-100 logo-animated" src="{% static "v2/images/grants/grants-white.gif" %}" alt="Grants" height="50"> -->
25+
<!-- <img class="mw-100 logo-static" src="{% static "v2/images/top-bar/grants-neg.svg" %}" alt="Grants" height="35"> -->
26+
{% include 'shared/svg-embed/h35px_grants.svg' %}
2727
</a>
2828
{% if request.path|matches:"^\/((.*new)|(.*cancel)|(.*fund))$" %}
2929
<button id="wallet-button" class="navbar-network ml-xl-5 py-1 px-2 hidden btn btn-outline-info dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">

app/grants/templates/grants/new-whitelabel.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,4 +209,11 @@ <h3 class="text-center">
209209
<script src="{% static "v2/js/pages/shared_bounty_mutation_estimate_gas.js" %}"></script>
210210
<script src="{% static "v2/js/grants/shared.js" %}"></script>
211211
<script src="{% static "v2/js/grants/new.js" %}"></script>
212+
<script>
213+
is_logged_in = {{ is_logged_in }};
214+
if (is_logged_in == 0) {
215+
_alert("You must be logged in to register your DApp");
216+
$('#new_button').prop('disabled', true);
217+
}
218+
</script>
212219
</html>

app/grants/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,16 +613,18 @@ def flag(request, grant_id):
613613
})
614614

615615

616-
@login_required
617616
def grant_new_whitelabel(request):
618617
"""Create a new grant, with a branded creation form for specific tribe"""
619618

619+
profile = get_profile(request)
620+
620621
params = {
621622
'active': 'new_grant',
622623
'title': _('Matic Build-n-Earn x Gitcoin'),
623624
'card_desc': _('Earn Rewards by Making Your DApps Superior'),
624625
'card_player_thumb_override': request.build_absolute_uri(static('v2/images/grants/maticxgitcoin.png')),
625626
'profile': profile,
627+
'is_logged_in': 1 if profile else 0,
626628
'grant': {},
627629
'keywords': get_keywords(),
628630
'recommend_gas_price': recommend_min_gas_price_to_confirm_in_time(4),

app/kudos/templates/shared/kudos_nav.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
</a>
2323
<i class="white font-bigger-2 d-none d-md-block fa fa-angle-right"></i>
2424
<a class="navbar-brand ml-2 py-0" href="{% url 'kudos_marketplace' %}">
25-
<img class="mw-100 logo-static" src="{% static 'v2/images/top-bar/kudos-neg.svg' %}" alt="kudos" height="35">
26-
<!-- <img class="mw-100 logo-animated" src="{% static "v2/images/kudos/kudos_faster_repeat.gif" %}" alt="kudos" height="50"> -->
25+
<!-- <img class="mw-100 logo-static" src="{% static 'v2/images/top-bar/kudos-neg.svg' %}" alt="kudos" height="35"> -->
26+
{% include 'shared/svg-embed/h35px_kudos.svg' %}
2727
</a>
2828
{% if request.path|matches:"^\/((explorer)|(issue.*)|(.*new.*))$" %}
2929
<button id="wallet-button" class="navbar-network ml-xl-5 py-1 px-2 hidden btn btn-outline-info dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">

app/quests/templates/quests/nav.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
</a>
2323
<i class="white font-bigger-2 d-none d-md-block fa fa-angle-right"></i>
2424
<a class="navbar-brand ml-2 py-0" href="{% url 'quests_index' %}">
25-
<img class="mw-100 logo-static" src="{% static 'v2/images/top-bar/quests-neg.svg' %}" alt="Quests" height="35">
26-
<!-- <img class="mw-100 logo-animated" src="{% static 'v2/images/quest_logo_hover.png' %}" alt="Quests" height="50"> -->
25+
<!-- <img class="mw-100 logo-static" src="{% static 'v2/images/top-bar/quests-neg.svg' %}" alt="Quests" height="35"> -->
26+
{% include 'shared/svg-embed/h35px_quests.svg' %}
2727
</a>
2828
{% if request.path|matches:"^\/((.*new)|(.*cancel)|(.*fund))$" %}
2929
<div class="navbar-network ml-xl-5 py-1 px-2 hidden">

app/retail/templates/shared/nav.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
</a>
2323
<i class="white font-bigger-2 d-none d-md-block fa fa-angle-right"></i>
2424
<a class="navbar-brand ml-2 py-0" href="/explorer">
25-
<img class="mw-100 logo-static" src="{% static 'v2/images/top-bar/bounties-neg.svg' %}" alt="Bounties" height="35">
26-
<!-- <img class="mw-100 logo-animated" src="{% static "v2/images/top-bar/bounties_desktop_hearbeating.gif" %}" alt="Logo" height="50"> -->
25+
<!-- <img class="mw-100 logo-static" src="{% static 'v2/images/top-bar/bounties-neg.svg' %}" alt="Bounties" height="35"> -->
26+
{% include 'shared/svg-embed/h35px_bounties.svg' %}
2727
</a>
2828
{% if request.path|matches:"^\/((explorer)|(issue.*)|(.*new.*))$" %}
2929
<!-- TODO: FIGURE HOW TO HANDLE FOR CROSS CHAIN -->

0 commit comments

Comments
 (0)