Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
93dd1ff
Copy bitcoin to litecoin
hectorchu Sep 9, 2025
aba259a
Add cw_mweb
hectorchu Sep 9, 2025
7f2d4ba
Build fixes
hectorchu Sep 9, 2025
0107963
Remove cw_core dep
hectorchu Sep 9, 2025
8ff7ab3
Add rpcs
hectorchu Sep 9, 2025
4335125
More stuff
hectorchu Sep 9, 2025
58950ab
update
hectorchu Sep 9, 2025
eaf0b5e
more stuff
hectorchu Sep 9, 2025
9bd7673
fix more build
hectorchu Sep 9, 2025
9baabae
fix build
hectorchu Sep 9, 2025
4d4fa15
oops
hectorchu Sep 9, 2025
858df23
Update proto
hectorchu Sep 9, 2025
516953d
more changes
hectorchu Sep 9, 2025
1b6088c
Update proto
hectorchu Sep 10, 2025
05e60d6
Add pubkey to index map
hectorchu Sep 10, 2025
0e434b4
Sign non mweb inputs
hectorchu Sep 10, 2025
3ef30af
small fix
hectorchu Sep 10, 2025
53e4456
Bump mwebd
hectorchu Sep 10, 2025
c39b021
update publicuri
hectorchu Sep 10, 2025
0b1e066
fix xpub
hectorchu Sep 10, 2025
c3a925e
Bump mwebd
hectorchu Sep 11, 2025
2011271
fixes
hectorchu Sep 12, 2025
db3c566
Show error from mwebd start
hectorchu Sep 12, 2025
7012a28
Bump mwebd
hectorchu Sep 12, 2025
cf8c3e4
Use unix socket for mwebd
hectorchu Sep 12, 2025
71e0984
Start mwebd early
hectorchu Sep 13, 2025
68b82c1
Remove artificial delay
hectorchu Sep 13, 2025
21e6135
Fixed unconfirmed transaction view mounting issues
hectorchu Sep 13, 2025
8ed1352
Bump mwebd
hectorchu Sep 13, 2025
289dded
switch to new rpc
hectorchu Sep 13, 2025
0a0af19
silly fix
hectorchu Sep 13, 2025
0477770
Bump mwebd
hectorchu Sep 14, 2025
0fb9be6
Don't eat psbt rpc errors
hectorchu Sep 14, 2025
efdda33
fix long line
hectorchu Sep 14, 2025
359f085
fix: don't estabilish connections
MrCyjaneK Oct 15, 2025
cb53573
address review comments
MrCyjaneK Nov 9, 2025
28c6b5f
Merge remote-tracking branch 'origin/main' into cyjan-ltc
MrCyjaneK Nov 9, 2025
27c787c
Update lib/coins/litecoin/creation/restore_wallet.dart
MrCyjaneK Nov 9, 2025
a2b1ae9
Update lib/coins/litecoin/creation/new_wallet.dart
MrCyjaneK Nov 9, 2025
b96832c
ui: address switcher
MrCyjaneK Nov 12, 2025
e4735b0
remove duplicate deps
OmarHatem28 Nov 21, 2025
4e0979f
fix: use older dependencies, update flutter to 3.32.0, fix BDK
MrCyjaneK Nov 22, 2025
234eda2
use proper assets, resize icon
MrCyjaneK Nov 24, 2025
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
2 changes: 1 addition & 1 deletion .fvmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"flutter": "3.29.3"
"flutter": "3.32.0"
}
13 changes: 9 additions & 4 deletions .github/workflows/build_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on: [push]
jobs:
app_android:
runs-on: ubuntu-latest
env:
ANDROID_NDK_VERSION: 28.2.13676358
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -20,14 +22,17 @@ jobs:
with:
distribution: 'zulu'
java-version: '17'
- name: Flutter pub get
- name: Git submodule update
run: |
flutter pub get
- name: Prepare dev
run: ./.tooling/prepare_dev.sh
git submodule update --init --recursive
- name: Build monero_c
run: |
make libs_android_download
- name: Flutter pub get
run: |
flutter pub get
- name: Prepare dev
run: make prepare_dev
- name: Build apk
run: |
flutter build apk --profile
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ on: [push]

jobs:
format:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
env:
ANDROID_NDK_VERSION: 28.2.13676358
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -20,6 +22,13 @@ jobs:
with:
distribution: 'zulu'
java-version: '17'
- name: Git submodule update
run: |
git submodule update --init --recursive
- name: Build monero_c
run: |
make libs_android_download

- name: Flutter pub get
run: |
flutter pub get
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "external/cake_wallet"]
path = external/cake_wallet
url = https://github.com/cake-tech/cake_wallet
4 changes: 2 additions & 2 deletions .tooling/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pushd lib/l10n
popd

dart run build_runner build --delete-conflicting-outputs
dart fix --apply .
dart format .
dart fix --apply lib/
dart format lib/

flutter gen-l10n
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"dart.flutterSdkPath": ".fvm/versions/3.29.3"
"dart.flutterSdkPath": ".fvm/versions/3.32.0"
}
27 changes: 16 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
include .env
UNAME := $(shell uname)

libs_android_download:
libs_android_download: mwebd_android
./build_moneroc.sh --prebuild --coin ${COIN} --tag ${MONERO_C_TAG} --triplet x86_64-linux-android --location android/app/src/main/jniLibs/x86_64
./build_moneroc.sh --prebuild --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-linux-android --location android/app/src/main/jniLibs/arm64-v8a
./build_moneroc.sh --prebuild --coin ${COIN} --tag ${MONERO_C_TAG} --triplet armv7a-linux-androideabi --location android/app/src/main/jniLibs/armeabi-v7a

libs_android_build:
libs_android_build: mwebd_android
ifneq ($(UNAME), Linux)
echo Only Linux hosts can build for android, try $(MAKE) libs_android_download
exit 1
Expand All @@ -15,15 +15,15 @@ endif
./build_moneroc.sh --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-linux-android --location android/app/src/main/jniLibs/arm64-v8a
./build_moneroc.sh --coin ${COIN} --tag ${MONERO_C_TAG} --triplet armv7a-linux-androideabi --location android/app/src/main/jniLibs/armeabi-v7a

libs_android_build_ci:
libs_android_build_ci: mwebd_android
./build_moneroc.sh --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-linux-android --location android/app/src/main/jniLibs/arm64-v8a

libs_ios_download:
libs_ios_download: mwebd_ios
./build_moneroc.sh --prebuild --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-apple-ios --location ios/native_libs/ios-arm64
./build_moneroc.sh --prebuild --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-apple-iossimulator --location ios/native_libs/ios-arm64-simulator
cd ios && ./gen_framework.sh

libs_ios_build:
libs_ios_build: mwebd_ios
ifneq ($(UNAME), Darwin)
echo Only Darwin hosts can build for iOS, try $(MAKE) libs_ios_download
exit 1
Expand All @@ -32,13 +32,18 @@ endif
./build_moneroc.sh --coin ${COIN} --tag ${MONERO_C_TAG} --triplet aarch64-apple-iossimulator --location ios/native_libs/ios-arm64-simulator
cd ios && ./gen_framework.sh

cupcake_android_monero:
dart run build_runner build --delete-conflicting-outputs
flutter build apk --dart-define=COIN_MONERO=true
cupcake_android:
flutter build apk

cupcake_ios_monero:
dart run build_runner build --delete-conflicting-outputs
flutter build ios --no-codesign --dart-define=COIN_MONERO=true
cupcake_ios:
flutter build ios --no-codesign

mwebd_android:
cd external/cake_wallet/scripts/android && bash ./build_mwebd.sh --dont-install

mwebd_ios:
cd external/cake_wallet/scripts/ios && bash ./build_mwebd.sh --dont-install

prepare_dev:
cd external/cake_wallet/scripts && bash ./prepare_torch.sh
./.tooling/prepare_dev.sh
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To build:
```bash
$ make libs_android_build # or libs_android_download, libs_ios_build, libs_ios_download
$ make prepare_dev # load dev signing key (not required on iOS)
$ make cupcake_android_monero # or cupcake_
$ make cupcake_android # or cupcake_ios
```

### Adding other coins
Expand Down
2 changes: 2 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ analyzer:
overridden_fields: ignore
exclude:
- '**.g.dart'
- 'external/**'

include: package:flutter_lints/flutter.yaml

linter:
Expand Down
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if (flutterVersionName == null) {
android {
namespace "com.cakewallet.cupcake"
compileSdk flutter.compileSdkVersion
ndkVersion "27.3.13750724"
ndkVersion "29.0.14206865"

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
Expand Down
5 changes: 5 additions & 0 deletions assets/coins/ltc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/icons/address_ltc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions assets/icons/address_mweb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/arrow_down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions external/cake_wallet
Submodule cake_wallet added at 3baea4
28 changes: 17 additions & 11 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
PODS:
- bdk_flutter (0.31.3):
- Flutter
- cw_mweb (0.0.1):
- Flutter
- fast_scanner (5.1.1):
- Flutter
- Flutter (1.0.0)
Expand Down Expand Up @@ -50,6 +52,7 @@ PODS:

DEPENDENCIES:
- bdk_flutter (from `.symlinks/plugins/bdk_flutter/ios`)
- cw_mweb (from `.symlinks/plugins/cw_mweb/ios`)
- fast_scanner (from `.symlinks/plugins/fast_scanner/ios`)
- Flutter (from `Flutter`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
Expand All @@ -69,6 +72,8 @@ SPEC REPOS:
EXTERNAL SOURCES:
bdk_flutter:
:path: ".symlinks/plugins/bdk_flutter/ios"
cw_mweb:
:path: ".symlinks/plugins/cw_mweb/ios"
fast_scanner:
:path: ".symlinks/plugins/fast_scanner/ios"
Flutter:
Expand All @@ -93,19 +98,20 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/url_launcher_ios/ios"

SPEC CHECKSUMS:
bdk_flutter: 86c9ba59ee282dee08c3a29599abe867d10a8b10
fast_scanner: 44c00940355a51258cd6c2085734193cd23d95bc
bdk_flutter: cef9180019b4c6b67a3e3dfb74611683fe140107
cw_mweb: 3aea2fb35b2bd04d8b2d21b83216f3b8fb768d85
fast_scanner: 2cb1ad3e69e645e9980fb4961396ce5804caa3e3
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
haptic_feedback: 8cb3ee0cb6b797946c2b0df9c99ebc8f7ed79c71
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
local_auth_darwin: fa4b06454df7df8e97c18d7ee55151c57e7af0de
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f
flutter_secure_storage: 1ed9476fba7e7a782b22888f956cce43e2c62f13
haptic_feedback: fd1d8509833f58f164fc12122c0357fa9b2750e0
integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e
local_auth_darwin: d2e8c53ef0c4f43c646462e3415432c4dab3ae19
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
sqlite3: 73513155ec6979715d3904ef53a8d68892d4032b
sqlite3_flutter_libs: 86f82662868ee26ff3451f73cac9c5fc2a1f57fa
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
sqlite3_flutter_libs: 83f8e9f5b6554077f1d93119fe20ebaa5f3a9ef1
url_launcher_ios: 694010445543906933d732453a59da0a173ae33d

PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796

Expand Down
22 changes: 21 additions & 1 deletion lib/coins/abstract/address.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
import 'package:flutter/material.dart';

class Address {
Address(this.address);
Address(this.label, this.address);
final AddressLabel label;
final String address;

@override
String toString() {
return address;
}
}

abstract class AddressLabel {
String get label;
String get extra;
Widget icon(final Color color);
}

class UnknownLabel implements AddressLabel {
@override
String get label => "";

@override
String get extra => "";

@override
Widget icon(final Color color) => SizedBox.shrink();
}
2 changes: 1 addition & 1 deletion lib/coins/abstract/coin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:cupcake/coins/abstract/wallet_info.dart';
import 'package:cupcake/l10n/app_localizations.dart';
import 'package:flutter/cupertino.dart';

enum Coins { monero, bitcoin, unknown }
enum Coins { monero, bitcoin, litecoin, unknown }

abstract class Coin {
static late AppLocalizations L;
Expand Down
5 changes: 2 additions & 3 deletions lib/coins/abstract/wallet.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:cupcake/coins/abstract/address.dart';
import 'package:cupcake/coins/abstract/coin.dart';
import 'package:cupcake/coins/abstract/wallet_info.dart';
import 'package:cupcake/coins/abstract/wallet_seed_detail.dart';
Expand Down Expand Up @@ -28,13 +29,11 @@ abstract class CoinWallet {

String get getAccountLabel;

String get getCurrentAddress;

String get seed;

String get passphrase;

String get primaryAddress;
List<Address> get address;

String get walletName;

Expand Down
3 changes: 3 additions & 0 deletions lib/coins/abstract/wallet_info.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:cupcake/coins/abstract/coin.dart';
import 'package:cupcake/coins/abstract/wallet.dart';
import 'package:cupcake/coins/bitcoin/wallet_info.dart';
import 'package:cupcake/coins/litecoin/wallet_info.dart';
import 'package:cupcake/coins/monero/wallet_info.dart';
import 'package:cupcake/utils/config.dart';
import 'package:flutter/widgets.dart';
Expand Down Expand Up @@ -41,6 +42,8 @@ abstract class CoinWalletInfo {
return MoneroWalletInfo(walletName);
case Coins.bitcoin:
return BitcoinWalletInfo(walletName);
case Coins.litecoin:
return LitecoinWalletInfo(walletName);
case Coins.unknown:
throw UnimplementedError("unknown coin");
}
Expand Down
18 changes: 15 additions & 3 deletions lib/coins/bitcoin/address.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
import 'package:cupcake/coins/abstract/address.dart';
import 'package:flutter/material.dart';

class BitcoinAddress implements Address {
BitcoinAddress(this.address);
class BitcoinAddress extends Address {
BitcoinAddress(super.label, super.address);
}

class SegwitAddress implements AddressLabel {
@override
Widget icon(final Color color) => Icon(
Icons.currency_bitcoin,
color: color,
);

@override
String get extra => "";

@override
final String address;
String get label => "SegWit";
}
1 change: 1 addition & 0 deletions lib/coins/bitcoin/creation/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class BitcoinWalletCreation extends WalletCreation {
await Future.delayed(Duration.zero); // do not call on build();
seed.ctrl.clear();
passphrase.ctrl.clear();
passphraseConfirm.ctrl.clear();
}

@override
Expand Down
3 changes: 0 additions & 3 deletions lib/coins/bitcoin/creation/new_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,16 @@ class CreateBitcoinWalletCreationMethod extends CreationMethod {
required this.walletPath,
required this.walletPassword,
required this.passphrase,
this.progressCallback,
});
final coin = Bitcoin();
final AppLocalizations L;

final ProgressCallback? progressCallback;
final String walletPath;
final String walletPassword;
final String passphrase;

@override
Future<CreationOutcome> create() async {
progressCallback?.call(description: L.generating_polyseed);
final mnemonic = await Mnemonic.create(WordCount.words12);

final keys = "${Bitcoin().getPathForWallet(p.basename(walletPath))}.keys";
Expand Down
Loading
Loading