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/transaction history #863

Merged
merged 15 commits into from
Nov 6, 2023
Merged

Feat/transaction history #863

merged 15 commits into from
Nov 6, 2023

Conversation

tobi-bams
Copy link
Contributor

Describe your changes

Issue ticket number and link

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested on Chrome and Firefox
  • I have tested on a mobile device

@tobi-bams tobi-bams linked an issue Oct 31, 2023 that may be closed by this pull request
@elraphty
Copy link
Contributor

elraphty commented Nov 2, 2023

@tobi-bams please the Withdraw text does not have any padding Withdraw

@elraphty
Copy link
Contributor

elraphty commented Nov 2, 2023

@tobi-bams also fix the merge conflicts

@tobi-bams
Copy link
Contributor Author

@tobi-bams please the Withdraw text does not have any padding Withdraw

This is because the name field is displaying a pubkey rather than an actual name, if it's a pubkey I will change it to what we have below

@ecurrencyhodler
Copy link
Contributor

@tobi-bams is that because it's pulling from fake data? We have names stored in our backend. I also don't see a receiver info in the screenshot raph posted.

@tobi-bams
Copy link
Contributor Author

@tobi-bams is that because it's pulling from fake data? We have names stored in our backend. I also don't see a receiver info in the screenshot raph posted.

Yes, that's the reason. But Raphael said users using lnauth have their Pubkey as their name.

Also, for deposit and Withdrawal, we don't have receivers. Only payment has receivers.

@ecurrencyhodler
Copy link
Contributor

@tobi-bams ah that makes sense. Thanks for explaining.

Let me sync with Milan and get back to you soon.

@ecurrencyhodler
Copy link
Contributor

@tobi-bams I have an update. Let's restrict the width of the displayed name by width. Then let's have a tooltip pop up that displays the whole name. I've highlighted an example in the image below.
Payment History

You can find this in figma here.

Copy link
Contributor

@kevkevinpal kevkevinpal left a comment

Choose a reason for hiding this comment

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

lgtm just small issues that I can deal with myself will try to merge today

Comment on lines +11 to +18
export const formatSat = (sat: number) => {
if (sat === 0 || !sat) {
return '0';
}
const satsWithComma = sat.toLocaleString();
const splittedSat = satsWithComma.split(',');
return splittedSat.join(' ');
};
Copy link
Contributor

Choose a reason for hiding this comment

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

We want to write tests for this but I don't think we have jest working yet

Copy link
Contributor

Choose a reason for hiding this comment

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

We want to write tests for this but I don't think we have jest working yet

@tobi-bams Why not use this function in helpers.ts convertToLocaleString instead of creating a new function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@elraphty convertToLocaleString is returning something else compared to what I want.

type={'checkbox'}
checked={filter.payment}
onChange={() => handleFilter('payment')}
/>{' '}
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure why {' '} is here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm my editor always adds this, I will remove it manually

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm my editor always adds this, I will remove it manually

type={'checkbox'}
checked={filter.deposit}
onChange={() => handleFilter('deposit')}
/>{' '}
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure why {' '} is here

type={'checkbox'}
checked={filter.withdraw}
onChange={() => handleFilter('withdraw')}
/>{' '}
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure why {' '} is here

@tobi-bams
Copy link
Contributor Author

lgtm just small issues that I can deal with myself will try to merge today

Please don't merge, currently pushing a fix for lnurk users

@tobi-bams
Copy link
Contributor Author

@kevkevinpal you can merge now I also removed the empty strings {' '}

@ecurrencyhodler I also added a tool tip when a users name is so long

@kevkevinpal kevkevinpal merged commit fcc0411 into master Nov 6, 2023
4 checks passed
@ecurrencyhodler
Copy link
Contributor

ecurrencyhodler commented Nov 7, 2023

Screenshot 2023-11-06 at 6 19 06 PM

@tobi this looks really good and I can easily click on bounties.

Is there a limit to viewing the txn history such amount of rows? I can't seem to see deposits into the org.

@ecurrencyhodler
Copy link
Contributor

@tobi-bams okay the date seems to pull the time the bounty was created but we need it to display the time it was paid. Also it'd be great if we can get the format in MM/DD/YYYY. I'll create a separate issue.

@ecurrencyhodler ecurrencyhodler mentioned this pull request Nov 7, 2023
5 tasks
@tobi-bams
Copy link
Contributor Author

Screenshot 2023-11-06 at 6 19 06 PM @tobi this looks really good and I can easily click on bounties.

Is there a limit to viewing the txn history such amount of rows? I can't seem to see deposits into the org.

There are no limits to the number of rows for now, you can't see previous deposits because @elraphty had to create a new table on the backend to accommodate the new design and he is yet to write a migration script to populate the new table with previous data.

@tobi-bams
Copy link
Contributor Author

@tobi-bams okay the date seems to pull the time the bounty was created but we need it to display the time it was paid. Also it'd be great if we can get the format in MM/DD/YYYY. I'll create a separate issue.

@elraphty please can you return the date the bounty was paid??

@ecurrencyhodler
Copy link
Contributor

Okay thanks @tobi-bams. I actually think we should keep the no limit for now.

elraphty pushed a commit that referenced this pull request Jan 26, 2024
* feat: transaction history table new design

* update: updated UI with more style

* feat: filter payments by

* update: payment history display properly

* update: payment history filter

* feat: make table responsive

* feat: format sats  to display as in design

* update: added format name function to shorten lnauth user name

* feat: added a tooltip for users with pubkey as username

* update: removed empty strings

* fix: fixed some eslint issue
@Evanfeenstra Evanfeenstra deleted the feat/transaction-history branch January 26, 2024 17:56
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.

Update transaction history in organization
4 participants