Open
Conversation
Move swap from cases + repository to the application/swap/coordinators pattern used by the rest of the codebase. Extracts six coordinators covering quote requests, quote-data retrieval, supported chains, ConfirmParams construction, swap-asset search, and swap quote refresh orchestration. Side fixes: - Permit2 expiration now reads from Rust core's SwapConfig (permit2_expiration / permit2_sig_deadline) instead of hardcoded values; previous Android value was 30 hours instead of 30 days. - Restore SyncAssetInfoImplTest compile by using coVerify for the suspend addAssetIds call. Closes #199
gemcoder21
reviewed
May 7, 2026
|
|
||
| private fun permit2Single(token: String, spender: String, value: String, nonce: ULong): PermitSingle { | ||
| val config = Config().getSwapConfig() | ||
| val now = (System.currentTimeMillis() / 1000).toULong() |
gemcoder21
reviewed
May 7, 2026
| value = permit.value, | ||
| nonce = permit.permit2Nonce, | ||
| ) | ||
| val chain = quote.request.fromAsset.id.toAssetId()?.chain ?: throw Exception() |
Contributor
There was a problem hiding this comment.
SwapperQuoteAsset.id make it AssetId
…ze-featureswap # Conflicts: # android/data/coordinators/src/main/kotlin/com/gemwallet/android/data/coordinators/swap/RequestSwapQuotesImpl.kt # android/features/swap/viewmodels/src/main/kotlin/com/gemwallet/android/features/swap/viewmodels/SwapViewModel.kt
Add a small Time utility (nowSeconds) and use it in permit creation; validate asset chain with a clear error message. Introduce QUOTE_DEBOUNCE_MS constant and use it for quote request debounce instead of a hardcoded 500ms. Simplify asset ID collection by using flatMap and avoid intermediate folding. Consolidate transfer error handling in SwapViewModel via a setTransferError helper to remove duplicated code. Also add a small cache placeholder file.
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.
Move swap from cases + repository to the application/swap/coordinators pattern used by the rest of the codebase. Extracts six coordinators covering quote requests, quote-data retrieval, supported chains, ConfirmParams construction, swap-asset search, and swap quote refresh orchestration.
Side fixes:
Closes: #199