Skip to content

Commit

Permalink
minor security and ui improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
aldrinzigmundv authored and dummytoken committed Oct 2, 2023
1 parent be599d9 commit f56ac6c
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 84 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ android {
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 23
targetSdkVersion 33
versionCode 7
versionName "0.8.0"
versionCode 8
versionName "0.8.1"
}

signingConfigs {
Expand Down
4 changes: 2 additions & 2 deletions lib/pages/homepage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class _HomePageState extends State<HomePage> {
wallet.transactions[index].confirmationTime?.height);
if (wallet.transactions[index].sent == 0) {
int finalFee =
format.getFee(wallet.transactions[index]?.fee);
format.getFee(wallet.transactions[index].fee);
return GestureDetector(
onTap: () =>
showTransactionInfo(index, blockHeight, finalFee),
Expand Down Expand Up @@ -242,7 +242,7 @@ class _HomePageState extends State<HomePage> {
);
} else {
int finalFee =
format.getFee(wallet.transactions[index]?.fee);
format.getFee(wallet.transactions[index].fee);
return GestureDetector(
onTap: () =>
showTransactionInfo(index, blockHeight, finalFee),
Expand Down
6 changes: 6 additions & 0 deletions lib/pages/setup pages/restoremnemonicpage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ class _RestoreMnemonicPageState extends State<RestoreMnemonicPage> {
));
}

@override
void dispose() {
_mnemonic.dispose();
super.dispose();
}

@override
void initState() {
super.initState();
Expand Down
9 changes: 8 additions & 1 deletion lib/pages/transactionpages/sendpage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class _SendPage extends State<SendBitcoinPage> {
];

scanQRCode() async {
var result;
ScanResult result;
try {
result = await BarcodeScanner.scan();
_scannedQRAddress = result.rawContent;
Expand Down Expand Up @@ -119,6 +119,13 @@ class _SendPage extends State<SendBitcoinPage> {
));
}

@override
void dispose() {
_sendAmount.dispose();
_destinationAddress.dispose();
super.dispose();
}

@override
void initState() {
super.initState();
Expand Down
92 changes: 14 additions & 78 deletions lib/pages/transactionpages/transactionconfirmationpage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,87 +75,23 @@ class TransactionConfirmationPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
const Padding(
padding: EdgeInsets.all(18.0),
child: Text(
'Transaction Fee',
style: TextStyle(fontSize: 19.9),
textAlign: TextAlign.center,
),
),
Padding(
padding: const EdgeInsets.all(9.0),
child: Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.black, width: 1),
borderRadius: BorderRadius.circular(9.0),
),
child: Padding(
padding: const EdgeInsets.fromLTRB(9.0, 18.0, 9.0, 18.0),
child: Text(
fee,
style: const TextStyle(
fontSize: 19.9,
wordSpacing: 2.0,
),
textAlign: TextAlign.center,
),
),
),
),
const Padding(
padding: EdgeInsets.all(18.0),
child: Text(
'Amount To Send',
style: TextStyle(fontSize: 19.9),
textAlign: TextAlign.center,
),
),
Padding(
padding: const EdgeInsets.all(9.0),
child: Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.black, width: 1),
borderRadius: BorderRadius.circular(9.0),
),
child: Padding(
padding: const EdgeInsets.fromLTRB(9.0, 18.0, 9.0, 18.0),
child: Text(
'$amount sats',
style: const TextStyle(
fontSize: 19.9,
wordSpacing: 2.0,
),
textAlign: TextAlign.center,
),
),
),
),
const Padding(
padding: EdgeInsets.all(18.0),
child: Text(
'Receiving Address',
style: TextStyle(fontSize: 19.9),
textAlign: TextAlign.center,
),
),
Padding(
padding: const EdgeInsets.all(9.0),
child: Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.black, width: 1),
borderRadius: BorderRadius.circular(9.0),
),
child: Padding(
padding: const EdgeInsets.fromLTRB(9.0, 18.0, 9.0, 18.0),
child: Text(
address,
style: const TextStyle(fontSize: 19.9),
textAlign: TextAlign.center,
),
),
child: Card(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
const Padding(padding: EdgeInsets.all(9.0), child: Text('Transaction Fee', style: TextStyle(fontSize: 21.0, fontWeight: FontWeight.bold))),
Padding(padding: const EdgeInsets.all(9.0), child: Text(fee, style: const TextStyle(fontSize: 21.0))),
const SizedBox(height: 18.0,),
const Padding(padding: EdgeInsets.all(9.0), child: Text('Amount to Send', style: TextStyle(fontSize: 21.0, fontWeight: FontWeight.bold))),
Padding(padding: const EdgeInsets.all(9.0), child: Text('$amount sats', style: const TextStyle(fontSize: 21.0))),
const SizedBox(height: 18.0,),
const Padding(padding: EdgeInsets.all(9.0), child: Text('Destination Address', style: TextStyle(fontSize: 21.0, fontWeight: FontWeight.bold))),
Padding(padding: const EdgeInsets.all(9.0), child: Text(address, style: const TextStyle(fontSize: 21.0))),
]),
),
),
)
],
),
),
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: thirdbank
description: A free and open-source experimental non-custodial Bitcoin wallet that focuses on simplicity and ease of use.
publish_to: 'none'
version: 0.8.0
version: 0.8.1

environment:
sdk: '>=3.1.0 <4.0.0'
Expand Down

0 comments on commit f56ac6c

Please sign in to comment.