Skip to content

fix: ensure base reserve is returned and storage is cleared on expiration (#29)#63

Open
Ummi-001 wants to merge 1 commit into
bridgelet-org:mainfrom
Ummi-001:feat/return-base-reserve
Open

fix: ensure base reserve is returned and storage is cleared on expiration (#29)#63
Ummi-001 wants to merge 1 commit into
bridgelet-org:mainfrom
Ummi-001:feat/return-base-reserve

Conversation

@Ummi-001
Copy link
Copy Markdown
Contributor

Closes #29

Overview

This PR addresses issue #29 by fixing the account expiration lifecycle handler to explicitly ensure payment funds are accompanied by the proper reserve state return processing, alongside clean storage deletion of payment tracking data.

Changes Made

  • Modified the expire function inside contracts/ephemeral_account/src/lib.rs.
  • Added a call to storage::clear_all_payments(&env) immediately after calculating the final balance to safely clear out state footprint data.
  • Enforced single-return logic to prevent double-returns or redundant accounting updates on already expired or swept addresses.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Return Base Reserve on Expiration

1 participant