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.3 #243

Merged
merged 45 commits into from
Nov 30, 2023
Merged

1.2.3 #243

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
746c425
version bump
willyfromtheblock Nov 7, 2023
d0344d1
upgrade coinlib_flutter to
willyfromtheblock Nov 7, 2023
546bd3f
skeleton for experimental features settings
willyfromtheblock Nov 7, 2023
029db30
allow to activate and deactivate experimental features
willyfromtheblock Nov 7, 2023
322edcc
replace tab class with enum
willyfromtheblock Nov 7, 2023
ec74bc6
allow option to add watchonly wallet
willyfromtheblock Nov 7, 2023
4d3e257
introduce watchOnly for wallet
willyfromtheblock Nov 7, 2023
f0c8a19
don't count watchOnly towards nOfWalletOfLetterCode
willyfromtheblock Nov 7, 2023
c69a1ff
wallets found in scan can not by watchOnly
willyfromtheblock Nov 7, 2023
620686a
show watch only icon in wallet list
willyfromtheblock Nov 7, 2023
7179e0f
fix tests
willyfromtheblock Nov 7, 2023
4c47ea9
don't generate unused address for watchOnly wallet
willyfromtheblock Nov 7, 2023
d158109
bottom navigation for watchOnly wallet
willyfromtheblock Nov 7, 2023
309e86c
reduce menu items for watchOnly
willyfromtheblock Nov 7, 2023
8ce1e40
pass watchOnly to address tab
willyfromtheblock Nov 7, 2023
acd5c89
introduce watchOnly address book
willyfromtheblock Nov 8, 2023
0817de4
move addr book search bar to walletHome appBar
willyfromtheblock Nov 9, 2023
62fa76b
first sucessful watch only wallet
willyfromtheblock Nov 9, 2023
f1ebcf5
make whole "watch only" line clickable
willyfromtheblock Nov 9, 2023
bbe17dc
bring over slidable from addr book
willyfromtheblock Nov 9, 2023
05da3d7
introduce isWatchOnly to address model
willyfromtheblock Nov 10, 2023
d6501ac
return isWatchOnly addresses from getWatchedWalletScriptHashes
willyfromtheblock Nov 10, 2023
d1509df
refactor addressbook slidable
willyfromtheblock Nov 10, 2023
dd49df6
fix layouting and colors for new addr book
willyfromtheblock Nov 10, 2023
837bdf8
properly remove watchOnly addresses
willyfromtheblock Nov 10, 2023
b7bf812
show place holders if no addresses are configured
willyfromtheblock Nov 10, 2023
20df713
migrate edit dialog and 2dos
willyfromtheblock Nov 10, 2023
b273fdd
changelog
willyfromtheblock Nov 15, 2023
6dcc067
upgrade dart and linter
willyfromtheblock Nov 16, 2023
24a3cc8
fix onSurface colors
willyfromtheblock Nov 16, 2023
0373fc7
fix appBarTheme in light mode
willyfromtheblock Nov 16, 2023
8436853
fix send tab for regular wallets
willyfromtheblock Nov 16, 2023
f112b9c
2do
willyfromtheblock Nov 16, 2023
f8c12ae
more theming 2dos
willyfromtheblock Nov 16, 2023
aaa5e30
fix e2e new key test and 2dos for theming
willyfromtheblock Nov 16, 2023
c5298f7
adapt snack bar colors to material 3
willyfromtheblock Nov 30, 2023
c2e2043
changelog
willyfromtheblock Nov 30, 2023
fa3b409
add cancel button to wallet reset
willyfromtheblock Nov 30, 2023
374e0db
give ModalBottomSheetContainer responsive width
willyfromtheblock Nov 30, 2023
0a9817d
2do is checked
willyfromtheblock Nov 30, 2023
e6f84e6
fix addr book issue in dark mode
willyfromtheblock Nov 30, 2023
2264aba
make watched icon explicitly black for dark mode
willyfromtheblock Nov 30, 2023
d601dfa
upgrade coinlib
willyfromtheblock Nov 30, 2023
2f464aa
convert slidable to expandable
willyfromtheblock Nov 30, 2023
26589c9
finalize watch only address book
willyfromtheblock Nov 30, 2023
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### **1.2.3** (2023-11-30)
* Experimental features are now available in Settings
* "Watch only" wallets are the first available feature that can be enabled. These wallets can only monitor the balance of an address and cannot spend coins.
* App now uses Material 3 design language

### **1.2.2** (2023-09-27)
* Change the options for purchasing Peercoin on some devices

Expand Down
5 changes: 5 additions & 0 deletions assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,12 @@
"app_settings_price_feed_disable_button": "Disable Price Feed API",
"app_settings_price_feed_search": "Search currency code",
"app_settings_language_search": "Search language",
"app_settings_experimental_features": "Experimental Features",
"app_settings_experimental_feature_watchOnlyWallets": "Watch only wallets",
"app_settings_price_alert_content": "This will enable our privacy friendly price data feed.\nIt can be disabled anytime.",
"app_wallets": "Wallets",
"watch_only": "Watch only",
"addresses_none": "No addresses found",
"authenticate_biometric_hint": "Verify identity",
"authenticate_biometric_reason": "Please authenticate.",
"authenticate_biometric_title": "Authentication required",
Expand Down Expand Up @@ -319,6 +323,7 @@
"receive_website_faucet": "You can receive free testnet coins on this faucet.",
"scan_qr": "Scan QR-Code",
"search": "Search",
"search_address": "Search address",
"select_coin": "Please select a coin",
"send": "Send",
"send_address": "Address",
Expand Down
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ void main() async {
}

class PeercoinApp extends StatelessWidget {
const PeercoinApp({Key? key}) : super(key: key);
const PeercoinApp({super.key});

@override
Widget build(BuildContext context) {
Expand Down
1 change: 1 addition & 0 deletions lib/models/experimental_features.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enum ExperimentalFeatures { watchOnlyWallets }
12 changes: 12 additions & 0 deletions lib/models/hive/app_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class AppOptionsStore extends HiveObject {
@HiveField(10, defaultValue: [])
List<String> _walletOrder = [];

@HiveField(11, defaultValue: [])
List<String> _activatedExperimentalFeatures = [];

AppOptionsStore(this._allowBiometrics);

bool get allowBiometrics {
Expand Down Expand Up @@ -142,4 +145,13 @@ class AppOptionsStore extends HiveObject {
List<String> get walletOrder {
return _walletOrder;
}

set activatedExperimentalFeatures(List<String> newFeatures) {
_activatedExperimentalFeatures = newFeatures;
save();
}

List<String> get activatedExperimentalFeatures {
return _activatedExperimentalFeatures;
}
}
10 changes: 7 additions & 3 deletions lib/models/hive/app_options.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions lib/models/hive/coin_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,16 @@ class CoinWallet extends HiveObject {
@HiveField(10, defaultValue: false)
bool _dueForRescan = false;

@HiveField(11, defaultValue: false)
bool _watchOnly = false;

CoinWallet(
this._name,
this._title,
this._letterCode,
this._walletIndex,
this._dueForRescan,
this._watchOnly,
);

set addNewAddress(WalletAddress newAddress) {
Expand All @@ -70,6 +74,10 @@ class CoinWallet extends HiveObject {
return _balance;
}

bool get watchOnly {
return _watchOnly;
}

set balance(int newBalance) {
_balance = newBalance;
save();
Expand Down Expand Up @@ -179,6 +187,11 @@ class CoinWallet extends HiveObject {
save();
}

void removeTransaction(WalletTransaction tx) {
_transactions.removeWhere((element) => element.txid == tx.txid);
save();
}

void putUtxo(WalletUtxo newUtxo) {
_utxos.add(newUtxo);
save();
Expand Down
7 changes: 5 additions & 2 deletions lib/models/hive/coin_wallet.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions lib/models/hive/wallet_address.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class WalletAddress extends HiveObject {
int notificationBackendCount = 0;
@HiveField(8, defaultValue: false)
bool isWatched = false;
@HiveField(9, defaultValue: false)
bool isWatchOnly = false;

WalletAddress({
required this.address,
Expand All @@ -29,6 +31,7 @@ class WalletAddress extends HiveObject {
required this.status,
required this.isOurs,
required this.wif,
required this.isWatchOnly,
});

set newStatus(String? newStatus) {
Expand Down
7 changes: 5 additions & 2 deletions lib/models/hive/wallet_address.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions lib/providers/app_settings_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,15 @@ class AppSettingsProvider with ChangeNotifier {
_appOptions.walletOrder = newOrder;
notifyListeners();
}

List<String> get activatedExperimentalFeatures {
return _appOptions.activatedExperimentalFeatures;
}

void setActivatedExperimentalFeatures(
List<String> newFeatures,
) {
_appOptions.activatedExperimentalFeatures = newFeatures;
notifyListeners();
}
}
Loading
Loading