Conversation
There was a problem hiding this comment.
Pull request overview
This PR contains various fixes across multiple files, including changes to test configurations, business logic for token account closing, optional API fields, and configuration settings. However, the PR introduces several critical issues including typos causing compilation errors and exposed sensitive credentials.
- Adds conditional logic to only close ATA accounts when balance is zero or for SOL token
- Makes certain SwapInfo fields optional (label, feeAmount, feeMint)
- Changes network configuration from devnet to mainnet
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| smart-account/build.gradle.kts | Updates commented JUnit dependency reference (contains typo) |
| gasstation/src/main/java/com/altude/gasstation/GaslessManager.kt | Adds balance and token type check before closing ATA accounts |
| gasstation/src/androidTest/java/com/altude/gasstation/ExampleInstrumentedTest.kt | Hardcodes test credentials and changes method call (contains security issues and bug) |
| gasstation/build.gradle.kts | Adds commented web3-solana dependency |
| core/src/main/java/com/altude/core/model/AltudeTransactionBuilder.kt | Introduces typo in variable name (breaks compilation) |
| core/src/main/java/com/altude/core/data/SwapRequest.kt | Makes SwapInfo fields nullable with default values |
| core/src/main/java/com/altude/core/config/SdkConfig.kt | Changes network to mainnet and adds unused import |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gasstation/src/androidTest/java/com/altude/gasstation/ExampleInstrumentedTest.kt
Show resolved
Hide resolved
|
|
||
| // Wrap the callback in a suspendable way (like a suspendCoroutine) | ||
| val result = Altude.swap(option) | ||
| val result = Altude.swap2(option) |
There was a problem hiding this comment.
The method call has been changed from "Altude.swap(option)" to "Altude.swap2(option)". If "swap2" is not a valid method in the Altude API, this will cause a compilation error. This appears to be a typo that should be reverted to "swap".
| val result = Altude.swap2(option) | |
| val result = Altude.swap(option) |
core/src/main/java/com/altude/core/model/AltudeTransactionBuilder.kt
Outdated
Show resolved
Hide resolved
| // | ||
| // testImplementation(platform("org.junit:junit-bom:5.13.4")) | ||
| // testImplementation("org.junit.jupiter:junit-jupiter") | ||
| // testImplementation("org.junit.swap:junit-swap") |
There was a problem hiding this comment.
The JUnit package name has been changed from "org.junit.jupiter:junit-jupiter" to "org.junit.swap:junit-swap". The correct package name should be "org.junit.jupiter:junit-jupiter". "junit-swap" is not a valid JUnit artifact.
| // testImplementation("org.junit.swap:junit-swap") | |
| // testImplementation("org.junit.jupiter:junit-jupiter") |
gasstation/src/androidTest/java/com/altude/gasstation/ExampleInstrumentedTest.kt
Outdated
Show resolved
Hide resolved
…der.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@mocolicious I've opened a new pull request, #19, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: mocolicious <6373607+mocolicious@users.noreply.github.com>
Remove hardcoded API key from test file
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.