Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If there is a pending transaction in the Safe, the self-sell script overwrites it when creating the
settle
transaction.With these changes, the created transaction will use the nonce that is recommended by the Safe API. This is the same nonce used by the interface to determine the nonce for the next transaction.
I also sneaked in a change in the parameters, since the script is not working unless
--to-token
is explicit.Test Plan
This is difficult to test as the script only works on mainnet (see #74).
I suggest to see that the api call returns the expected nonce.
For example, 0xA03be496e67Ec29bC62F01a428683D7F9c204930 is a Safe that right now has a pending transaction, and you can see that the API output is the expected one: