mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-11-10 12:29:49 +03:00
Associate cached TransactionCount with its corresponding walletId.
This commit is contained in:
parent
840a7c521c
commit
cdfa2b9821
@ -230,9 +230,9 @@ export const walletApi = apiWithTag.injectEndpoints({
|
||||
service: Wallet,
|
||||
args: [walletId],
|
||||
}),
|
||||
invalidatesTags: [
|
||||
invalidatesTags: (_result, _error, { walletId }) => [
|
||||
{ type: 'Transactions', id: 'LIST' },
|
||||
'TransactionCount',
|
||||
{ type: 'TransactionCount', id: walletId },
|
||||
],
|
||||
}),
|
||||
|
||||
@ -643,7 +643,9 @@ export const walletApi = apiWithTag.injectEndpoints({
|
||||
args: [walletId],
|
||||
}),
|
||||
transformResponse: (response: any) => response?.count,
|
||||
providesTags: ['TransactionCount'],
|
||||
providesTags: (result, _error, { walletId }) => result
|
||||
? [{ type: 'TransactionCount', id: walletId }]
|
||||
: [],
|
||||
onCacheEntryAdded: onCacheEntryAddedInvalidate(baseQuery, [{
|
||||
command: 'onCoinAdded',
|
||||
service: Wallet,
|
||||
|
Loading…
Reference in New Issue
Block a user