fix openOrders reload

This commit is contained in:
Adrian Brzeziński 2022-12-15 02:07:48 +01:00
parent 1f7c6667f7
commit 279e521918
3 changed files with 3 additions and 3 deletions

View File

@ -268,7 +268,6 @@ const AdvancedTradeForm = () => {
Date.now(),
10
)
actions.reloadMangoAccount()
actions.fetchOpenOrders()
notify({
type: 'success',
@ -297,7 +296,6 @@ const AdvancedTradeForm = () => {
undefined,
undefined
)
actions.reloadMangoAccount()
actions.fetchOpenOrders()
notify({
type: 'success',

View File

@ -45,7 +45,6 @@ const UnsettledTrades = ({
new PublicKey(mktAddress)
)
actions.fetchOpenOrders()
actions.reloadMangoAccount()
notify({
type: 'success',
title: 'Successfully settled funds',

View File

@ -677,6 +677,9 @@ const mangoStore = create<MangoStore>()(
const set = get().set
const client = get().client
const group = get().group
if (!providedMangoAccount) {
await get().actions.reloadMangoAccount()
}
const mangoAccount =
providedMangoAccount || get().mangoAccount.current