-
Notifications
You must be signed in to change notification settings - Fork 18
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
Amazing and fully native swap #17
Open
katleta3000
wants to merge
35
commits into
tonkeeper:develop
Choose a base branch
from
katleta3000:contest_2024
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
- TonSwift 1.0.10
- Move to common App
- Add new module and transition based on TonPicker
- Add mock output, add some tuning to bottom sheet view controller
- WIP
- Remove a token from picker that is chosen in the pair
- Add details output to swap
- Add module and basic classes
- Works
- Add swap details
- Add error handling
- Add special tokens
# Conflicts: # LocalPackages/App/Sources/App/MainModule/Flows/MainCoordinator.swift # LocalPackages/App/Sources/App/WalletModule/Modules/WalletBalance/WalletBalanceViewModel.swift # LocalPackages/core-swift/Sources/KeeperCore/Controller/Send/SendConfirmationController/SendConfirmationController.swift # Tonkeeper.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
- Fix the issue due to formatting; add haptic engine on success
- Constraint and animation fix
- Add converted balances
This reverts commit 49460d7.
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.
Hi there, welcome to my swap feature implementation 🚀
That was an exciting challenge, but due to my limited time and priorities, I decided to focus only on the swap feature.
Here, you can take a look at the overall result:
https://github.com/tonkeeper/ios/assets/1257625/32ab2e1b-78e8-4afd-baac-21804d1de181
All three kinds of swap work without using any webview.
As STON.fi defines its individual list of provided tokens, I did the same with USDT, NOT, ANON, PUNK, jUSDT.
Also, in
SwapAvailableTokenController
, you can find the commented code for receiving tokens from the TON blockchain. Unfortunately, there is no API to search through more than 35k tokens and no way to receive only tokens that are whitelisted. I thought about making recursive requests in the background to get the whole database, but I dropped the realisation from the final codebase. That's why I also didn't finish the ChooseTokenViewController, as it can't be fully implemented to work as expected in Figma. Cheers to those who succeded 🫡Here are some known issues and polishing things I didn't have time to implement:
private var priceChangeLimit: Double = 0.01 // 1%
inSwapViewModel.swift
. And this is a working settings, but with no UI implemented.en
locale.SendV3Controller
and the newSwapController
; I suggest adding shared controllers or common extensions or moving the re-used codes to other architecture layers.Some other suggestions for the codebase: