Skip to content
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
24 changes: 12 additions & 12 deletions .github/actions/fork-result-label/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,31 @@ inputs:
PULL_REQUEST_NUMBER:
description: Pull request id
required: false
default: "0"
default: '0'
runs:
using: "composite"
using: 'composite'
steps:
- name: delete success label
uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0
with:
labels: "CI Passed"
number: ${{ inputs.PULL_REQUEST_NUMBER }}
labels: 'CI Passed'
number: ${{ inputs.PULL_REQUEST_NUMBER }}
- name: delete fail label
uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0
with:
labels: "CI Failed"
number: ${{ inputs.PULL_REQUEST_NUMBER }}
labels: 'CI Failed'
number: ${{ inputs.PULL_REQUEST_NUMBER }}
- name: adding success label
uses: actions-ecosystem/action-add-labels@bd52874380e3909a1ac983768df6976535ece7f8
if: ${{ inputs.SUCCESS == 'true' }}
with:
labels: "CI Passed"
number: ${{ inputs.PULL_REQUEST_NUMBER }}
github_token: ${{ inputs.TOKEN }}
labels: 'CI Passed'
number: ${{ inputs.PULL_REQUEST_NUMBER }}
github_token: ${{ inputs.TOKEN }}
- name: adding fail label
uses: actions-ecosystem/action-add-labels@bd52874380e3909a1ac983768df6976535ece7f8
if: ${{ inputs.SUCCESS == 'false' }}
with:
labels: "CI Failed"
number: ${{ inputs.PULL_REQUEST_NUMBER }}
github_token: ${{ inputs.TOKEN }}
labels: 'CI Failed'
number: ${{ inputs.PULL_REQUEST_NUMBER }}
github_token: ${{ inputs.TOKEN }}
14 changes: 5 additions & 9 deletions src/hooks/useReservesHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,16 @@ export function useReserveRatesHistory(reserveAddress: string, timeRange: Reserv
const [error, setError] = useState(false);
const [data, setData] = useState<FormattedReserveHistoryItem[]>([]);

const ratesHistoryApiUrl = currentNetworkConfig?.ratesHistoryApiUrl;

const refetchData = useCallback<() => () => void>(() => {
// reset
setLoading(true);
setError(false);
setData([]);

if (
reserveAddress &&
currentNetworkConfig.ratesHistoryApiUrl &&
!BROKEN_ASSETS.includes(reserveAddress)
) {
const cancelable = makeCancelable(
fetchStats(reserveAddress, timeRange, currentNetworkConfig.ratesHistoryApiUrl)
);
if (reserveAddress && ratesHistoryApiUrl && !BROKEN_ASSETS.includes(reserveAddress)) {
const cancelable = makeCancelable(fetchStats(reserveAddress, timeRange, ratesHistoryApiUrl));

cancelable.promise
.then((data: APIResponse[]) => {
Expand All @@ -120,7 +116,7 @@ export function useReserveRatesHistory(reserveAddress: string, timeRange: Reserv

setLoading(false);
return () => null;
}, [reserveAddress, timeRange, currentNetworkConfig]);
}, [reserveAddress, timeRange, ratesHistoryApiUrl]);

useEffect(() => {
const cancel = refetchData();
Expand Down