Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/main/java/com/altude/core/config/SdkConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ object SdkConfig {
private var baseUrl: String = "https://api.altude.so" //"http://10.0.2.2:5000/"//
var apiKey: String = ""
//lateinit var ownerKeyPair: Keypair
var isDevnet: Boolean = true
var isDevnet: Boolean = false

@OptIn(ExperimentalTime::class)
var apiConfig = ConfigResponse()
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/com/altude/core/data/SwapRequest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ data class RoutePlan(
@Serializable
data class SwapInfo(
val ammKey: String,
val label: String,
val label: String? = null,
val inputMint: String,
val outputMint: String,
val inAmount: String,
val outAmount: String,
val feeAmount: String,
val feeMint: String
val feeAmount: String? = null,
val feeMint: String? = null
)

@Serializable
Expand Down
3 changes: 3 additions & 0 deletions gasstation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ dependencies {
implementation(libs.serialization.json) {
exclude(group = "com.ditchoom")
}
// implementation("com.solanamobile:web3-solana:0.2.5") {
// exclude(group = "com.ditchoom.buffer")
// }
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,7 @@ class ExampleInstrumentedTest {
@Test
fun testSwap() = runBlocking {
//Altude.savePrivateKey(accountPrivateKey )
val testMnemonic = System.getProperty("TEST_MNEMONIC") ?: ""
Altude.saveMnemonic(testMnemonic)
Altude.saveMnemonic("pause trial leisure wife deliver save crack sniff exact village claim upset")
val option = SwapOption(
account = "BG8ttfjfSdUVxJB5saKq59gfFdtpvDBeVTwg1X3ZBUyS",
inputMint = Token.SOL.mint(),
Expand All @@ -293,7 +292,7 @@ class ExampleInstrumentedTest {
)

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

result
.onSuccess { println("✅ Sent: ${it.Signature}") }
.onFailure {
Expand Down
25 changes: 13 additions & 12 deletions gasstation/src/main/java/com/altude/gasstation/GaslessManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -283,19 +283,20 @@ object GaslessManager {
if (ataInfo != null) {
val parsed = ataInfo.data?.parsed?.info
val balance = parsed?.tokenAmount?.uiAmount ?: 0.0

if (parsed?.closeAuthority == feePayerPubKey.toBase58() || defaultWallet == null)
authorized = feePayerPubKey
else {
authorized = defaultWallet.publicKey
isOwnerRequiredSignature = true
if(balance == 0.0 || token == Token.SOL.mint()){
if (parsed?.closeAuthority == feePayerPubKey.toBase58() || defaultWallet == null)
authorized = feePayerPubKey
else {
authorized = defaultWallet.publicKey
isOwnerRequiredSignature = true
}
val instruction = TokenProgram.closeAtaAccount(
ata = ata,
destination = authorized,
authority = authorized
)
txInstructions.add(instruction)
}
val instruction = TokenProgram.closeAtaAccount(
ata = ata,
destination = authorized,
authority = authorized
)
txInstructions.add(instruction)


}
Expand Down
2 changes: 1 addition & 1 deletion smart-account/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies {
// //implementation("com.ditchoom:buffer-android:1.4.2")
//
// 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.

// testRuntimeOnly("org.junit.platform:junit-platform-launcher")

implementation("foundation.metaplex:solana:0.2.10"){
Expand Down