fetch last slot after reload

This commit is contained in:
tjs 2023-08-12 16:07:00 -04:00
parent 62a3f337e1
commit 0c00c38ca0
1 changed files with 1 additions and 1 deletions

View File

@ -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)