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

Implement withdrawable assets #358

Merged
merged 15 commits into from Mar 28, 2023
Merged

Conversation

Wendrowiec13
Copy link
Contributor

@Wendrowiec13 Wendrowiec13 commented Mar 22, 2023

Resolves L2B-1040

@linear
Copy link

linear bot commented Mar 23, 2023

L2B-1040 Show withdrawable assets

There's design for "Quick Actions" panel that should show on user page when there are actions available due to offer processing or assets being ready to withdraw.

This story is only about showing assets ready for withdrawal.

Implementation details

Assets ready for withdrawal for a given user can be obtained by querying

  • withdrawable_assets table

This table has a history of withdrawable balance changes. It has a balance_detla column which has a positive value when asset becomes ready for withdrawal and a negative value when asset is withdrawn. You should query by stark_key to gather sum(balance_delta)and GROUP BY asset_hash. When the sum > 0, user has withdrawable assets.

Acceptance criteria

  • Withdrawable assets are shown only when owner is logged in
  • On Spot exachange there should be a separate entry for each withdrawable asset

Copy link
Member

@adamiak adamiak left a comment

Choose a reason for hiding this comment

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

Approved, but please rename as requested in the comment.

@Wendrowiec13 Wendrowiec13 added this pull request to the merge queue Mar 28, 2023
Merged via the queue into master with commit f9ee15b Mar 28, 2023
4 checks passed
@Wendrowiec13 Wendrowiec13 deleted the implement-withdrawable-assets branch March 28, 2023 20:04
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