Merge pull request #63 from cypherstack/desktop

Desktop
This commit is contained in:
julian-CStack 2022-09-14 16:07:36 -06:00 committed by GitHub
commit 8bcd155967
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 66 additions and 43 deletions

View file

@ -6,22 +6,26 @@ class ContactAddressEntry {
final Coin coin;
final String address;
final String label;
final String? other;
const ContactAddressEntry({
required this.coin,
required this.address,
required this.label,
this.other,
});
ContactAddressEntry copyWith({
Coin? coin,
String? address,
String? label,
String? other,
}) {
return ContactAddressEntry(
coin: coin ?? this.coin,
address: address ?? this.address,
label: label ?? this.label,
other: other ?? this.other,
);
}
@ -30,6 +34,7 @@ class ContactAddressEntry {
coin: Coin.values.byName(jsonObject["coin"] as String),
address: jsonObject["address"] as String,
label: jsonObject["label"] as String,
other: jsonObject["other"] as String?,
);
}
@ -38,6 +43,7 @@ class ContactAddressEntry {
"label": label,
"address": address,
"coin": coin.name,
"other": other ?? "",
};
}

View file

@ -73,6 +73,7 @@ class _AddressBookViewState extends ConsumerState<AddressBookView> {
coin: manager.coin,
address: await manager.currentReceivingAddress,
label: "Current Receiving",
other: manager.walletName,
),
);
}

View file

@ -208,6 +208,16 @@ class ContactPopUp extends ConsumerWidget {
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
if (contact.id == "default")
Text(
e.other!,
style:
STextStyles.itemSubtitle12,
),
if (contact.id == "default")
const SizedBox(
height: 2,
),
Text(
"${e.label} (${e.coin.ticker})",
style: STextStyles.itemSubtitle12,

View file

@ -376,9 +376,13 @@ class _WalletViewState extends ConsumerState<WalletView> {
const SizedBox(
width: 16,
),
Text(
ref.watch(managerProvider.select((value) => value.walletName)),
Expanded(
child: Text(
ref.watch(
managerProvider.select((value) => value.walletName)),
style: STextStyles.navBarTitle,
overflow: TextOverflow.ellipsis,
),
)
],
),

View file

@ -42,7 +42,7 @@ import 'package:stackwallet/utilities/prefs.dart';
import 'package:tuple/tuple.dart';
import 'package:uuid/uuid.dart';
const int MINIMUM_CONFIRMATIONS = 2;
const int MINIMUM_CONFIRMATIONS = 1;
const int DUST_LIMIT = 294;
const String GENESIS_HASH_MAINNET =

View file

@ -79,7 +79,8 @@ class WalletSheetCard extends ConsumerWidget {
const SizedBox(
width: 12,
),
Column(
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -118,6 +119,7 @@ class WalletSheetCard extends ConsumerWidget {
),
],
),
),
],
),
),

View file

@ -28,7 +28,7 @@ import 'bitcoin_wallet_test_parameters.dart';
void main() {
group("bitcoin constants", () {
test("bitcoin minimum confirmations", () async {
expect(MINIMUM_CONFIRMATIONS, 2);
expect(MINIMUM_CONFIRMATIONS, 1);
});
test("bitcoin dust limit", () async {
expect(DUST_LIMIT, 294);