Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.2.5 #247

Merged
merged 7 commits into from
Apr 8, 2024
Merged

1.2.5 #247

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### **1.2.5** (2023-04-08)

- Address public keys can now be exported during transaction signing

### **1.2.4** (2023-04-05)

- Add transaction signing from wallet home
Expand Down
1 change: 1 addition & 0 deletions assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@
"reset_modal_title": "Resetting this Wallet",
"reset_modal_description": "This will reset the wallet balance and will check all addresses for UTXOs.\nNon-broadcasted transactions will be removed.",
"sign_transaction_step_1_description": "Select the address which should sign the transaction",
"sign_transaction_step_1_copy_pubkey": "Copy public key to clipboard",
"sign_transaction_step_2": "Enter Transaction Hex",
"sign_transaction_input_label": "Transaction Hex",
"sign_transaction_step_3": "Sign Transaction",
Expand Down
4 changes: 2 additions & 2 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>Can we access your camera in order to scan barcodes?</string>
<string>We would like to access your camera to scan QR codes.</string>
<key>NSFaceIDUsageDescription</key>
<string>FaceID protects your wallet from unauthorized use.</string>
<string>We would like to use FaceID to protect your wallet from unauthorized use.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>We would like to access your filesystem to import the CSV file.</string>
<key>UIBackgroundModes</key>
Expand Down
7 changes: 1 addition & 6 deletions lib/screens/wallet/address_selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,10 @@ class _AddressSelectorScreenState extends State<AddressSelectorScreen> {
];
}

Future<bool> _onWillPop() async {
Navigator.pop(context, _selectedAddress);
return true;
}

@override
Widget build(BuildContext context) {
return PopScope(
onPopInvoked: (_) => _onWillPop,
canPop: false,
child: Scaffold(
appBar: AppBar(
centerTitle: true,
Expand Down
35 changes: 35 additions & 0 deletions lib/screens/wallet/wallet_sign_transaction.dart
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,29 @@ class _WalletSignTransactionScreenState
}
}

void _copyPubKeyToClipboard(String address) async {
final wif = await _walletProvider.getWif(
identifier: _walletName,
address: _signingAddress,
);
final pubKey = WIF.fromString(wif).privkey.pubkey.hex;

Clipboard.setData(ClipboardData(text: pubKey));
if (mounted) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
AppLocalizations.instance.translate(
'snack_copied',
),
textAlign: TextAlign.center,
),
duration: const Duration(seconds: 2),
),
);
}
}

Future<void> _performReset(BuildContext ctx) async {
return await showDialog(
context: context,
Expand Down Expand Up @@ -310,6 +333,18 @@ class _WalletSignTransactionScreenState
small: true,
active: !_signingDone,
),
_signingAddress.isNotEmpty && !_signingDone
? PeerButton(
action: () => _copyPubKeyToClipboard(
_signingAddress,
),
text: AppLocalizations.instance.translate(
'sign_transaction_step_1_copy_pubkey',
),
small: true,
active: !_signingDone,
)
: Container(),
const SizedBox(
height: 20,
),
Expand Down
45 changes: 21 additions & 24 deletions lib/widgets/wallet/addresses_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -821,32 +821,29 @@ class _AddressTabState extends State<AddressTab> {
applyFilter();
},
),
Padding(
padding: const EdgeInsets.all(kIsWeb ? 8.0 : 0),
child: ChoiceChip(
backgroundColor: Theme.of(context).colorScheme.background,
selectedColor: Theme.of(context).shadowColor,
visualDensity: const VisualDensity(
horizontal: 0.0,
vertical: -4,
),
label: AutoSizeText(
AppLocalizations.instance
.translate('addressbook_hide_empty'),
textAlign: TextAlign.center,
minFontSize: 10,
style: TextStyle(
color: Theme.of(context).colorScheme.secondary,
),
ChoiceChip(
backgroundColor: Theme.of(context).colorScheme.background,
selectedColor: Theme.of(context).shadowColor,
visualDensity: const VisualDensity(
horizontal: 0.0,
vertical: -4,
),
label: AutoSizeText(
AppLocalizations.instance
.translate('addressbook_hide_empty'),
textAlign: TextAlign.center,
minFontSize: 10,
style: TextStyle(
color: Theme.of(context).colorScheme.secondary,
),
selected: _showEmpty,
onSelected: (_) {
setState(() {
_showEmpty = _;
});
applyFilter();
},
),
selected: _showEmpty,
onSelected: (_) {
setState(() {
_showEmpty = _;
});
applyFilter();
},
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: peercoin
description: A new Peercoin wallet.

version: 1.2.4+136
version: 1.2.5+137

environment:
sdk: '>=3.2.0 <4.0.0'
Expand Down
Loading