Skip to content

Commit

Permalink
Merge pull request #2487 from OlympusDAO/develop
Browse files Browse the repository at this point in the history
Release: RBS 1.1
  • Loading branch information
appleseed-iii authored Dec 9, 2022
2 parents a0b24a7 + bf465cf commit 8e35581
Show file tree
Hide file tree
Showing 126 changed files with 23,559 additions and 27,477 deletions.
34 changes: 17 additions & 17 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
# Required
# Covalent (https://www.covalenthq.com/)
REACT_APP_COVALENT_API_KEY=""
VITE_COVALENT_API_KEY=""

# Optional
# Toggle to "true" to use Olympus Give features
REACT_APP_GIVE_ENABLED="true"
VITE_GIVE_ENABLED="true"
# This should be toggled to "true" if you need to use the mock sOHM contract
# (which allows for on-demand rebasing)
REACT_APP_MOCK_SOHM_ENABLED="false"
VITE_MOCK_SOHM_ENABLED="false"

# Optional
# Google Analytics (https://analytics.google.com/)
REACT_APP_GOOGLE_ANALYTICS_API_KEY=""
VITE_GOOGLE_ANALYTICS_API_KEY=""

# Optional
# If you run your own node, you can provide connection url(s) to that node.
# To provide multiple urls for a network, please seperate them with a space.
REACT_APP_ETHEREUM_NODE_URL=""
REACT_APP_ETHEREUM_TESTNET_NODE_URL=""
VITE_ETHEREUM_NODE_URL=""
VITE_ETHEREUM_TESTNET_NODE_URL=""

REACT_APP_FANTOM_NODE_URL=""
REACT_APP_FANTOM_TESTNET_NODE_URL=""
VITE_FANTOM_NODE_URL=""
VITE_FANTOM_TESTNET_NODE_URL=""

REACT_APP_POLYGON_NODE_URL=""
REACT_APP_POLYGON_TESTNET_NODE_URL=""
VITE_POLYGON_NODE_URL=""
VITE_POLYGON_TESTNET_NODE_URL=""

# Olympus Give
# These 2 settings should be toggled to "true" if you want to use Olympus Give features
REACT_APP_GIVE_ENABLED="true"
REACT_APP_GIVE_GRANTS_ENABLED="true"
VITE_GIVE_ENABLED="true"
VITE_GIVE_GRANTS_ENABLED="true"

# This should be toggled to "true" if you need to use the mock sOHM contract
# (which allows for on-demand rebasing)
REACT_APP_MOCK_SOHM_ENABLED="false"
VITE_MOCK_SOHM_ENABLED="false"

REACT_APP_ARBITRUM_NODE_URL=""
REACT_APP_ARBITRUM_TESTNET_NODE_URL=""
VITE_ARBITRUM_NODE_URL=""
VITE_ARBITRUM_TESTNET_NODE_URL=""

REACT_APP_AVALANCHE_NODE_URL=""
REACT_APP_AVALANCHE_TESTNET_NODE_URL=""
VITE_AVALANCHE_NODE_URL=""
VITE_AVALANCHE_TESTNET_NODE_URL=""
29 changes: 13 additions & 16 deletions .github/workflows/coverageBadges.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ jobs:
test-branch:
runs-on: ubuntu-latest
steps:
- name: Checkout front end code.
uses: actions/checkout@v3
with:
ref: ${{ github.ref}}
- name: Build UI
run: yarn install --frozen-lockfile
- name: Run unit tests
run: yarn test:unit --silent --ci --json --coverage --testLocationInResults --maxWorkers=2 --outputFile=branch-report.json
- name: Upload Report
uses: actions/upload-artifact@v3
with:
name: branch-report
path: branch-report.json
- name: Checkout front end code.
uses: actions/checkout@v3
with:
ref: ${{ github.ref}}
- name: Build UI
run: yarn install --frozen-lockfile
- name: Run unit tests
run: yarn test:unit --reporter=json --outputFile=branch-report.json
- name: Upload Report
uses: actions/upload-artifact@v3
with:
name: branch-report
path: branch-report.json
prepareBadges:
runs-on: ubuntu-latest
needs: [test-branch]
Expand Down Expand Up @@ -85,6 +85,3 @@ jobs:
color: blue
namedLogo: jest
logoColor: lightblue



57 changes: 27 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,42 @@ jobs:
test-base:
runs-on: ubuntu-latest
steps:
- name: Checkout front end code.
uses: actions/checkout@v3
with:
ref: ${{ github.base_ref}}
- name: Build UI
run: yarn install --frozen-lockfile
- name: Run unit tests
run: yarn test:unit --silent --ci --json --coverage --testLocationInResults --maxWorkers=2 --outputFile=base-report.json
- name: Upload Report
uses: actions/upload-artifact@v3
with:
name: base-report
path: base-report.json
- name: Checkout front end code.
uses: actions/checkout@v3
with:
ref: ${{ github.base_ref}}
- name: Build UI
run: yarn install --frozen-lockfile
- name: Run unit tests
run: yarn test:unit --reporter=json --outputFile=base-report.json && node ./scripts/fix-coverage-report.js --outputFile base-report.json
- name: Upload Report
uses: actions/upload-artifact@v3
with:
name: base-report
path: base-report.json
test-branch:
runs-on: ubuntu-latest
steps:
- name: Checkout front end code.
uses: actions/checkout@v3
with:
ref: ${{ github.ref}}
- name: Build UI
run: yarn install --frozen-lockfile
- name: Run unit tests
run: yarn test:unit --silent --ci --json --coverage --testLocationInResults --maxWorkers=2 --outputFile=branch-report.json
- name: Upload Report
uses: actions/upload-artifact@v3
with:
name: branch-report
path: branch-report.json
- name: Checkout front end code.
uses: actions/checkout@v3
with:
ref: ${{ github.ref}}
- name: Build UI
run: yarn install --frozen-lockfile
- name: Run unit tests
run: yarn test:unit --reporter=json --outputFile=branch-report.json && node ./scripts/fix-coverage-report.js --outputFile branch-report.json
- name: Upload Report
uses: actions/upload-artifact@v3
with:
name: branch-report
path: branch-report.json
coverageReport:
runs-on: ubuntu-latest
needs: [test-base, test-branch]
permissions:
pull-requests: write
contents: write
steps:
steps:
- name: Download Base Report
uses: actions/download-artifact@v3
with:
Expand All @@ -61,6 +61,3 @@ jobs:
coverage-file: branch-report.json
base-coverage-file: base-report.json
annotations: none



2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tasks:
if [ ! -f .env ]; then cp ".env.example" ".env"; fi
yarn && \
gp sync-done install
command: REACT_APP_PROVIDER=$(gp url 8545) yarn start
command: VITE_PROVIDER=$(gp url 8545) yarn start
- name: Test
init: gp sync-await install
command: |
Expand Down
51 changes: 1 addition & 50 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,55 +236,6 @@ If you wish to use a theme's color scheme manually, follow these steps:

For the available theme properties, take a look at the themes in `src/themes`.

## Application translation

Olympus uses [linguijs](https://github.com/lingui/js-lingui) to manage translation.

The language files are located in a submodule deployed in `src/locales/translations`. This submodule points to the [olympus translation repository](https://github.com/OlympusDAO/olympus-translations)

In order to mark text for translation you can use:

- The <Trans> component in jsx templates eg. `<Trans>Translate me!</Trans>`
- The t function in javascript code and jsx templates. `` t`Translate me` ``
You can also add comments for the translators. eg.

```JSX
t({
message: "Bond",
comment: "The action of bonding (verb)",
})
```

- Where a variable/javascript function is required within a block of translatable text, string interpolation can be used:

```JSX
{t`Your current Staked Balance is ${getSOhmBalance().toFixed(2)} sOHM`}
```

When new texts are created or existing texts are modified in the application please leave a message in the OlympusDao app-translation channel for the translators to translate them.

### Resolving merge conflicts with translations

```bash
$ git diff
# shows two commits in conflict below (fbdd867,e6e0919)
diff --cc src/locales/translations
index fbdd867,e6e0919..0000000
--- a/src/locales/translations
+++ b/src/locales/translations

cd src/locales/translations
# first commit
git checkout fbdd867
# merge in second commit
git merge e6e0919
git commit

cd ../../..
git add src/locales/translations
git commit
```

## ESLint

We use ESLint to find/automatically fix problems.
Expand Down Expand Up @@ -324,7 +275,7 @@ Each PR into master will get its own custom URL that is visible on the PR page.

### Feature Flags

- Give: by default it is enabled. It can be disabled by setting the `REACT_APP_GIVE_ENABLED` environment variable to "false".
- Give: by default it is enabled. It can be disabled by setting the `VITE_GIVE_ENABLED` environment variable to "false".

## Dashboard

Expand Down
9 changes: 5 additions & 4 deletions public/index.html → index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,25 @@
<!-- End Google Tag Manager -->

<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.svg" type="image/svg+xml"/> <!-- browser theme aware favicon -->
<link rel="icon" href="/favicon.svg" type="image/svg+xml"/> <!-- browser theme aware favicon -->
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=5, minimum-scale=1" />
<meta name="description"
content="Olympus utilizes Treasury Reserves to enable long-term price consistency and scarcity within an infinite supply system" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="apple-touch-icon" href="/logo192.png" />

<link rel="manifest" href="%PUBLIC_URL%/manifest.json" crossorigin="use-credentials" />
<link rel="manifest" href="/manifest.json" crossorigin="use-credentials" />
<title>OlympusDAO</title>

<link rel="preconnect" href="https://api.thegraph.com" crossOrigin="anonymous" />
<link rel="preconnect" href="https://eth-mainnet.alchemyapi.io" crossOrigin="anonymous" />
</head>

<body>
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> <!-- fallback, if on head browsers will prefer the .ico over .svg -->
<link rel="icon" href="/favicon.ico" /> <!-- fallback, if on head browsers will prefer the .ico over .svg -->
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="src/index.tsx"></script>
</body>

</html>
Loading

0 comments on commit 8e35581

Please sign in to comment.