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