-
Notifications
You must be signed in to change notification settings - Fork 2
State persist for handling pending transactions #76
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
base: main
Are you sure you want to change the base?
Conversation
|
✔️ 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/ |
| @@ -1,2 +1,2 @@ | |||
| REACT_APP_NODE_CONFIG_ENV=staging | |||
| REACT_APP_INFURA_KEY='' | |||
| REACT_APP_INFURA_KEY=e9d88f4871b04add8ab3dbfd71b70877 | |||
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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.
|
it's already leaked now - we'll need to update to a new one...
…On Mon, Mar 7, 2022 at 6:44 AM Vincent Geddes ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In .env
<#76 (comment)>
:
> @@ -1,2 +1,2 @@
REACT_APP_NODE_CONFIG_ENV=staging
-REACT_APP_INFURA_KEY=''
+REACT_APP_INFURA_KEY=e9d88f4871b04add8ab3dbfd71b70877
Can you add .env to the gitignore? Also our Infura key is being leaked
again :)
—
Reply to this email directly, view it on GitHub
<#76 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVTOMVRI4UND6SPWQENM3U6XT3JANCNFSM5NSABR3A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
| top:0; | ||
| position:fixed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: CSS formatting
| top:0; | |
| position:fixed; | |
| top: 0; | |
| position: fixed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, updated code.
src/config-local.tsx
Outdated
| HEALTH_CHECK_POLKADOT_POLL_SKIP_BLOCKS: 500, | ||
|
|
||
| //Provider for listening ethereum events | ||
| ETHEREUM_WEB_SOCKET__PROVIDER: 'ws://localhost:8546', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Double underscore.
| ETHEREUM_WEB_SOCKET__PROVIDER: 'ws://localhost:8546', | |
| ETHEREUM_WEB_SOCKET_PROVIDER: 'ws://localhost:8546', |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Incorrect formatting here.
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use ===.
There was a problem hiding this comment.
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.
This PR partially resolves ticket SNO-117. It comprises