V4.6.2 Bug Fixes (#874)

* Added a temporary workaround for empty receive addresses

* Fix Typo in PR template

* Make existing node private [skip ci]

* Fix transactions page background color [skip ci]

* Update ios version for internal test build [skip ci]

* update macos version for internal test build [skip ci]
This commit is contained in:
Omar Hatem 2023-04-17 21:09:26 +02:00 committed by GitHub
parent a472527c6f
commit 9e7009f339
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 29 additions and 14 deletions

View file

@ -8,6 +8,6 @@ Please include a summary of the changes and which issue is fixed / feature is ad
- [ ] Initial Manual Tests Passed - [ ] Initial Manual Tests Passed
- [ ] Double check modified code and verify it with the feature/task requirements - [ ] Double check modified code and verify it with the feature/task requirements
- [ ] Formate code - [ ] Format code
- [ ] Look for code duplication - [ ] Look for code duplication
- [ ] Clear naming for variables and methods - [ ] Clear naming for variables and methods

View file

@ -48,7 +48,13 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store {
@override @override
@computed @computed
String get address => receiveAddresses.first.address; String get address {
if (receiveAddresses.isEmpty) {
return generateNewAddress().address;
}
return receiveAddresses.first.address;
}
@override @override
set address(String addr) => null; set address(String addr) => null;
@ -121,8 +127,8 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store {
return address; return address;
} }
Future<BitcoinAddressRecord> generateNewAddress( BitcoinAddressRecord generateNewAddress(
{bitcoin.HDWallet? hd, bool isHidden = false}) async { {bitcoin.HDWallet? hd, bool isHidden = false}) {
currentReceiveAddressIndex += 1; currentReceiveAddressIndex += 1;
// FIX-ME: Check logic for whichi HD should be used here ??? // FIX-ME: Check logic for whichi HD should be used here ???
final address = BitcoinAddressRecord( final address = BitcoinAddressRecord(
@ -165,7 +171,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store {
Future<void> _discoverAddresses(bitcoin.HDWallet hd, bool isHidden) async { Future<void> _discoverAddresses(bitcoin.HDWallet hd, bool isHidden) async {
var hasAddrUse = true; var hasAddrUse = true;
List<BitcoinAddressRecord> addrs; List<BitcoinAddressRecord> addrs;
if (addresses.isNotEmpty) { if (addresses.isNotEmpty) {
addrs = addresses addrs = addresses
.where((addr) => addr.isHidden == isHidden) .where((addr) => addr.isHidden == isHidden)
@ -179,7 +185,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store {
hd: hd, hd: hd,
isHidden: isHidden); isHidden: isHidden);
} }
while(hasAddrUse) { while(hasAddrUse) {
final addr = addrs.last.address; final addr = addrs.last.address;
hasAddrUse = await _hasAddressUsed(addr); hasAddrUse = await _hasAddressUsed(addr);

View file

@ -146,6 +146,8 @@ PODS:
- CryptoSwift - CryptoSwift
- url_launcher_ios (0.0.1): - url_launcher_ios (0.0.1):
- Flutter - Flutter
- wakelock (0.0.1):
- Flutter
DEPENDENCIES: DEPENDENCIES:
- barcode_scan2 (from `.symlinks/plugins/barcode_scan2/ios`) - barcode_scan2 (from `.symlinks/plugins/barcode_scan2/ios`)
@ -173,6 +175,7 @@ DEPENDENCIES:
- uni_links (from `.symlinks/plugins/uni_links/ios`) - uni_links (from `.symlinks/plugins/uni_links/ios`)
- UnstoppableDomainsResolution (~> 4.0.0) - UnstoppableDomainsResolution (~> 4.0.0)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- wakelock (from `.symlinks/plugins/wakelock/ios`)
SPEC REPOS: SPEC REPOS:
https://github.com/CocoaPods/Specs.git: https://github.com/CocoaPods/Specs.git:
@ -235,6 +238,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/uni_links/ios" :path: ".symlinks/plugins/uni_links/ios"
url_launcher_ios: url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios" :path: ".symlinks/plugins/url_launcher_ios/ios"
wakelock:
:path: ".symlinks/plugins/wakelock/ios"
SPEC CHECKSUMS: SPEC CHECKSUMS:
barcode_scan2: 0af2bb63c81b4565aab6cd78278e4c0fa136dbb0 barcode_scan2: 0af2bb63c81b4565aab6cd78278e4c0fa136dbb0
@ -271,6 +276,7 @@ SPEC CHECKSUMS:
uni_links: d97da20c7701486ba192624d99bffaaffcfc298a uni_links: d97da20c7701486ba192624d99bffaaffcfc298a
UnstoppableDomainsResolution: c3c67f4d0a5e2437cb00d4bd50c2e00d6e743841 UnstoppableDomainsResolution: c3c67f4d0a5e2437cb00d4bd50c2e00d6e743841
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4 url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f
PODFILE CHECKSUM: ae71bdf0eb731a1ffc399c122f6aa4dea0cb5f6f PODFILE CHECKSUM: ae71bdf0eb731a1ffc399c122f6aa4dea0cb5f6f

View file

@ -1,5 +1,6 @@
import 'package:cake_wallet/src/screens/dashboard/widgets/anonpay_transaction_row.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/anonpay_transaction_row.dart';
import 'package:cake_wallet/src/screens/dashboard/widgets/order_row.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/order_row.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/view_model/dashboard/anonpay_transaction_list_item.dart'; import 'package:cake_wallet/view_model/dashboard/anonpay_transaction_list_item.dart';
import 'package:cake_wallet/view_model/dashboard/order_list_item.dart'; import 'package:cake_wallet/view_model/dashboard/order_list_item.dart';
import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/crypto_currency.dart';
@ -25,7 +26,9 @@ class TransactionsPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
color: Theme.of(context).backgroundColor, color: ResponsiveLayoutUtil.instance.isMobile(context)
? null
: Theme.of(context).backgroundColor,
padding: EdgeInsets.only(top: 24, bottom: 24), padding: EdgeInsets.only(top: 24, bottom: 24),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[

View file

@ -106,8 +106,8 @@ abstract class NodeCreateOrEditViewModelBase with Store {
state = IsExecutingState(); state = IsExecutingState();
if (editingNode != null) { if (editingNode != null) {
await _nodeSource.put(editingNode.key, node); await _nodeSource.put(editingNode.key, node);
} else if (existingNode(node) != null) { } else if (_existingNode(node) != null) {
setAsCurrent(existingNode(node)!); setAsCurrent(_existingNode(node)!);
} else { } else {
await _nodeSource.add(node); await _nodeSource.add(node);
setAsCurrent(_nodeSource.values.last); setAsCurrent(_nodeSource.values.last);
@ -140,7 +140,7 @@ abstract class NodeCreateOrEditViewModelBase with Store {
} }
} }
Node? existingNode(Node node) { Node? _existingNode(Node node) {
final nodes = _nodeSource.values.toList(); final nodes = _nodeSource.values.toList();
nodes.forEach((item) { nodes.forEach((item) {
item.login ??= ''; item.login ??= '';

View file

@ -18,8 +18,8 @@ MONERO_COM_BUILD_NUMBER=40
MONERO_COM_BUNDLE_ID="com.cakewallet.monero" MONERO_COM_BUNDLE_ID="com.cakewallet.monero"
CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_NAME="Cake Wallet"
CAKEWALLET_VERSION="4.6.2" CAKEWALLET_VERSION="4.6.3"
CAKEWALLET_BUILD_NUMBER=145 CAKEWALLET_BUILD_NUMBER=146
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"
HAVEN_NAME="Haven" HAVEN_NAME="Haven"

View file

@ -15,8 +15,8 @@ if [ -n "$1" ]; then
fi fi
CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_NAME="Cake Wallet"
CAKEWALLET_VERSION="1.0.1" CAKEWALLET_VERSION="1.0.2"
CAKEWALLET_BUILD_NUMBER=11 CAKEWALLET_BUILD_NUMBER=12
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"
if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then