fetch last slot after reload
This commit is contained in:
parent
62a3f337e1
commit
0c00c38ca0
|
@ -575,13 +575,13 @@ const mangoStore = create<MangoStore>()(
|
|||
const group = get().group
|
||||
const client = get().client
|
||||
const mangoAccount = get().mangoAccount.current
|
||||
const lastSlot = get().mangoAccount.lastSlot
|
||||
if (!group) throw new Error('Group not loaded')
|
||||
if (!mangoAccount)
|
||||
throw new Error('No mango account exists for reload')
|
||||
|
||||
const { value: reloadedMangoAccount, slot } =
|
||||
await mangoAccount.reloadWithSlot(client)
|
||||
const lastSlot = get().mangoAccount.lastSlot
|
||||
if (
|
||||
!confirmationSlot ||
|
||||
(confirmationSlot && slot > confirmationSlot)
|
||||
|
|
Loading…
Reference in New Issue