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: order force withdrawal #110

Merged
merged 6 commits into from
Nov 8, 2024
Merged

Conversation

Vovke
Copy link
Collaborator

@Vovke Vovke commented Oct 31, 2024

No description provided.

@Vovke Vovke linked an issue Oct 31, 2024 that may be closed by this pull request
@Vovke Vovke marked this pull request as ready for review November 1, 2024 10:49
@Vovke Vovke requested review from Slesarew and fluiderson November 1, 2024 10:49
@Vovke Vovke added this to the Milestone 1 milestone Nov 1, 2024
fluiderson
fluiderson previously approved these changes Nov 1, 2024
Copy link
Collaborator

@fluiderson fluiderson left a comment

Choose a reason for hiding this comment

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

All fine, but do we need this in the main branch now if this just marks an order as withdrawn without actually withdrawing from it?

@Vovke
Copy link
Collaborator Author

Vovke commented Nov 3, 2024

All fine, but do we need this in the main branch now if this just marks an order as withdrawn without actually withdrawing from it?

@fluiderson that part still WIP, way more work than expected

@Vovke Vovke requested a review from fluiderson November 7, 2024 07:53
src/chain/payout.rs Outdated Show resolved Hide resolved
src/chain/payout.rs Outdated Show resolved Hide resolved
@Vovke
Copy link
Collaborator Author

Vovke commented Nov 7, 2024

linking issue for upper tx limit
#124

if let Some(native_token) = &chain.native_token {
(native_token.name == *name) && (native_token.decimals == specs.decimals)
} else {
assets = assets
Copy link
Member

Choose a reason for hiding this comment

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

why replace smart retain and any with primitives?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Slesarew, this code takes names for assets from the config, not from a chain. The retain method doesn't allow the mutating of the key value, hence filter_map and then collect.

Copy link
Member

Choose a reason for hiding this comment

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

and why not from the chain? Taking those from chain ensures they will be accepted by chain and things will match as advertised, does it not?

Copy link
Member

Choose a reason for hiding this comment

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

wait. Aren't these two doing exactly same thing?

Copy link
Collaborator

@fluiderson fluiderson Nov 8, 2024

Choose a reason for hiding this comment

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

and why not from the chain? Taking those from chain ensures they will be accepted by chain and things will match as advertised, does it not?

Basically, I just removed checks for asset names from your code. Everything else is the same.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If you don't get why, there's no such thing as an asset name for the Assets pallet in terms of the asset transferring, just IDs. Names are just a metadata for humans there. Now, the daemon user can set the same asset names as on the chain or name them on their own (with the checks, this was impossible). The latter feature was very much requested for testing purposes by the frontend team.

@Slesarew Slesarew merged commit 07178a6 into Kalapaja:main Nov 8, 2024
6 of 7 checks passed
@Vovke Vovke deleted the force-withdrawal branch November 8, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants