-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OCT-1454: Cancelling requests while changing route from Metrics (#104)
- Loading branch information
Showing
14 changed files
with
72 additions
and
22 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
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,10 +1,17 @@ | ||
import { GenericAbortSignal } from 'axios'; | ||
|
||
import env from 'env'; | ||
import apiService from 'services/apiService'; | ||
|
||
export type Response = { | ||
leverage: number; | ||
}; | ||
|
||
export async function apiGetEpochLeverage(epoch: number): Promise<Response> { | ||
return apiService.get(`${env.serverEndpoint}rewards/leverage/${epoch}`).then(({ data }) => data); | ||
export async function apiGetEpochLeverage( | ||
epoch: number, | ||
signal?: GenericAbortSignal, | ||
): Promise<Response> { | ||
return apiService | ||
.get(`${env.serverEndpoint}rewards/leverage/${epoch}`, { signal }) | ||
.then(({ data }) => data); | ||
} |
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,10 +1,17 @@ | ||
import { GenericAbortSignal } from 'axios'; | ||
|
||
import env from 'env'; | ||
import apiService from 'services/apiService'; | ||
|
||
export type Response = { | ||
patrons: string[]; | ||
}; | ||
|
||
export async function apiGetEpochPatrons(epoch: number): Promise<Response> { | ||
return apiService.get(`${env.serverEndpoint}user/patrons/${epoch}`).then(({ data }) => data); | ||
export async function apiGetEpochPatrons( | ||
epoch: number, | ||
signal?: GenericAbortSignal, | ||
): Promise<Response> { | ||
return apiService | ||
.get(`${env.serverEndpoint}user/patrons/${epoch}`, { signal }) | ||
.then(({ data }) => data); | ||
} |
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
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
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