fix: resolve async/sync mismatches and missing Chain match arms#36
Open
knoal wants to merge 2 commits into
Open
fix: resolve async/sync mismatches and missing Chain match arms#36knoal wants to merge 2 commits into
knoal wants to merge 2 commits into
Conversation
Adds full Solana support behind the solana feature flag: - New src/chains/solana.rs with SolanaConnector and SolanaWallet - Support for SOL and SPL token transfers - Updated Chain enum to include Solana and SolanaDevnet - Updated README.md and examples/multi_chain.rs - Added integration tests in tests/solana_integration.rs Closes kcolbchain#22
…lana module - Remove .await from sync method calls in solana_integration.rs (balance, transfer_sol, transfer_spl_token are all synchronous) - Add missing Solana/SolanaDevnet arms to Display impl for Chain - Map spl_token::instruction::error to SolanaError::TransactionFailed in transfer_spl_token to fix E0277 error conversion
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 three issues blocking PR #23:
.awaitfrombalance(),transfer_sol(), andtransfer_spl_token()calls intests/solana_integration.rs— these methods are synchronous but the async test functions were awaiting them.SolanaandSolanaDevnetarms to thefmt::Displayimpl forChaininsrc/chain/mod.rs..map_err()to convertProgramErrorfromspl_token::instruction::transfertoSolanaError::TransactionFailed, fixing E0277.The code compiles cleanly (only deprecation warnings, no errors).