fix openOrders reload
This commit is contained in:
parent
1f7c6667f7
commit
279e521918
|
@ -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',
|
||||||
|
|
|
@ -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',
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue