Skip to content

Commit

Permalink
starknet sdk integrated
Browse files Browse the repository at this point in the history
  • Loading branch information
sajalbnl committed Sep 12, 2024
1 parent 8fccfdb commit b5f9d71
Show file tree
Hide file tree
Showing 15 changed files with 221 additions and 337 deletions.
30 changes: 16 additions & 14 deletions wallet_app/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import java.util.Properties

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.jetbrains.kotlin.android)
id("com.google.dagger.hilt.android")
id("kotlin-kapt")
id("org.jmailen.kotlinter")
}

android {
Expand All @@ -15,16 +17,28 @@ android {
}

defaultConfig {
val properties = Properties()
properties.load(project.rootProject.file("local.properties").inputStream())

applicationId = "com.example.walletapp"
minSdk = 24
targetSdk = 34
versionCode = 1
versionName = "1.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"



buildConfigField("String", "DEMO_RPC_URL", "\"https://starknet-mainnet.g.alchemy.com/starknet/version/rpc/v0_7/${properties.getProperty("KEY_NAME")}\"")
buildConfigField("String", "DEMO_ACCOUNT_ADDRESS", "\"0x02dc260794e4c2eeae87b1403a88385a72c18a5844d220b88117b2965a8cf3a5\"")
buildConfigField("String", "DEMO_PRIVATE_KEY", "\"rFAP8fkTAz9TmYw8_V5Fyzxi-WSoQdhk\"")
buildConfigField("String", "DEMO_RECIPIENT_ACCOUNT_ADDRESS", "\"0xc1c7db92d22ef773de96f8bde8e56c85\"")
}

buildTypes {


release {
isMinifyEnabled = false
proguardFiles(
Expand All @@ -49,7 +63,6 @@ android {
}
}
}

dependencies {

implementation(libs.androidx.core.ktx)
Expand Down Expand Up @@ -80,8 +93,7 @@ dependencies {
implementation(libs.hilt.android)
implementation(libs.androidx.hilt.navigation.fragment)
implementation (libs.androidx.hilt.navigation.compose.v100alpha03)

implementation (libs.core)
implementation("com.swmansion.starknet:starknet:0.12.2")

implementation(libs.androidx.ui.tooling.preview)
debugImplementation(libs.androidx.ui.tooling)
Expand All @@ -95,16 +107,6 @@ dependencies {

implementation(libs.androidx.navigation.compose)

implementation (libs.retrofit)
implementation(libs.converter.gson)
implementation (libs.kotlinx.coroutines.core)
implementation (libs.kotlinx.coroutines.android)

implementation("com.google.dagger:hilt-android:2.50")
kapt("com.google.dagger:hilt-android-compiler:2.50")
kapt("androidx.hilt:hilt-compiler:1.0.0")
implementation("androidx.hilt:hilt-navigation-fragment:1.0.0")
implementation("androidx.hilt:hilt-navigation-compose:1.0.0-alpha03")

implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.IconButton
import androidx.compose.material.Button
import androidx.compose.material.ButtonDefaults
import androidx.compose.material.TextField
import androidx.compose.material3.IconButton
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.TextField
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.unit.dp
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.sharp.ArrowBack
import androidx.compose.runtime.Composable
Expand Down Expand Up @@ -157,7 +157,7 @@ class AccountPasswordActivity : ComponentActivity() {
Button(
onClick = { val i = Intent(context, RecoveryPhraseActivity::class.java)
context.startActivity(i) },
colors = ButtonDefaults.buttonColors(backgroundColor = Color("#1B1B76".toColorInt())),
colors = ButtonDefaults.buttonColors(Color("#1B1B76".toColorInt())),
modifier = Modifier
.fillMaxWidth()
.height(49.dp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,3 @@ fun AddTokenScreenView(modifier: Modifier) {
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,3 @@ fun CreateAccount( modifier: Modifier) {
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,4 @@ fun CustomDialog(onDismiss: () -> Unit) {
.width(500.dp)
.padding(8.dp)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@ class SendActivity : ComponentActivity() {
}

}
}
}
Loading

0 comments on commit b5f9d71

Please sign in to comment.