Skip to content

Conversation

@sumitsnk
Copy link
Contributor

@sumitsnk sumitsnk commented Feb 4, 2022

This PR partially resolves ticket SNO-117. It comprises

  1. The redux state's persistence and handling of the lost callback
  2. Handle pending transactions to show after refresh.
  3. Handling event nonce to synchronize the application state

@netlify
Copy link

netlify bot commented Feb 4, 2022

✔️ Deploy Preview for snowbridge-web ready!

🔨 Explore the source changes: 7ec0844

🔍 Inspect the deploy log: https://app.netlify.com/sites/snowbridge-web/deploys/622867dc1ca8000007b80e21

😎 Browse the preview: https://deploy-preview-76--snowbridge-web.netlify.app/

@sumitsnk sumitsnk marked this pull request as ready for review February 25, 2022 05:16
@@ -1,2 +1,2 @@
REACT_APP_NODE_CONFIG_ENV=staging
REACT_APP_INFURA_KEY=''
REACT_APP_INFURA_KEY=e9d88f4871b04add8ab3dbfd71b70877
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add .env to the gitignore? Also our Infura key is being leaked again :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I've included it; however, I need to push it to ensure that the UI is working properly with stagging.

@musnit
Copy link
Contributor

musnit commented Mar 7, 2022 via email

Comment on lines 10 to 11
top:0;
position:fixed;
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: CSS formatting

Suggested change
top:0;
position:fixed;
top: 0;
position: fixed;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, updated code.

HEALTH_CHECK_POLKADOT_POLL_SKIP_BLOCKS: 500,

//Provider for listening ethereum events
ETHEREUM_WEB_SOCKET__PROVIDER: 'ws://localhost:8546',
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Double underscore.

Suggested change
ETHEREUM_WEB_SOCKET__PROVIDER: 'ws://localhost:8546',
ETHEREUM_WEB_SOCKET_PROVIDER: 'ws://localhost:8546',

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your help.I've adjusted the code to reflect your suggestions.

src/net/eth.ts Outdated
// handles the missed Ethereum events (MessgaeDispatched) for the transactions for basic/Incentivized Ethereum contracts and updates tx-nonce by comparing with latest channel nonce.
dispatch(handleEthereumMissedEvents(web3));

}, 5000);
Copy link
Contributor

Choose a reason for hiding this comment

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

The interval time should be configurable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, defiantly.

src/net/eth.ts Outdated
let transactions = store.getState().transactions.transactions;
pendingTxCount = pendingEventTransactions(transactions);
if (pendingTxCount === 0)
clearInterval(interval);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Incorrect formatting here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

src/net/eth.ts Outdated
let stateData:any = store.getState();
if(stateData && stateData.transactions && stateData.transactions.transactions.length>0) {
let pendingTxCount = pendingEventTransactions(stateData.transactions.transactions);
if (pendingTxCount == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Use ===.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I've adjusted the code to reflect your suggestions.

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