-
Notifications
You must be signed in to change notification settings - Fork 60
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
Counterfactual Safes deletion endpoints #1795
Conversation
…controller.spec.ts Co-authored-by: Aaron Cook <aaron@safe.global>
…controller.spec.ts Co-authored-by: Aaron Cook <aaron@safe.global>
…controller.ts Co-authored-by: Aaron Cook <aaron@safe.global>
…unterfactual-safe.builder.ts Co-authored-by: Aaron Cook <aaron@safe.global>
Pull Request Test Coverage Report for Build 10217581347Details
💛 - Coveralls |
).not.toHaveBeenCalled(); | ||
}); | ||
|
||
it('returns 403 if chain_id is not a valid chain ID', async () => { |
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.
What do you think about adding another test case that ensure the token is valid if signed on a different chain?
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.
Added in 650d3f6
src/routes/accounts/counterfactual-safes/counterfactual-safes.controller.spec.ts
Show resolved
Hide resolved
@@ -584,4 +584,337 @@ describe('CounterfactualSafesController', () => { | |||
).not.toHaveBeenCalled(); | |||
}); | |||
}); | |||
|
|||
describe('Delete Counterfactual Safe', () => { | |||
it('should delete a Counterfactual Safe', async () => { |
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.
We should add test coverage regarding a datasource error. These assume that deletion was successful.
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.
Added in 650d3f6 (I've added that test also to the rest of endpoints)
Depends on #1789
Summary
This PR adds a subset of the Counterfactual Safes storage controller endpoints. Specifically:
The first one deletes an existing Counterfactual Safe by the creator's account address, the chain ID, and the predicted address of the Safe to be deployed.
The second deletes all the Counterfactual Safes associated with the address, i.e.: the address being the creator of the Counterfactual Safes.
Changes
DELETE /v1/accounts/:address/storage/counterfactual-safes/:chainId/:predictedAddress
DELETE /v1/accounts/:address/storage/counterfactual-safes