Files
hash-wallet/lib/new-ui/pages/about_page.dart
T
jwinterm dd449f2594 Merge upstream Cake Wallet v6.5.0
Catches up from the May 12 fork point (v6.1.2+23) through v6.5.0: 535
upstream commits, including the Monero silent-open fix, Monero on Trezor,
Ledger/Trezor BLE fixes, the new seed and history screens, quick Bitcoin
sync, git-pinned dependencies (pubspec_overrides.yaml), frozen Hive
adapters (*.part.dart), monero_c v0.18.4.6-RC2 and Flutter 3.41.9.

Merged with both sides normalized first (import rename, 100-column
format), which took the conflict count from 614 paths to 322. The
procedure is now scripts/upstream_sync.sh.

Kept from Hash Bags:
- WalletType enum order and Hive IDs. SQLite stores WalletType.index and
  our order differs from upstream's; taking theirs would reread saved
  wallets as other chains. Our frozen adapter keeps the shipped IDs.
- The 1.0.2 legacy PIN and wallet-password decode and self-heal.
- Removed chains (Solana, Tron, Zano, Zcash, Decred, Haven) and the new
  Robinhood chain stay out; Cake Pay and non-Trocador swaps stay out.
- Default nodes (node.wownero.org, sethforprivacy, Blockstream, bysh.me),
  converted to upstream's isDefault node-list key; Wownero is back in the
  node reset list.
- Privacy: address resolvers limited to domain-anchored sources again;
  prices.neroswap.com for fiat; upstream's charts tab, which reads
  prices.cakewallet.com, sits behind FeatureFlag.isChartsEnabled = false.
- Lightning stays behind FeatureFlag.isLightningEnabled, including
  upstream's new post-seed Lightning username step.
- Our icon pipeline, branding and bundle identifiers.

Twelve new upstream widget tests are skipped: test and code are unchanged
from v6.5.0 apart from renames (not rerun on a pristine upstream checkout;
upstream's top_bar_test does not compile against its own TopBar).
flutter analyze lib: 0 errors; flutter test: 345 passed, 12 skipped;
flutter build bundle compiles. Built with Flutter 3.41.9.
2026-10-24 23:49:29 -04:00

127 lines
4.7 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import 'dart:math';
import 'package:hash_wallet/entities/new_ui_entities/list_item/list_item_regular_row.dart';
import 'package:hash_wallet/generated/i18n.dart';
import 'package:hash_wallet/new-ui/widgets/modal_page_wrapper.dart';
import 'package:hash_wallet/new-ui/widgets/receive_page/receive_top_bar.dart';
import 'package:hash_wallet/src/widgets/hash_image_widget.dart';
import 'package:hash_wallet/src/widgets/new_list_row/new_list_section.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
// written by people who happened to read my slack message in 2025
// whoever works on this codebase in the future, feel free to add your own mark here
const List<String> aboutPageEasterEggs = [
"Designed in (S)pain",
"Proudly managing over 🤷‍♂️ XMR",
"The bag is not a lie 💰",
"I don’t play soccer because I enjoy the sport. I’m just doing it for kicks.",
"Markets in red? Big deal.\nWhat color is the grass outside?",
"Conquered Web3, now working on Web6-7",
"Proud owner of none of your funds\n(we are not impressed)",
"*writing down my seedphrase*\nhash hash hash hash hash hash hash ha...",
"Don't forget to actually use your crypto to pay for stuff in the real world 🙂",
"A chain of blocks? That's preposterous!",
"IOU a hug <3",
"Warning: up to 4.8% programmed by cats",
"We love collecting your data <3\nWe're just really incompetent at it"
];
class AboutPage extends StatefulWidget {
const AboutPage({super.key, required this.appVersion});
final String appVersion;
@override
State<AboutPage> createState() => _AboutPageState();
}
class _AboutPageState extends State<AboutPage> {
static const int easterEggTreshold = 5;
String _bottomText = S.current.payment_made_easy;
int _easterEggCounter = 0;
void _easterEgg() {
_easterEggCounter++;
if (_easterEggCounter == easterEggTreshold) {
setState(() {
_bottomText = aboutPageEasterEggs.elementAt(Random().nextInt(aboutPageEasterEggs.length));
});
}
}
@override
Widget build(BuildContext context) {
return ModalPageWrapper(
topBar: ModalTopBar(
title: S.of(context).about,
leadingIcon: Icon(Icons.arrow_back_ios_new),
leadingSemanticLabel: S.of(context).seed_alert_back,
onLeadingPressed: Navigator.of(context).pop,
),
content: Container(
color: Theme.of(context).colorScheme.surface,
child: Column(children: [
Column(
children: [
Column(
spacing: 16,
children: [
SizedBox(),
GestureDetector(
onTap: _easterEgg,
child: HashImageWidget(
imageUrl: "assets/new-ui/hash_squircle_icon.svg",
width: 128,
height: 128,
),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
spacing: 8,
children: [
Text(
"Hash Bags",
style: TextStyle(fontSize: 32, fontWeight: FontWeight.w500),
),
Text(widget.appVersion,
style: TextStyle(
fontSize: 32,
fontWeight: FontWeight.w500,
color: Theme.of(context).colorScheme.onSurfaceVariant))
],
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 12.0),
child: Wrap(
children: [
Text(
_bottomText,
textAlign: TextAlign.center,
style: TextStyle(color: Theme.of(context).colorScheme.onSurfaceVariant),
),
],
),
),
],
),
SizedBox(height: 32),
NewListSections(sections: {
"": [
ListItemRegularRow(
keyValue: "gh",
label: "GitHub",
onTap: () =>
launchUrl(Uri.https("github.com", "Such-Software/hash-wallet")),
trailingIconPath: "assets/new-ui/link_arrow.svg",
foregroundColor: Theme.of(context).colorScheme.primary,
trailingIconSize: 10),
],
})
],
)
])),
);
}
}