-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: remove mock * fix: compile error
- Loading branch information
Showing
6 changed files
with
3 additions
and
51 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
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,6 +1 @@ | ||
####################################### | ||
# Development | ||
####################################### | ||
|
||
# Enables mock mode (default = false) | ||
REACT_APP_MOCK=false |
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,21 +1 @@ | ||
import * as realApi from './api' | ||
import * as mockApi from './mock' | ||
|
||
export { getIsOrderBookTypedError } from './getIsOrderBookTypedError' | ||
|
||
const useMock = process.env.REACT_APP_MOCK === 'true' | ||
|
||
// Re-exporting the result, mocked or not. | ||
// Unfortunately, did not find a way to export | ||
// a mix of mock/real implementations | ||
// without manually naming the exports | ||
export const { | ||
// functions that have a mock | ||
getProfileData, | ||
getQuote = realApi.getQuote, | ||
getOrder = realApi.getOrder, | ||
getNativePrice = realApi.getNativePrice, | ||
getTrades = realApi.getTrades, | ||
getOrders = realApi.getOrders, | ||
// functions that only have a mock | ||
} = useMock ? { ...mockApi } : { ...realApi } | ||
export * from './api' |
This file was deleted.
Oops, something went wrong.
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,6 +1,2 @@ | ||
####################################### | ||
# Development | ||
####################################### | ||
|
||
# Enables mock mode (default = false) | ||
REACT_APP_MOCK=false | ||
|