Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bidsSlab depth length stays 0 #71

Open
ddave09 opened this issue Jun 15, 2022 · 1 comment
Open

bidsSlab depth length stays 0 #71

ddave09 opened this issue Jun 15, 2022 · 1 comment

Comments

@ddave09
Copy link

ddave09 commented Jun 15, 2022

newOrderInstruction successfully passes with connection.sendTransaction and connection.confirmTransaction.

But when I do:

const marketState = await MarketState.retrieve(
  connection,
  marketKey,
  "finalized"
);

const bidsSlab = await marketState.loadBidsSlab(connection, "finalized");
const depth = bidsSlab.getL2DepthJS(1, false);

expect(depth.length).toBe(1);

The test fails because the depth is 0. It should be one.

@0xBraunGuy
Copy link

Try "confirmed" instead of"finalized". "confirmed" is usually good enough for most use cases (and will be true after "confirmTransaction")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants