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

feat: lp_subscribe_order_fills (PRO-938) #4319

Merged
merged 6 commits into from Dec 6, 2023
Merged

Conversation

AlastairHolmes
Copy link
Contributor

@AlastairHolmes AlastairHolmes commented Dec 6, 2023

The unwraps are annoying, but the behaviour is correct. This behaviour matches other subscriptions in substrate.

Base automatically changed from feat/new-lp-interface-design to main December 6, 2023 14:27
@AlastairHolmes AlastairHolmes requested review from niklasnatter and GabrielBuragev and removed request for a team December 6, 2023 14:27
kylezs and others added 2 commits December 6, 2023 15:32
chore: snake case for ApiWaitForResult

refactor: factor out wait for result unwrapping

refactor: use submit_signed_xt inside the wait_for call

feat: withdraw asset wait for

refactor: wait for is optional

chore: use txhash and txdetails naming
@AlastairHolmes
Copy link
Contributor Author

AlastairHolmes commented Dec 6, 2023

@dandanlen Yeah sorry I totally forgot about the old PR, but your comments have been addressed. The old PR was signficantly broken.

Copy link
Collaborator

@dandanlen dandanlen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some surface level comments for now, I can take a closer look later if necessary.

Comment on lines 213 to 214
hash: Hash,
number: BlockNumber,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

	block_hash: Hash,
	block_number: BlockNumber,

?

I think this would be a little clearer.

id,
..
}) => {
Some((lp.clone(), AssetPair::new(*base_asset, *quote_asset).unwrap(), *id))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably the unwrap is ok because we know it was constructe from a valid base/quote pair when the event was constructed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@dandanlen dandanlen enabled auto-merge (squash) December 6, 2023 16:05
@dandanlen dandanlen merged commit c4be27a into main Dec 6, 2023
40 checks passed
@dandanlen dandanlen deleted the feat/subscribe_order_fills branch December 6, 2023 16:42
@AlastairHolmes AlastairHolmes changed the title feat: lp_subscribe_order_fills feat: lp_subscribe_order_fills (PRO-938) Dec 11, 2023
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

Successfully merging this pull request may close these issues.

None yet

3 participants