Skip to content

transactions - new page #498

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 45 commits into from
Aug 20, 2025
Merged

Conversation

pandablue0809
Copy link
Member

@pandablue0809 pandablue0809 requested a review from ihomp July 28, 2025 20:36
Copy link
Member

@ihomp ihomp left a comment

Choose a reason for hiding this comment

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

That looks like a copy of the old PHP code—we don't need that.
PHP has great functionality, and we need to have the same functionality. but the code is very messy; we shouldn't copy it.

We have the nice and clean code for /transaction/ - most of the utils we need are already in use there, and the structure is nice there; we need the same just for /transactions/

we don't need to copy php, we need to write a new code from scratch.
you should relay or xrpl documentation, rather than old php code.
Php code is needed, not miss all the functionaly we had there..
we need all the functionality we had in php plus all the new one according the documentaton, whcih is missed in php.

the structure should be similiar to /transaction/ - means
we have a component for common firlds between different transactions.
like transaction hash, time and date etc

then we need to have separate components for different transactions types.

@ihomp
Copy link
Member

ihomp commented Jul 31, 2025

Right now, it is the same mess as we had in PHP - we won't merge it unless it is structured.

Copy link
Member

@ihomp ihomp left a comment

Choose a reason for hiding this comment

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

Please return the comments and answer some questions.

@pandablue0809 pandablue0809 requested a review from ihomp August 8, 2025 12:38
@ihomp
Copy link
Member

ihomp commented Aug 9, 2025

const [pageFiatRate, setPageFiatRate] = useState(0)

  useEffect(() => {
    if (!selectedCurrency || !tx?.outcome) return
    const { ledgerTimestamp } = tx?.outcome
    if (!ledgerTimestamp) return

    fetchHistoricalRate({ timestamp: ledgerTimestamp * 1000, selectedCurrency, setPageFiatRate })
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, [selectedCurrency, tx])

This code is repeated in many transaction types, as many of them need the historical price. (we shouldn't not copy-paste the code to different places)
You should better subtract it from each tx Card and include it in the Card , it already has the tx and selectedCurrency
then pageFiatRate can be passed into tx cards.

@ihomp
Copy link
Member

ihomp commented Aug 9, 2025

If we reuse some functions from the /transaction/ for /transactions/, they would need to be subtracted as well, not copy-pasted, but that can be done later in a separate PR, For now we just focus on the structure.

Copy link
Member

@ihomp ihomp left a comment

Choose a reason for hiding this comment

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

Subtract the same code from each component to one level up and reuse it.

@pandablue0809 pandablue0809 requested a review from ihomp August 12, 2025 07:13
@pandablue0809
Copy link
Member Author

@ihomp
I fixed

Copy link
Member

@ihomp ihomp left a comment

Choose a reason for hiding this comment

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

There are many things to fix, but we will address them in separate tickets

@ihomp ihomp merged commit 0f5ff7c into Bithomp:main Aug 20, 2025
@pandablue0809 pandablue0809 deleted the feat/445/transactions-page branch August 21, 2025 03:37
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.

2 participants