Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mr cyjane k cyjan monerodart #1425

Closed
wants to merge 196 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
6b795b5
feat: rebase btc-addr-types, migrate to bitcoin_base
rafael-xmr Feb 26, 2024
2cbf1dc
feat: allow scanning elect-rs using get_tweaks
rafael-xmr Feb 26, 2024
3c88146
feat: scanning and adding addresses working with getTweaks, add btc S…
rafael-xmr Feb 27, 2024
a5bc338
chore: pubspec.lock
rafael-xmr Feb 27, 2024
2967809
chore: pubspec.lock
rafael-xmr Feb 27, 2024
a44bd6b
fix: scan when switching, fix multiple unspents in same tx
rafael-xmr Feb 27, 2024
477aff0
fix: initial scan
rafael-xmr Feb 28, 2024
f58fca3
fix: initial scan
rafael-xmr Feb 28, 2024
c5bd0d2
Merge remote-tracking branch 'origin/main' into CW-453-silent-payments
rafael-xmr Feb 28, 2024
0016d43
fix: scanning issues
rafael-xmr Feb 28, 2024
18697fb
fix: sync, storing silent unspents
rafael-xmr Mar 1, 2024
9faba04
Merge remote-tracking branch 'origin/main' into CW-453-silent-payments
rafael-xmr Mar 1, 2024
2db156e
chore: deps
rafael-xmr Mar 1, 2024
23a3683
fix: label issues, clear spent utxo
rafael-xmr Mar 5, 2024
1d8ca1d
Merge remote-tracking branch 'origin/main' into CW-453-silent-payment…
rafael-xmr Mar 5, 2024
0832e21
chore: deps
rafael-xmr Mar 5, 2024
e8abd86
fix: build
rafael-xmr Mar 5, 2024
4308e3e
fix: missing types
rafael-xmr Mar 5, 2024
dd532b4
feat: new electrs API & changes, fixes for last block scanning
rafael-xmr Mar 11, 2024
ce864d1
Merge remote-tracking branch 'origin/main' into CW-453-silent-payments
rafael-xmr Mar 11, 2024
7197a7b
Merge remote-tracking branch 'origin/main' into CW-453-silent-payments
rafael-xmr Apr 1, 2024
8ed3e41
feat: Scan Silent Payments homepage toggle
rafael-xmr Apr 1, 2024
d6de17c
chore: build configure
rafael-xmr Apr 1, 2024
226c47c
feat: generic fixes, testnet UI improvements, useSSL on bitcoin nodes
rafael-xmr Apr 5, 2024
b47b1d5
Merge remote-tracking branch 'origin/main' into CW-453-silent-payments
rafael-xmr Apr 5, 2024
2b23ab1
fix: invalid Object in sendData
rafael-xmr Apr 5, 2024
dd803ed
Merge remote-tracking branch 'origin/main' into CW-453-silent-payments
rafael-xmr Apr 8, 2024
487be52
feat: improve addresses page & address book displays
rafael-xmr Apr 8, 2024
36c6436
feat: silent payments labeled addresses disclaimer
rafael-xmr Apr 8, 2024
6ee57a7
fix: missing i18n
rafael-xmr Apr 8, 2024
058ff6a
chore: print
rafael-xmr Apr 9, 2024
8ea2e6e
feat: single block scan, rescan by date working for btc mainnet
rafael-xmr Apr 9, 2024
ddbb63a
feat: new cake features page replace market page, move sp scan toggle…
rafael-xmr Apr 9, 2024
fa5effd
feat: delete silent addresses
rafael-xmr Apr 9, 2024
0777db8
fix: red dot in non ssl nodes
rafael-xmr Apr 9, 2024
65d6a89
fix: inconsistent connection states, fix tx history
rafael-xmr Apr 9, 2024
465c7ef
fix: tx & balance displays, cpfp sending
rafael-xmr Apr 10, 2024
a4f8cdf
feat: new rust lib
rafael-xmr Apr 12, 2024
551c457
Merge remote-tracking branch 'origin/main' into CW-453-silent-payments
rafael-xmr Apr 12, 2024
7f792fc
chore: node path
rafael-xmr Apr 12, 2024
2df4a17
fix: check node based on network
rafael-xmr Apr 12, 2024
2b42b55
fix: missing txcount from addresses
rafael-xmr Apr 12, 2024
021347a
style: padding in feature page cards
rafael-xmr Apr 12, 2024
23d6221
fix: restore not getting all wallet addresses by type
rafael-xmr Apr 12, 2024
615db5a
fix: auto switch node broken
rafael-xmr Apr 12, 2024
a887ea7
fix: silent payment txs not being restored
rafael-xmr Apr 15, 2024
e4156ba
feat: change scanning to subscription model, sync improvements
rafael-xmr Apr 17, 2024
53fe2b0
Merge remote-tracking branch 'origin/main' into CW-453-silent-payments
rafael-xmr Apr 17, 2024
eb64a75
fix: scan re-subscription
rafael-xmr Apr 18, 2024
5b3128f
fix: default nodes
rafael-xmr Apr 18, 2024
ca81d44
fix: improve scanning by date, fix single block scan
rafael-xmr Apr 18, 2024
67256d3
refactor: common function for input tx selection
rafael-xmr Apr 18, 2024
5f78769
various fixes for build issues
MrCyjaneK Apr 10, 2024
7bc6967
initial monero.dart implementation
MrCyjaneK Apr 10, 2024
176150c
...
MrCyjaneK Apr 12, 2024
dcf6140
multiple wallets
MrCyjaneK Apr 16, 2024
5b42130
other fixes from monero.dart and monero_c
MrCyjaneK Apr 20, 2024
39845d6
fix: nodes & build
rafael-xmr Apr 22, 2024
78f801e
update build scripts
MrCyjaneK Apr 23, 2024
7cf0a76
remove unnecessary code
MrCyjaneK Apr 23, 2024
5a03c04
Add windows app, build scripts and build guide for it.
mkyq Sep 27, 2023
2ffd8ed
Minor fix in generated monero configs
OmarHatem28 Sep 27, 2023
4a7d8ca
fix: send all with multiple outs
rafael-xmr Apr 30, 2024
04fa18a
add missing monero_c command
MrCyjaneK May 1, 2024
a0fd73a
add android build script
MrCyjaneK May 1, 2024
e866d38
Merge and fix main
OmarHatem28 May 2, 2024
e5b78cd
Merge and fix main
OmarHatem28 May 2, 2024
bc1cfc5
undo android ndk removal
OmarHatem28 May 2, 2024
0510cee
Fix modified exception_handler.dart
OmarHatem28 May 2, 2024
d6081c4
Temporarily remove haven
OmarHatem28 May 2, 2024
bda1a85
fix build issues
MrCyjaneK May 2, 2024
2d0ab86
fix pr script
MrCyjaneK May 3, 2024
924afdf
Fixes for build monero.dart (monero_c) for windows.
mkyq May 3, 2024
ac30e14
monero build script
MrCyjaneK May 3, 2024
e504cf1
wip: ios build script
MrCyjaneK May 4, 2024
0a57de0
Merge remote-tracking branch 'origin/main' into CW-453-silent-payments
rafael-xmr May 6, 2024
242e92b
Merge remote-tracking branch 'origin/main' into CW-453-silent-payments
rafael-xmr May 6, 2024
d49b1be
Merge remote-tracking branch 'origin/CW-453-silent-payments' into CW-…
rafael-xmr May 6, 2024
781cbc2
refactor: unchanged file
rafael-xmr May 6, 2024
bd02c1f
Added build guides for iOS and macOS. Replaced nproc call on macOS. A…
mkyq May 6, 2024
eef2514
Update monero.dart and monero_c versions.
mkyq May 7, 2024
950cc84
Add missed windows build scripts
mkyq May 7, 2024
657e9ac
Merge remote-tracking branch 'origin/main' into CW-453-silent-payments
rafael-xmr May 6, 2024
1cb7189
Update the application configuration for windows build script.
mkyq May 7, 2024
eccc339
Update cw_monero pubspec lock file for monero.dart
mkyq May 7, 2024
69dd7a5
Update pr_test_build.yml
OmarHatem28 May 8, 2024
15ca7d6
chore: upgrade
rafael-xmr May 8, 2024
05a23a9
Merge remote-tracking branch 'origin/main' into CW-453-silent-payments
rafael-xmr May 8, 2024
1ebd19f
chore: merge changes
rafael-xmr May 8, 2024
61d7051
Merge remote-tracking branch 'origin/CW-453-silent-payments' into CW-…
rafael-xmr May 8, 2024
f090d09
refactor: unchanged files [skip ci]
rafael-xmr May 8, 2024
ca037d9
Merge branch 'main' of https://github.com/cake-tech/cake_wallet into …
OmarHatem28 May 8, 2024
a745c59
Fix conflicts with main
OmarHatem28 May 8, 2024
0e902b6
fix for multiple wallets
MrCyjaneK May 8, 2024
8f75256
Merge branch 'main' into MrCyjaneK-cyjan-monerodart
OmarHatem28 May 8, 2024
bf14a14
Add tron to windows application configuration.
mkyq May 8, 2024
1fe4470
Add macOS option for description message in configure_cake_wallet.sh
mkyq May 8, 2024
75f3cb7
Include missed monero dll for windows.
mkyq May 8, 2024
49a92ff
Merge branch 'main' of https://github.com/cake-tech/cake_wallet into …
OmarHatem28 May 8, 2024
fa53913
fix conflicts with main
OmarHatem28 May 8, 2024
b7c942a
Merge remote-tracking branch 'origin/main' into CW-453-silent-payments
rafael-xmr May 9, 2024
524f186
Merge branch 'main' into MrCyjaneK-cyjan-monerodart
OmarHatem28 May 9, 2024
1c17b69
Merge branch 'main' into MrCyjaneK-cyjan-monerodart
OmarHatem28 May 9, 2024
112c092
Disable haven configuration for iOS as default. Add ability to config…
mkyq May 9, 2024
8e5d997
fix: scan fixes, add date, allow sending while scanning
rafael-xmr May 9, 2024
8b5ab79
Merge remote-tracking branch 'origin/main' into CW-453-silent-payments
rafael-xmr May 9, 2024
7d91c5e
add missing nano secrets file [skip ci]
OmarHatem28 May 10, 2024
6d9cf1d
ios library
MrCyjaneK May 10, 2024
00f79a3
don't pull prebuilds android
MrCyjaneK May 10, 2024
ae1fe40
Add auto generation of manifest file for android project even for iOS…
mkyq May 10, 2024
e72ed49
feat: sync fixes, sp settings
rafael-xmr May 10, 2024
4ac357f
Merge remote-tracking branch 'origin/main' into CW-453-silent-payments
rafael-xmr May 10, 2024
3c041ee
feat: fix resyncing
rafael-xmr May 11, 2024
2d883f8
store crash fix
MrCyjaneK May 11, 2024
f6d41f3
Merge branch 'main' into MrCyjaneK-cyjan-monerodart
OmarHatem28 May 11, 2024
e68cae6
make init async so it won't lag
MrCyjaneK May 12, 2024
5ce0d6f
fix monero_c build issues
MrCyjaneK May 13, 2024
9702b64
libstdc++
MrCyjaneK May 13, 2024
ed866d9
Fix MacOS saving wallet file issue
OmarHatem28 May 13, 2024
2f69596
update pubspec.lock
OmarHatem28 May 13, 2024
2c978fc
Merge branch 'main' of https://github.com/cake-tech/cake_wallet into …
OmarHatem28 May 13, 2024
6291f72
Merge branch 'main' of https://github.com/cake-tech/cake_wallet into …
OmarHatem28 May 14, 2024
1599626
fix build script
MrCyjaneK May 14, 2024
9169551
Use dylib as iOS framework. Use custom path for loading of iOS framew…
mkyq May 14, 2024
e1acef2
fix: date from height logic, status disconnected & chain tip get
rafael-xmr May 14, 2024
ec6225b
fix: params
rafael-xmr May 14, 2024
2c9558d
Merge remote-tracking branch 'origin/main' into CW-453-silent-payments
rafael-xmr May 14, 2024
8f8ee34
Merge branch 'main' of https://github.com/cake-tech/cake_wallet into …
OmarHatem28 May 14, 2024
290bdf3
feat: electrum migration if using cake electrum
rafael-xmr May 14, 2024
20b0f24
Merge remote-tracking branch 'origin/CW-453-silent-payments' into CW-…
rafael-xmr May 14, 2024
78a6015
fix nodes
OmarHatem28 May 14, 2024
7783875
Merge branch 'main' of https://github.com/cake-tech/cake_wallet into …
OmarHatem28 May 14, 2024
081de3f
re-enable tron
OmarHatem28 May 15, 2024
f61e9b2
update sp_scanner to work on iOS [skip ci]
OmarHatem28 May 15, 2024
b56e01b
Merge branch 'main' of https://github.com/cake-tech/cake_wallet into …
OmarHatem28 May 15, 2024
b35b066
bump monero_c hash
MrCyjaneK May 15, 2024
e3a1fc7
Merge remote-tracking branch 'origin/MrCyjaneK-cyjan-monerodart' into…
OmarHatem28 May 15, 2024
562cfb2
bump monero_c commit
MrCyjaneK May 15, 2024
603dd5d
bump moneroc version
MrCyjaneK May 15, 2024
910bcb2
bump monero_c commit
MrCyjaneK May 15, 2024
888543c
Merge remote-tracking branch 'origin/MrCyjaneK-cyjan-monerodart' into…
OmarHatem28 May 15, 2024
bf2ff45
Add ability to build monero wallet lib as universal lib. Update macOS…
mkyq May 15, 2024
015bb1f
fix: wrong socket for old electrum nodes
rafael-xmr May 16, 2024
8955df8
Merge branch 'main' into MrCyjaneK-cyjan-monerodart
OmarHatem28 May 17, 2024
57e7314
Fix unchecked wallet type call
OmarHatem28 May 18, 2024
6eb8f35
Merge branch 'main' into CW-453-silent-payments
OmarHatem28 May 18, 2024
c8bdc3d
get App Dir correctly in default_settings_migration.dart
OmarHatem28 May 19, 2024
f3197a6
Merge remote-tracking branch 'origin/MrCyjaneK-cyjan-monerodart' into…
OmarHatem28 May 19, 2024
6d76130
handle previous issue with fetching linux documents directory [skip ci]
OmarHatem28 May 19, 2024
d78f524
backup fix
MrCyjaneK May 20, 2024
c5a532a
fix NTFS issues
MrCyjaneK May 21, 2024
5ca5c54
Merge branch 'main' into MrCyjaneK-cyjan-monerodart
OmarHatem28 May 21, 2024
cf8a20f
Close the wallet when the wallet gets changed
konstantinullrich May 22, 2024
00ceb93
fix: double balance
rafael-xmr May 22, 2024
932161a
feat: node domain
rafael-xmr May 22, 2024
dc86968
Merge remote-tracking branch 'origin/main' into CW-453-silent-payments
rafael-xmr May 22, 2024
d230904
fix: menu name
rafael-xmr May 23, 2024
bcb2240
Merge branch 'main' of https://github.com/cake-tech/cake_wallet into …
OmarHatem28 May 23, 2024
97a5812
bump monero_c commit
MrCyjaneK May 24, 2024
4dd4241
Merge branch 'main' into MrCyjaneK-cyjan-monerodart
OmarHatem28 May 24, 2024
fb3c816
fix: update tip on set scanning
rafael-xmr May 24, 2024
da59860
fix: connection switching back and forth
rafael-xmr May 24, 2024
cfa4515
feat: check if node is electrs, and supports sp
rafael-xmr May 24, 2024
7650393
chore: fix build
rafael-xmr May 24, 2024
c71318c
Merge remote-tracking branch 'origin/CW-453-silent-payments' into CW-…
OmarHatem28 May 25, 2024
c4b4d4e
minor enhancements
OmarHatem28 May 25, 2024
9320e38
Merge branch 'main' into MrCyjaneK-cyjan-monerodart
OmarHatem28 May 25, 2024
ce2a9cd
fixes and enhancements
OmarHatem28 May 28, 2024
6d7ba21
Merge branch 'main' of https://github.com/cake-tech/cake_wallet into …
OmarHatem28 May 28, 2024
aee365c
solve conflicts with main
OmarHatem28 May 28, 2024
dc424b5
Merge branch 'refs/heads/main' into MrCyjaneK-cyjan-monerodart
konstantinullrich May 28, 2024
701c6b2
Only stop wallet on rename and delete
konstantinullrich May 28, 2024
802935d
fix: status toggle
rafael-xmr May 28, 2024
1786474
Merge branch 'main' of https://github.com/cake-tech/cake_wallet into …
OmarHatem28 May 28, 2024
bac9093
minor enhancement
OmarHatem28 May 28, 2024
f4e01c5
Merge remote-tracking branch 'refs/remotes/origin/CW-453-silent-payme…
konstantinullrich May 29, 2024
17eddde
Monero.com fixes
OmarHatem28 May 29, 2024
cee7ab6
bump monero_c commit
MrCyjaneK May 29, 2024
fb6be41
update sp_scanner to include windows and linux
OmarHatem28 May 29, 2024
17c1362
Merge remote-tracking branch 'origin/MrCyjaneK-cyjan-monerodart' into…
konstantinullrich May 29, 2024
86d4c92
Merge remote-tracking branch 'refs/remotes/origin/CW-453-silent-payme…
konstantinullrich May 29, 2024
2fea9e0
Merge branch 'refs/heads/main' into MrCyjaneK-cyjan-monerodart
konstantinullrich May 29, 2024
30c7d2a
Update macOS build guide. Change brew dependencies for build unbound …
mkyq May 29, 2024
dc41f07
Merge branch 'main' of https://github.com/cake-tech/cake_wallet into …
OmarHatem28 Jun 4, 2024
b9f1d9b
fix conflicts and update macos build guide
OmarHatem28 Jun 4, 2024
b8d925e
remove build cache when on gh actions
MrCyjaneK Jun 5, 2024
f2bd5e5
update secure storage
OmarHatem28 Jun 5, 2024
ca2439a
free up even more storage
MrCyjaneK Jun 5, 2024
54fae0b
free up more storage
MrCyjaneK Jun 6, 2024
82b0115
Merge branch 'main' into MrCyjaneK-cyjan-monerodart
OmarHatem28 Jun 6, 2024
95bf36d
fix conflicts
OmarHatem28 Jun 6, 2024
26c7c3e
fix workflow issue
OmarHatem28 Jun 6, 2024
a564551
add keychain group entitlement and update script for RunnerBase on macos
fossephate Jun 9, 2024
8a3e98a
update secure_storage version to 8.1.0 in configure.dart
fossephate Jun 9, 2024
e42cc3f
Add Inno Setup Script for windows exe installer
konstantinullrich Jun 27, 2024
355d990
fixes from comments
MrCyjaneK Jun 28, 2024
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
1 change: 1 addition & 0 deletions .github/workflows/cache_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
/opt/android/cake_wallet/cw_monero/android/.cxx
/opt/android/cake_wallet/cw_monero/ios/External
/opt/android/cake_wallet/cw_shared_external/ios/External
/opt/android/cake_wallet/scripts/monero_c/release
key: ${{ hashFiles('**/build_monero.sh', '**/build_haven.sh', '**/monero_api.cpp') }}

- if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }}
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/pr_test_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,25 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "BRANCH_NAME=${{ github.event.inputs.branch }}" >> $GITHUB_ENV

- name: Free Up GitHub Actions Ubuntu Runner Disk Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Free Disk Space (Ubuntu)
uses: insightsengineering/disk-space-reclaimer@v1
with:
tools-cache: true
android: false
dotnet: true
haskell: true
large-packages: true
swap-storage: true
docker-images: true

- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: "11.x"

- name: Configure placeholder git details
run: |
git config --global user.email "CI@cakewallet.com"
git config --global user.name "Cake Github Actions"
- name: Flutter action
uses: subosito/flutter-action@v1
with:
Expand Down Expand Up @@ -72,7 +79,8 @@ jobs:
/opt/android/cake_wallet/cw_monero/android/.cxx
/opt/android/cake_wallet/cw_monero/ios/External
/opt/android/cake_wallet/cw_shared_external/ios/External
key: ${{ hashFiles('**/build_monero.sh', '**/build_haven.sh', '**/monero_api.cpp') }}
/opt/android/cake_wallet/scripts/monero_c/release
key: ${{ hashFiles('**/prepare_moneroc.sh' ,'**/build_monero_all.sh', '**/build_haven.sh', '**/monero_api.cpp') }}

- if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }}
name: Generate Externals
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ assets/images/app_logo.png
macos/Runner/Info.plist
macos/Runner/DebugProfile.entitlements
macos/Runner/Release.entitlements
macos/Runner/Runner.entitlements
lib/core/secure_storage.dart

macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
Expand All @@ -166,3 +167,8 @@ macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
macos/Runner/Configs/AppInfo.xcconfig

# Monero.dart (Monero_C)
scripts/monero_c
# iOS generated framework bin
ios/MoneroWallet.framework/MoneroWallet
16 changes: 8 additions & 8 deletions .metadata
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
# This file should be version controlled and should not be manually edited.

version:
revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
channel: stable
revision: "367f9ea16bfae1ca451b9cc27c1366870b187ae2"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
- platform: macos
create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
- platform: windows
create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2

# User provided section

Expand Down
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifestBase.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
android:fullBackupContent="false"
android:versionCode="__versionCode__"
android:versionName="__versionName__"
android:requestLegacyExternalStorage="true">
android:requestLegacyExternalStorage="true"
android:extractNativeLibs="true">
<activity
android:name=".MainActivity"
android:launchMode="singleInstance"
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/jniLibs/arm64-v8a/libc++_shared.so
Empty file.
1 change: 1 addition & 0 deletions android/app/src/main/jniLibs/armeabi-v7a/libc++_shared.so
Empty file.
Empty file.
1 change: 1 addition & 0 deletions android/app/src/main/jniLibs/x86_64/libc++_shared.so
38 changes: 38 additions & 0 deletions build-guide-win.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Building CakeWallet for Windows

## Requirements and Setup

The following are the system requirements to build CakeWallet for your Windows PC.

```
Windows 10 or later (64-bit), x86-64 based
Flutter 3 or above
```

## Building CakeWallet on Windows

These steps will help you configure and execute a build of CakeWallet from its source code.

### 1. Installing Package Dependencies

For build CakeWallet windows application from sources you will be needed to have:
> [Install Flutter]Follow installation guide (https://docs.flutter.dev/get-started/install/windows) and install do not miss to dev tools (install https://docs.flutter.dev/get-started/install/windows/desktop#development-tools) which are required for windows desktop development (need to install Git for Windows and Visual Studio 2022). Then install `Desktop development with C++` packages via GUI Visual Studio 2022, or Visual Studio Build Tools 2022 including: `C++ Build Tools core features`, `C++ 2022 Redistributable Update`, `C++ core desktop features`, `MVC v143 - VS 2022 C++ x64/x86 build tools`, `C++ CMake tools for Windwos`, `Testing tools core features - Build Tools`, `C++ AddressSanitizer`.
> [Install WSL] for building monero dependencies need to install Windows WSL (https://learn.microsoft.com/en-us/windows/wsl/install) and required packages for WSL (Ubuntu):
`$ sudo apt update `
`$ sudo apt build-essential cmake gcc-mingw-w64 g++-mingw-w64 autoconf libtool pkg-config`

### 2. Pull CakeWallet source code

You can downlaod CakeWallet source code from our [GitHub repository](github.com/cake-tech/cake_wallet) via git by following next command:
`$ git clone https://github.com/cake-tech/cake_wallet.git --branch MrCyjaneK-cyjan-monerodart`
OR you can download it as [Zip archive](https://github.com/cake-tech/cake_wallet/archive/refs/heads/MrCyjaneK-cyjan-monerodart.zip)

### 3. Build Monero, Monero_c and their dependencies

For use monero in the application need to build Monero wrapper - Monero_C which will be used by monero.dart package. For that need to run shell (bash - typically same named utility should be available after WSL is enabled in your system) with previously installed WSL, then change current directory to the application project directory with your used shell and then change current directory to `scripts/windows`: `$ cd scripts/windows`. Run build script: `$ ./build_all.sh`.

### 4. Configure and build CakeWallet application

To configure the application open directory where you have downloaded or unarchived CakeWallet sources and run `cakewallet.bat`.
Or if you used WSL and have active shell session you can run `$ ./cakewallet.sh` script in `scripts/windows` which will run `cakewallet.bat` in WSL.
After execution of `cakewallet.bat` you should to get `Cake Wallet.zip` in project root directory which will contains `CakeWallet.exe` file and another needed files for run the application. Now you can extract files from `Cake Wallet.zip` archive and run the application.
51 changes: 51 additions & 0 deletions cakewallet.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
@echo off
set cw_win_app_config=--monero --bitcoin --ethereum --polygon --nano --bitcoinCash --solana --tron
set cw_root=%cd%
set cw_archive_name=Cake Wallet.zip
set cw_archive_path=%cw_root%\%cw_archive_name%
set secrets_file_path=lib\.secrets.g.dart
set release_dir=build\windows\x64\runner\Release
@REM Path could be different
if [%~1]==[] (set tools_root=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Redist\MSVC\14.38.33135\x64\Microsoft.VC143.CRT) else (set tools_root=%1)
@REM Generate android manifest file
cd scripts
bash.exe gen_android_manifest.sh
cd /d %cw_root%
echo === Generating pubspec.yaml ===
copy /Y pubspec_description.yaml pubspec.yaml > nul
call flutter pub get > nul
call dart run tool\generate_pubspec.dart
call flutter pub get > nul
call dart run tool\configure.dart %cw_win_app_config%

IF NOT EXIST "%secrets_file_path%" (
echo === Generating new secrets file ===
call dart run tool\generate_new_secrets.dart
) ELSE (echo === Using previously/already generated secrets file: %secrets_file_path% ===)

echo === Generating mobx models ===
for /d %%i in (cw_core cw_monero cw_bitcoin cw_ethereum cw_evm cw_polygon cw_nano cw_bitcoin_cash cw_solana cw_tron .) do (
cd %%i
call flutter pub get > nul
call dart run build_runner build --delete-conflicting-outputs > nul
cd /d %cw_root%
)

echo === Generating localization files ===
call dart run tool\generate_localization.dart

echo === Building the application executable file ===
call flutter build windows --dart-define-from-file=env.json --release

echo === Prepare distribution actions. Copy needed files to the application bundle ===
copy /Y "%tools_root%\msvcp140.dll" "%release_dir%\" > nul
copy /Y "%tools_root%\vcruntime140.dll" "%release_dir%\" > nul
copy /Y "%tools_root%\vcruntime140_1.dll" "%release_dir%\" > nul

echo === Generate the application archive ===
xcopy /s /e /v /Y "%release_dir%\*.*" "build\Cake Wallet\" > nul
tar acf "%cw_archive_name%" -C build\ "Cake Wallet"

echo === Open Explorer with the application archive ===
echo Cake Wallet created archive at: %cw_archive_path%
%SystemRoot%\explorer.exe /select, %cw_archive_path%
12 changes: 10 additions & 2 deletions configure_cake_wallet.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#!/bin/bash

IOS="ios"
ANDROID="android"
MACOS="macos"

PLATFORMS=($IOS $ANDROID)
PLATFORMS=($IOS $ANDROID $MACOS)
PLATFORM=$1

if ! [[ " ${PLATFORMS[*]} " =~ " ${PLATFORM} " ]]; then
echo "specify platform: ./configure_cake_wallet.sh ios|android"
echo "specify platform: ./configure_cake_wallet.sh ios|android|macos"
exit 1
fi

Expand All @@ -14,6 +17,11 @@ if [ "$PLATFORM" == "$IOS" ]; then
cd scripts/ios
fi

if [ "$PLATFORM" == "$MACOS" ]; then
echo "Configuring for macOS"
cd scripts/macos
fi

if [ "$PLATFORM" == "$ANDROID" ]; then
echo "Configuring for Android"
cd scripts/android
Expand Down
7 changes: 4 additions & 3 deletions cw_core/lib/pathForWallet.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import 'dart:io';
import 'package:cw_core/root_dir.dart';
import 'package:cw_core/wallet_type.dart';
import 'package:path_provider/path_provider.dart';

Future<String> pathForWalletDir({required String name, required WalletType type}) async {
final root = await getApplicationDocumentsDirectory();
final root = await getAppDir();
final prefix = walletTypeToString(type).toLowerCase();
final walletsDir = Directory('${root.path}/wallets');
final walletDire = Directory('${walletsDir.path}/$prefix/$name');
Expand All @@ -20,8 +21,8 @@ Future<String> pathForWallet({required String name, required WalletType type}) a
.then((path) => path + '/$name');

Future<String> outdatedAndroidPathForWalletDir({required String name}) async {
final directory = await getApplicationDocumentsDirectory();
final directory = await getAppDir();
final pathDir = directory.path + '/$name';

return pathDir;
}
}
35 changes: 35 additions & 0 deletions cw_core/lib/root_dir.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import 'dart:io';
import 'package:path_provider/path_provider.dart';

String? _rootDirPath;

void setRootDirFromEnv() => _rootDirPath = Platform.environment['CAKE_WALLET_DIR'];

Future<Directory> getAppDir({String appName = 'cake_wallet'}) async {
Directory dir;

if (_rootDirPath != null && _rootDirPath!.isNotEmpty) {
dir = Directory.fromUri(Uri.file(_rootDirPath!));
dir.create(recursive: true);
} else {
if (Platform.isWindows) {
dir = await getApplicationSupportDirectory();
} else if (Platform.isLinux) {
String appDirPath;

try {
dir = await getApplicationDocumentsDirectory();
appDirPath = '${dir.path}/$appName';
} catch (e) {
appDirPath = '/home/${Platform.environment['USER']}/.$appName';
}

dir = Directory.fromUri(Uri.file(appDirPath));
await dir.create(recursive: true);
} else {
dir = await getApplicationDocumentsDirectory();
}
}

return dir;
}
8 changes: 8 additions & 0 deletions cw_core/lib/sec_random_native.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:io';
import 'dart:math';
import 'dart:typed_data';

import 'package:flutter/services.dart';
Expand All @@ -6,6 +8,12 @@ const utils = const MethodChannel('com.cake_wallet/native_utils');

Future<Uint8List> secRandom(int count) async {
try {
if (Platform.isWindows || Platform.isLinux) {
// Used method to get securely generated random bytes from cake backups
const byteSize = 256;
final rng = Random.secure();
return Uint8List.fromList(List<int>.generate(count, (_) => rng.nextInt(byteSize)));
}
return await utils.invokeMethod<Uint8List>('sec_random', {'count': count}) ?? Uint8List.fromList([]);
} on PlatformException catch (_) {
return Uint8List.fromList([]);
Expand Down
6 changes: 2 additions & 4 deletions cw_haven/lib/api/account_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import 'package:cw_haven/api/signatures.dart';
import 'package:cw_haven/api/types.dart';
import 'package:cw_haven/api/haven_api.dart';
import 'package:cw_haven/api/structs/account_row.dart';
import 'package:flutter/foundation.dart';
import 'package:cw_haven/api/wallet.dart';

final accountSizeNative = havenApi
Expand Down Expand Up @@ -72,12 +71,11 @@ void _setLabelForAccount(Map<String, dynamic> args) {
}

Future<void> addAccount({required String label}) async {
await compute(_addAccount, label);
_addAccount(label);
await store();
}

Future<void> setLabelForAccount({required int accountIndex, required String label}) async {
await compute(
_setLabelForAccount, {'accountIndex': accountIndex, 'label': label});
_setLabelForAccount({'accountIndex': accountIndex, 'label': label});
await store();
}
6 changes: 0 additions & 6 deletions cw_monero/android/.classpath

This file was deleted.

8 changes: 0 additions & 8 deletions cw_monero/android/.gitignore

This file was deleted.

23 changes: 0 additions & 23 deletions cw_monero/android/.project

This file was deleted.

Loading
Loading