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

dapp-feat: Transaction History Support feature complete (#368) #397

Merged
merged 6 commits into from
Sep 14, 2023

Conversation

quiet-node
Copy link
Member

Description:
This PR includes the addition of transactionType and transactionTimeStamp to all HTS and ERC20 methods, in preparation for the /activity page. Additionally, it includes the /activity page to complete the transaction history support feature.

Related issue(s): #368

Fixes #368

** UI Demo **:

Screen.Recording.2023-09-13.at.4.52.11.PM.mov

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@quiet-node quiet-node added enhancement New feature or request P2 Tooling tooling labels Sep 13, 2023
@quiet-node quiet-node added this to the 0.5.0 milestone Sep 13, 2023
@quiet-node quiet-node self-assigned this Sep 13, 2023
@quiet-node quiet-node requested a review from a team as a code owner September 13, 2023 21:53
@github-actions
Copy link

github-actions bot commented Sep 13, 2023

Test Results

197 tests  ±0   191 ✔️ ±0   6m 36s ⏱️ -10s
  62 suites ±0       6 💤 ±0 
  13 files   ±0       0 ±0 

Results for commit 572b1cb. ± Comparison against base commit 0566f51.

♻️ This comment has been updated with latest results.

@@ -78,8 +78,13 @@ describe('getERC20TokenInformation', () => {

describe('erc20Mint', () => {
// Mock baseContract object
const txHash = '0x63424020a69bf46a0669f46dd66addba741b9c02d37fab1686428f5209bc759d';
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: make this a class constant so you don't have to create it in each describe/test

const key = localStorage.key(i);

// only include item with KEY includes 'HEDERA' and NOT include 'READONLY'
if (key?.includes('HEDERA') && !key?.includes('READONLY')) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Q: what's the logic here?
Is this filtering out transactions that didn't go through consensus?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's right. There are some cases in ERC20 or ERC721 where the contract methods are view functions so I marked them with READONLY flag. These READONLY transaction results do not have a txHash but just the readonly results, and that's why I didn't include it in the /activity page.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please open a ticket for this. I think it'd be good to capture these actually.
If the format matches the transactions I would say add them in follow up. Just add a column to capture TRANSACTION / QUERY.
If it currently doesn't match we can schedule for later

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah I see. Unfortunately, the READONLY transactions currently do not have the same structure as other transactions so I'll open a ticket for this

@quiet-node quiet-node force-pushed the 368-Transaction-History-Support-feature branch from 16de7a4 to c22f8e3 Compare September 14, 2023 01:37
@quiet-node quiet-node merged commit 876dd1c into main Sep 14, 2023
19 checks passed
@quiet-node quiet-node deleted the 368-Transaction-History-Support-feature branch September 14, 2023 20:20
mshakeg pushed a commit to mshakeg/hedera-smart-contracts that referenced this pull request Oct 14, 2023
… (hashgraph#397)

* dapp-feat: added transactionType & transactionTimeStamp to all HTS methods' transaction results

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-feat: added transactionType & transactionTimeStamp to all ERC20 methods' transaction results

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-feat: transaction history support feature complete

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-fix: fixed repeated import statements

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-update: added constants.ts holding multiple shared variables

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-update: replaced txHash with MOCK_TX_HASH in erc20 tests

Signed-off-by: Logan Nguyen <[email protected]>

---------

Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Mo Shaikjee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2 Tooling tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[System Contract DApp] Transaction History Support feature
2 participants