-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
feat: add Defly Web extension wallet provider #317
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This refactors the Kibisis wallet client to use an extendable `AVMProvider` class, laying the groundwork for future wallet implementations that also use `@agoralabs-sh/avm-web-provider`. - Created new `AVMProvider` abstract class - Refactored `KibisisWallet` to extend `AVMProvider` - Moved common AVM Web Provider functionality to `AVMProvider` - Implemented abstract methods in `KibisisWallet` for Kibisis-specific behavior
- Created new `DeflyWebWallet` class extending `AVMProvider` - Implemented Defly-specific methods for enable, disable, and sign transactions - Added `DEFLY_WEB` to `WalletId` enum and `WalletMap` - Updated utility functions to include Defly Web Wallet
This addresses an issue where certain frameworks are unable to dynamically import `@agoralabs-sh/avm-web-provider` due to module format incompatibilities. - Modified `_initializeAVMWebProviderSDK` method to handle both default and named exports - Ensured compatibility between CommonJS (AVM Web Provider) and ESM (use-wallet)
Extract common AVM Web Provider functionality into abstract base class to support both Kibisis and Defly Web providers. Update implementations to use `algosdk` v3 and new network configuration system. - Create abstract `AVMProvider` class with shared provider logic - Move common methods from Kibisis to `AVMProvider` - Update transaction handling for `algosdk` v3 API - Add network configuration and genesis hash fallback - Implement Defly Web provider using shared base class
Enable proper TypeScript type checking in AVM provider tests by introducing type-safe utility types for testing protected methods. - Remove `@ts-nocheck` comments from Defly Web and Kibisis tests - Add `TestableDeflyWebWallet` and `TestableKibisisWallet` utility types - Update `vi.spyOn` calls to use proper type assertions - Remove unnecessary type assertions from mock implementations - Add proper return type to `mockSignTransactionsResponseOnce`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR migrates the Defly Web provider implementation from #256 to the v4 architecture, adapting it to work with the new network configuration system and
algosdk
v3. See the original PR for details about the initial Defly Web provider implementation, which will be closed in favor of this v4-compatible version.It also improves type safety across AVM provider tests by removing
@ts-nocheck
comments and introducing proper TypeScript patterns.Details
algosdk
v3 API@ts-nocheck
comments from AVM provider tests