From 3abf2666ba9e91dcb672e502ce2478d70a8caa99 Mon Sep 17 00:00:00 2001
From: poka <poka@p2p.legal>
Date: Sun, 21 Aug 2022 06:35:36 +0200
Subject: [PATCH] can copy address from generated Cesium salt/password

---
 lib/screens/myWallets/import_g1_v1.dart | 30 +++++++++++++++++++------
 pubspec.yaml                            |  2 +-
 2 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/lib/screens/myWallets/import_g1_v1.dart b/lib/screens/myWallets/import_g1_v1.dart
index 0bb14fe9..6448c8b6 100644
--- a/lib/screens/myWallets/import_g1_v1.dart
+++ b/lib/screens/myWallets/import_g1_v1.dart
@@ -10,6 +10,7 @@ import 'package:gecko/models/wallet_data.dart';
 import 'package:gecko/providers/my_wallets.dart';
 import 'package:gecko/providers/substrate_sdk.dart';
 import 'package:gecko/providers/wallet_options.dart';
+import 'package:gecko/providers/wallets_profiles.dart';
 import 'package:gecko/screens/myWallets/unlocking_wallet.dart';
 import 'package:gecko/screens/transaction_in_progress.dart';
 import 'package:provider/provider.dart';
@@ -171,14 +172,29 @@ class ImportG1v1 extends StatelessWidget {
                       ),
                     ),
                     const SizedBox(height: 20),
-                    Text(
-                      getShortPubkey(sub.g1V1NewAddress),
-                      style: const TextStyle(
-                          fontSize: 18,
-                          color: Colors.black,
-                          fontWeight: FontWeight.bold,
-                          fontFamily: 'Monospace'),
+                    GestureDetector(
+                      key: const Key('copyPubkey'),
+                      onTap: () {
+                        Clipboard.setData(
+                            ClipboardData(text: sub.g1V1NewAddress));
+                        snackCopyKey(context);
+                      },
+                      child: Text(
+                        getShortPubkey(sub.g1V1NewAddress),
+                        style: const TextStyle(
+                          fontSize: 20,
+                          fontWeight: FontWeight.w600,
+                        ),
+                      ),
                     ),
+                    // Text(
+                    //   getShortPubkey(sub.g1V1NewAddress),
+                    //   style: const TextStyle(
+                    //       fontSize: 18,
+                    //       color: Colors.black,
+                    //       fontWeight: FontWeight.bold,
+                    //       fontFamily: 'Monospace'),
+                    // ),
                     const SizedBox(height: 20),
                     Text(
                       '${balance['transferableBalance']} $currencyName',
diff --git a/pubspec.yaml b/pubspec.yaml
index 2becac75..225f6357 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -5,7 +5,7 @@ description: Pay with G1.
 # pub.dev using `pub publish`. This is preferred for private packages.
 publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 
-version: 0.0.10+26
+version: 0.0.10+27
 
 environment:
   sdk: '>=2.12.0 <3.0.0'
-- 
GitLab