Skip to content

Commit

Permalink
feat: copyable address (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oshioke-Salaki authored Aug 25, 2024
1 parent 685fd9b commit 2cf2327
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.example.walletapp

import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
Expand Down Expand Up @@ -88,7 +91,9 @@ class ReceiverActivity : ComponentActivity() {
color = Color.White,
fontSize = 15.sp,
modifier = Modifier.clickable {
// TODO(47): Copy address to clipboard
val clipboard = getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
val clip = ClipData.newPlainText("Wallet Address", "0xfoo...123") // Replace with actual wallet address
clipboard.setPrimaryClip(clip)
}
)
}
Expand Down

0 comments on commit 2cf2327

Please sign in to comment.