Skip to content

Commit

Permalink
Merge pull request #143 from ar-io/fix-congestion-banner-clearing
Browse files Browse the repository at this point in the history
fix: clear congestion banner when status is succesful within congestion window
  • Loading branch information
kunstmusik authored Jan 29, 2025
2 parents 1ab2162 + 07bcaa2 commit 77fe0a8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.8.1] - 2025-01-29

### Fixed

- Clear congestion banner when network returns to normal

## [1.8.0] - 2025-01-28

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ar-io/network-portal",
"private": true,
"version": "1.8.0",
"version": "1.8.1",
"type": "module",
"scripts": {
"build": "yarn clean && tsc --build tsconfig.build.json && NODE_OPTIONS=--max-old-space-size=32768 vite build",
Expand Down
5 changes: 3 additions & 2 deletions src/components/GlobalDataProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ const GlobalDataProvider = ({ children }: { children: ReactElement }) => {
if (!res.ok) {
log.error('AO CU URL is down');
setAoCongested(true);
} else if (endTime - startTime > CONGESTION_WINDOW) {
setAoCongested(true);
} else {
const congested = endTime - startTime > CONGESTION_WINDOW;
setAoCongested(congested);
}
})
.catch((error) => {
Expand Down

0 comments on commit 77fe0a8

Please sign in to comment.