Skip to content

Commit d017cf9

Browse files
committed
chore: update env var for api baseurl
1 parent 07fb2de commit d017cf9

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

.env.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
NEXT_PUBLIC_ENV=prod
2-
NEXT_PUBLIC_SCREENING_URL=https://aave-api-v2.aave.com
2+
NEXT_PUBLIC_API_BASEURL=https://aave-api-v2.aave.com

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ TENDERLY_PROJECT=
55
NEXT_PUBLIC_ENV=prod
66
NEXT_PUBLIC_ENABLE_GOVERNANCE=true
77
NEXT_PUBLIC_ENABLE_STAKING=true
8-
NEXT_PUBLIC_SCREENING_URL=https://aave-api-v2.aave.com
8+
NEXT_PUBLIC_API_BASEURL=https://aave-api-v2.aave.com

.github/actions/build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ runs:
4444
NEXT_PUBLIC_ENV: '${{ inputs.NEXT_PUBLIC_ENV }}'
4545
NEXT_PUBLIC_ENABLE_GOVERNANCE: 'true'
4646
NEXT_PUBLIC_ENABLE_STAKING: 'true'
47-
NEXT_PUBLIC_SCREENING_URL: 'https://aave-api-v2.aave.com'
47+
NEXT_PUBLIC_API_BASEURL: 'https://aave-api-v2.aave.com'

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ src/locales/
1313
# IDE
1414
.vscode
1515

16+
# Env
17+
.env.*
18+
1619
# Specific Ignores
1720
*.svg
1821
*.ico

custom.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ namespace NodeJS {
88
NEXT_PUBLIC_ENABLE_GOVERNANCE: string;
99
NEXT_PUBLIC_ENABLE_STAKING: string;
1010
NEXT_PUBLIC_ENV: string;
11-
NEXT_PUBLIC_SCREENING_URL: string;
11+
NEXT_PUBLIC_API_BASEURL: string;
1212
}
1313
}

src/hooks/useAddressAllowed.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ const TWO_MINUTES = 2 * 60 * 1000;
1111
export const useAddressAllowed = (address: string): AddressAllowedResult => {
1212
const [isAllowed, setIsAllowed] = useState(true);
1313

14-
const screeningUrl = process.env.NEXT_PUBLIC_SCREENING_URL;
14+
const screeningUrl = `${process.env.NEXT_PUBLIC_API_BASEURL}/addresses/status`;
15+
const queryParams = `?address=${address}`;
1516

1617
const getIsAddressAllowed = async () => {
1718
if (screeningUrl && address) {
1819
try {
19-
const response = await fetch(`${screeningUrl}/addresses/status?address=${address}`);
20+
const response = await fetch(screeningUrl + queryParams);
2021
if (response.ok) {
2122
const data: { addressAllowed: boolean } = await response.json();
2223
setIsAllowed(data.addressAllowed);

0 commit comments

Comments
 (0)