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(litd): Add full support for decimal display for TAP assets #1040

Merged
merged 12 commits into from
Nov 29, 2024

Conversation

jamaljsr
Copy link
Owner

Closes #986
Depends on #1039

Description

Adds support for setting the decimal_display field when minting assets. I've also updated all of the labels and input fields to support decimal values when creating addresses, sending assets on-chain, funding asset channels, creating asset invoices, and paying asset invoices.

Steps to Test

First, you'll need to build the docker image using the litd PR branch:

$ cd docker/litd/
$ docker build --build-arg LITD_VERSION=update-to-lnd-18-4 -t polarlightning/litd:0.14.0-pre1 -f src.Dockerfile --no-cache .

Then in Polar:

  1. Create a new network with 4 litd nodes
  2. Mint a PUSD asset with a 100,050 supply using 2 decimal places
  3. Create an 500.25 PUSD asset address on carol
  4. Send PUSD to that address from alice
  5. Open a 400.50 PUSD asset channel from alice to bob
  6. Open a 100M sats channel from bob to carol
  7. Open a 400.50 PUSD asset channel from carol to dave
  8. Create a 200.25 PUSD asset invoice on dave
  9. Pay the invoice on alice using PUSD
  10. Confirm the payment completes successfully
  11. Confirm the asset amount labels throughout the app all show values with 2 decimal places

Screenshots

image

@jamaljsr jamaljsr changed the title Tap decimal display feat(litd): Add full support for decimal display on TAP assets Oct 30, 2024
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (d156b1a) to head (9a586b5).
Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #1040   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          151       152    +1     
  Lines         5492      5541   +49     
  Branches      1111      1126   +15     
=========================================
+ Hits          5492      5541   +49     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamaljsr jamaljsr changed the title feat(litd): Add full support for decimal display on TAP assets feat(litd): Add full support for decimal display for TAP assets Oct 30, 2024
@kelvinator07
Copy link
Contributor

LGTM

@jamaljsr jamaljsr merged commit a89e58d into master Nov 29, 2024
5 checks passed
@jamaljsr jamaljsr deleted the tap-decimal-display branch November 29, 2024 21:24
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