Skip to content

#528 refactor Wallet Connection : Bug Fix#552

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
A5cend-dev:refactor-wallet-connection
May 28, 2026
Merged

#528 refactor Wallet Connection : Bug Fix#552
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
A5cend-dev:refactor-wallet-connection

Conversation

@A5cend-dev
Copy link
Copy Markdown
Contributor

Description

Refactored and fixed wallet connection handling across Starknet and MetaMask integrations to improve reliability, provider isolation, and transaction validation behavior.

The update improves wallet validation by allowing either a Starknet or MetaMask extension to satisfy connection requirements, preventing unrelated wallet providers from being blocked when Starknet is unavailable. The wallet connection hook was updated to perform dynamic validation checks during connection attempts instead of relying on stale initialization state.

MetaMask account and chain change listeners were isolated to only affect MetaMask sessions, preventing EVM events from unintentionally disconnecting or overriding Starknet connection state. Wallet connection error handling was also improved by enabling the dismiss action for all active wallet errors instead of limiting it to installation-related messages.

Transaction validation logic in TransactionManager.tsx was refactored to support provider-aware address validation for both Starknet and EVM address formats. Decimal and amount serialization was also improved using safe integer math (BigInt and Math.round) to prevent floating-point precision and exponent formatting issues in hexadecimal outputs.

Additional unit and component test coverage was added for wallet connection behavior, event isolation, rendering validation, and error dismissal handling. Documentation artifacts including walkthrough.md were completed, and all related implementation tasks were marked as finished in task.md.

Related Issue

Closes #528

Type of Change

Bug fix and refactor focused on wallet connection reliability, provider compatibility, transaction validation, and testing improvements.

Notes

The implementation includes both hook-level and component-level test coverage for critical wallet interaction flows. The refactor preserves existing functionality while improving connection stability and reducing provider-specific side effects.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 28, 2026

@A5cend-dev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER RUKAYAT-CODER merged commit 5b9e22e into rinafcode:main May 28, 2026
4 of 6 checks passed
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.

refactor Wallet Connection : Bug Fix

2 participants