feat: add WalletConnect integration for Ledger devices#720
Open
polymorpher wants to merge 17 commits intoharmony-one:masterfrom
Open
feat: add WalletConnect integration for Ledger devices#720polymorpher wants to merge 17 commits intoharmony-one:masterfrom
polymorpher wants to merge 17 commits intoharmony-one:masterfrom
Conversation
- Add WalletConnect integration using @reown/appkit - Replace direct Ledger integration with WalletConnect - Update session management to support WalletConnect - Add Harmony Mainnet chain configuration Link to Devin run: https://app.devin.ai/sessions/9e403c268ac34438a5e04b2de9cc557e Requested by: Aaron Co-Authored-By: Aaron Li <aaron@hiddenstate.xyz>
…gning # Conflicts: # frontend/yarn.lock
polymorpher
commented
Feb 6, 2025
| const { gasEstimate } = fee | ||
| const { chain_id, rpc_url } = networkConfig | ||
|
|
||
| const harmony = new Harmony(rpc_url, { |
Contributor
Author
There was a problem hiding this comment.
This is incorrect. Harmony class is undefined. Please do not simply copy from old implementations. Instead, properly invoke correct contract calling methods from wagmi
polymorpher
commented
Feb 6, 2025
|
|
||
| switch (transactionData.type) { | ||
| case "MsgSend": | ||
| return harmony.transactions.signTransaction({ |
Contributor
Author
There was a problem hiding this comment.
Similarly, this is incorrect because the instance harmony would not exist and would not have the field transactions
polymorpher
commented
Feb 6, 2025
| }) | ||
|
|
||
| case "MsgDelegate": | ||
| return harmony.stakings.delegate({ |
polymorpher
commented
Feb 6, 2025
| }) | ||
|
|
||
| case "MsgUndelegate": | ||
| return harmony.stakings.undelegate({ |
polymorpher
commented
Feb 6, 2025
| }) | ||
|
|
||
| case "MsgWithdrawDelegationReward": | ||
| return harmony.stakings.collectRewards({ |
- Replace Harmony class usage with wagmi's writeContract - Add proper error handling in WalletConnect component - Use correct contract ABI and address for staking operations - Implement gas estimation using wagmi methods Co-Authored-By: Aaron Li <aaron@hiddenstate.xyz>
Co-Authored-By: Aaron Li <aaron@hiddenstate.xyz>
# Conflicts: # frontend/src/components/common/TmSessionExisting.vue # frontend/yarn.lock
Co-Authored-By: Aaron Li <aaron@hiddenstate.xyz>
Co-Authored-By: Aaron Li <aaron@hiddenstate.xyz>
Co-Authored-By: Aaron Li <aaron@hiddenstate.xyz>
Co-Authored-By: Aaron Li <aaron@hiddenstate.xyz>
Co-Authored-By: Aaron Li <aaron@hiddenstate.xyz>
Co-Authored-By: Aaron Li <aaron@hiddenstate.xyz>
Co-Authored-By: Aaron Li <aaron@hiddenstate.xyz>
Co-Authored-By: Aaron Li <aaron@hiddenstate.xyz>
Co-Authored-By: Aaron Li <aaron@hiddenstate.xyz>
This file contains hidden or 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
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.
Fixes #719
Problem:
Solution:
Testing:
Note: This implementation follows the new approach suggested in #719, using WalletConnect instead of modifying the existing Ledger integration.
Link to Devin run: https://app.devin.ai/sessions/9e403c268ac34438a5e04b2de9cc557e
Requested by: Aaron