Skip to content

feat/PRO-2845/transaction-history-new#209

Merged
RanaBug merged 3 commits intostagingfrom
feat/PRO-2845/transaction-history-new
Dec 10, 2024
Merged

feat/PRO-2845/transaction-history-new#209
RanaBug merged 3 commits intostagingfrom
feat/PRO-2845/transaction-history-new

Conversation

@RanaBug
Copy link
Collaborator

@RanaBug RanaBug commented Dec 9, 2024

Description

  • New api endpoint with transaction hash and block explorer link
  • Filtering option by chain id

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • 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 change)

@RanaBug RanaBug requested a review from IAmKio December 9, 2024 16:49
@RanaBug RanaBug self-assigned this Dec 9, 2024
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 9, 2024

Deploying x with  Cloudflare Pages  Cloudflare Pages

Latest commit: d5a1071
Status: ✅  Deploy successful!
Preview URL: https://b7eff6dd.x-e62.pages.dev
Branch Preview URL: https://feat-pro-2845-transaction-hi.x-e62.pages.dev

View logs

@github-actions github-actions bot temporarily deployed to Preview (feat/PRO-2845/transaction-history-new) December 9, 2024 17:44 Inactive
Copy link
Collaborator

@IAmKio IAmKio left a comment

Choose a reason for hiding this comment

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

Just a few minor points but other than that it's looking good!

src/types/api.ts Outdated
incoming: Transaction[];
};

export type Transaction = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you rename this to FlairTransaction please? The reason for this is because this data type is specific to Flair and we will have different shapes of transactions from Etherscan, for example. In that scenario there would be an additional type called EtherscanTransaction and it would be easier to differentiate between the two 🙏

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Comment on lines 15 to 32
const allChainsOptions = [
{
chainId: 1,
chainName: 'Ethereum',
},
{
chainId: 137,
chainName: 'Polygon',
},
{
chainId: 8453,
chainName: 'Base',
},
{
chainId: 100,
chainName: 'Gnosis',
},
];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this belong in utils/blockchain.ts? Looks useful to be used elsewhere

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah fair enough, I moved it to utils

Comment on lines 90 to 91
? '#8A77FF'
: '#e2ddff4d'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should these be moved to the theme?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Theme is for styledComponents and I used tailwind for this component, but I can add this to tailwind config yes


const sortedTransactions = allTransactions.sort(
(a, b) => b.timestamp - a.timestamp
const transactions = (history as TransactionHistory).results;
Copy link
Collaborator

Choose a reason for hiding this comment

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

May be worth checking here that .results exists before continuing

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes good point, added a '?' to check

Copy link
Collaborator

@IAmKio IAmKio left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@RanaBug RanaBug merged commit 19366dc into staging Dec 10, 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.

2 participants