Skip to content

Commit

Permalink
remove walletConnectKit library and replace the wallet connect button…
Browse files Browse the repository at this point in the history
… with outlined material button
  • Loading branch information
Babak-gh committed Nov 11, 2023
1 parent 9d5bbb1 commit 91e2af3
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
1 change: 0 additions & 1 deletion example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ dependencies {
implementation 'androidx.activity:activity-ktx:1.6.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.3.0'
implementation 'dev.pinkroom:walletconnectkit:0.3.2'
implementation 'org.web3j:crypto:5.0.0'

// WalletConnect V2: core library + WalletConnectModal
Expand Down
9 changes: 9 additions & 0 deletions example/src/main/res/drawable/ic_wallet_connect_logo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="33dp"
android:height="20dp"
android:viewportWidth="33"
android:viewportHeight="20">
<path
android:pathData="M6.683,3.927C11.967,-1.244 20.533,-1.244 25.817,3.927L26.453,4.549C26.717,4.807 26.717,5.227 26.453,5.485L24.277,7.614C24.145,7.743 23.931,7.743 23.799,7.614L22.924,6.758C19.238,3.15 13.262,3.15 9.576,6.758L8.639,7.675C8.506,7.804 8.292,7.804 8.16,7.675L5.985,5.546C5.721,5.287 5.721,4.868 5.985,4.61L6.683,3.927ZM30.316,8.329L32.251,10.224C32.516,10.483 32.516,10.902 32.251,11.16L23.522,19.704C23.258,19.962 22.829,19.962 22.565,19.704L16.369,13.64C16.303,13.575 16.196,13.575 16.13,13.64L9.935,19.704C9.67,19.962 9.242,19.962 8.978,19.704L0.248,11.16C-0.016,10.902 -0.016,10.482 0.248,10.224L2.184,8.329C2.448,8.071 2.877,8.071 3.141,8.329L9.337,14.393C9.403,14.457 9.51,14.457 9.576,14.393L15.771,8.329C16.036,8.071 16.464,8.071 16.728,8.329L22.924,14.393C22.99,14.457 23.097,14.457 23.163,14.393L29.359,8.329C29.623,8.071 30.051,8.071 30.316,8.329Z"
android:fillColor="#FF006FFF"/>
</vector>
11 changes: 9 additions & 2 deletions example/src/main/res/layout/fragment_connect_wallet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,17 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<dev.pinkroom.walletconnectkit.WalletConnectButton
<com.google.android.material.button.MaterialButton
android:id="@+id/connectButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="50dp"
style="?attr/materialButtonOutlinedStyle"
android:text="@string/wallet_connect"
android:textColor="#FF006FFF"
app:icon="@drawable/ic_wallet_connect_logo"
app:iconTint="#FF006FFF"
app:iconGravity="textStart"
app:strokeColor="#FF006FFF"
android:layout_marginStart="@dimen/padding"
android:layout_marginEnd="@dimen/padding"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
1 change: 1 addition & 0 deletions example/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<string name="account_type">org.xmtp.example.android</string>
<string name="error">Something went wrong</string>

<string name="wallet_connect">WalletConnect</string>
<string name="generate_wallet">Generate wallet</string>
<string name="connect_wallet">Connect wallet</string>
<string name="no_wallet_apps">No wallet apps installed</string>
Expand Down
2 changes: 1 addition & 1 deletion example/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="Theme.XMTPAndroid" parent="Theme.AppCompat.Light.NoActionBar" />
<style name="Theme.XMTPAndroid" parent="Theme.Material3.Light.NoActionBar" />
</resources>

0 comments on commit 91e2af3

Please sign in to comment.