Skip to content

Commit

Permalink
feat: add rNFT license and contractual agreement (#246)
Browse files Browse the repository at this point in the history
* feat: add rNFT license page and route for a given tokenId (=exchangeId)

* add ContractualAgreement route, page and component

* Allow the template to be rendered for a non existing offer (during creation process)

* Design the ExchangePolicyDetails popup as expected

* fix a few bugs

* fix jest failure

* use generic enum for ProgressStatus of several hooks

* add comment to explicit converting the tokenId to exchangeId

* add card reference to the TODO for contractual agreement

* Chat - exchange context should contain CTA to render contract

* clean code

* remove 'any' type for useModal returns
  • Loading branch information
levalleux-ludo authored Sep 30, 2022
1 parent 90f4a27 commit a02f8d8
Show file tree
Hide file tree
Showing 33 changed files with 3,040 additions and 91 deletions.
14 changes: 13 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,16 @@ REACT_APP_OFFER_CURATION_LIST=
#
REACT_APP_ENABLE_CURATION_LISTS=false

REACT_APP_DEFAULT_TOKENS_LIST_TESTING='[{"symbol":"ETH","name":"Ether","address":"0x0000000000000000000000000000000000000000","decimals":"18"}]'
REACT_APP_DEFAULT_TOKENS_LIST_TESTING='[{"symbol":"ETH","name":"Ether","address":"0x0000000000000000000000000000000000000000","decimals":"18"}]'

REACT_APP_RNFT_LICENSE_TEMPLATE=ipfs://QmZ7GtjENZaSgd9M41DbvWkKWkwFcj3B2Hiw7zWVhUjJVp

REACT_APP_BUYER_SELLER_AGREEMENT_TEMPLATE=ipfs://QmQKtEcfWSHHbtBfZScZhgHik4MPSqXQafFGfq1ZbsHLjK

# TESTING
REACT_APP_DEFAULT_DISPUTE_RESOLVER_ID=1
# STAGING
# REACT_APP_DEFAULT_DISPUTE_RESOLVER_ID=2

REACT_APP_DEFAULT_RESOLUTION_PERIOD_DAYS=15

8 changes: 8 additions & 0 deletions .github/workflows/ci_reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ on:
REACT_APP_OFFER_CURATION_LIST:
required: false
type: string
REACT_APP_RNFT_LICENSE_TEMPLATE:
required: true
type: string
REACT_APP_BUYER_SELLER_AGREEMENT_TEMPLATE:
required: true
type: string
secrets:
NPM_TOKEN:
required: true
Expand Down Expand Up @@ -59,6 +65,8 @@ jobs:
REACT_APP_ENABLE_CURATION_LISTS: ${{ inputs.REACT_APP_ENABLE_CURATION_LISTS }}
REACT_APP_SELLER_CURATION_LIST: ${{ inputs.REACT_APP_SELLER_CURATION_LIST }}
REACT_APP_OFFER_CURATION_LIST: ${{ inputs.REACT_APP_OFFER_CURATION_LIST }}
REACT_APP_RNFT_LICENSE_TEMPLATE: ${{ inputs.REACT_APP_RNFT_LICENSE_TEMPLATE }}
REACT_APP_BUYER_SELLER_AGREEMENT_TEMPLATE: ${{ inputs.REACT_APP_BUYER_SELLER_AGREEMENT_TEMPLATE }}
REACT_APP_INFURA_IPFS_PROJECT_ID: ${{ secrets.REACT_APP_INFURA_IPFS_PROJECT_ID }}
REACT_APP_INFURA_IPFS_PROJECT_SECRET: ${{ secrets.REACT_APP_INFURA_IPFS_PROJECT_SECRET }}
REACT_APP_DEFAULT_TOKENS_LIST_TESTING: ${{ secrets.REACT_APP_DEFAULT_TOKENS_LIST_TESTING }}
Expand Down
5 changes: 4 additions & 1 deletion config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ module.exports = {
jest: function (config) {
// ...add your jest config customisation...
config.moduleNameMapper = {
"\\.(css|less|scss|sass)$": "<rootDir>/styleMock.js"
"\\.(css|less|scss|sass)$": "<rootDir>/test/__mocks__/styleMock.js",
"react-markdown": "<rootDir>/test/__mocks__/react-markdown.js",
"remark-gfm": "<rootDir>/test/__mocks__/remark-gfm.js",
"rehype-raw": "<rootDir>/test/__mocks__/rehype-raw.js"
};
config.transformIgnorePatterns = [
// '[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|cjs|ts|tsx)$',
Expand Down
Loading

0 comments on commit a02f8d8

Please sign in to comment.