Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move some constants to env #5

Merged
merged 2 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ NEXT_PUBLIC_EXPLORER=https://explorer.astranaut.dev
NEXT_PUBLIC_GTAG=
NEXT_PUBLIC_FEE=20
NEXT_PUBLIC_TITLE=SolarSwap
NEXT_PUBLIC_WALLET_CONNECT_RELAY=wc-relay.astranaut.dev
NEXT_PUBLIC_WALLET_CONNECT_RELAY=wc-relay.astranaut.dev
NEXT_PUBLIC_DEFAULT_OUTPUT_CURRENCY=0x6f74f5511ba144990A8aeBaF20AFBD3B56EedCb2
NEXT_PUBLIC_GN_INFO_CLIENT=http://167.172.80.21:8000/subgraphs/name/solarswap/exchange-v1
NEXT_PUBLIC_GN_BLOCK_CLIENT=http://167.172.80.21:8000/subgraphs/name/solarswap/blocks-v1
3 changes: 3 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ jobs:
NEXT_PUBLIC_WALLET_CONNECT_RELAY=wc-relay.astranaut.dev
NEXT_PUBLIC_SENTRY_DSN=https://204e8402a7684195a50ee186a5fec8d8@sentry.astranet.live/6
NEXT_PUBLIC_SENTRY_ENVIRONMENT=testnet
NEXT_PUBLIC_DEFAULT_OUTPUT_CURRENCY=0x6f74f5511ba144990A8aeBaF20AFBD3B56EedCb2
NEXT_PUBLIC_GN_INFO_CLIENT=http://167.172.80.21:8000/subgraphs/name/solarswap/exchange-v1
NEXT_PUBLIC_GN_BLOCK_CLIENT=http://167.172.80.21:8000/subgraphs/name/solarswap/blocks-v1
9 changes: 7 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
jobs:
build-and-deploy:
uses: AstraProtocol/github-actions-workflows/.github/workflows/stella-deployment.yml@main
secrets:
secretBuildArgs: |
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
GITHUB_TOKEN=${{ secrets.GH_AUTH_TOKEN }}
with:
ingressEnabled: "yes"
ingressHost: "defi.prod.astranet.services"
Expand All @@ -26,5 +30,6 @@ jobs:
NEXT_PUBLIC_WALLET_CONNECT_RELAY=wc-relay.astranaut.io
NEXT_PUBLIC_SENTRY_DSN=https://204e8402a7684195a50ee186a5fec8d8@sentry.astranet.live/6
NEXT_PUBLIC_SENTRY_ENVIRONMENT=mainnet
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
GITHUB_TOKEN=${{ secrets.GH_AUTH_TOKEN }}
NEXT_PUBLIC_DEFAULT_OUTPUT_CURRENCY=0x6f74f5511ba144990A8aeBaF20AFBD3B56EedCb2
NEXT_PUBLIC_GN_INFO_CLIENT=http://167.172.80.21:8000/subgraphs/name/solarswap/exchange-v1
NEXT_PUBLIC_GN_BLOCK_CLIENT=http://167.172.80.21:8000/subgraphs/name/solarswap/blocks-v1
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ RUN SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN} \
NEXT_PUBLIC_FEE=${NEXT_PUBLIC_FEE} \
NEXT_PUBLIC_TITLE=${NEXT_PUBLIC_TITLE} \
NEXT_PUBLIC_WALLET_CONNECT_RELAY=${NEXT_PUBLIC_WALLET_CONNECT_RELAY} \
NEXT_PUBLIC_SENTRY_DSN = ${NEXT_PUBLIC_SENTRY_DSN} \
NEXT_PUBLIC_SENTRY_DSN=${NEXT_PUBLIC_SENTRY_DSN} \
yarn build

# Production image, copy all the files and run next
Expand Down
4 changes: 2 additions & 2 deletions src/config/constants/endpoints.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const INFO_CLIENT = 'http://167.172.80.21:8000/subgraphs/name/solarswap/exchange-v1'
export const BLOCKS_CLIENT = 'http://167.172.80.21:8000/subgraphs/name/solarswap/blocks-v1'
export const INFO_CLIENT = process.env.NEXT_PUBLIC_GN_INFO_CLIENT
export const BLOCKS_CLIENT = process.env.NEXT_PUBLIC_GN_BLOCK_CLIENT
export const GRAPH_HEALTH = 'https://api.thegraph.com/index-node/graphql'
2 changes: 1 addition & 1 deletion src/state/swap/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ASA
export const DEFAULT_INPUT_CURRENCY = 'ASA'
// USDT
export const DEFAULT_OUTPUT_CURRENCY = '0x6f74f5511ba144990A8aeBaF20AFBD3B56EedCb2'
export const DEFAULT_OUTPUT_CURRENCY = process.env.NEXT_PUBLIC_DEFAULT_OUTPUT_CURRENCY
Loading