Skip to content

Commit

Permalink
9987 kill quadratic lands w migrations (#10137)
Browse files Browse the repository at this point in the history
* added redirect to decentralized app

* deleted app files and created migration

* keep local.env

* removed QD trust score

* removed player field from trust calculation

* update migration to use original field

* reverted updates to model

* chore: address feedback comments

Co-authored-by: Tim Schultz <[email protected]>
Co-authored-by: Aditya Anand M C <[email protected]>
  • Loading branch information
3 people authored Feb 17, 2022
1 parent 7fdeb05 commit 212c45a
Show file tree
Hide file tree
Showing 81 changed files with 84 additions and 7,029 deletions.
7 changes: 4 additions & 3 deletions app/app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
from kudos.router import router as kdrouter

from .sitemaps import sitemaps
from .views import redirect_view

urlpatterns = [

Expand Down Expand Up @@ -770,9 +771,9 @@
url(r'^blocknative', perftools.views.blocknative, name='blocknative'),

# quadratic lands
path('quadraticlands/', include('quadraticlands.urls', namespace='quadraticlands')),
re_path(r'^quadraticlands/?', include('quadraticlands.urls', namespace='ql_catchall_')),
re_path(r'^quadraticland/?', include('quadraticlands.urls', namespace='ql_catchall')),
path('quadraticlands/', redirect_view),
re_path(r'^quadraticlands/?', redirect_view),
re_path(r'^quadraticland/?', redirect_view),

# for robots
url(r'^robots.txt/?', retail.views.robotstxt, name='robotstxt'),
Expand Down
4 changes: 4 additions & 0 deletions app/app/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from django.shortcuts import redirect

def redirect_view(request):
return redirect('http://decentralized.quadraticlands.com/')
70 changes: 0 additions & 70 deletions app/assets/v2/js/pages/profile-trust.js
Original file line number Diff line number Diff line change
Expand Up @@ -2065,76 +2065,6 @@ Vue.component('facebook-verify-modal', {
}
});

Vue.component('qd-modal', {
delimiters: [ '[[', ']]' ],
data: function() {
return {
validationError: '',
forceStep: false,
awaitingResponse: false
};
},
props: {
showValidation: {
type: Boolean,
required: false,
'default': false
},
service: {
type: Object,
required: true
}
},
computed: {
step() {
return this.forceStep || this.validationStep;
}
},
template: `
<b-modal id="twitter-modal" @hide="dismissVerification()" :visible="showValidation" size="lg" body-class="p-0" center hide-header hide-footer>
<template v-slot:default="{ hide }">
<div class="modal-content p-0">
<div class="top rounded-top p-2 text-center" style="background: #0e0333;">
<div class="w-100">
<button @click="dismissVerification()" type="button" class="close position-absolute mt-2 text-white" style="right: 1rem" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="bg-white d-flex mt-4 mx-auto p-1 rounded-circle" style="width: 74px; height: 74px;">
<img class="m-auto w-100" src="/static/v2/images/quadraticlands/mission/diplomacy.svg" alt="QL Diplomacy Logo">
</div>
<h3 class="text-white my-4"> Verify with Quadratic Diplomacy </h3>
</div>
<div class="font-smaller-1 line-height-3 spacer-px-4 spacer-px-lg-6 spacer-py-5">
<div class="mb-4 text-left">
<p class="mb-4 font-subheader text-left">
Use your GTC to strengthen Gitcoin Grants!
</p>
<p class="mb-4 font-subheader text-left">
WHY: The Foundation of Gitcoin Grants is Quadratic Funding, which is itself dependant upon sybil & fraud resistence.
</p>
<button @click="goToVerification" role="button" class="btn btn-primary mb-2 mt-5 px-5 float-right">
Verify Now
</button>
</div>
</div>
</div>
</template>
</b-modal>`,
methods: {
dismissVerification() {
this.$emit('modal-dismissed');
setTimeout(() => {
this.forceStep = false;
}, 1000);
},
goToVerification() {
window.open('/quadraticlands/mission/diplomacy', '_blank');
this.dismissVerification();
}
}
});

if (document.getElementById('gc-trust-manager-app')) {

Expand Down
6 changes: 0 additions & 6 deletions app/dashboard/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,6 @@ def update_trust_bonus(self, pk):
tb += 0.15
# if profile.is_duniter_verified:
# tb *= 1.001
qd_tb = 0
for player in profile.players.all():
new_score = 0
if player.tokens_in:
new_score = min(player.tokens_in / 100, 0.20)
qd_tb = max(qd_tb, new_score)

# cap the trust_bonus score at 1.5
tb = min(1.5, tb)
Expand Down
7 changes: 0 additions & 7 deletions app/dashboard/templates/profiles/trust-vue.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,6 @@ <h5 class="modal-title" id="exampleModalLabel">Generate your Proof of Personhood
@modal-dismissed="hideModal()">
</twitter-verify-modal>

<qd-modal
:service="serviceDict.qd"
:show-validation="visibleModal === 'qd-modal'"
validation-step="0"
@modal-dismissed="hideModal()">
</qd-modal>

<poap-verify-modal
:service="serviceDict.poap"
:show-validation="visibleModal === 'poap-modal'"
Expand Down
13 changes: 0 additions & 13 deletions app/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2912,19 +2912,6 @@ def get_profile_tab(request, profile, tab, prev_context):
'desc': 'Through PoH, upload a a video of yourself and get vouched for by a member of their community.',
'match_percent': 50,
'is_verified': profile.is_poh_verified
}, {
'ref': 'qd',
'name': 'Quadratic Diplomacy',
'icon_path': static('v2/images/quadraticlands/mission/diplomacy.svg'),
'desc': 'Stake your GTC on your frens, and earn sybil resistence by doing so!',
'match_percent': 20,
'is_verified': profile.players.exists(),
'disable_disconnect': True,
'alt_is_verified_btn': {
'text': 'Explore',
'type': 'btn-outline-primary',
'location': reverse('quadraticlands:mission_diplomacy')
}
}, {
'ref': 'brightid',
'name': 'BrightID',
Expand Down
60 changes: 0 additions & 60 deletions app/quadraticlands/admin.py

This file was deleted.

5 changes: 0 additions & 5 deletions app/quadraticlands/apps.py

This file was deleted.

1 change: 0 additions & 1 deletion app/quadraticlands/forms.py

This file was deleted.

Loading

0 comments on commit 212c45a

Please sign in to comment.