Skip to content

Commit

Permalink
Merge branch 'main' into 1.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
willyfromtheblock authored Mar 24, 2024
2 parents 10e91e1 + 81d9bdf commit 4c1fa9c
Show file tree
Hide file tree
Showing 14 changed files with 494 additions and 409 deletions.
429 changes: 244 additions & 185 deletions CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
buildscript {
ext.kotlin_version = '1.7.21'
ext {
compileSdkVersion = 33
targetSdkVersion = 33
compileSdkVersion = 34
targetSdkVersion = 34
appCompatVersion = "1.1.0"
}

Expand Down
4 changes: 2 additions & 2 deletions lib/models/available_coins.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AvailableCoins {
letterCode: 'PPC',
iconPath: 'assets/icon/ppc-icon-48.png',
iconPathTransparent: 'assets/icon/ppc-icon-white-48.png',
networkType: NetworkParams.mainnet,
networkType: Network.mainnet,
opreturnSize: 256,
fractions: 6,
minimumTxValue: 10000,
Expand All @@ -39,7 +39,7 @@ class AvailableCoins {
letterCode: 'tPPC',
iconPath: 'assets/icon/ppc-icon-48-grey.png',
iconPathTransparent: 'assets/icon/ppc-icon-48-grey.png',
networkType: NetworkParams.testnet,
networkType: Network.testnet,
opreturnSize: 256,
fixedFee: true,
fractions: 6,
Expand Down
2 changes: 1 addition & 1 deletion lib/models/coin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Coin {
final String iconPath;
final String iconPathTransparent;
final String uriCode;
final NetworkParams networkType;
final Network networkType;
final int fractions;
final int minimumTxValue;
final double fixedFeePerKb;
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/changelog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ChangeLogScreen extends StatelessWidget {
styleSheet:
MarkdownStyleSheet.fromTheme(Theme.of(context))
.copyWith(
textScaleFactor: 1.1,
textScaler: const TextScaler.linear(1.1),
),
),
],
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/setup/setup_import_seed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class _SetupImportSeedState extends State<SetupImportSeedScreen> {
'createWallet',
e.toString(),
);
if (mounted) {
if (context.mounted) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/wallet/import_wif.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class _ImportWifScreenState extends State<ImportWifScreen> {
),
);
} else {
if (mounted) {
if (context.mounted) {
await showDialog(
context: ctx,
builder: (BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/wallet/transaction_confirmation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ class _TransactionConfirmationScreenState
'showTransactionConfirmation',
e.toString(),
);
if (mounted) {
if (context.mounted) {
ScaffoldMessenger.of(context)
.showSnackBar(
SnackBar(
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/wallet/wallet_home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ class _WalletHomeState extends State<WalletHomeScreen>
newState: false,
);

if (mounted) {
if (context.mounted) {
context.loaderOverlay.hide();
Navigator.of(context).pop(); // pops modal bottom sheet
}
Expand Down
2 changes: 1 addition & 1 deletion lib/tools/validators.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:coinlib_flutter/coinlib_flutter.dart';

/// Returns true if the address is valid for the given network.
bool validateAddress(String address, NetworkParams network) {
bool validateAddress(String address, Network network) {
try {
Address.fromString(address, network);
return true;
Expand Down
71 changes: 37 additions & 34 deletions lib/widgets/wallet/receive_tab.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:io';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:provider/provider.dart';
Expand Down Expand Up @@ -163,41 +164,43 @@ class _ReceiveTabState extends State<ReceiveTab> {
),
),
);
} else if (widget.wallet.letterCode == 'PPC' && Platform.isIOS == false) {
return Align(
child: PeerContainer(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
PeerServiceTitle(
title: AppLocalizations.instance.translate('buy_peercoin'),
),
const SizedBox(height: 20),
Text(
AppLocalizations.instance
.translate('receive_website_description'),
textAlign: TextAlign.center,
),
const SizedBox(height: 20),
PeerButton(
text: AppLocalizations.instance
.translate('receive_website_credit'),
action: () {
launchURL('https://ppc.lol/buy');
},
),
const SizedBox(height: 20),
PeerButton(
text: AppLocalizations.instance
.translate('receive_website_exchandes'),
action: () {
launchURL('https://ppc.lol/exchanges');
},
),
],
} else if (!kIsWeb) {
if (widget.wallet.letterCode == 'PPC' && Platform.isIOS == false) {
return Align(
child: PeerContainer(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
PeerServiceTitle(
title: AppLocalizations.instance.translate('buy_peercoin'),
),
const SizedBox(height: 20),
Text(
AppLocalizations.instance
.translate('receive_website_description'),
textAlign: TextAlign.center,
),
const SizedBox(height: 20),
PeerButton(
text: AppLocalizations.instance
.translate('receive_website_credit'),
action: () {
launchURL('https://ppc.lol/buy');
},
),
const SizedBox(height: 20),
PeerButton(
text: AppLocalizations.instance
.translate('receive_website_exchandes'),
action: () {
launchURL('https://ppc.lol/exchanges');
},
),
],
),
),
),
);
);
}
}
return const SizedBox();
}
Expand Down
9 changes: 4 additions & 5 deletions lib/widgets/wallet/send_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,10 @@ class _SendTabState extends State<SendTab> {
currentIndex: _currentAddressIndex + 1,
numberOfRecipients: _numberOfRecipients,
raiseNewindex: (int newIndex) => setState(
() => {
if (triggerFormValidation())
{
_currentAddressIndex = newIndex - 1,
},
() {
if (triggerFormValidation()) {
_currentAddressIndex = newIndex - 1;
}
},
),
)
Expand Down
Loading

0 comments on commit 4c1fa9c

Please sign in to comment.