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

#882 | clearing the address url parameter on internal transactions navigation #930

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Viterbo
Copy link
Collaborator

@Viterbo Viterbo commented Jan 8, 2025

Fixes #882

Description

The address parameter seemed to update after the query was made so even when you click on the internal transactions button (with no address filter) it does not change the filter until the second click to keep on navigating (It takes a delayed effect).

This PR adds a little bouncing to wait for the address parameter to update before performing the actual query so now it make it with the correct address filter.

Test scenarios

1 - visit this link with address filter:
https://deploy-preview-930--dev-mainnet-teloscan.netlify.app/txsinternal?a=0xa30b5e3c8Fee56C135Aecb733cd708cC31A5657a&page=7,10
image

2 - Click on Internal Transaction under Blockchain menu:
image

@Viterbo Viterbo self-assigned this Jan 8, 2025
Copy link

netlify bot commented Jan 8, 2025

Deploy Preview for testnet-teloscan ready!

Name Link
🔨 Latest commit 4d37a32
🔍 Latest deploy log https://app.netlify.com/sites/testnet-teloscan/deploys/679d3fa45f81dd00082b8145
😎 Deploy Preview https://deploy-preview-930--testnet-teloscan.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 8, 2025

Deploy Preview for teloscan-stage ready!

Name Link
🔨 Latest commit 4d37a32
🔍 Latest deploy log https://app.netlify.com/sites/teloscan-stage/deploys/679d3fa4872fee000899d0be
😎 Deploy Preview https://deploy-preview-930--teloscan-stage.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 8, 2025

Deploy Preview for dev-mainnet-teloscan ready!

Name Link
🔨 Latest commit 4d37a32
🔍 Latest deploy log https://app.netlify.com/sites/dev-mainnet-teloscan/deploys/679d3fa4cc19120008ac96c9
😎 Deploy Preview https://deploy-preview-930--dev-mainnet-teloscan.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 8, 2025

Deploy Preview for zkevm-testnet ready!

Name Link
🔨 Latest commit 4d37a32
🔍 Latest deploy log https://app.netlify.com/sites/zkevm-testnet/deploys/679d3fa4cc19120008ac96cb
😎 Deploy Preview https://deploy-preview-930--zkevm-testnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Viterbo Viterbo changed the title clearing the address url parameter on internal transactions navigation #882 | clearing the address url parameter on internal transactions navigation Jan 17, 2025
@pmjanus
Copy link
Contributor

pmjanus commented Jan 20, 2025

The deploy link is not working for me as on the image, when i click on the nav bar blockchain -> internal transactions after visiting https://deploy-preview-930--dev-mainnet-teloscan.netlify.app/txsinternal?a=0xa30b5e3c8Fee56C135Aecb733cd708cC31A5657a&page=7,10
the site still does not update the tab correctly.

2025-01-20.06-36-02.mov

@Viterbo
Copy link
Collaborator Author

Viterbo commented Jan 31, 2025

The deploy link is not working for me as on the image, when i click on the nav bar blockchain -> internal transactions after visiting https://deploy-preview-930--dev-mainnet-teloscan.netlify.app/txsinternal?a=0xa30b5e3c8Fee56C135Aecb733cd708cC31A5657a&page=7,10 the site still does not update the tab correctly.

This is the interaction I get when I go to the Internal Transaction entry from the top menu.
Starting from this URL: https://deploy-preview-930--dev-mainnet-teloscan.netlify.app/txsinternal?a=0xa30b5e3c8Fee56C135Aecb733cd708cC31A5657a&page=7,10

teloscan--internal-transactions.webm

Comment on lines -277 to -294
toggleAllExpanded() {
this.allExpanded = !this.allExpanded;
this.rows.forEach((row) => {
row.expand = this.allExpanded;
});
this.saveAllExpanded();
},
loadAllExpanded() {
// we look for the local Storage to see if the user has already expanded all the rows
const allExpanded = localStorage.getItem('allExpanded');
if (allExpanded) {
this.allExpanded = allExpanded === 'true';
}
},
saveAllExpanded() {
// we save the state of the allExpanded variable in the local storage
localStorage.setItem('allExpanded', this.allExpanded);
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

housekeeping

Comment on lines -299 to -303
if(row.get("timeStamp") != null){
long epoch = FormatterUtils.getEpochFromSQLTimestamp(row.get("timeStamp").toString());
row.replace("timeStamp", epoch);
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

housekeeping. Code out of place

Comment on lines +144 to +151
clearPagination() {
this.pagination = {
...this.pagination,
page: 1,
rowsPerPage: this.initialPageSize,
rowsNumber: 0,
};
},
Copy link
Collaborator Author

@Viterbo Viterbo Jan 31, 2025

Choose a reason for hiding this comment

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

clearPagination() - second part of the fix

Comment on lines +138 to +141
// each time the address changes, we clear the pagination
address() {
this.clearPagination();
},
Copy link
Collaborator Author

@Viterbo Viterbo Jan 31, 2025

Choose a reason for hiding this comment

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

watch address property - part of the fix (to the number of the total rows)

Comment on lines +169 to +172
} else {
// we are in the first page loading for the first time, so we clear the pagination
this.clearPagination();
}
Copy link
Collaborator Author

@Viterbo Viterbo Jan 31, 2025

Choose a reason for hiding this comment

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

clearPagination() when there's no pagination parameter in the URL - the final part of the fix

@@ -7,7 +7,6 @@ export default boot(({ app }) => {

const defaultNetwork = Object.keys(evmSettings)[0];
let network = new URLSearchParams(window.location.search).get('network') ?? process.env.NETWORK_EVM_NAME;
console.log('Multichain initMultichain()', { network, NETWORK_EVM_NAME: process.env.NETWORK_EVM_NAME });
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

housekeeping

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