From 10cbe8d8d17a2d0ea744d5318704b99ada89d858 Mon Sep 17 00:00:00 2001 From: Mateusz Jasiuk Date: Mon, 16 Dec 2024 12:05:26 +0100 Subject: [PATCH] fix: query only relevant bonds to see if it's possible to vote (#1407) * fix: query only relevant bonds to see if it's possible to vote * chore: bump minor --- apps/namadillo/package.json | 4 ++-- apps/namadillo/src/atoms/proposals/atoms.ts | 4 +++- yarn.lock | 10 +++++----- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/namadillo/package.json b/apps/namadillo/package.json index e40f155c1..79048005e 100644 --- a/apps/namadillo/package.json +++ b/apps/namadillo/package.json @@ -1,6 +1,6 @@ { "name": "@namada/namadillo", - "version": "1.0.5", + "version": "1.0.6", "description": "Namadillo", "repository": "https://github.com/anoma/namada-interface/", "author": "Heliax Dev ", @@ -10,7 +10,7 @@ "@chain-registry/client": "^1.53.5", "@cosmjs/encoding": "^0.32.3", "@keplr-wallet/types": "^0.12.136", - "@namada/indexer-client": "0.0.31", + "@namada/indexer-client": "1.0.2", "@tailwindcss/container-queries": "^0.1.1", "@tanstack/query-core": "^5.40.0", "@tanstack/react-query": "^5.40.0", diff --git a/apps/namadillo/src/atoms/proposals/atoms.ts b/apps/namadillo/src/atoms/proposals/atoms.ts index 480b0d45f..102e27564 100644 --- a/apps/namadillo/src/atoms/proposals/atoms.ts +++ b/apps/namadillo/src/atoms/proposals/atoms.ts @@ -127,7 +127,9 @@ export const canVoteAtom = atomFamily((proposalStartEpoch: bigint) => enabled: account.isSuccess, queryFn: async () => { const all_bonds = await api.apiV1PosBondAddressGet( - account.data!.address + account.data!.address, + undefined, + Number(proposalStartEpoch) ); return all_bonds.data.results.reduce( diff --git a/yarn.lock b/yarn.lock index 983a41c2f..4bc1b64db 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3613,12 +3613,12 @@ __metadata: languageName: unknown linkType: soft -"@namada/indexer-client@npm:0.0.31": - version: 0.0.31 - resolution: "@namada/indexer-client@npm:0.0.31" +"@namada/indexer-client@npm:1.0.2": + version: 1.0.2 + resolution: "@namada/indexer-client@npm:1.0.2" dependencies: axios: "npm:^1.6.1" - checksum: 45bf4c05f590f3daee46aa217a5bcf7cd0ee08f3a0dcf8f6a89f8458786ffa99035d2cad8b87c7b28080aeca34e10cfd7b3eee905a2e26f740e43ca883c1252c + checksum: 536807e94c788c97e844c5153ddcc031ef80665867aee741df87622f4a9e39d8668909f66c88688cb37993ec7bf605bf97710bcb6bfb2597b7feda2c40dc6633 languageName: node linkType: hard @@ -3659,7 +3659,7 @@ __metadata: "@cosmjs/encoding": "npm:^0.32.3" "@eslint/js": "npm:^9.9.1" "@keplr-wallet/types": "npm:^0.12.136" - "@namada/indexer-client": "npm:0.0.31" + "@namada/indexer-client": "npm:1.0.2" "@playwright/test": "npm:^1.24.1" "@release-it/keep-a-changelog": "npm:^5.0.0" "@svgr/webpack": "npm:^6.5.1"