Skip to content

Commit

Permalink
Remove signingcosmwasmclient from accountclient query key
Browse files Browse the repository at this point in the history
  • Loading branch information
adairrr committed Jul 1, 2024
1 parent b016bf5 commit 5e7ec4d
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 16 deletions.
8 changes: 8 additions & 0 deletions examples/wagemos-cosmoskit-nextjs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# wagemos-cosmoskit-nextjs

## 0.3.22

### Patch Changes

- Updated dependencies []:
- @abstract-money/react@1.3.9
- @abstract-money/provider-cosmoskit@5.0.9

## 0.3.21

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/wagemos-cosmoskit-nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wagemos-cosmoskit-nextjs",
"version": "0.3.21",
"version": "0.3.22",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
8 changes: 8 additions & 0 deletions examples/wagemos-graz-nextjs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# wagemos-graz-nextjs

## 0.3.22

### Patch Changes

- Updated dependencies []:
- @abstract-money/react@1.3.9
- @abstract-money/provider-graz@5.0.9

## 0.3.21

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/wagemos-graz-nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wagemos-graz-nextjs",
"version": "0.3.21",
"version": "0.3.22",
"private": true,
"scripts": {
"dev": "NODE_OPTIONS='--inspect' next dev",
Expand Down
7 changes: 7 additions & 0 deletions packages/provider-cosmoskit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @abstract-money/provider-cosmoskit

## 5.0.9

### Patch Changes

- Updated dependencies []:
- @abstract-money/react@1.3.9

## 5.0.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/provider-cosmoskit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@abstract-money/provider-cosmoskit",
"version": "5.0.8",
"version": "5.0.9",
"description": "Provider for CosmosKit",
"homepage": "https://github.com/AbstractSDK/abstract.js#readme",
"author": "dalechyn <vlad@abstract.money>",
Expand Down
7 changes: 7 additions & 0 deletions packages/provider-graz/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @abstract-money/provider-graz

## 5.0.9

### Patch Changes

- Updated dependencies []:
- @abstract-money/react@1.3.9

## 5.0.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/provider-graz/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@abstract-money/provider-graz",
"version": "5.0.8",
"version": "5.0.9",
"description": "Provider for Graz",
"homepage": "https://github.com/AbstractSDK/abstract.js#readme",
"author": "dalechyn <vlad@abstract.money>",
Expand Down
6 changes: 6 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @abstract-money/react

## 1.3.9

### Patch Changes

- Remove signingcosmwasmclient from account client query key

## 1.3.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@abstract-money/react",
"version": "1.3.8",
"version": "1.3.9",
"description": "React Hooks for Abstract SDK",
"homepage": "https://github.com/AbstractSDK/abstract.js#readme",
"author": "dalechyn <vlad@abstract.money>",
Expand Down
22 changes: 11 additions & 11 deletions packages/react/src/utils/use-abstract-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,22 @@ export async function getAbstractClient({
)
}

type QueryKey = readonly [
'abstract-client',
string | undefined,
string | undefined,
string | undefined,
string,
]

export type UseAbstractClientParameters = {
chainName: string | undefined
sender?: string | undefined
query?: UseQueryParameters<
AbstractClient | undefined,
unknown,
AbstractClient | undefined,
readonly [
'abstract-client',
string | undefined,
string | undefined,
string | undefined,
string,
SigningCosmWasmClient | undefined,
]
QueryKey
>
}

Expand All @@ -79,9 +80,8 @@ export function useAbstractClient(parameters: UseAbstractClientParameters) {
} = useSenderAddress({ chainName })

const queryKey = React.useMemo(
() =>
['abstract-client', sender_, sender, chainName, apiUrl, client] as const,
[sender_, sender, chainName, apiUrl, client],
() => ['abstract-client', sender_, sender, chainName, apiUrl] as const,
[sender_, sender, chainName, apiUrl],
)

const queryFn = React.useCallback(() => {
Expand Down

0 comments on commit 5e7ec4d

Please sign in to comment.