magicblock-labs / magicblock-labs/Solana.Unity-SDK
[Bug] Cannot Swap Tokens With The SDK
- Dominant language
- C#
- Stars
- 199
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Trying to do a swap with the SDK triggers security by Phantom and also says that no balances are changed, and they arn't when approved. It happened in my code and also on the live demo provided by this github at
https://magicblock-labs.github.io/Solana.Unity-SDK/
**To Reproduce**
Steps to reproduce the behavior:
Connect Phantom wallet
Do the basic Swap outlined by the docs
Swap any tokens
Wont work and get security warning as well as no token changes
**Expected behavior**
Code should allow swapping between tokens
**Screenshots**

DK/assets/113896751/93b4c452-608b-4f2e-97d9-d90a61040a7f)
**Desktop (please complete the following information):**
- OS: Windows
- Browser : Brave
**Additional context**
Add any other context about the problem here.

Contributor guide
Research direction
Start by reproducing the swap from the linked live demo with a connected Phantom wallet, using the documented basic swap flow. Compare the security warning and token balances before and after approval; done means the swap completes without the warning and balances change as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100