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(receive): lower cjit LSP balance #1714

Merged
merged 1 commit into from
Apr 23, 2024
Merged

fix(receive): lower cjit LSP balance #1714

merged 1 commit into from
Apr 23, 2024

Conversation

pwltr
Copy link
Collaborator

@pwltr pwltr commented Apr 22, 2024

Description

  • lower CJIT LSP balance to be 2,5 x invoice amount
  • fixes CJIT fee estimation

Linked Issues/Tasks

Closes #1703 #1644

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

QA Notes

Get a CJIT channel, check the "You will receive" amount matches the actual amount received, check that the receive capacity is not at the maximum

@pwltr pwltr linked an issue Apr 22, 2024 that may be closed by this pull request
@coreyphillips
Copy link
Collaborator

Receiving the following errors when attempting to create a CJIT invoice. The "You Will Receive" amount seems to exceed the specified amount. Tapping "Continue" results in "Failed to create cjit entry".
Simulator Screenshot - iPhone 14 Pro - 2024-04-23 at 11 17 27
Simulator Screenshot - iPhone 14 Pro - 2024-04-23 at 11 16 45

@pwltr
Copy link
Collaborator Author

pwltr commented Apr 23, 2024

Receiving the following errors when attempting to create a CJIT invoice. The "You Will Receive" amount seems to exceed the specified amount. Tapping "Continue" results in "Failed to create cjit entry".

Yeah that is because the MINIMUM_AMOUNT is not dynamic yet. Needs to be fixed but not in the scope of this PR. For now you have to put in something larger like 200 000 on staging.

// hardcoded to be above fee (1092)
// TODO: fee is dynamic so this should be fetched from the API
const MINIMUM_AMOUNT = 20000;

@pwltr pwltr merged commit 57f6c2f into master Apr 23, 2024
6 checks passed
@pwltr pwltr deleted the fix/cjit-inbound branch April 23, 2024 15:55
pwltr added a commit that referenced this pull request Apr 25, 2024
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.

[Bug]: decrease inbound liquidity for CJIT Discrepancy with balance received when opening a CJIT
2 participants