fix: refetch wallet data on mount
Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
parent
71fcf50d0f
commit
2d11eb2d92
|
|
@ -100,6 +100,7 @@ export const MyWalletSection = ({ className }: { className?: string }) => {
|
|||
{BigInt(myWallet.powerToken || 0n)}
|
||||
</Balance>
|
||||
<Button
|
||||
buttonClassName={tw`rounded-full`}
|
||||
variant="ghost"
|
||||
onClick={() => refreshMutation.mutate()}
|
||||
disabled={refreshMutation.isPending}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,10 @@ export const wallet = {
|
|||
},
|
||||
}
|
||||
|
||||
export const useWallet = () => useAuthQuery(wallet.get())
|
||||
export const useWallet = () =>
|
||||
useAuthQuery(wallet.get(), {
|
||||
refetchOnMount: true,
|
||||
})
|
||||
|
||||
export const useWalletTransactions = (query: Parameters<typeof wallet.transactions.get>[0] = {}) =>
|
||||
useAuthQuery(wallet.transactions.get(query))
|
||||
|
|
|
|||
Loading…
Reference in New Issue