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: add pending transaction list on address page #175

Merged
merged 9 commits into from
Dec 21, 2023

Conversation

Keith-CY
Copy link
Member

@Keith-CY Keith-CY commented Dec 12, 2023

Add a tab of pending transactions on the address page

image

Notice that transaction list header may be scrollable based on its actual width
image

Ref: Magickbase/ckb-explorer-public-issues#220

Copy link

vercel bot commented Dec 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ckb-explorer-frontend-in-magickbase-repo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 21, 2023 2:59am

src/pages/Address/styles.module.scss Show resolved Hide resolved
src/pages/Address/index.tsx Outdated Show resolved Hide resolved
src/pages/Address/index.tsx Outdated Show resolved Hide resolved
src/pages/Address/index.tsx Outdated Show resolved Hide resolved
src/models/Transaction/index.ts Show resolved Hide resolved
@FrederLu
Copy link

FrederLu commented Dec 18, 2023

Data inconsistency occurs.
4 pieces of data are displayed in the middle of the tab and api, and 2 pieces of data are displayed in the list. After refreshing the page, the data returns to normal.

2023-12-18.17.42.23.mov

@Keith-CY
Copy link
Member Author

Data inconsistency occurs. 4 pieces of data are displayed in the middle of the tab and api, and 2 pieces of data are displayed in the list. After refreshing the page, the data returns to normal.

2023-12-18.17.42.23.mov

It's possible because total count and list are fetched from 2 different queries.

It should be fixed by dfd8f5d which fetches them with the same query.

@FrederLu
Copy link

Data inconsistency occurs. 4 pieces of data are displayed in the middle of the tab and api, and 2 pieces of data are displayed in the list. After refreshing the page, the data returns to normal.
2023-12-18.17.42.23.mov

It's possible because total count and list are fetched from 2 different queries.

It should be fixed by dfd8f5d which fetches them with the same query.

2023-12-19.10.03.43.mov

Now it should be replaced with the same API, but there will still be out-of-synchronization of list and tab data, as well as page anomalies.

@Keith-CY
Copy link
Member Author

Data inconsistency occurs. 4 pieces of data are displayed in the middle of the tab and api, and 2 pieces of data are displayed in the list. After refreshing the page, the data returns to normal.
2023-12-18.17.42.23.mov

It's possible because total count and list are fetched from 2 different queries.
It should be fixed by dfd8f5d which fetches them with the same query.

2023-12-19.10.03.43.mov
Now it should be replaced with the same API, but there will still be out-of-synchronization of list and tab data, as well as page anomalies.

This error was caused by mismatched cache, and should be fixed by 3ae33e6

@FrederLu
Copy link

A time issue was discovered in the lite version of pending transactions on the address page.
image

@Keith-CY
Copy link
Member Author

A time issue was discovered in the lite version of pending transactions on the address page. image

Got it, it's because a pending transaction doesn't have its block number and timestamp(it's not packaged into a block), the design draft(https://www.figma.com/file/6XNoimRDbFTTNm016rbIdU/Magickbase?type=design&node-id=11495-35230&mode=design&t=wc1k7lf0DYEh7065-0) should be updated accordingly cc @Kirl70

@Keith-CY
Copy link
Member Author

A time issue was discovered in the lite version of pending transactions on the address page. image

Got it, it's because a pending transaction doesn't have its block number and timestamp(it's not packaged into a block), the design draft(figma.com/file/6XNoimRDbFTTNm016rbIdU/Magickbase?type=design&node-id=11495-35230&mode=design&t=wc1k7lf0DYEh7065-0) should be updated accordingly cc @Kirl70

But I also found the timestamp is displayed in the all pending transaction list http://localhost:3000/transaction/list?tab=pending
Is it the timestamp when the transaction is discovered by the service? @rabbitz If yes, I think the timestamp of a pending transaction of a specific address can be the same one

@FrederLu
Copy link

image `CSV Export` needs to be hidden under the `Pending Transactions` tab. It provides data under the `Transactions` tab.

@rabbitz
Copy link

rabbitz commented Dec 19, 2023

A time issue was discovered in the lite version of pending transactions on the address page. image

Got it, it's because a pending transaction doesn't have its block number and timestamp(it's not packaged into a block), the design draft(figma.com/file/6XNoimRDbFTTNm016rbIdU/Magickbase?type=design&node-id=11495-35230&mode=design&t=wc1k7lf0DYEh7065-0) should be updated accordingly cc @Kirl70

But I also found the timestamp is displayed in the all pending transaction list http://localhost:3000/transaction/list?tab=pending Is it the timestamp when the transaction is discovered by the service? @rabbitz If yes, I think the timestamp of a pending transaction of a specific address can be the same one

The time here should show created_at, because the same serialized data structure as transactions committed is used, and the created_at field is missing here.

https://github.com/nervosnetwork/ckb-explorer/blob/6e31433319ac413e22482201be42ac6b8bc21fcf/app/jobs/import_transaction_job.rb#L28-L30

@rabbitz
Copy link

rabbitz commented Dec 19, 2023

Use created_at or create_timestamp as the value of pending transaction time

nervosnetwork/ckb-explorer#1537

@Keith-CY
Copy link
Member Author

Keith-CY commented Dec 20, 2023

The lite transaction list is refactored to make block height field optional, please review again @WhiteMinds
output

@Keith-CY Keith-CY requested a review from WhiteMinds December 20, 2023 15:33
@Keith-CY
Copy link
Member Author

Use created_at or create_timestamp as the value of pending transaction time

nervosnetwork/ckb-explorer#1537

What's the difference between create_timestamp and created_at

@Keith-CY
Copy link
Member Author

Export CSV is hidden by commit 8a8747e @FrederLu

@rabbitz
Copy link

rabbitz commented Dec 21, 2023

Optimize translation for create_timestamp and income: nervosnetwork/ckb-explorer#1538

@Keith-CY Keith-CY added this pull request to the merge queue Dec 21, 2023
Merged via the queue into develop with commit ffd2157 Dec 21, 2023
8 checks passed
@Keith-CY Keith-CY deleted the pending-tx-list-of-address branch December 21, 2023 06:54
@Sven-TBD
Copy link

A related issue post here.
Hi @Keith-CY , could u help check this issue as well?

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.

5 participants