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

Bad token detection: only transfer as much as is available #3195

Merged
merged 2 commits into from
Dec 31, 2024

Conversation

MartinquaXD
Copy link
Contributor

Description

The new bad token detection in the driver identified some sell tokens as unsupported although they are perfectly fine
(example order)

The reason is probably that the test transfer the bad token detection currently always uses the order's full signed sell amount. This will fail if the user created a partially fillable order where the sell amount exceeds their current balance.

Changes

Adjusted the test transfer to only transfer the order.partial.available amount (when applicable). This value takes partial fills of the given order and the user's current balance into account.

@MartinquaXD MartinquaXD requested a review from a team as a code owner December 31, 2024 11:06
@MartinquaXD MartinquaXD changed the title Bad token detection only transfers as much as the user has Bad token detection: only transfer as much as is available Dec 31, 2024
Copy link
Contributor

@m-lord-renkse m-lord-renkse left a comment

Choose a reason for hiding this comment

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

nice!

@MartinquaXD MartinquaXD enabled auto-merge (squash) December 31, 2024 11:38
@MartinquaXD MartinquaXD merged commit 68a5bac into main Dec 31, 2024
11 checks passed
@MartinquaXD MartinquaXD deleted the fix-driver-bad-token-detection branch December 31, 2024 11:43
@github-actions github-actions bot locked and limited conversation to collaborators Dec 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants