Skip to content

Commit

Permalink
TRCl-1113 CoinbaseWalletSDK Integration (#3)
Browse files Browse the repository at this point in the history
* Add CoinbaseSDK provider

* Clean up

* Update .gitignore

* Clean up

* Changed Java version
  • Loading branch information
ruixhuang authored Jun 13, 2023
1 parent eff355b commit 095f5de
Show file tree
Hide file tree
Showing 52 changed files with 1,450 additions and 425 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.DS_Store
.*.swp
.gradle

.idea
Binary file removed .gradle/8.0/checksums/checksums.lock
Binary file not shown.
Binary file removed .gradle/8.0/checksums/md5-checksums.bin
Binary file not shown.
Binary file removed .gradle/8.0/checksums/sha1-checksums.bin
Binary file not shown.
Binary file not shown.
Empty file.
Binary file removed .gradle/8.0/executionHistory/executionHistory.bin
Binary file not shown.
Binary file removed .gradle/8.0/executionHistory/executionHistory.lock
Binary file not shown.
Binary file removed .gradle/8.0/fileChanges/last-build.bin
Binary file not shown.
Binary file removed .gradle/8.0/fileHashes/fileHashes.bin
Binary file not shown.
Binary file removed .gradle/8.0/fileHashes/fileHashes.lock
Binary file not shown.
Binary file removed .gradle/8.0/fileHashes/resourceHashesCache.bin
Binary file not shown.
Empty file removed .gradle/8.0/gc.properties
Empty file.
Binary file removed .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
2 changes: 0 additions & 2 deletions .gradle/buildOutputCleanup/cache.properties

This file was deleted.

Binary file removed .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
Binary file removed .gradle/file-system.probe
Binary file not shown.
Empty file removed .gradle/vcs-1/gc.properties
Empty file.
6 changes: 0 additions & 6 deletions .idea/compiler.xml

This file was deleted.

21 changes: 0 additions & 21 deletions .idea/gradle.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/kotlinc.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/misc.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

50 changes: 19 additions & 31 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
}

android {
Expand All @@ -20,7 +19,8 @@ android {

buildTypes {
release {
minifyEnabled false
minifyEnabled true
signingConfig signingConfigs.getByName("debug")
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Expand All @@ -38,40 +38,28 @@ android {
composeOptions {
kotlinCompilerExtensionVersion "1.4.7"
}

configurations {
all*.exclude module: 'bcprov-jdk15on'
}
}

dependencies {
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'org.testng:testng:6.9.6'
implementation project(path: ':cartera')

implementation 'androidx.core:core-ktx:1.8.0'
implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.0')
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
implementation 'androidx.activity:activity-compose:1.5.1'
implementation platform('androidx.compose:compose-bom:2022.10.00')
implementation 'androidx.compose.ui:ui'
implementation 'androidx.compose.ui:ui-graphics'
implementation 'androidx.compose.ui:ui-tooling-preview'
implementation 'androidx.compose.material3:material3'
implementation 'androidx.compose.material:material'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'

api "androidx.compose.runtime:runtime:1.5.0-alpha03"
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation platform('androidx.compose:compose-bom:2022.10.00')
androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
debugImplementation 'androidx.compose.ui:ui-tooling'
debugImplementation 'androidx.compose.ui:ui-test-manifest'

def compose_ui_version = '1.5.0-alpha03'

// api "androidx.compose.foundation:foundation-layout:$composeVersion"
api "androidx.compose.ui:ui:$compose_ui_version"
implementation "androidx.compose.ui:ui-text:$compose_ui_version"
implementation "androidx.compose.material:material:$compose_ui_version"

api "androidx.activity:activity:$compose_ui_version"
implementation "androidx.activity:activity-compose:$compose_ui_version"

}

configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(module("org.hamcrest:hamcrest-core:1.1")).using(module("junit:junit:4.13.2"))
}
}
}
21 changes: 17 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
xmlns:tools="http://schemas.android.com/tools">

<application
android:name="exchange.dydx.carteraexample.CarteraSampleApplication"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.CarteraExample"
tools:replace="android:dataExtractionRules"
tools:targetApi="31">
tools:targetApi="31" >

<activity
android:name=".MainActivity"
android:name="exchange.dydx.carteraexample.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -24,4 +24,17 @@
</activity>
</application>

<queries>
<!-- Explicit apps you know in advance about: -->
<package android:name="io.metamask"/>
<package android:name="org.toshi"/>
<package android:name="im.token.app"/>
<package android:name="com.wallet.crypto.trustapp"/>
<package android:name="io.zerion.android"/>
<package android:name="vip.mytokenpocket"/>
<package android:name="me.rainbow"/>
<package android:name="io.oneinch.android"/>
<package android:name="pro.huobi"/>
</queries>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package exchange.dydx.carteraexample

import android.app.Application

class CarteraSampleApplication: Application() {
override fun onCreate() {
super.onCreate()
}
}
20 changes: 16 additions & 4 deletions app/src/main/java/exchange/dydx/carteraExample/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
package exchange.dydx.carteraexample

import android.content.Intent
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Surface
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable
import androidx.activity.compose.setContent
import exchange.dydx.carteraExample.WalletList
import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts
import exchange.dydx.cartera.CarteraConfig


class MainActivity : ComponentActivity() {

private lateinit var launcher: ActivityResultLauncher<Intent>

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

launcher = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result ->
val uri = result.data?.data ?: return@registerForActivityResult
CarteraConfig.handleResponse(uri)
}

setContent {
MyApp {
WalletList.Content()
WalletList.Content(launcher)
}
}
}
Expand Down
Loading

0 comments on commit 095f5de

Please sign in to comment.