This repository contains the static files, shared between ambire-common
and the web
and mobile
wallets.
The project uses Yarn.
- Make sure that you have
NodeJS v16.14.0
installed. - In the root folder run
yarn install
generate:contractInfo
- this script generatescontants/humanizerInfo.json
.build
- combineshumanizerInfo.json
,tokenList.json
andWALLETInitialClaimableRewards.json
into a single json file (result.json
) and copiesadexToStakingTransfers.json
and the newly createdresult.json
into thebuild/
folder.predeploy
- runs thebuild
script. Only used by github actions.deploy
- runspredeploy
deploys all files inside thebuild/
folder using gh-pages. Only used by github actions.
- Contracts should NEVER BE DELETED, only added, even if they are outdated/deprecated. This is due to the fact that even if no new transactions are to be humanized, the old ones should still be humanized.
- If you make any updates to the humanizers in the web app or the mobile app, you should UPDATE THE HUMANIZERS IN THE OTHER ONE AS WELL. Humanizers in the web app are stored internally, while the mobile app uses the ones from
ambire-common
.
tokenList.json
- updated manually. Don't forget to runyarn generate:contractInfo && yarn build
after you update it. This is because humanizerInfo has a property calledtokenList
that depends ontokenList.json
.humanizerInfo.json
- in order to update this file you have to make changes inscripts/generateContractInfo
. To apply your changes tohumanizerInfo.json
runyarn run generate:contractInfo
.- Build your changes by running
yarn run build
. This creates a new fileresult.json
in thebuild/
folder, copiesadexToStakingTransfers.json
and updatescache.json
. (The github action will automatically build the changes, but you still have to build locally in order to test them) - See the section "Testing the changes".
- Open a PR with your changes. This PR should be tested by both the web and mobile app team.
- Make sure you have built your changes by running
yarn run build
. - Run
yarn dev
to start the development server. - Change the
REACT_APP_CONSTANTS_ENDPOINT
's value tohttp://localhost:5000/
in the env file of the web app or the equivalent in the mobile app. - Test properly and make sure that everything works as expected.