-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2629 from Kwenta/fix/switch-aws-bucket
Fix: Add AWS bucket support
- Loading branch information
Showing
4 changed files
with
26 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export const FLEEK_STORAGE_BUCKET = '25710180-23d8-43f4-b0c9-5b7f55f63165-bucket' | ||
|
||
export const FLEEK_BASE_URL = 'https://storage.kwenta.io' | ||
|
||
export const TRADING_REWARDS_AWS_BUCKET = 'https://trading-rewards-snapshots.s3.amazonaws.com/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
import axios from 'axios' | ||
|
||
import { FLEEK_BASE_URL, FLEEK_STORAGE_BUCKET } from '../constants/files' | ||
import { | ||
FLEEK_BASE_URL, | ||
FLEEK_STORAGE_BUCKET, | ||
TRADING_REWARDS_AWS_BUCKET, | ||
} from '../constants/files' | ||
|
||
export const client = axios.create({ | ||
baseURL: `${FLEEK_BASE_URL}/${FLEEK_STORAGE_BUCKET}/data/`, | ||
timeout: 10000, | ||
}) | ||
const createClient = (baseURL: string) => { | ||
return axios.create({ | ||
baseURL, | ||
timeout: 5000, | ||
}) | ||
} | ||
|
||
export const awsClient = createClient(TRADING_REWARDS_AWS_BUCKET) | ||
|
||
export const fleekClient = createClient(`${FLEEK_BASE_URL}/${FLEEK_STORAGE_BUCKET}/data/`) |