Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ flatpak-build/
**/linux/flutter/generated_plugins.cmake

scripts/torch_dart/
scripts/scanqr_c_gozxing
fiat-check-output.txt
scripts/zcash_lib
scripts/android/yttrium
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/jniLibs/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
lib*_wallet2_api_c.so
libsimple.so
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -343,4 +343,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 18601c2df1b9c6704d6a786e4e6777ae88178c28

COCOAPODS: 1.16.2
COCOAPODS: 1.17.0
4 changes: 4 additions & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
A1B4A70C9CFA13AB71662216 /* LnurlPay.swift in Resources */ = {isa = PBXBuildFile; fileRef = 7D3364C03978A8A74B6D586E /* LnurlPay.swift */; settings = {ASSET_TAGS = (BreezSDK, ); }; };
A3D5E17CC53DF13FA740DEFA /* RedeemSwap.swift in Resources */ = {isa = PBXBuildFile; fileRef = 9D2F2C9F2555316C95EE7EA3 /* RedeemSwap.swift */; settings = {ASSET_TAGS = (BreezSDK, ); }; };
B6C6E59403ACDE44724C12F4 /* ServiceConfig.swift in Resources */ = {isa = PBXBuildFile; fileRef = B3D5E78267F5F18D882FDC3B /* ServiceConfig.swift */; settings = {ASSET_TAGS = (BreezSDK, ); }; };
CE745DB2304ABBD800B018C1 /* simple.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE745DB1304ABBD800B018C1 /* simple.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
CE918BF82D533ECE007F186E /* MoneroWallet.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE918BF72D533ECE007F186E /* MoneroWallet.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
CE918BFA2D533ED4007F186E /* WowneroWallet.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE918BF92D533ED4007F186E /* WowneroWallet.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
CE918BFC2D533ED8007F186E /* ZanoWallet.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE918BFB2D533ED8007F186E /* ZanoWallet.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
Expand All @@ -47,6 +48,7 @@
CE918BF82D533ECE007F186E /* MoneroWallet.xcframework in CopyFiles */,
CE918BFA2D533ED4007F186E /* WowneroWallet.xcframework in CopyFiles */,
CE918BFC2D533ED8007F186E /* ZanoWallet.xcframework in CopyFiles */,
CE745DB2304ABBD800B018C1 /* simple.xcframework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -87,6 +89,7 @@
B3D5E78267F5F18D882FDC3B /* ServiceConfig.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServiceConfig.swift; path = "../.symlinks/plugins/breez_sdk/ios/bindings-swift/Sources/BreezSDK/ServiceConfig.swift"; sourceTree = "<group>"; };
B478EFCC3C0760ED97FFE561 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
C58D93382C00FAC6004BCF69 /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.tbd; path = usr/lib/libresolv.tbd; sourceTree = SDKROOT; };
CE745DB1304ABBD800B018C1 /* simple.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = simple.xcframework; path = ../scripts/scanqr_c_gozxing/build/simple.xcframework; sourceTree = "<group>"; };
CE918BF72D533ECE007F186E /* MoneroWallet.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = MoneroWallet.xcframework; sourceTree = "<group>"; };
CE918BF92D533ED4007F186E /* WowneroWallet.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = WowneroWallet.xcframework; sourceTree = "<group>"; };
CE918BFB2D533ED8007F186E /* ZanoWallet.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = ZanoWallet.xcframework; sourceTree = "<group>"; };
Expand Down Expand Up @@ -117,6 +120,7 @@
CE918BF92D533ED4007F186E /* WowneroWallet.xcframework */,
CE918BF72D533ECE007F186E /* MoneroWallet.xcframework */,
CEFC07A12EF2EEEB0012DB29 /* WarpApiFFI.xcframework */,
CE745DB1304ABBD800B018C1 /* simple.xcframework */,
C58D93382C00FAC6004BCF69 /* libresolv.tbd */,
0C9986A3251A932F00D566FD /* CryptoSwift.framework */,
B478EFCC3C0760ED97FFE561 /* Pods_Runner.framework */,
Expand Down
2 changes: 1 addition & 1 deletion lib/entities/qr_scanner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class _BarcodeScannerSimpleState extends State<BarcodeScannerSimple> {
setState(() {
popped = true;
});
Navigator.of(context).pop(_barcode!.rawValue ?? _barcode!.rawBytes);
Navigator.of(context).pop(_barcode!.rawValue);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/new-ui/pages/scan_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ class _ScanPageState extends State<ScanPage> {
setState(() {
popped = true;
});
Navigator.of(context).pop(_barcode!.rawValue ?? _barcode!.rawBytes);
Navigator.of(context).pop(_barcode!.rawValue);
}
}
}
Expand Down
18 changes: 9 additions & 9 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -909,8 +909,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: "69b3276b090fa6ac01b4483ca3adca93a8e615be"
resolved-ref: "69b3276b090fa6ac01b4483ca3adca93a8e615be"
ref: d53afcca247ed4a700d90368fe71b3880c816990
resolved-ref: d53afcca247ed4a700d90368fe71b3880c816990
url: "https://github.com/MrCyjaneK/fast_scanner"
source: git
version: "5.1.1"
Expand Down Expand Up @@ -3095,21 +3095,21 @@ packages:
source: git
version: "0.0.1"
trezor_flutter:
dependency: "direct overridden"
dependency: "direct main"
description:
path: trezor-flutter
ref: "7d27e19b7bcdcd6241df35953f9a6ec2df0c7a97"
resolved-ref: "7d27e19b7bcdcd6241df35953f9a6ec2df0c7a97"
url: "https://github.com/cake-tech/trezor-flutter.git"
ref: f5121b1f3a06000ff836da8e6e6c83f53a9fa487
resolved-ref: f5121b1f3a06000ff836da8e6e6c83f53a9fa487
url: "https://github.com/cake-tech/trezor-flutter"
source: git
version: "0.1.0"
trezor_usb_transport:
dependency: "direct overridden"
description:
path: trezor_usb_transport
ref: "7d27e19b7bcdcd6241df35953f9a6ec2df0c7a97"
resolved-ref: "7d27e19b7bcdcd6241df35953f9a6ec2df0c7a97"
url: "https://github.com/cake-tech/trezor-flutter.git"
ref: f5121b1f3a06000ff836da8e6e6c83f53a9fa487
resolved-ref: f5121b1f3a06000ff836da8e6e6c83f53a9fa487
url: "https://github.com/cake-tech/trezor-flutter"
source: git
version: "0.0.1"
tuple:
Expand Down
2 changes: 1 addition & 1 deletion pubspec_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:
fast_scanner:
git:
url: https://github.com/MrCyjaneK/fast_scanner
ref: 69b3276b090fa6ac01b4483ca3adca93a8e615be
ref: d53afcca247ed4a700d90368fe71b3880c816990
http: ^1.1.0
path_provider: ^2.0.11
modal_bottom_sheet:
Expand Down
2 changes: 1 addition & 1 deletion pubspec_overrides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ dependency_overrides:
fast_scanner:
git:
url: https://github.com/MrCyjaneK/fast_scanner
ref: 69b3276b090fa6ac01b4483ca3adca93a8e615be
ref: d53afcca247ed4a700d90368fe71b3880c816990
ffi:
git:
url: https://github.com/dart-lang/native
Expand Down
1 change: 1 addition & 0 deletions scripts/android/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ fi
DIR=$(dirname "$0")

$DIR/build_torch.sh
$DIR/build_scanqr.sh

case $APP_ANDROID_TYPE in
"monero.com") $DIR/build_monero_all.sh ;;
Expand Down
16 changes: 16 additions & 0 deletions scripts/android/build_scanqr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -x -e

cd "$(dirname "$0")"

../prepare_scanqr.sh

JNI_LIBS="$(cd ../.. && pwd)/android/app/src/main/jniLibs"

if [[ -n "${ANDROID_NDK_VERSION:-}" && -n "${ANDROID_HOME:-}" ]]; then
export ANDROID_NDK="${ANDROID_HOME}/ndk/${ANDROID_NDK_VERSION}"
fi

pushd ../scanqr_c_gozxing
make android-arm64-v8a android-armeabi-v7a android-x86_64 JNI_LIBS="${JNI_LIBS}"
popd
3 changes: 3 additions & 0 deletions scripts/android/docker/Dockerfile.final
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ARG MONERO_IMAGE
ARG DECRED_IMAGE
ARG MWEBD_IMAGE
ARG ZCASH_IMAGE
ARG SCANQR_IMAGE

FROM ${TORCH_IMAGE} AS torch_src
FROM ${REOWN_IMAGE} AS reown_src
Expand All @@ -14,6 +15,7 @@ FROM ${MONERO_IMAGE} AS monero_src
FROM ${DECRED_IMAGE} AS decred_src
FROM ${MWEBD_IMAGE} AS mwebd_src
FROM ${ZCASH_IMAGE} AS zcash_src
FROM ${SCANQR_IMAGE} AS scanqr_src

FROM --platform=linux/amd64 alpine

Expand All @@ -24,3 +26,4 @@ COPY --from=monero_src /w /w.top
COPY --from=decred_src /w /w.top
COPY --from=mwebd_src /w /w.top
COPY --from=zcash_src /w /w.top
COPY --from=scanqr_src /w /w.top
11 changes: 11 additions & 0 deletions scripts/android/docker/Dockerfile.scanqr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ARG BASE_IMAGE
FROM --platform=linux/amd64 ${BASE_IMAGE} AS build

RUN mkdir -p /w/scripts/android
COPY scripts/prepare_scanqr.sh /w/scripts/prepare_scanqr.sh
COPY scripts/android/build_scanqr.sh /w/scripts/android/build_scanqr.sh
RUN /w/scripts/android/build_scanqr.sh \
&& rm -rf /w/scripts/scanqr_c_gozxing/.git

FROM --platform=linux/amd64 alpine
COPY --from=build /w /w
8 changes: 6 additions & 2 deletions scripts/android/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ monero_ver=$(tinysha $SCRIPT_DIR/Dockerfile.monero $REPO_ROOT/scripts/prepare_mo
mwebd_ver=$(tinysha $SCRIPT_DIR/Dockerfile.mwebd $REPO_ROOT/pubspec_overrides.yaml $(find $REPO_ROOT/cw_mweb/go -type f))
zcash_ver=$(tinysha $SCRIPT_DIR/Dockerfile.zcash $REPO_ROOT/scripts/prepare_zcash.sh $REPO_ROOT/scripts/android/build_zcash.sh)
decred_ver=$(tinysha $SCRIPT_DIR/Dockerfile.torch $SCRIPT_DIR/Dockerfile.decred $REPO_ROOT/scripts/android/build_decred.sh $REPO_ROOT/cw_decred/pubspec.yaml)
echo $base_ver $torch_ver $reown_ver $bitbox_ver $monero_ver $mwebd_ver $zcash_ver $decred_ver > /tmp/docker_build_versions
scanqr_ver=$(tinysha $SCRIPT_DIR/Dockerfile.scanqr $REPO_ROOT/scripts/prepare_scanqr.sh $REPO_ROOT/scripts/android/build_scanqr.sh)
echo $base_ver $torch_ver $reown_ver $bitbox_ver $monero_ver $mwebd_ver $zcash_ver $decred_ver $scanqr_ver > /tmp/docker_build_versions
final_ver=$(tinysha /tmp/docker_build_versions)

docker create --name temp_extract $(img final $final_ver) \
Expand All @@ -85,6 +86,8 @@ build monero "$monero_ver" --build-arg BASE_IMAGE="$(img base "$base_ver")"

build zcash "$zcash_ver" --build-arg BASE_IMAGE="$(img base "$base_ver")"

build scanqr "$scanqr_ver" --build-arg BASE_IMAGE="$(img base "$base_ver")"

build torch "$torch_ver" \
--build-arg BASE_IMAGE="$(img base "$base_ver")"

Expand All @@ -100,7 +103,8 @@ build final $final_ver \
--build-arg MONERO_IMAGE="$(img monero $monero_ver)" \
--build-arg DECRED_IMAGE="$(img decred $decred_ver)" \
--build-arg MWEBD_IMAGE="$(img mwebd $mwebd_ver)" \
--build-arg ZCASH_IMAGE="$(img zcash $zcash_ver)"
--build-arg ZCASH_IMAGE="$(img zcash $zcash_ver)" \
--build-arg SCANQR_IMAGE="$(img scanqr $scanqr_ver)"

echo "done: $(img final $final_ver)"
echo $(img final $final_ver) > /tmp/cakewallet_docker
Expand Down
1 change: 1 addition & 0 deletions scripts/ios/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ fi
DIR=$(dirname "$0")

$DIR/build_torch.sh
$DIR/build_scanqr.sh

case $APP_IOS_TYPE in
"monero.com") $DIR/build_monero_all.sh ;;
Expand Down
10 changes: 10 additions & 0 deletions scripts/ios/build_scanqr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -x -e

cd "$(dirname "$0")"

../prepare_scanqr.sh

pushd ../scanqr_c_gozxing
make apple
popd
2 changes: 2 additions & 0 deletions scripts/macos/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

./build_torch.sh

./build_scanqr.sh

./build_monero_all.sh universal && ./build_decred.sh
4 changes: 4 additions & 0 deletions scripts/macos/build_scanqr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -x -e
cd "$(dirname "$0")"
exec bash ../ios/build_scanqr.sh
23 changes: 23 additions & 0 deletions scripts/prepare_scanqr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -x -e

cd "$(dirname "$0")"

HASH=866f5755c1b6a020d1ec907e345b4b2c448c18a3

if [[ ! -d "scanqr_c_gozxing/.git" ]];
then
rm -rf scanqr_c_gozxing
git clone https://github.com/MrCyjaneK/scanqr_c_gozxing scanqr_c_gozxing
cd scanqr_c_gozxing
else
cd scanqr_c_gozxing
git fetch -a
fi

git reset --hard
git checkout $HASH
git reset --hard

echo "scanqr_c_gozxing source prepared".
Loading