Skip to content

Commit

Permalink
git_versions + wownero fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCyjaneK committed Apr 29, 2024
1 parent dc05f1f commit b317e0c
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,5 @@ scripts/linux/cache

scripts/windows/build
scripts/windows/cache

lib/git_versions.dart
3 changes: 1 addition & 2 deletions cw_wownero/lib/api/wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ int getUnlockedBalance({int accountIndex = 0}) =>

int getCurrentHeight() => wownero.Wallet_blockChainHeight(wptr!);

int getNodeHeightSync() =>
wownero.WOWNERO_cw_WalletListener_height(getWlptr()!);
int getNodeHeightSync() => wownero.Wallet_daemonBlockChainHeight(wptr!);

bool isRefreshPending = false;
bool connected = false;
Expand Down
File renamed without changes.
32 changes: 32 additions & 0 deletions scripts/prepare_moneroc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -x -e

cd "$(dirname "$0")"



if [[ ! -d "monero_c" ]];
then
git clone https://github.com/mrcyjanek/monero_c --branch rewrite-wip
Expand All @@ -13,6 +15,36 @@ then
git submodule update --init --force --recursive
./apply_patches.sh monero
./apply_patches.sh wownero
cd ..
fi


MONERO_C_HASH="$(cd monero_c && git log -1 --pretty=format:"%H")"

cat > ../lib/git_versions.dart <<EOF
import 'dart:io';
/*ANDROID_VERSION*/ const ANDROID_VERSION = "${MONERO_C_HASH}";
/*IOS_VERSION*/ const IOS_VERSION = "${MONERO_C_HASH}";
/*MACOS_VERSION*/ const MACOS_VERSION = "${MONERO_C_HASH}";
/*LINUX_VERSION*/ const LINUX_VERSION = "${MONERO_C_HASH}";
/*WINDOWS_VERSION*/ const WINDOWS_VERSION = "${MONERO_C_HASH}";
String getPluginVersion() {
if (Platform.isAndroid) {
return ANDROID_VERSION;
} else if (Platform.isIOS) {
return IOS_VERSION;
} else if (Platform.isMacOS) {
return MACOS_VERSION;
} else if (Platform.isLinux) {
return LINUX_VERSION;
} else if (Platform.isWindows) {
return WINDOWS_VERSION;
} else {
return "Unknown version";
}
}
EOF

echo "monero_c source prepared".

0 comments on commit b317e0c

Please sign in to comment.