Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gar): use updated weight attribute #145

Merged
merged 3 commits into from
Feb 3, 2025
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
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.2] - 2025-02-03

### Changed

- Updated to latest ar.io SDK to support changes in property names for data returned by the network

## [1.8.1] - 2025-01-29

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions 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.1",
"version": "1.8.2",
"type": "module",
"scripts": {
"build": "yarn clean && tsc --build tsconfig.build.json && NODE_OPTIONS=--max-old-space-size=32768 vite build",
Expand All @@ -20,7 +20,7 @@
"deploy": "yarn build && permaweb-deploy --ant-process ${DEPLOY_ANT_PROCESS_ID}"
},
"dependencies": {
"@ar.io/sdk": "^3.3.0-alpha.12",
"@ar.io/sdk": "^3.4.1-alpha.2",
"@fontsource/rubik": "^5.0.19",
"@headlessui/react": "^2.2.0",
"@radix-ui/react-dropdown-menu": "^2.1.2",
Expand Down
5 changes: 3 additions & 2 deletions src/pages/Gateway/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ const Gateway = () => {
const weightFields: Array<[string, number | undefined]> = [
['Stake', gateway?.weights?.stakeWeight],
['Tenure', gateway?.weights?.tenureWeight],
['Gateway Performance Ratio', gateway?.weights?.gatewayRewardRatioWeight],
['Observer Performance Ratio', gateway?.weights?.observerRewardRatioWeight],
// there will be a period where old epoch notices have the old field, and new epoch notices have the new field, so check both
['Gateway Performance Ratio', gateway?.weights?.gatewayPerformanceRatio || gateway?.weights?.gatewayRewardRatioWeight],
['Observer Performance Ratio', gateway?.weights?.observerPerformanceRatio || gateway?.weights?.observerRewardRatioWeight],
['Composite', gateway?.weights?.compositeWeight],
['Normalized', gateway?.weights?.normalizedCompositeWeight],
];
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
plimit-lit "^3.0.1"
warp-contracts "1.4.45"

"@ar.io/sdk@^3.3.0-alpha.12":
version "3.3.0-alpha.12"
resolved "https://registry.yarnpkg.com/@ar.io/sdk/-/sdk-3.3.0-alpha.12.tgz#73464e6834eb430946062768d69310d470095208"
integrity sha512-MiVze8ed2GNsH16NJDOCLrKrnmh6v1nTRZUhPK9YS3m3tUMYeu7zOnDxQooaDjduwH+d5CI1jpOYOncyTT+skw==
"@ar.io/sdk@^3.4.1-alpha.2":
version "3.4.1-alpha.2"
resolved "https://registry.yarnpkg.com/@ar.io/sdk/-/sdk-3.4.1-alpha.2.tgz#91715524ef8de46e298f86d8c7047de80681baea"
integrity sha512-19eJRKQX8x0Ue/+p0c0fGUIBbL7VZaMu/Nblkp8riFLwWAhdzLMiQ4vO4xa9KMbkXq/vMy5UvOpm4Ho41MZimg==
dependencies:
"@dha-team/arbundles" "^1.0.1"
"@permaweb/aoconnect" "^0.0.57"
Expand Down