Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: polygon l2 checkout #9372

Merged
merged 36 commits into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2cb9769
fix get_hackathons4
octavioamu Aug 16, 2021
8b52d7f
GITC-321: Sets featured grant to 'grant_id = 1' (#9367)
gdixon Aug 17, 2021
b1da0a4
Merge branch 'stable'
gdixon Aug 17, 2021
eda2e0c
rough commit
chibie Aug 18, 2021
a0514d3
setup polygon: connect/switch/add chain
chibie Aug 19, 2021
5860a58
feat: introduce steward endpoint (#9377)
thelostone-mc Aug 20, 2021
4eaa2cb
GITC-276 purge: gitcoin faucet (#9333)
thelostone-mc Aug 20, 2021
615c7e0
fixes bounty fulfillment data (#9368)
owocki Aug 20, 2021
e0fdf77
GITC-245: Implements the CLR calc in SQL (#9348)
gdixon Aug 20, 2021
c7306a8
feat: trust-bonus api (#9349)
thelostone-mc Aug 23, 2021
8317398
chore: made defer_clr_to readonly
thelostone-mc Aug 23, 2021
f1cc437
Merge branch 'stable'
gdixon Aug 23, 2021
c9023c1
more utils
chibie Aug 25, 2021
3326823
upload svg
chibie Aug 25, 2021
6b422fb
stale nav (#9382)
owocki Aug 25, 2021
af072d7
GITC-294: show clear cart on loading screen (#9369)
thelostone-mc Aug 25, 2021
132ad9e
DoingGud interview
owocki Aug 25, 2021
da2651d
Update API.md
Kweiss Aug 26, 2021
d94561a
implement modal design
chibie Aug 26, 2021
29c3b47
checkout recommendation, estimate gas, rootToChildToken
chibie Aug 26, 2021
53e9ebb
finish checkout + handle unsupported tokens etc.
chibie Aug 29, 2021
7c405ee
handle balance check + amount to deposit
chibie Aug 30, 2021
e0a83e8
GITC-315: Fixes sms verify (#9390)
gdixon Aug 30, 2021
80ead8e
GITC-368: Adds skip_cleanup to retain build artefacts (#9409)
gdixon Aug 30, 2021
e42eaaf
gas cost estimation
chibie Aug 30, 2021
482d578
bug fix checkout recommendation
chibie Aug 30, 2021
176caef
some fixes
chibie Aug 30, 2021
03461e7
Fix small bug when click to slack link (#9416)
duythien Aug 31, 2021
3ee89de
Updates db.py to always read from replicas (#9403)
gdixon Aug 31, 2021
8196243
address review comments @thelostone-mc
chibie Aug 31, 2021
85c2b6e
Add test env to bundle (#9374)
zlsgh Aug 31, 2021
8455eb1
more review fixes @PixelantDesign
chibie Aug 31, 2021
bbf66d6
review fix @willsputra
chibie Sep 1, 2021
539c2f7
indicate metamask popup
chibie Sep 1, 2021
0f05832
Merge branch 'master' into polygon-checkout
chibie Sep 1, 2021
b6e555d
no metamask popup with insufficient balance
chibie Sep 1, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
provider: pages
token: $GITHUB_TOKEN
keep_history: true
skip_cleanup: true
local_dir: _build/site
fqdn: docs.gitcoin.co
target_branch: gh-pages
Expand Down
6 changes: 1 addition & 5 deletions app/app/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ def db_for_read(self, model, **hints):
Else go to default DB
"""
replicas = ['read_replica_1', 'read_replica_2']
if settings.JOBS_NODE:
return random.choice(replicas)
if settings.CELERY_NODE:
return random.choice(replicas)
return 'default'
return random.choice(replicas)

def db_for_write(self, model, **hints):
"""
Expand Down
10 changes: 4 additions & 6 deletions app/app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
DEBUG = env.bool('DEBUG', default=True)
QUESTS_LIVE = True
ENV = env('ENV', default='local')
DEBUG_ENVS = env.list('DEBUG_ENVS', default=['local', 'stage', 'test'])
DEBUG_ENVS = env.list('DEBUG_ENVS', default=['local', 'stage', 'test', 'travis'])
IS_DEBUG_ENV = ENV in DEBUG_ENVS
HOSTNAME = env('HOSTNAME', default=socket.gethostname())
BASE_URL = env('BASE_URL', default='http://localhost:8000/')
Expand Down Expand Up @@ -111,11 +111,11 @@
'retail',
'ptokens',
'rest_framework',
'django_filters',
'marketing',
'economy',
'dashboard',
'quests',
'faucet',
'tdi',
'gas',
'git',
Expand Down Expand Up @@ -368,7 +368,7 @@ def callback(request):
}

# Production logging
if ENV not in ['local', 'test', 'staging', 'preview']:
if ENV not in ['local', 'test', 'staging', 'preview', 'travis']:
# add AWS monitoring
boto3_session = Session(
aws_access_key_id=AWS_ACCESS_KEY_ID,
Expand Down Expand Up @@ -417,7 +417,7 @@ def callback(request):
MEDIAFILES_LOCATION = env.str('MEDIAFILES_LOCATION', default='media')
STATIC_ROOT = root(STATICFILES_LOCATION)

if ENV in ['prod', 'stage']:
if ENV in ['prod', 'stage', 'test']:
DEFAULT_FILE_STORAGE = env('DEFAULT_FILE_STORAGE', default='app.static_storage.MediaFileStorage')
STATICFILES_STORAGE = env('STATICFILES_STORAGE', default='app.static_storage.SilentFileStorage')
STATIC_HOST = env('STATIC_HOST', default='https://s.gitcoin.co/')
Expand Down Expand Up @@ -772,8 +772,6 @@ def callback(request):

INSTALLED_APPS += env.list('DEBUG_APPS', default=[])

# Faucet App config
FAUCET_AMOUNT = env.float('FAUCET_AMOUNT', default=.00025)

SENDGRID_EVENT_HOOK_URL = env('SENDGRID_EVENT_HOOK_URL', default='sg_event_process')
GITHUB_EVENT_HOOK_URL = env('GITHUB_EVENT_HOOK_URL', default='github/payload/')
Expand Down
2 changes: 1 addition & 1 deletion app/app/sitemaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class StaticViewSitemap(sitemaps.Sitemap):
def items(self):
return [
'dashboard', 'new_funding', 'tip', 'terms', 'privacy', 'cookie', 'prirp', 'apitos', 'about', 'index',
'help', 'whitepaper', 'whitepaper_access', '_leaderboard', 'faucet', 'mission', 'slack', 'labs', 'results',
'help', 'whitepaper', 'whitepaper_access', '_leaderboard', 'mission', 'slack', 'labs', 'results',
'activity', 'kudos_main', 'kudos_marketplace', 'grants', 'funder_bounties', 'quests_index', 'newquest',
'products', 'avatar_landing'
]
Expand Down
9 changes: 0 additions & 9 deletions app/app/tests/test_app_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,6 @@ def test_stats_resolve(self):
"""Test the stats url and check the resolution."""
self.assertEqual(resolve('/_administration/stats/').view_name, 'stats')

def test_faucet_reverse(self):
"""Test the faucet url and check the reverse."""
self.assertEqual(reverse('faucet'), '/faucet')

def test_faucet_resolve(self):
"""Test the faucet url and check the resolution."""
self.assertEqual(resolve('/faucet').view_name, 'faucet')
self.assertEqual(resolve('/faucet/').view_name, 'faucet')

def test_explorer_reverse(self):
"""Test the explorer url and check the reverse."""
self.assertEqual(reverse('explorer'), '/explorer')
Expand Down
2 changes: 1 addition & 1 deletion app/app/travis.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CACHE_URL=dbcache://my_cache_table
COLLECTFAST_CACHE_URL=dbcache://collectfast
DATABASE_URL=psql://postgres:postgres@localhost/testdb
ENV=test
ENV=travis
REDIS_URL=rediscache://localhost:6379/0?client_class=django_redis.client.DefaultClient
CACHEOPS_REDIS=redis://localhost:6379/0
GEOIP_PATH=/opt/GeoIP/
Expand Down
13 changes: 0 additions & 13 deletions app/app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import dashboard.views
import dataviz.d3_views
import dataviz.views
import faucet.views
import gitcoinbot.views
import healthcheck.views
import kudos.views
Expand Down Expand Up @@ -256,7 +255,6 @@
),
url(r'^api/v0.1/org_perms', dashboard.views.org_perms, name='org_perms'),
url(r'^api/v0.1/bulk_invite', dashboard.views.bulk_invite, name='bulk_invite'),
url(r'^api/v0.1/faucet/save/?', faucet.views.save_faucet, name='save_faucet'),
url(r'^api/v0.1/', include(dbrouter.urls)),
url(r'^api/v0.1/', include(kdrouter.urls)),
url(r'^api/v0.1/', include(grant_router.urls)),
Expand Down Expand Up @@ -493,7 +491,6 @@
re_path(r'^labs/?$', dashboard.views.labs, name='labs'),

# gas views
url(r'^gas/faucets/?', dashboard.gas_views.gas_faucet_list, name='gas_faucet_list'),
url(r'^gas/faq/?', dashboard.gas_views.gas_faq, name='gas_faq'),
url(r'^gas/intro/?', dashboard.gas_views.gas_intro, name='gas_intro'),
url(r'^gas/calculator/?', dashboard.gas_views.gas_calculator, name='gas_calculator'),
Expand Down Expand Up @@ -607,9 +604,6 @@
url(r'^l/(.*)$/?', linkshortener.views.linkredirect, name='redirect'),
url(r'^credit/(.*)$/?', credits.views.credits, name='credit'),

# faucet views
re_path(r'^faucet/?', faucet.views.faucet, name='faucet'),

# bounty requests
re_path(r'^requests/?', bounty_requests.views.bounty_request, name='bounty_requests'),
url(
Expand Down Expand Up @@ -674,8 +668,6 @@
path('_administration/email/kudos_mkt', retail.emails.kudos_mkt, name='kudos_mkt'),
path('_administration/email/new_bounty', retail.emails.new_bounty, name='admin_new_bounty'),
path('_administration/email/roundup', retail.emails.roundup, name='roundup'),
path('_administration/email/faucet_rejected', retail.emails.faucet_rejected, name='email_faucet_rejected'),
path('_administration/email/faucet', retail.emails.faucet, name='email_faucet'),
path('_administration/email/new_tip', retail.emails.new_tip, name='new_tip'),
path('_administration/email/new_match', retail.emails.new_match, name='new_match'),
path('_administration/email/quarterly_roundup', retail.emails.quarterly_roundup, name='quarterly_roundup'),
Expand Down Expand Up @@ -724,11 +716,6 @@
tdi.views.process_accesscode_request,
name='process_accesscode_request'
),
re_path(
r'^_administration/process_faucet_request/(.*)$',
faucet.views.process_faucet_request,
name='process_faucet_request'
),
re_path(r'^_administration/bulkemail/', dashboard.views.bulkemail, name='bulkemail'),
re_path(
r'^_administration/email/start_work_approved$', retail.emails.start_work_approved, name='start_work_approved'
Expand Down
9 changes: 9 additions & 0 deletions app/assets/v2/images/grants/polygon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading