Skip to content

Implement CSV export for channels and swaps #42

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

Merged
merged 3 commits into from
May 23, 2020
Merged

Conversation

jamaljsr
Copy link
Member

Closes #26

Note: This branch is based on PR #41. Only the last two commits are new

This PR implements CSV exporting of channels and swaps from the client side.

Steps to Test:

  1. From the Loop page, click on the download icon to export the channels
  2. Open the downloaded file and verify the data is what you expected
  3. Go to the History page and click on the download icon to export the swaps
  4. Open the downloaded file and verify the data is what you expected

Sample File Content

channels.csv

Channel ID,Remote Pubkey,Capacity,Local Balance,Remote Balance,Active,Uptime Percent
"170424302370816","0221d0c3a8a3d810514e902abaf7f7314a151ffce722ff87244a0339cca2d63bb8","2000000","390950","1600000","true","100"
"157230162837504","02d5844e6c781cb3927e2c5ccf6a26adade03cb9fe2a05a10a2d46d50dd4f93dd9","8000000","1990829","6000121","true","100"
"150633093070848","03fd97474010e464d61a90862bae7877413248786ae4c935e692559d4742945468","10000000","4990950","5000000","true","100"
"124244814004224","03fd97474010e464d61a90862bae7877413248786ae4c935e692559d4742945468","15000000","9990950","5000000","true","100"
"163827232604160","02d5844e6c781cb3927e2c5ccf6a26adade03cb9fe2a05a10a2d46d50dd4f93dd9","12000000","8040834","3950116","true","100"
"177021372137472","0221d0c3a8a3d810514e902abaf7f7314a151ffce722ff87244a0339cca2d63bb8","1800000","1620950","170000","true","100"

swaps.csv

"ID","Type","Amount","Status","Created On","Updated On"
"cee9d20623bc62ab5d8a7349f293f889f4d0825f20c1b13c0713171c6e7eb40a","Loop Out","950000","Success","5/19/2020 2:08:49 PM","5/19/2020 2:09:14 PM"
"fde8542ae8c393418cb63dd46cb4a79191838994dfe3ab2d99b4dac19ecd26f8","Loop In","1000000","Success","5/19/2020 2:05:22 PM","5/19/2020 2:05:59 PM"

@jamaljsr jamaljsr merged commit 16c503d into master May 23, 2020
@jamaljsr jamaljsr deleted the feat/csv-export branch May 23, 2020 21:32
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.

Implement CSV downloading of channels and swap history
1 participant