fix: downgrade and fork reown (#2566)

Due to reown changing their license in version 1.2.0 we switched to use last open source release of reown with all fixes for flutter 3.32.0 and 16kb page size requirements. chore: drop dependency overrides for reown ci: switch prebuilds to use github releases instead of CDN fix: reown socket errors in onDone and onError fix: remove flutter_secure_storage on linux (closes #2577, #2561)

cyan committed Oct 17, 2025 at 20:05 UTC 2cf1202f3635ac55385ab19324b709daaec6d744
9 files changed +87 -64
.github/workflows/pr_test_build_android.yml
+10 -4
@@ -202,14 +202,20 @@ jobs:
202 pushd torch_dart
203 tar -xzf ../torch_dart.tar.gz
204 popd
205 + rm ./torch_dart.tar.gz
206 popd
207
207 - - name: Fetch reown dependencies
208 + - name: Fetch prebuilt Reown
209 run: |
210 set -x -e
210 - wget https://static.mrcyjanek.net/lfs/cake-yttrium/x86_64.so -O android/app/src/main/jniLibs/x86_64/libuniffi_yttrium.so
211 - wget https://static.mrcyjanek.net/lfs/cake-yttrium/arm64-v8a.so -O android/app/src/main/jniLibs/arm64-v8a/libuniffi_yttrium.so
212 - wget https://static.mrcyjanek.net/lfs/cake-yttrium/armeabi-v7a.so -O android/app/src/main/jniLibs/armeabi-v7a/libuniffi_yttrium.so
211 + pushd scripts
212 + wget https://github.com/cake-tech/reown_flutter/releases/download/v0.0.4/reown_flutter-v0.0.4.tar.gz -O reown_flutter.tar.gz
213 + mkdir reown_flutter
214 + pushd reown_flutter
215 + tar -xzf ../reown_flutter.tar.gz
216 + popd
217 + rm ./reown_flutter.tar.gz
218 + popd
219
220 - name: Execute Build and Setup Commands
221 run: |
.github/workflows/pr_test_build_linux.yml
+13
@@ -186,6 +186,19 @@ jobs:
186 pushd torch_dart
187 tar -xzf ../torch_dart.tar.gz
188 popd
189 + rm ./torch_dart.tar.gz
190 + popd
191 +
192 + - name: Fetch prebuilt Reown
193 + run: |
194 + set -x -e
195 + pushd scripts
196 + wget https://github.com/cake-tech/reown_flutter/releases/download/v0.0.4/reown_flutter-v0.0.4.tar.gz -O reown_flutter.tar.gz
197 + mkdir reown_flutter
198 + pushd reown_flutter
199 + tar -xzf ../reown_flutter.tar.gz
200 + popd
201 + rm ./reown_flutter.tar.gz
202 popd
203
204 - name: Execute Build and Setup Commands
Dockerfile
+1
@@ -134,6 +134,7 @@ RUN ARCH=$(uname -m) && \
134 "platforms;android-33" \
135 "platforms;android-34" \
136 "platforms;android-35" \
137 + "platforms;android-36" \
138 "build-tools;33.0.2" \
139 "build-tools;33.0.1" \
140 "build-tools;33.0.0" \
android/app/build.gradle
-1
@@ -102,7 +102,6 @@ flutter {
102 }
103
104 dependencies {
105 - implementation 'net.java.dev.jna:jna:5.17.0@aar'
105 testImplementation 'junit:junit:4.12'
106 androidTestImplementation 'androidx.test:runner:1.3.0'
107 androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
ios/Podfile.lock
+30 -31
@@ -1,4 +1,6 @@
1 PODS:
2 + - bitbox_flutter (0.0.1):
3 + - Flutter
4 - connectivity_plus (0.0.1):
5 - Flutter
6 - CryptoSwift (1.8.4)
@@ -112,6 +114,7 @@ PODS:
114 - YttriumWrapper (0.8.35)
115
116 DEPENDENCIES:
117 + - bitbox_flutter (from `.symlinks/plugins/bitbox_flutter/ios`)
118 - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
119 - CryptoSwift
120 - cw_decred (from `.symlinks/plugins/cw_decred/ios`)
@@ -158,6 +161,8 @@ SPEC REPOS:
161 - YttriumWrapper
162
163 EXTERNAL SOURCES:
164 + bitbox_flutter:
165 + :path: ".symlinks/plugins/bitbox_flutter/ios"
166 connectivity_plus:
167 :path: ".symlinks/plugins/connectivity_plus/ios"
168 cw_decred:
@@ -226,31 +231,32 @@ EXTERNAL SOURCES:
231 :path: ".symlinks/plugins/wakelock_plus/ios"
232
233 SPEC CHECKSUMS:
229 - connectivity_plus: 2a701ffec2c0ae28a48cf7540e279787e77c447d
234 + bitbox_flutter: 9505732798041c413152669751beeaecc5fe400f
235 + connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
236 CryptoSwift: e64e11850ede528a02a0f3e768cec8e9d92ecb90
231 - cw_decred: 9c0e1df74745b51a1289ec5e91fb9e24b68fa14a
232 - cw_mweb: 22cd01dfb8ad2d39b15332006f22046aaa8352a3
233 - device_display_brightness: 1510e72c567a1f6ce6ffe393dcd9afd1426034f7
234 - device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
235 - devicelocale: 35ba84dc7f45f527c3001535d8c8d104edd5d926
237 + cw_decred: a02cf30175a46971c1e2fa22c48407534541edc6
238 + cw_mweb: 3aea2fb35b2bd04d8b2d21b83216f3b8fb768d85
239 + device_display_brightness: 04374ebd653619292c1d996f00f42877ea19f17f
240 + device_info_plus: 335f3ce08d2e174b9fdc3db3db0f4e3b1f66bd89
241 + devicelocale: bd64aa714485a8afdaded0892c1e7d5b7f680cf8
242 DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
243 DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
244 dnssec_proof: d461cac7bd3301eb7447f87936745a0c1ae0a67e
239 - fast_scanner: 44c00940355a51258cd6c2085734193cd23d95bc
240 - file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655
245 + fast_scanner: 2cb1ad3e69e645e9980fb4961396ce5804caa3e3
246 + file_picker: 9b3292d7c8bc68c8a7bf8eb78f730e49c8efc517
247 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
242 - flutter_inappwebview_ios: 6f63631e2c62a7c350263b13fa5427aedefe81d4
243 - flutter_local_authentication: 1172a4dd88f6306dadce067454e2c4caf07977bb
244 - flutter_local_notifications: ff50f8405aaa0ccdc7dcfb9022ca192e8ad9688f
245 - flutter_mailer: 2ef5a67087bc8c6c4cefd04a178bf1ae2c94cd83
246 - flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
247 - fluttertoast: 21eecd6935e7064cc1fcb733a4c5a428f3f24f0f
248 - image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
249 - in_app_review: 436034b18594851a7328d7f1c2ed5ec235b79cfc
250 - integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
248 + flutter_inappwebview_ios: b89ba3482b96fb25e00c967aae065701b66e9b99
249 + flutter_local_authentication: 989278c681612f1ee0e36019e149137f114b9d7f
250 + flutter_local_notifications: a5a732f069baa862e728d839dd2ebb904737effb
251 + flutter_mailer: 3a8cd4f36c960fb04528d5471097270c19fec1c4
252 + flutter_secure_storage: 2c2ff13db9e0a5647389bff88b0ecac56e3f3418
253 + fluttertoast: 2c67e14dce98bbdb200df9e1acf610d7a6264ea1
254 + image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a
255 + in_app_review: 7dd1ea365263f834b8464673f9df72c80c17c937
256 + integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e
257 OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
252 - package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
253 - path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
258 + package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
259 + path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
260 payjoin_flutter: d9d4c8aa16bd5dfedb9b21d0edc8199e0187d96e
261 permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
262 reown_yttrium: cee334ade64725b1d83f7b34c706a6aae2696d58
@@ -259,19 +265,12 @@ SPEC CHECKSUMS:
265 share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
266 shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
267 sp_scanner: b1bc9321690980bdb44bba7ec85d5543e716d1b5
262 - permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
263 - reown_yttrium: c0e87e5965fa60a3559564cc35cffbba22976089
264 - SDWebImage: 9f177d83116802728e122410fb25ad88f5c7608a
265 - sensitive_clipboard: d4866e5d176581536c27bb1618642ee83adca986
266 - share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f
267 - shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
268 - sp_scanner: eaa617fa827396b967116b7f1f43549ca62e9a12
268 SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
270 - torch_dart: d2cf778332cc6e6a3b362dcf45e4dde52bc34e35
271 - uni_links: d97da20c7701486ba192624d99bffaaffcfc298a
272 - universal_ble: cf52a7b3fd2e7c14d6d7262e9fdadb72ab6b88a6
273 - url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
274 - wakelock_plus: 76957ab028e12bfa4e66813c99e46637f367fc7e
269 + torch_dart: f4620705d10f05492fab047f2fa1c3a600e7d17d
270 + uni_links: ed8c961e47ed9ce42b6d91e1de8049e38a4b3152
271 + universal_ble: ff19787898040d721109c6324472e5dd4bc86adc
272 + url_launcher_ios: 694010445543906933d732453a59da0a173ae33d
273 + wakelock_plus: e29112ab3ef0b318e58cfa5c32326458be66b556
274 YttriumWrapper: 31e937fe9fbe0f1314d2ca6be9ce9b379a059966
275
276 PODFILE CHECKSUM: 5296465b1c6d14d506230356756826012f65d97a
pubspec_base.yaml
+2 -2
@@ -127,7 +127,8 @@ dependencies:
127 git:
128 url: https://github.com/cake-tech/on_chain.git
129 ref: cake-update-v2
130 - reown_walletkit: 1.1.5+1
130 + reown_walletkit:
131 + path: ./scripts/reown_flutter/packages/reown_walletkit
132 blockchain_utils:
133 git:
134 url: https://github.com/cake-tech/blockchain_utils
@@ -181,7 +182,6 @@ dependency_overrides:
182 git:
183 url: https://github.com/cake-tech/web3dart.git
184 ref: cake
184 - flutter_secure_storage_platform_interface: 1.0.2
185 protobuf: ^3.1.0
186 bitcoin_base:
187 git:
scripts/android/build_reown_deps.sh
+4 -25
@@ -1,32 +1,11 @@
1 #!/bin/bash
2
3 -# NOTE: This script is used to build the reown dependencies for the android app.
4 -# ideally we should be able to get rid of this script when yttrium updates at some point.
5 -# CI uses prebuilds that are provided as-is at https://static.mrcyjanek.net/lfs/cake-yttrium/
6 -# please, do **NOT** use those prebuilds for production.
7 -
3 cd "$(dirname $0)"
4
5 set -x -e
6
12 -if [ ! -e yttrium/.git ]; then
13 - rm -rf yttrium
14 - git clone https://github.com/reown-com/yttrium
15 -fi
16 -cd yttrium
17 -# git checkout ed8e8f5af2029406263be5993e484c3a69c1db7a
18 -git reset --hard
19 -git checkout 9f81ab8e0fb879a994392d603b7908b2104d1735
20 -git reset --hard
21 -
22 -sed -i.bak "s/-i ''/-i.bak/g" build-kotlin.sh
23 -sed -i.bak "s/--bin uniffi-bindgen generate/-p kotlin-ffi --bin uniffi-bindgen generate/g" build-kotlin.sh
24 -sed -i.bak "s/stat -f%z/echo stat -f%z/g" build-kotlin.sh
25 -sed -i.bak "s/ -t arm64-v8a/ -t arm64-v8a -t x86_64/g" build-kotlin.sh
26 -
27 -cargo install cargo-ndk
28 -ENABLE_STRIP=false PROFILE=release bash -x ./build-kotlin.sh
7 +../prepare_reown.sh
8
30 -cp target/x86_64-linux-android/release/deps/libuniffi_yttrium.so ../../../android/app/src/main/jniLibs/x86_64/libuniffi_yttrium.so
31 -cp target/aarch64-linux-android/release/deps/libuniffi_yttrium.so ../../../android/app/src/main/jniLibs/arm64-v8a/libuniffi_yttrium.so
32 -cp target/armv7-linux-androideabi/release/deps/libuniffi_yttrium.so ../../../android/app/src/main/jniLibs/armeabi-v7a/libuniffi_yttrium.so
\ No newline at end of file
9 +../reown_flutter/scripts/build_native_deps.sh
10 +cd ../reown_flutter/scripts/yttrium/
11 +./generate_kotlin_locally.sh
\ No newline at end of file
scripts/linux/app_config.sh
+1 -1
@@ -13,7 +13,7 @@ CONFIG_ARGS=""
13
14 case $APP_LINUX_TYPE in
15 $CAKEWALLET)
16 - CONFIG_ARGS="--monero --bitcoin --ethereum --polygon --nano --bitcoinCash --solana --tron --wownero --dogecoin --base";;
16 + CONFIG_ARGS="--monero --bitcoin --ethereum --polygon --nano --bitcoinCash --solana --tron --wownero --dogecoin --base --excludeFlutterSecureStorage";;
17 esac
18
19 cp -rf pubspec_description.yaml pubspec.yaml
scripts/prepare_reown.sh new
+26
@@ -0,0 +1,26 @@
1 +#!/bin/bash
2 +set -x -e
3 +cd "$(dirname "$0")"
4 +
5 +# IMPORTANT: Make sure to update action 'Build Reown` in
6 +# - .github/workflows/pr_test_build_android.yml
7 +# - .github/workflows/pr_test_build_linux.yml
8 +# https://github.com/cake-tech/reown_flutter/releases/download/v0.0.4/reown_flutter-v0.0.4.tar.gz
9 +
10 +HASH=8a6d79ef7a268c493eeba45feef9991eea119bbd
11 +
12 +if [[ ! -d "reown_flutter/.git" ]];
13 +then
14 + rm -rf reown_flutter
15 + git clone https://github.com/cake-tech/reown_flutter
16 + cd reown_flutter
17 +else
18 + cd reown_flutter
19 + git fetch -a
20 +fi
21 +
22 +git reset --hard
23 +git checkout $HASH
24 +git reset --hard
25 +
26 +./scripts/generate_all.sh
\ No newline at end of file