Skip to content

Commit

Permalink
Feature: branded claims (poapxyz#14)
Browse files Browse the repository at this point in the history
* Fix on fastify configurations & helpers bug fix

* fix database operations & enchance transactions admin

* Fix QR claim tx hash update after bump

* Add backend endpoint to sign and delegate claim

* Add delegated flow to POAP claims

* Add new delegated web3 frontend flow

* Add new event column in database

* Add backoffice support to delegated claims

* Set claim method through event attribute

* Bump wallet connect library & event admin changes

* Change OpenSea API to TheGraph

* Add user input save on claim

* Delegated cliam enhacement

* Contract validations
* Edge case handling
* Improving backoffice styles

* Add event edition via secret_code

* Add event edit fixes

* Add tooltips for better styling
* Limit event edition to 30 days after start event date
* Update metadata date format

* Fix on typos

* Updating user input display

* feat(claim): Add informative gas modal

* feat(claim): Add informative gas modal after clicking button

* Refactor alert message to DelegateClaim component

* Update libraries and add portis wallet

* Feature: Branded claims integration (mcortesi#71)

* Add event template tables to sql files

* implementation of event_template in POST/PUT event endpoints
now claim-qr endpoint returns the custom event template

* add Event Template GET, POST, PUT endpoints

* PR Fixes

* add event_template_id to GET events endpoints
fix name filter in event template endpoints

* fix event template PUT

* add sendgrid implementation
send an email when a community event is created

* modify .env.template

* Fix on requirements

* Code cleanup

* Feature: branded claim pages

* feat(templates): Add empty page and routing

* feat(templates): Add filters and table

* feat(templates): Add creation form

* feat(events): Add template select in creation form

* feat(templates): Connect creation to backend. Add error handling to form

* feat(templates): Connect table content to backend

* feat(template): Connect update form to api

* fix(templates): Menu nav shows correctly

* feat(claim): Add form with template base component

* fix(events): On edit modal, preloads template on select

* feat(claim): Add dinamic custom footer

* feat(claim): Add responsive dinamic footer, body and header

* fix(templates): Name filter works correctly

* feat(claim): Add loading spinner when waiting for claim template

* feat(templates): Add preview modal

Co-authored-by: niconiahi <[email protected]>

* Add frontend refactor

* Add bug fixes for branded claim page

* Add fixes for branded claims error handling

Co-authored-by: Nahuel Fernandez <[email protected]>
Co-authored-by: niconiahi <[email protected]>

* Feature: Branded claims integration (mcortesi#72)

* Add event template tables to sql files

* implementation of event_template in POST/PUT event endpoints
now claim-qr endpoint returns the custom event template

* add Event Template GET, POST, PUT endpoints

* PR Fixes

* add event_template_id to GET events endpoints
fix name filter in event template endpoints

* fix event template PUT

* add sendgrid implementation
send an email when a community event is created

* modify .env.template

* Fix on requirements

* Code cleanup

* Feature: branded claim pages

* feat(templates): Add empty page and routing

* feat(templates): Add filters and table

* feat(templates): Add creation form

* feat(events): Add template select in creation form

* feat(templates): Connect creation to backend. Add error handling to form

* feat(templates): Connect table content to backend

* feat(template): Connect update form to api

* fix(templates): Menu nav shows correctly

* feat(claim): Add form with template base component

* fix(events): On edit modal, preloads template on select

* feat(claim): Add dinamic custom footer

* feat(claim): Add responsive dinamic footer, body and header

* fix(templates): Name filter works correctly

* feat(claim): Add loading spinner when waiting for claim template

* feat(templates): Add preview modal

Co-authored-by: niconiahi <[email protected]>

* Add frontend refactor

* Add bug fixes for branded claim page

* Add fixes for branded claims error handling

* Fix event admin minor bugs

Co-authored-by: Nahuel Fernandez <[email protected]>
Co-authored-by: niconiahi <[email protected]>

Co-authored-by: niconiahi <[email protected]>
Co-authored-by: Nahuel Fernandez <[email protected]>
  • Loading branch information
3 people authored Sep 21, 2020
1 parent 77e1a55 commit 3d7cd5b
Show file tree
Hide file tree
Showing 72 changed files with 11,824 additions and 2,337 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@ dist/
TODO

.local_scripts/

# Yarn Lock File
yarn.lock
3 changes: 2 additions & 1 deletion client/.firebaserc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"projects": {
"default": "poapapp"
"default": "poapapp",
"testing": "poap-site-dev"
}
}
34 changes: 32 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@portis/web3": "^2.0.0-beta.57",
"@walletconnect/web3-provider": "1.1.0",
"@types/react-color": "^3.0.4",
"aos": "^2.3.4",
"auth0-js": "^9.11.2",
"classnames": "^2.2.6",
Expand All @@ -15,8 +18,10 @@
"query-string": "^6.8.3",
"react": "^16.8.6",
"react-burger-menu": "^2.6.10",
"react-color": "^2.18.1",
"react-day-picker": "^7.4.0",
"react-dom": "^16.8.6",
"react-lightweight-tooltip": "^1.0.0",
"react-modal": "^3.10.1",
"react-paginate": "^6.3.0",
"react-router-dom": "^5.1.2",
Expand All @@ -25,6 +30,8 @@
"react-share": "^3.0.0",
"react-toast-notifications": "^2.4.0",
"typescript": "3.7.4",
"web3": "^1.2.8",
"web3modal": "1.9.0",
"yup": "^0.27.0"
},
"scripts": {
Expand All @@ -35,7 +42,24 @@
"deploy": "yarn build && yarn firebase deploy"
},
"eslintConfig": {
"extends": "react-app"
"extends": [
"react-app",
"eslint:recommended",
"plugin:react/recommended",
"plugin:cypress/recommended",
"plugin:prettier/recommended"
],
"plugins": [],
"rules": {
"react/prop-types": 0,
"prettier/prettier": "error",
"react/jsx-sort-props": 0,
"react/display-name": 0,
"no-console": "off",
"react/no-unescaped-entities": 0,
"no-control-regex": 0,
"react/jsx-boolean-value": "never"
}
},
"browserslist": {
"production": [
Expand Down Expand Up @@ -66,6 +90,12 @@
"@types/react-select": "^3.0.12",
"@types/react-share": "^2.1.1",
"@types/react-toast-notifications": "^2.0.0",
"@types/yup": "^0.26.22"
"@types/web3": "^1.2.2",
"@types/yup": "^0.26.22",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-cypress": "^2.11.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-simple-import-sort": "^5.0.3",
"prettier": "^2.0.5"
}
}
1 change: 1 addition & 0 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const App: React.FC<AppProps> = ({ auth }) => (
<Route exact path={ROUTES.adminLogin.path} component={AdminLoginPage} />
<Route path={ROUTES.admin} component={BackOffice} />
<Route path={ROUTES.signerClaimPage} component={SignerClaimPage} />
<Route path={ROUTES.codeClaimWeb3PageHash} component={CodeClaimPage} />
<Route path={ROUTES.codeClaimPageHash} component={CodeClaimPage} />
<Route path={ROUTES.codeClaimPage} component={CodeClaimPage} />
<Route path={ROUTES.home} component={ScanPage} />
Expand Down
36 changes: 36 additions & 0 deletions client/src/CodeClaimPage/ClaimBumped.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from 'react';

/* Helpers */
import { HashClaim } from '../api';

/* Components */
import { LinkButton } from '../components/LinkButton';

/* Assets */
import ClaimFooterMessage from './ClaimFooterMessage';

/*
* @dev: Component to show user that transactions is being mined
* */
const ClaimBumped: React.FC<{ claim: HashClaim }> = ({ claim }) => {
const etherscanLink = `https://etherscan.io/tx/${claim.tx_hash}`;
const appLink = `/scan/${claim.beneficiary}`;

return (
<div className={'claim-info'} data-aos="fade-up" data-aos-delay="300">
<div className={'info-title'}>The POAP token is on its way to your wallet</div>
<div className={'text-info'}>
Your transaction was replaced for a new one with more gas price so you can get your POAP faster. You can check the the <a href={etherscanLink} target={"_blank"}>transaction on Etherscan</a>
</div>
<LinkButton
text={'Check my badges'}
link={appLink}
extraClass={'link-btn'}
target={''}
/>
<ClaimFooterMessage />
</div>
);
};

export default ClaimBumped;
Loading

0 comments on commit 3d7cd5b

Please sign in to comment.