summaryrefslogtreecommitdiff
path: root/wallee-c2ec/app/src/main/java/ch/bfh/habej2/wallee_c2ec/ExchangeActivity.kt
diff options
context:
space:
mode:
Diffstat (limited to 'wallee-c2ec/app/src/main/java/ch/bfh/habej2/wallee_c2ec/ExchangeActivity.kt')
-rw-r--r--wallee-c2ec/app/src/main/java/ch/bfh/habej2/wallee_c2ec/ExchangeActivity.kt45
1 files changed, 45 insertions, 0 deletions
diff --git a/wallee-c2ec/app/src/main/java/ch/bfh/habej2/wallee_c2ec/ExchangeActivity.kt b/wallee-c2ec/app/src/main/java/ch/bfh/habej2/wallee_c2ec/ExchangeActivity.kt
new file mode 100644
index 0000000..6aebf8b
--- /dev/null
+++ b/wallee-c2ec/app/src/main/java/ch/bfh/habej2/wallee_c2ec/ExchangeActivity.kt
@@ -0,0 +1,45 @@
+package ch.bfh.habej2.wallee_c2ec
+
+import android.content.Intent
+import android.os.Bundle
+import androidx.activity.ComponentActivity
+import androidx.activity.compose.setContent
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.material3.Button
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Surface
+import androidx.compose.material3.Text
+import androidx.compose.ui.Modifier
+import ch.bfh.habej2.wallee_c2ec.config.EXCHANGES
+import ch.bfh.habej2.wallee_c2ec.ui.theme.Walleec2ecTheme
+
+class ExchangeActivity : ComponentActivity() {
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContent {
+ Walleec2ecTheme {
+ // A surface container using the 'background' color from the theme
+ Surface(
+ modifier = Modifier.fillMaxSize(),
+ color = MaterialTheme.colorScheme.background
+ ) {
+ Text(text = "Choose the exchange to withdraw from")
+
+ // TODO let user select exchanges from config here
+ // config must contain display name, credentials (generated by cli)
+ // and the base url of the c2ec bank-integration api
+ EXCHANGES.forEach { Text(text = it.displayName) }
+
+ Button(onClick = { Intent(this.parent, WithdrawalCreationActivity::class.java) }) {
+ title = "withdraw"
+ }
+
+ Button(onClick = { finish() }) {
+ title = "back"
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file