-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Confirm only a tx that wasn't already confirmed #301
Conversation
8d28dff
to
1c1b657
Compare
e61f1a9
to
5c9525c
Compare
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat is new author?A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package. Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights. What is network access?This module accesses the network. Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use. What is unstable ownership?A new collaborator has begun publishing package versions. Package stability and security risk may be elevated. Try to reduce the amount of authors you depend on to reduce the risk to malicious actors gaining access to your supply chain. Packages should remove inactive collaborators with publishing rights from packages on npm. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
src/SmartTransactionsController.ts
Outdated
@@ -126,6 +136,7 @@ export default class SmartTransactionsController extends StaticIntervalPollingCo | |||
getNonceLock: any; | |||
provider: Provider; | |||
confirmExternalTransaction: any; | |||
getTransactions: any; |
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 we make this type the same as this.getRegularTransactions
, if they are indeed the same type?
f2d7638
to
b90d084
Compare
Add "getTransactions" to a test file Update types Update types Update a test Remove a comment Refactor logic for checking a confirmed transaction Update a condition Update a check if a transaction needs confirmation Add a check Update type for "minedHash", refactoring
b90d084
to
56d6df3
Compare
Description
When used outside of Swaps, the TransactionController usually confirms completed smart transactions, unless a user closes a browser before a smart transaction is completed. We only want to call the
confirmExternalTransaction
function if a transaction wasn't already confirmed.