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

View File

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

View File

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