Skip to content

init fix#18

Closed
chenchan09 wants to merge 6 commits intomainfrom
chen/test-bugs
Closed

init fix#18
chenchan09 wants to merge 6 commits intomainfrom
chen/test-bugs

Conversation

@chenchan09
Copy link
Contributor

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.


// Wrap the callback in a suspendable way (like a suspendCoroutine)
val result = Altude.swap(option)
val result = Altude.swap2(option)
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Suggested change
val result = Altude.swap2(option)
val result = Altude.swap(option)

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

//
// testImplementation(platform("org.junit:junit-bom:5.13.4"))
// testImplementation("org.junit.jupiter:junit-jupiter")
// testImplementation("org.junit.swap:junit-swap")
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
// testImplementation("org.junit.swap:junit-swap")
// testImplementation("org.junit.jupiter:junit-jupiter")

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mocolicious and others added 2 commits January 5, 2026 17:43
…der.kt

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI commented Jan 5, 2026

@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.

Copilot AI and others added 3 commits January 5, 2026 23:47
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>
@chenchan09 chenchan09 closed this Jan 6, 2026
@chenchan09 chenchan09 deleted the chen/test-bugs branch January 6, 2026 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants