Skip to content

Commit

Permalink
purge: ens (#7060)
Browse files Browse the repository at this point in the history
* purge ens

* lint fixes

* address review comments

* addres comments

Co-authored-by: Dan Lipert <[email protected]>
  • Loading branch information
thelostone-mc and danlipert authored Jul 28, 2020
1 parent 5e0e770 commit c435440
Show file tree
Hide file tree
Showing 40 changed files with 11 additions and 996 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fix-stylelint: ## Run stylelint --fix against the project directory. Requires no
@npm run stylelint:fix

fix-yapf: ## Run yapf against any included or newly introduced Python code.
@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/
@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/

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

Expand Down
9 changes: 0 additions & 9 deletions app/app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@
'dashboard',
'chat',
'quests',
'enssubdomain',
'faucet',
'tdi',
'gas',
Expand Down Expand Up @@ -555,14 +554,6 @@ def callback(request):
EMAIL_USE_TLS = env.bool('EMAIL_USE_TLS', default=True)
SERVER_EMAIL = env('SERVER_EMAIL', default='[email protected]')

# ENS Subdomain Settings
# The value of ENS_LIMIT_RESET_DAYS should be higher since only one transaction is allowed per user.
# The only reason for a user to make more than one request is when he looses access to the wallet.
ENS_TLD = env('ENS_TLD', default='gitcoin.eth')
ENS_LIMIT_RESET_DAYS = env.int('ENS_LIMIT_RESET_DAYS', default=30)
ENS_OWNER_ACCOUNT = env('ENS_OWNER_ACCOUNT', default='0x00000')
ENS_PRIVATE_KEY = env('ENS_PRIVATE_KEY', default=None)

# IMAP Settings
IMAP_EMAIL = env('IMAP_EMAIL', default='<email>')
IMAP_PASSWORD = env('IMAP_PASSWORD', default='<password>')
Expand Down
5 changes: 0 additions & 5 deletions app/app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import dashboard.views
import dataviz.d3_views
import dataviz.views
import enssubdomain.views
import faucet.views
import gitcoinbot.views
import healthcheck.views
Expand Down Expand Up @@ -628,7 +627,6 @@
re_path(r'^settings/matching/?', marketing.views.matching_settings, name='matching_settings'),
re_path(r'^settings/feedback/?', marketing.views.feedback_settings, name='feedback_settings'),
re_path(r'^settings/slack/?', marketing.views.slack_settings, name='slack_settings'),
re_path(r'^settings/ens/?', marketing.views.ens_settings, name='ens_settings'),
re_path(r'^settings/account/?', marketing.views.account_settings, name='account_settings'),
re_path(r'^settings/tokens/?', marketing.views.token_settings, name='token_settings'),
re_path(r'^settings/job/?', marketing.views.job_settings, name='job_settings'),
Expand Down Expand Up @@ -686,9 +684,6 @@
# sendgrid webhook processing
path(settings.SENDGRID_EVENT_HOOK_URL, marketing.webhookviews.process, name='sendgrid_event_process'),

# ENS urls
url(r'^ens/?$', enssubdomain.views.ens_subdomain, name='ens'),

# gitcoinbot
url(settings.GITHUB_EVENT_HOOK_URL, gitcoinbot.views.payload, name='payload'),
url(r'^impersonate/', include('impersonate.urls')),
Expand Down
27 changes: 0 additions & 27 deletions app/assets/ens/index.js

This file was deleted.

33 changes: 0 additions & 33 deletions app/assets/ens/pending.js

This file was deleted.

20 changes: 0 additions & 20 deletions app/assets/ens/register.js

This file was deleted.

Binary file removed app/assets/v2/images/ens.png
Binary file not shown.
Binary file removed app/assets/v2/images/ens_gitcoin.png
Binary file not shown.
2 changes: 1 addition & 1 deletion app/assets/v2/js/metamask-approval.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async function approve_metamask() {
function ask_metamask_connection() {
var page_url = $(location).attr('pathname');

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

if (page_url.lastIndexOf('/') === len) {
Expand Down
31 changes: 1 addition & 30 deletions app/dashboard/management/commands/activity_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from dashboard.models import Bounty, Profile
from dashboard.utils import all_sendcryptoasset_models
from economy.utils import convert_amount
from enssubdomain.models import ENSSubdomainRegistration
from faucet.models import FaucetRequest
from marketing.mails import send_mail

Expand Down Expand Up @@ -151,27 +150,6 @@ def format_faucet_distribution(self, fr):
'payee_location': location,
}

def format_ens_reg(self, ensreg):
location, bio = get_bio(ensreg.profile.handle) if ensreg.profile else "", ""
amount = ensreg.gas_cost_eth
return {
'type': 'ens_subdomain_registration',
'created_on': ensreg.created_on,
'last_activity': ensreg.modified_on,
'amount': amount,
'denomination': 'ETH',
'amount_eth': amount,
'amount_usdt': convert_amount(amount, 'ETH', 'USDT'),
'from_address': '0x4331B095bC38Dc3bCE0A269682b5eBAefa252929',
'claimee_address': ensreg.subdomain_wallet_address,
'repo': 'n/a',
'from_username': 'admin',
'fulfiller_github_username': ensreg.profile.handle if ensreg.profile else "",
'status': 'sent',
'comments': f"ENS Subdomain Registration {ensreg.pk}",
'payee_bio': bio,
'payee_location': location,
}

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

enssubregistrations = ENSSubdomainRegistration.objects.filter(
created_on__gte=options['start_date'],
created_on__lte=options['end_date']
).order_by('created_on', 'id')
formted_enssubreg = imap(self.format_ens_reg, enssubregistrations)

# python3 list hack
formatted_frs = [x for x in formatted_frs]
formatted_bounties = [x for x in formatted_bounties]
formateted_enssubregistrations = [x for x in formted_enssubreg]
all_items = formatted_bounties + all_scram + formatted_frs + formateted_enssubregistrations
all_items = formatted_bounties + all_scram + formatted_frs

csvfile = StringIO()
csvwriter = csv.DictWriter(csvfile, fieldnames=[
Expand Down
58 changes: 0 additions & 58 deletions app/dashboard/templates/ens/base.html

This file was deleted.

25 changes: 0 additions & 25 deletions app/dashboard/templates/ens/ens.html

This file was deleted.

20 changes: 0 additions & 20 deletions app/dashboard/templates/ens/ens_edit.html

This file was deleted.

27 changes: 0 additions & 27 deletions app/dashboard/templates/ens/ens_pending.html

This file was deleted.

17 changes: 0 additions & 17 deletions app/dashboard/templates/ens/ens_rate_limit.html

This file was deleted.

40 changes: 0 additions & 40 deletions app/dashboard/templates/ens/ens_register.html

This file was deleted.

Loading

0 comments on commit c435440

Please sign in to comment.