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

fix(transfer): remove 80% onchain cap, misc fixes #2406

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Conversation

pwltr
Copy link
Collaborator

@pwltr pwltr commented Dec 17, 2024

Description

  • remove 80% onchain cap for channel orders, now uses fee estimation from LSP and adds that to the spendable onchain balance
  • add CJIT max amount client validation

Linked Issues/Tasks

Closes #2393 #2249

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (improving code without creating new functionality)

Tests

  • Detox test
  • Unit test
  • No test

Screenshot / Video

Simulator.Screen.Recording.-.iPhone.16.-.2024-12-17.at.16.01.55.mp4

QA Notes

Because the LSP service fee estimation when calculating the max amount is slightly lower than the actual there will be a dust output leftover which is added to the onchain fee.

}

return ok(buyChannelData);
return ok(order);
Copy link
Collaborator Author

@pwltr pwltr Dec 17, 2024

Choose a reason for hiding this comment

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

The transaction is already setup correctly and the amount validated in the beginning of the transfer flow so this can be simplified to only updating the recipient address and amount.

@pwltr pwltr marked this pull request as ready for review December 17, 2024 15:19
@pwltr pwltr requested a review from coreyphillips December 17, 2024 15:19
@pwltr pwltr merged commit a34400c into master Dec 18, 2024
7 checks passed
@pwltr pwltr deleted the fix/transfer-fixes branch December 18, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants