Skip to content

Commit

Permalink
fix(hooks): stale program on same id and different lib (#1699)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitayutanov authored Dec 5, 2024
1 parent 1151eae commit ecdaad7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion utils/gear-hooks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gear-js/react-hooks",
"version": "0.14.1",
"version": "0.14.2",
"description": "React hooks used across Gear applications",
"author": "Gear Technologies",
"license": "GPL-3.0",
Expand Down
2 changes: 1 addition & 1 deletion utils/gear-hooks/src/hooks/sails/use-program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function useProgram<TQueryFnData, TData = TQueryFnData>({

return useQuery({
...query,
queryKey: ['program', id, api?.provider.endpoint],
queryKey: ['program', library.toString(), id, api?.provider.endpoint],
queryFn: getProgram,
enabled: isApiReady && Boolean(id) && (query?.enabled ?? true),
});
Expand Down
6 changes: 3 additions & 3 deletions utils/wallet-connect/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gear-js/wallet-connect",
"version": "0.2.1",
"version": "0.2.2",
"type": "module",
"description": "React library to connect Substrate based wallets to Gear dApps",
"author": "Gear Technologies",
Expand All @@ -24,7 +24,7 @@
"preview": "vite preview"
},
"peerDependencies": {
"@gear-js/react-hooks": "^0.14.1",
"@gear-js/react-hooks": "^0.14.2",
"@gear-js/ui": "^0.5.28",
"@gear-js/vara-ui": "^0.0.11"
},
Expand All @@ -37,7 +37,7 @@
}
},
"devDependencies": {
"@gear-js/react-hooks": "0.14.1",
"@gear-js/react-hooks": "0.14.2",
"@gear-js/ui": "0.5.28",
"@gear-js/vara-ui": "0.0.11",
"@polkadot/react-identicon": "3.11.3",
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2691,7 +2691,7 @@ __metadata:
languageName: unknown
linkType: soft

"@gear-js/[email protected].1, @gear-js/react-hooks@workspace:^, @gear-js/react-hooks@workspace:utils/gear-hooks":
"@gear-js/[email protected].2, @gear-js/react-hooks@workspace:^, @gear-js/react-hooks@workspace:utils/gear-hooks":
version: 0.0.0-use.local
resolution: "@gear-js/react-hooks@workspace:utils/gear-hooks"
dependencies:
Expand Down Expand Up @@ -2838,7 +2838,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@gear-js/wallet-connect@workspace:utils/wallet-connect"
dependencies:
"@gear-js/react-hooks": 0.14.1
"@gear-js/react-hooks": 0.14.2
"@gear-js/ui": 0.5.28
"@gear-js/vara-ui": 0.0.11
"@polkadot/react-identicon": 3.11.3
Expand All @@ -2859,7 +2859,7 @@ __metadata:
vite-plugin-node-polyfills: 0.22.0
vite-plugin-svgr: 3.2.0
peerDependencies:
"@gear-js/react-hooks": ^0.14.1
"@gear-js/react-hooks": ^0.14.2
"@gear-js/ui": ^0.5.28
"@gear-js/vara-ui": ^0.0.11
peerDependenciesMeta:
Expand Down

0 comments on commit ecdaad7

Please sign in to comment.