mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-29 06:38:45 +01:00
Merge branch 'cake-tech:dev' into dev
This commit is contained in:
@@ -210,45 +210,48 @@ class BaseAlertDialog extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.all(16.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () => null,
|
onTap: () => null,
|
||||||
child: Container(
|
child: Material(
|
||||||
decoration: BoxDecoration(
|
borderRadius: BorderRadius.circular(24),
|
||||||
borderRadius: BorderRadius.circular(24),
|
child: Container(
|
||||||
color: Theme.of(context).colorScheme.surface,
|
decoration: BoxDecoration(
|
||||||
),
|
borderRadius: BorderRadius.circular(24),
|
||||||
child: Padding(
|
color: Theme.of(context).colorScheme.surface,
|
||||||
padding: const EdgeInsets.all(24.0),
|
),
|
||||||
child: Stack(
|
child: Padding(
|
||||||
clipBehavior: Clip.none,
|
padding: const EdgeInsets.all(24.0),
|
||||||
children: [
|
child: Stack(
|
||||||
if (headerImageUrl != null) headerImage(context, headerImageUrl!),
|
clipBehavior: Clip.none,
|
||||||
Column(
|
children: [
|
||||||
mainAxisSize: MainAxisSize.min,
|
if (headerImageUrl != null) headerImage(context, headerImageUrl!),
|
||||||
children: <Widget>[
|
Column(
|
||||||
if (headerImageUrl != null) const SizedBox(height: 50),
|
mainAxisSize: MainAxisSize.min,
|
||||||
Column(
|
children: <Widget>[
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
if (headerImageUrl != null) const SizedBox(height: 50),
|
||||||
children: <Widget>[
|
Column(
|
||||||
if (headerText?.isNotEmpty ?? false) headerTitle(context),
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
titleText != null
|
children: <Widget>[
|
||||||
? title(context)
|
if (headerText?.isNotEmpty ?? false) headerTitle(context),
|
||||||
: SizedBox(height: 16),
|
titleText != null
|
||||||
isDividerExists
|
? title(context)
|
||||||
? Padding(
|
: SizedBox(height: 16),
|
||||||
padding: EdgeInsets.only(top: 16, bottom: 8),
|
isDividerExists
|
||||||
child: const HorizontalSectionDivider(),
|
? Padding(
|
||||||
)
|
padding: EdgeInsets.only(top: 16, bottom: 8),
|
||||||
: Offstage(),
|
child: const HorizontalSectionDivider(),
|
||||||
Padding(
|
)
|
||||||
padding: EdgeInsets.symmetric(vertical: 25),
|
: Offstage(),
|
||||||
child: content(context),
|
Padding(
|
||||||
)
|
padding: EdgeInsets.symmetric(vertical: 25),
|
||||||
],
|
child: content(context),
|
||||||
),
|
)
|
||||||
// if (isBottomDividerExists) const HorizontalSectionDivider(),
|
],
|
||||||
actionButtons(context)
|
),
|
||||||
],
|
// if (isBottomDividerExists) const HorizontalSectionDivider(),
|
||||||
),
|
actionButtons(context)
|
||||||
],
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -482,14 +482,16 @@ abstract class DashboardViewModelBase with Store {
|
|||||||
}
|
}
|
||||||
// printV("Transaction disposer callback (relevantTxs: ${relevantTxs.length} current: ${transactions.length})");
|
// printV("Transaction disposer callback (relevantTxs: ${relevantTxs.length} current: ${transactions.length})");
|
||||||
|
|
||||||
String _txIdentityString(String txHash, TransactionDirection direction) => '${txHash}_$direction';
|
String _txIdentityString(String txHash, TransactionDirection direction) => "${txHash}_$direction";
|
||||||
|
String _txIdentityStringConfirmations(String txHash, TransactionDirection direction, int confirmations) => "${txHash}_${direction}_$confirmations";
|
||||||
|
|
||||||
|
|
||||||
final existingKeys = transactions
|
final existingKeys = transactions
|
||||||
.map((item) => _txIdentityString(item.transaction.txHash, item.transaction.direction))
|
.map((item) => _txIdentityStringConfirmations(item.transaction.txHash, item.transaction.direction, item.transaction.confirmations))
|
||||||
.toSet();
|
.toSet();
|
||||||
|
|
||||||
final newTransactions = relevantTxs
|
final newTransactions = relevantTxs
|
||||||
.where((tx) => !existingKeys.contains(_txIdentityString(tx.txHash, tx.direction)))
|
.where((tx) => !existingKeys.contains(_txIdentityStringConfirmations(tx.txHash, tx.direction, tx.confirmations)))
|
||||||
.map((tx) => TransactionListItem(
|
.map((tx) => TransactionListItem(
|
||||||
transaction: tx,
|
transaction: tx,
|
||||||
balanceViewModel: balanceViewModel,
|
balanceViewModel: balanceViewModel,
|
||||||
|
|||||||
Reference in New Issue
Block a user