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.9 #257

Merged
merged 10 commits into from
May 30, 2024
2 changes: 1 addition & 1 deletion .github/workflows/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
channel: 'stable'
- name: run tests
uses: ReactiveCircus/android-emulator-runner@v2.28.0
uses: ReactiveCircus/android-emulator-runner@v2.31.0
with:
api-level: ${{ matrix.api-level }}
arch: x86_64
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### **1.2.9** (2024-05-30)

- Show transaction id for finalized transactions in transaction signing flow
- Improve user experience for double tab to clipboard with hint texts

### **1.2.8** (2024-05-27)

- Allow broadcast of signed transactions if all inputs are signed
Expand Down
6 changes: 5 additions & 1 deletion assets/translations/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -510,5 +510,9 @@
"sign_transaction_step_3_description": "Dette er din underskrevne transaktionshex. Du kan trykke to gange for at kopiere det til udklipsholderen.",
"sign_transaction_input_selector_title": "Vælg hvilke input der skal signeres",
"sign_transaction_signing_failed": "Transaktionssignering mislykkedes.",
"sign_transaction_step_1_copy_pubkey": "Kopier den offentlige nøgle til udklipsholderen"
"sign_transaction_step_1_copy_pubkey": "Kopier den offentlige nøgle til udklipsholderen",
"sign_transaction_confirmation_input_signed": "Underskrevet",
"sign_transaction_inputs": "Input",
"sign_transaction_confirmation_title": "Gennemgå transaktionen",
"sign_transaction_confirmation_input_unsigned": "Ikke underskrevet"
}
8 changes: 5 additions & 3 deletions assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@
"sign_step_1_button_alt": "Change",
"sign_step_2": "Enter Message",
"sign_step_3": "Sign Message",
"sign_step_3_description": "This is your signature. You may double tap to copy it to the clipboard.",
"sign_step_3_description": "This is your signature.",
"sign_step_3_button": "Sign",
"verify_step_3_button": "Verify",
"sign_step_3_button_alt": "Copy signature to clipboard",
Expand Down Expand Up @@ -508,7 +508,7 @@
"sign_transaction_input_label": "Transaction Hex",
"sign_transaction_step_3": "Sign Transaction",
"sign_transaction_step_3_button_alt": "Copy hex to clipboard",
"sign_transaction_step_3_description": "This is your signed transaction hex. You may double tap to copy it to the clipboard.",
"sign_transaction_step_3_description": "Signed transaction hex",
"sign_transaction_input_selector_title": "Select which inputs to sign",
"sign_transaction_signing_failed": "Transaction signing failed.",
"sign_transaction_inputs": "Inputs",
Expand All @@ -518,5 +518,7 @@
"sign_transaction_confirmation_broadcast": "Broadcast",
"sign_transaction_confirmation_broadcast_snack": "Transaction broadcast attempted",
"sign_transaction_confirmation_dialog_title": "Broadcast Transaction",
"sign_transaction_confirmation_dialog_content": "Please confirm that you want to broadcast this transaction."
"sign_transaction_confirmation_dialog_content": "Please confirm that you want to broadcast this transaction.",
"sign_transaction_confirmation_transaction_id": "Transaction id",
"double_tap_to_copy": "You may double tap to copy the text."
}
6 changes: 5 additions & 1 deletion assets/translations/is.json
Original file line number Diff line number Diff line change
Expand Up @@ -510,5 +510,9 @@
"wallet_pop_menu_signing_transactions": "Skrifaðu Undir Viðskipti",
"sign_transaction_step_1_description": "Veldu heimilisfangið sem mun skrifa undir viðskiptin",
"sign_transaction_step_3_description": "Þetta er undirritaður viðskipta hex. Þú getur tvípikkað til að afrita það á klemmuspjaldið.",
"sign_transaction_step_1_copy_pubkey": "Afritaðu opinberan lykil á klemmuspjald"
"sign_transaction_step_1_copy_pubkey": "Afritaðu opinberan lykil á klemmuspjald",
"sign_transaction_confirmation_input_signed": "Undirritaður",
"sign_transaction_confirmation_input_unsigned": "Ekki undirritaður",
"sign_transaction_inputs": "Inntak",
"sign_transaction_confirmation_title": "Vinsamlegast skoðaðu viðskiptin"
}
6 changes: 5 additions & 1 deletion assets/translations/nb_NO.json
Original file line number Diff line number Diff line change
Expand Up @@ -510,5 +510,9 @@
"wallet_pop_menu_signing_transactions": "Signer Transaksjon",
"sign_transaction_step_1_description": "Velg adressen som skal signere transaksjonen",
"sign_transaction_step_3_description": "Dette er din signerte transaksjonshex. Du kan dobbelttrykke for å kopiere den til utklippstavlen.",
"sign_transaction_step_1_copy_pubkey": "Kopier offentlig nøkkel til utklippstavlen"
"sign_transaction_step_1_copy_pubkey": "Kopier offentlig nøkkel til utklippstavlen",
"sign_transaction_confirmation_input_signed": "Signert",
"sign_transaction_confirmation_input_unsigned": "Ikke signert",
"sign_transaction_inputs": "Inputs",
"sign_transaction_confirmation_title": "Se gjennom transaksjonen"
}
9 changes: 8 additions & 1 deletion assets/translations/ro.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,5 +466,12 @@
"currency_PAB": "Balboa Panamez",
"currency_SBD": "Dolar al Insulelor Solomon",
"currency_SSP": "Liră Sud Sudaneză",
"currency_TOP": "Pa'anga Tonganian"
"currency_TOP": "Pa'anga Tonganian",
"currency_TTD": "Dolar din Trinidad și Tobago",
"currency_TWD": "Noul Dolar Taiwanez",
"currency_UYU": "Peso Uruguayan",
"currency_UZS": "Som Uzbec",
"currency_VUV": "Ni-Vanuatu Vatu",
"currency_WST": "Tala Samoaneză",
"currency_XAF": "Franc din Africa Centrală"
}
6 changes: 5 additions & 1 deletion assets/translations/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -510,5 +510,9 @@
"sign_transaction_step_1_description": "Välj adressen som ska signera transaktionen",
"sign_transaction_step_2": "Ange Transaktionshex",
"sign_transaction_step_3_description": "Detta är din undertecknade transaktionshex. Du kan dubbeltrycka för att kopiera den till urklipp.",
"sign_transaction_step_1_copy_pubkey": "Kopiera den offentliga nyckeln till urklipp"
"sign_transaction_step_1_copy_pubkey": "Kopiera den offentliga nyckeln till urklipp",
"sign_transaction_inputs": "Ingångar",
"sign_transaction_confirmation_input_signed": "Signerad",
"sign_transaction_confirmation_input_unsigned": "Ej signerad",
"sign_transaction_confirmation_title": "Se över transaktionen"
}
1 change: 1 addition & 0 deletions lib/screens/settings/app_settings_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ class _AppSettingsScreenState extends State<AppSettingsScreen> {
children: [
const SizedBox(height: 20),
DoubleTabToClipboard(
withHintText: true,
clipBoardData: _seedPhrase,
child: SelectableText(
_seedPhrase,
Expand Down
2 changes: 2 additions & 0 deletions lib/screens/wallet/transaction_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ class TransactionDetails extends StatelessWidget {
children: [
DoubleTabToClipboard(
clipBoardData: tx.broadcastHex,
withHintText: true,
child: SelectableText(
tx.broadcastHex,
),
Expand Down Expand Up @@ -246,6 +247,7 @@ class TransactionDetails extends StatelessWidget {
flex: 2,
child: DoubleTabToClipboard(
clipBoardData: addr,
withHintText: false,
child: Text(
addr,
style: const TextStyle(
Expand Down
2 changes: 2 additions & 0 deletions lib/screens/wallet/wallet_sign_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ class _WalletMessageSigningScreenState
)
: DoubleTabToClipboard(
clipBoardData: _signingAddress,
withHintText: false,
child: SelectableText(_signingAddress),
),
),
Expand Down Expand Up @@ -286,6 +287,7 @@ class _WalletMessageSigningScreenState
children: [
DoubleTabToClipboard(
clipBoardData: _signature,
withHintText: true,
child: SelectableText(
_signature,
key: const Key('signature'),
Expand Down
1 change: 1 addition & 0 deletions lib/screens/wallet/wallet_sign_transaction.dart
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ class _WalletSignTransactionScreenState
),
)
: DoubleTabToClipboard(
withHintText: false,
clipBoardData: _signingAddress,
child: SelectableText(_signingAddress),
),
Expand Down
51 changes: 36 additions & 15 deletions lib/screens/wallet/wallet_sign_transaction_confirmation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class WalletSignTransactionConfirmationScreen extends StatelessWidget {
],
),
const SizedBox(
height: 20,
height: 10,
),
const Divider(),
Text(
Expand All @@ -278,28 +278,49 @@ class WalletSignTransactionConfirmationScreen extends StatelessWidget {
style: const TextStyle(fontWeight: FontWeight.bold),
),
const SizedBox(
height: 20,
height: 10,
),
DoubleTabToClipboard(
clipBoardData: tx.toHex(),
withHintText: true,
child: SelectableText(tx.toHex()),
),
if (txReadyForBroadcast)
const SizedBox(
height: 20,
),
if (txReadyForBroadcast)
Center(
child: PeerButton(
text: AppLocalizations.instance.translate(
'sign_transaction_confirmation_broadcast',
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Divider(),
Text(
AppLocalizations.instance.translate(
'sign_transaction_confirmation_transaction_id',
),
style:
const TextStyle(fontWeight: FontWeight.bold),
),
action: () => broadcastTransaction(
hex: tx.toHex(),
txId: tx.txid,
context: context,
const SizedBox(
height: 10,
),
),
DoubleTabToClipboard(
clipBoardData: tx.txid,
withHintText: true,
child: Text(tx.txid),
),
const SizedBox(
height: 20,
),
Center(
child: PeerButton(
text: AppLocalizations.instance.translate(
'sign_transaction_confirmation_broadcast',
),
action: () => broadcastTransaction(
hex: tx.toHex(),
txId: tx.txid,
context: context,
),
),
),
],
),
],
),
Expand Down
24 changes: 21 additions & 3 deletions lib/widgets/double_tab_to_clipboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import '../tools/app_localizations.dart';
class DoubleTabToClipboard extends StatelessWidget {
final Widget child;
final String clipBoardData;
final bool withHintText;

const DoubleTabToClipboard({
super.key,
required this.clipBoardData,
required this.child,
required this.withHintText,
});

static void tapEvent(BuildContext context, String clipBoardData) {
Expand All @@ -30,9 +32,25 @@ class DoubleTabToClipboard extends StatelessWidget {

@override
Widget build(BuildContext context) {
return GestureDetector(
onDoubleTap: () => tapEvent(context, clipBoardData),
child: child,
return Column(
children: [
GestureDetector(
onDoubleTap: () => tapEvent(context, clipBoardData),
child: child,
),
if (withHintText)
const SizedBox(
height: 5,
),
if (withHintText)
Text(
AppLocalizations.instance.translate('double_tap_to_copy'),
style: TextStyle(
fontSize: 12,
color: Theme.of(context).colorScheme.secondary,
),
),
],
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class AddressTabExpandable extends StatelessWidget {
? MediaQuery.of(context).size.width / 3
: MediaQuery.of(context).size.width,
child: DoubleTabToClipboard(
withHintText: false,
clipBoardData: walletAddress.address,
child: Card(
elevation: 0,
Expand Down
2 changes: 2 additions & 0 deletions lib/widgets/wallet/addresses_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ class _AddressTabState extends State<AddressTab> {
? MediaQuery.of(context).size.width / 3
: MediaQuery.of(context).size.width,
child: DoubleTabToClipboard(
withHintText: false,
clipBoardData: addr.address,
child: Card(
elevation: 0,
Expand Down Expand Up @@ -593,6 +594,7 @@ class _AddressTabState extends State<AddressTab> {
? MediaQuery.of(context).size.width / 3
: MediaQuery.of(context).size.width,
child: DoubleTabToClipboard(
withHintText: false,
clipBoardData: addr.address,
child: Card(
elevation: 0,
Expand Down
1 change: 1 addition & 0 deletions lib/widgets/wallet/receive_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ class _ReceiveTabState extends State<ReceiveTab> {
padding: const EdgeInsets.all(8.0),
child: FittedBox(
child: DoubleTabToClipboard(
withHintText: false,
clipBoardData: widget.unusedAddress,
child: SelectableText(
widget.unusedAddress,
Expand Down
1 change: 1 addition & 0 deletions lib/widgets/wallet/wallet_home_qr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class WalletHomeQr extends StatelessWidget {
padding: const EdgeInsets.all(8.0),
child: FittedBox(
child: DoubleTabToClipboard(
withHintText: false,
clipBoardData: address,
child: SelectableText(
address,
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.8+141
version: 1.2.9+142

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