Skip to content

Commit

Permalink
Merge pull request #55 from reflexer-labs/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mstfash authored Jan 26, 2021
2 parents ebca626 + 237d0cc commit 9eb8a9b
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 17 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
REACT_APP_NETWORK_ID: ${{ secrets.REACT_APP_NETWORK_ID_PRODUCTION }}
REACT_APP_NETWORK_URL: ${{ secrets.REACT_APP_NETWORK_URL_PRODUCTION }}
REACT_APP_COIN_TICKER_PRODUCTION: ${{ secrets.REACT_APP_COIN_TICKER_PRODUCTION }}
REACT_APP_SYSTEM_STATUS: ${{ secrets.REACT_APP_SYSTEM_STATUS }}

steps:
- uses: actions/checkout@v2
Expand Down
27 changes: 14 additions & 13 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,23 @@ jobs:
REACT_APP_GRAPH_API_URLS: ${{ secrets.REACT_APP_GRAPH_API_URLS_STAGING }}
REACT_APP_NETWORK_ID: ${{ secrets.REACT_APP_NETWORK_ID_STAGING }}
REACT_APP_NETWORK_URL: ${{ secrets.REACT_APP_NETWORK_URL_STAGING }}
REACT_APP_SYSTEM_STATUS: ${{ secrets.REACT_APP_SYSTEM_STATUS_STAGING }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Use Node.js 12.18.0
uses: actions/setup-node@v1
with:
node-version: '12.18.0'
- name: Use Node.js 12.18.0
uses: actions/setup-node@v1
with:
node-version: '12.18.0'

- name: Install dependencies
run: yarn
- name: Install dependencies
run: yarn

- name: Build static site
run: yarn build
- name: Build static site
run: yarn build

- name: Deploy staging
uses: jakejarvis/s3-sync-action@v0.5.0
with:
args: --acl public-read --follow-symlinks --delete
- name: Deploy staging
uses: jakejarvis/s3-sync-action@v0.5.0
with:
args: --acl public-read --follow-symlinks --delete
12 changes: 11 additions & 1 deletion src/containers/Shared.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import BalanceUpdater from '../services/BalanceUpdater';
import { capitalizeName, timeout } from '../utils/helper';
import WalletModal from '../components/WalletModal';
import { ChainId } from '@uniswap/sdk';
import { ETHERSCAN_PREFIXES } from '../utils/constants';
import { ETHERSCAN_PREFIXES, SYSTEM_STATUS } from '../utils/constants';
import { useActiveWeb3React } from '../hooks';
import LoadingModal from '../components/Modals/LoadingModal';
import styled from 'styled-components';
Expand All @@ -25,6 +25,7 @@ import TransactionUpdater from '../services/TransactionUpdater';
import usePrevious from '../hooks/usePrevious';
import { useHistory } from 'react-router-dom';
import ImagePreloader from '../components/ImagePreloader';
import AlertLabel from '../components/AlertLabel';

interface Props {
children: ReactNode;
Expand Down Expand Up @@ -174,6 +175,11 @@ const Shared = ({ children }: Props) => {
<EmptyDiv>
<Navbar />
</EmptyDiv>
{SYSTEM_STATUS && SYSTEM_STATUS.toLowerCase() === 'shutdown' ? (
<AlertContainer>
<AlertLabel type="danger" text={t('shutdown_text')} />
</AlertContainer>
) : null}
<Content>{children}</Content>
<EmptyDiv>
<CookieBanner />
Expand Down Expand Up @@ -225,3 +231,7 @@ const Container = styled.div`

const Content = styled.div``;
const EmptyDiv = styled.div``;

const AlertContainer = styled.div`
padding: 0 20px;
`;
3 changes: 3 additions & 0 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const {
REACT_APP_NETWORK_ID,
REACT_APP_COIN_TICKER_PRODUCTION,
REACT_APP_COIN_TICKER_KOVAN,
REACT_APP_SYSTEM_STATUS,
} = process.env;

export enum Network {
Expand All @@ -27,6 +28,8 @@ export const COIN_TICKER =

export const COLLATERAL_TYPE_ID = 'ETH-A';

export const SYSTEM_STATUS = REACT_APP_SYSTEM_STATUS || '';

export const GRAPH_API_URLS = REACT_APP_GRAPH_API_URLS
? REACT_APP_GRAPH_API_URLS.split(',')
: [
Expand Down
3 changes: 2 additions & 1 deletion src/utils/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,6 @@
"annual_redemption_tip": "Rate at which RAI is devalued or revalued over 8 hours.",
"liquidation_price_tip": "ETH price under which this Safe can get liquidated.",
"liquidation_penalty_tip": "This is a fee you pay in case your Safe gets liquidated. The fee is added on top of your Safe's debt during liquidation, resulting in more Safe collateral being sold.",
"app": "App"
"app": "App",
"shutdown_text": "The global settlement procedure was triggered for this system. You can't manage your Safes from this application anymore."
}
4 changes: 2 additions & 2 deletions src/utils/queries/safe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ systemState(id: "current") {
}`;

export const getUserSafesListQuery = (address: string) => `{
safes(where: { owner: "${address}" }) {
safes(where: { owner: "${address}", proxy_not: null, safeId_not: null }) {
safeId
safeHandler
collateral
Expand All @@ -42,7 +42,7 @@ export const getUserSafesListQuery = (address: string) => `{
}`;

export const getSafeByIdQuery = (safeId: string, address: string) => `{
safes(where: { safeId: "${safeId}" }) {
safes(where: { safeId: "${safeId}" , proxy_not: null, safeId_not: null}) {
safeId
collateral
createdAt
Expand Down

0 comments on commit 9eb8a9b

Please sign in to comment.