Skip to content

Commit c435440

Browse files
purge: ens (#7060)
* purge ens * lint fixes * address review comments * addres comments Co-authored-by: Dan Lipert <[email protected]>
1 parent 5e0e770 commit c435440

40 files changed

+11
-996
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fix-stylelint: ## Run stylelint --fix against the project directory. Requires no
5858
@npm run stylelint:fix
5959

6060
fix-yapf: ## Run yapf against any included or newly introduced Python code.
61-
@docker-compose exec web yapf -i -r -e "app/**/migrations/*.py" -e "app/app/settings.py" -p app/app/ app/avatar/ app/credits/ app/dataviz/ app/enssubdomain/ app/ethos/ app/github/
61+
@docker-compose exec web yapf -i -r -e "app/**/migrations/*.py" -e "app/app/settings.py" -p app/app/ app/avatar/ app/credits/ app/dataviz/ app/github/
6262

6363
fix: fix-eslint fix-stylelint fix-isort fix-yapf ## Attempt to run all fixes against the project directory.
6464

app/app/settings.py

-9
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
'dashboard',
111111
'chat',
112112
'quests',
113-
'enssubdomain',
114113
'faucet',
115114
'tdi',
116115
'gas',
@@ -555,14 +554,6 @@ def callback(request):
555554
EMAIL_USE_TLS = env.bool('EMAIL_USE_TLS', default=True)
556555
SERVER_EMAIL = env('SERVER_EMAIL', default='[email protected]')
557556

558-
# ENS Subdomain Settings
559-
# The value of ENS_LIMIT_RESET_DAYS should be higher since only one transaction is allowed per user.
560-
# The only reason for a user to make more than one request is when he looses access to the wallet.
561-
ENS_TLD = env('ENS_TLD', default='gitcoin.eth')
562-
ENS_LIMIT_RESET_DAYS = env.int('ENS_LIMIT_RESET_DAYS', default=30)
563-
ENS_OWNER_ACCOUNT = env('ENS_OWNER_ACCOUNT', default='0x00000')
564-
ENS_PRIVATE_KEY = env('ENS_PRIVATE_KEY', default=None)
565-
566557
# IMAP Settings
567558
IMAP_EMAIL = env('IMAP_EMAIL', default='<email>')
568559
IMAP_PASSWORD = env('IMAP_PASSWORD', default='<password>')

app/app/urls.py

-5
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import dashboard.views
3838
import dataviz.d3_views
3939
import dataviz.views
40-
import enssubdomain.views
4140
import faucet.views
4241
import gitcoinbot.views
4342
import healthcheck.views
@@ -628,7 +627,6 @@
628627
re_path(r'^settings/matching/?', marketing.views.matching_settings, name='matching_settings'),
629628
re_path(r'^settings/feedback/?', marketing.views.feedback_settings, name='feedback_settings'),
630629
re_path(r'^settings/slack/?', marketing.views.slack_settings, name='slack_settings'),
631-
re_path(r'^settings/ens/?', marketing.views.ens_settings, name='ens_settings'),
632630
re_path(r'^settings/account/?', marketing.views.account_settings, name='account_settings'),
633631
re_path(r'^settings/tokens/?', marketing.views.token_settings, name='token_settings'),
634632
re_path(r'^settings/job/?', marketing.views.job_settings, name='job_settings'),
@@ -686,9 +684,6 @@
686684
# sendgrid webhook processing
687685
path(settings.SENDGRID_EVENT_HOOK_URL, marketing.webhookviews.process, name='sendgrid_event_process'),
688686

689-
# ENS urls
690-
url(r'^ens/?$', enssubdomain.views.ens_subdomain, name='ens'),
691-
692687
# gitcoinbot
693688
url(settings.GITHUB_EVENT_HOOK_URL, gitcoinbot.views.payload, name='payload'),
694689
url(r'^impersonate/', include('impersonate.urls')),

app/assets/ens/index.js

-27
This file was deleted.

app/assets/ens/pending.js

-33
This file was deleted.

app/assets/ens/register.js

-20
This file was deleted.

app/assets/v2/images/ens.png

-11.4 KB
Binary file not shown.

app/assets/v2/images/ens_gitcoin.png

-18.6 KB
Binary file not shown.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ async function approve_metamask() {
5050
function ask_metamask_connection() {
5151
var page_url = $(location).attr('pathname');
5252

53-
shown_on = [ '/tip/send/2', '/kudos/send', '/ens' ];
53+
shown_on = [ '/tip/send/2', '/kudos/send' ];
5454
var len = page_url.length - 1;
5555

5656
if (page_url.lastIndexOf('/') === len) {

app/dashboard/management/commands/activity_report.py

+1-30
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
from dashboard.models import Bounty, Profile
3232
from dashboard.utils import all_sendcryptoasset_models
3333
from economy.utils import convert_amount
34-
from enssubdomain.models import ENSSubdomainRegistration
3534
from faucet.models import FaucetRequest
3635
from marketing.mails import send_mail
3736

@@ -151,27 +150,6 @@ def format_faucet_distribution(self, fr):
151150
'payee_location': location,
152151
}
153152

154-
def format_ens_reg(self, ensreg):
155-
location, bio = get_bio(ensreg.profile.handle) if ensreg.profile else "", ""
156-
amount = ensreg.gas_cost_eth
157-
return {
158-
'type': 'ens_subdomain_registration',
159-
'created_on': ensreg.created_on,
160-
'last_activity': ensreg.modified_on,
161-
'amount': amount,
162-
'denomination': 'ETH',
163-
'amount_eth': amount,
164-
'amount_usdt': convert_amount(amount, 'ETH', 'USDT'),
165-
'from_address': '0x4331B095bC38Dc3bCE0A269682b5eBAefa252929',
166-
'claimee_address': ensreg.subdomain_wallet_address,
167-
'repo': 'n/a',
168-
'from_username': 'admin',
169-
'fulfiller_github_username': ensreg.profile.handle if ensreg.profile else "",
170-
'status': 'sent',
171-
'comments': f"ENS Subdomain Registration {ensreg.pk}",
172-
'payee_bio': bio,
173-
'payee_location': location,
174-
}
175153

176154
def upload_to_s3(self, filename, contents):
177155
s3 = boto.connect_s3(settings.AWS_ACCESS_KEY_ID, settings.AWS_SECRET_ACCESS_KEY)
@@ -207,17 +185,10 @@ def handle(self, *args, **options):
207185
objs = [x for x in objs]
208186
all_scram += objs
209187

210-
enssubregistrations = ENSSubdomainRegistration.objects.filter(
211-
created_on__gte=options['start_date'],
212-
created_on__lte=options['end_date']
213-
).order_by('created_on', 'id')
214-
formted_enssubreg = imap(self.format_ens_reg, enssubregistrations)
215-
216188
# python3 list hack
217189
formatted_frs = [x for x in formatted_frs]
218190
formatted_bounties = [x for x in formatted_bounties]
219-
formateted_enssubregistrations = [x for x in formted_enssubreg]
220-
all_items = formatted_bounties + all_scram + formatted_frs + formateted_enssubregistrations
191+
all_items = formatted_bounties + all_scram + formatted_frs
221192

222193
csvfile = StringIO()
223194
csvwriter = csv.DictWriter(csvfile, fieldnames=[

app/dashboard/templates/ens/base.html

-58
This file was deleted.

app/dashboard/templates/ens/ens.html

-25
This file was deleted.

app/dashboard/templates/ens/ens_edit.html

-20
This file was deleted.

app/dashboard/templates/ens/ens_pending.html

-27
This file was deleted.

app/dashboard/templates/ens/ens_rate_limit.html

-17
This file was deleted.

app/dashboard/templates/ens/ens_register.html

-40
This file was deleted.

0 commit comments

Comments
 (0)