Skip to content

Conversation

@jinoosss
Copy link
Member

@jinoosss jinoosss commented Sep 3, 2025

What type of PR is this?

feature

What this PR does:

This PR enhances the wallet's transaction processing capabilities by implementing support for proper storage deposit event parsing and handling.

Key Changes:

  1. Updated Storage Deposit Event Types:

    • Changed event type identifiers from legacy format (StorageDeposit, UnlockDeposit) to proper protobuf type URLs (/tm.StorageDepositEvent, /tm.StorageUnlockEvent)
  2. Improved Event Parsing Logic:

    • Replaced manual attribute parsing with proper protobuf decoding using StorageDepositEvent and StorageUnlockEvent
    • Simplified parsing by directly accessing bytes_delta and fee_delta/fee_refund fields from decoded events
    • Removed complex string parsing logic for storage usage calculation
  3. Streamlined Data Processing:

    • Storage deposits now use absolute values of fee_delta and bytes_delta directly
    • Eliminated the need for custom parseStorageUsage function
    • Improved accuracy in storage cost calculations

@jinoosss jinoosss requested a review from a team as a code owner September 3, 2025 06:15
@jinoosss jinoosss changed the title Feat/support-storage-deposit-event feat: support storage deposit event Sep 3, 2025
@jinoosss jinoosss merged commit 23e5552 into main Sep 5, 2025
2 checks passed
@jinoosss jinoosss deleted the feat/support-storage-deposit-event branch September 5, 2025 10:23
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.

2 participants