Fix wallet logs refetch
onError does not exist on client.mutate
This commit is contained in:
parent
4bf9954c4e
commit
5b561e22a9
|
@ -150,13 +150,9 @@ function useServerConfig (wallet) {
|
||||||
priority,
|
priority,
|
||||||
...config
|
...config
|
||||||
}) => {
|
}) => {
|
||||||
|
try {
|
||||||
return await client.mutate({
|
return await client.mutate({
|
||||||
mutation: wallet.server.mutation,
|
mutation: wallet.server.mutation,
|
||||||
refetchQueries: ['WalletLogs'],
|
|
||||||
onError: (err) => {
|
|
||||||
client.refetchQueries({ include: ['WalletLogs'] })
|
|
||||||
throw err
|
|
||||||
},
|
|
||||||
variables: {
|
variables: {
|
||||||
id: walletId,
|
id: walletId,
|
||||||
...config,
|
...config,
|
||||||
|
@ -167,6 +163,9 @@ function useServerConfig (wallet) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} finally {
|
||||||
|
client.refetchQueries({ include: ['WalletLogs'] })
|
||||||
|
}
|
||||||
}, [client, walletId])
|
}, [client, walletId])
|
||||||
|
|
||||||
const clearConfig = useCallback(async () => {
|
const clearConfig = useCallback(async () => {
|
||||||
|
|
Loading…
Reference in New Issue