Skip to content

Remove deprecated promises field from PostRestoreResponse#900

Open
coldbrewnosugar wants to merge 1 commit intocashubtc:mainfrom
coldbrewnosugar:remove-deprecated-promises-field
Open

Remove deprecated promises field from PostRestoreResponse#900
coldbrewnosugar wants to merge 1 commit intocashubtc:mainfrom
coldbrewnosugar:remove-deprecated-promises-field

Conversation

@coldbrewnosugar
Copy link

Summary

  • Remove the deprecated promises field from PostRestoreResponse and its __init__ override that duplicated signatures into promises
  • Remove the backwards compatibility shim in the wallet API that copied promises back into signatures
  • Update the deprecated API restore test to assert on signatures instead of promises

The promises field was deprecated in v0.15.1 for compatibility with old cashu-ts clients. cashu-ts completed the same rename in v2.3.0 (PR #234) over a year ago. CDK is also cleaning this up in #1644.

Closes #898

The promises field was deprecated in v0.15.1 for backwards compatibility
with old cashu-ts clients. cashu-ts removed support for this field in
v2.3.0 over a year ago. This removes the field and the associated
compatibility shim in the wallet API.

Closes cashubtc#898
)
data = response.json()
assert "promises" in data
assert "signatures" in data
Copy link
Contributor

Choose a reason for hiding this comment

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

This test_api_restore test should just be removed completely from here. The PostRestoreRequest is already tested in the test_mint_api.py with the signatures field. This test was to ensure the backwards compatibility was still valid in its deprecated state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Remove the old promises field from PostRestoreResponse

2 participants