Cleanup
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
This commit is contained in:
parent
f36efbc24b
commit
e220ecbb0a
2
Makefile
2
Makefile
|
@ -276,7 +276,7 @@ lint: ##@test Run code style checks
|
|||
lint-fix: export TARGET := lein
|
||||
lint-fix: ##@test Run code style checks and fix issues
|
||||
lein cljfmt fix
|
||||
|
||||
|
||||
test: export TARGET := lein
|
||||
test: ##@test Run tests once in NodeJS
|
||||
lein with-profile test doo node test once
|
||||
|
|
|
@ -1253,7 +1253,7 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
|
|||
public void isDeviceRooted(final Callback callback) {
|
||||
callback.invoke(rootedDevice);
|
||||
}
|
||||
|
||||
|
||||
@ReactMethod
|
||||
public void validateMnemonic(final String seed, final Callback callback) {
|
||||
Log.d(TAG, "validateMnemonic");
|
||||
|
|
|
@ -687,4 +687,4 @@ void RCTStatus::generateAliasAndIdenticonAsync(QString publicKey, double callbac
|
|||
const char *alias = GenerateAlias({pubKey.data(), pubKey.length()});
|
||||
const char *identicon = Identicon({pubKey.data(), pubKey.length()});
|
||||
d->bridge->invokePromiseCallback(callbackId, QVariantList{alias, identicon});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ RCT_EXPORT_METHOD(initKeystore) {
|
|||
^(void)
|
||||
{
|
||||
NSString *res = StatusgoInitKeystore(keystoreDir.path);
|
||||
NSLog(@"StopNode result %@", res);
|
||||
NSLog(@"InitKeyStore result %@", res);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -434,7 +434,7 @@ RCT_EXPORT_METHOD(logout) {
|
|||
NSLog(@"Logout() method called");
|
||||
#endif
|
||||
NSString *result = StatusgoLogout();
|
||||
|
||||
|
||||
NSLog(@"%@", result);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
{
|
||||
config ? {},
|
||||
pkgs ? import ./pkgs.nix { inherit config; }
|
||||
}:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, stdenvNoCC, callPackage,status-go,
|
||||
{ config, lib, stdenvNoCC, callPackage, status-go,
|
||||
localMavenRepoBuilder, composeXcodeWrapper, mkShell, mergeSh }:
|
||||
|
||||
let
|
||||
|
@ -21,7 +21,7 @@ let
|
|||
fastlane
|
||||
status-go.android
|
||||
status-go.ios
|
||||
androidPlatform
|
||||
androidPlatform
|
||||
iosPlatform
|
||||
];
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{ mkShell, mergeSh, status-go }:
|
||||
|
||||
let
|
||||
let
|
||||
shell = mkShell {
|
||||
shellHook = ''
|
||||
if [ -z "$RCTSTATUS_FILEPATH" ]; then
|
||||
echo "RCTSTATUS_FILEPATH is not defined! Aborting."
|
||||
if [ -z "$STATUS_GO_IOS_LIBDIR" ]; then
|
||||
echo "STATUS_GO_IOS_LIBDIR is not defined! Aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -13,13 +13,13 @@ let
|
|||
|
||||
# Compare target folder with source to see if copying is required
|
||||
if [ -d "$RCTSTATUS_DIR/$targetBasename" ] && [ -d $STATUS_REACT_HOME/ios/Pods/ ] && \
|
||||
diff -q --no-dereference --recursive $RCTSTATUS_DIR/$targetBasename/ $RCTSTATUS_FILEPATH/ > /dev/null; then
|
||||
diff -q --no-dereference --recursive $RCTSTATUS_DIR/$targetBasename/ $STATUS_GO_IOS_LIBDIR/ > /dev/null; then
|
||||
echo "$RCTSTATUS_DIR/$targetBasename already in place"
|
||||
else
|
||||
sourceBasename="$(basename $RCTSTATUS_FILEPATH)"
|
||||
sourceBasename="$(basename $STATUS_GO_IOS_LIBDIR)"
|
||||
echo "Copying $sourceBasename from Nix store to $RCTSTATUS_DIR"
|
||||
rm -rf "$RCTSTATUS_DIR/$targetBasename/"
|
||||
cp -a $RCTSTATUS_FILEPATH $RCTSTATUS_DIR
|
||||
cp -a $STATUS_GO_IOS_LIBDIR $RCTSTATUS_DIR
|
||||
chmod -R 755 "$RCTSTATUS_DIR/$targetBasename"
|
||||
if [ "$sourceBasename" != "$targetBasename" ]; then
|
||||
mv "$RCTSTATUS_DIR/$sourceBasename" "$RCTSTATUS_DIR/$targetBasename"
|
||||
|
@ -27,5 +27,5 @@ let
|
|||
fi
|
||||
'';
|
||||
};
|
||||
in
|
||||
in
|
||||
mergeSh status-go.shell [ shell ]
|
||||
|
|
|
@ -51,8 +51,13 @@ if [[ "$TARGET" =~ (linux|windows|darwin|macos) ]]; then
|
|||
nix-shell ${shellArgs[@]} --run "scripts/prepare-for-desktop-platform.sh" || exit
|
||||
fi
|
||||
|
||||
statusGoConfig=''
|
||||
if [ -n "${STATUS_GO_SRC_OVERRIDE}" ]; then
|
||||
shellArgs+=("--arg config {status_go.src_override=\"${STATUS_GO_SRC_OVERRIDE}\";}")
|
||||
statusGoConfig+="status_go.src_override=\"${STATUS_GO_SRC_OVERRIDE}\";"
|
||||
fi
|
||||
|
||||
if [ -n "$statusGoConfig" ]; then
|
||||
shellArgs+=("--arg config {$statusGoConfig}")
|
||||
fi
|
||||
|
||||
# if _NIX_ATTR is specified we shouldn't use shell.nix, the path will be different
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
# This file defines custom shells as well as shortcuts
|
||||
# for accessing more nested shells.
|
||||
{
|
||||
{
|
||||
config ? {},
|
||||
pkgs ? import ./pkgs.nix { inherit config; }
|
||||
}:
|
||||
|
||||
let
|
||||
# everything else we define in nix/ dir
|
||||
targets = pkgs.callPackage ./targets.nix { };
|
||||
targets = pkgs.callPackage ./targets.nix { inherit config; };
|
||||
|
||||
# for calling lein targets in CI or Makefile
|
||||
leiningen-sh = pkgs.mkShell {
|
||||
|
@ -27,7 +27,7 @@ let
|
|||
name = "status-react-shell"; # for identifying all shells
|
||||
buildInputs = with pkgs; lib.unique ([
|
||||
# core utilities that should always be present in a shell
|
||||
bash curl wget file unzip flock git gnumake jq ncurses
|
||||
bash curl wget file unzip flock git gnumake jq ncurses
|
||||
# build specific utilities
|
||||
clojure leiningen maven watchman
|
||||
# other nice to have stuff
|
||||
|
|
|
@ -131,7 +131,7 @@ let
|
|||
inherit buildInputs;
|
||||
shellHook = ''
|
||||
# These variables are used by the iOS build preparation section in nix/mobile/ios/default.nix
|
||||
export RCTSTATUS_FILEPATH=${status-go-packages.ios}/lib/Statusgo.framework
|
||||
export STATUS_GO_IOS_LIBDIR=${status-go-packages.ios}/lib/Statusgo.framework
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
@ -6,8 +6,13 @@ source "$_current_dir/lib/setup/path-support.sh"
|
|||
|
||||
source_lib "platform.sh"
|
||||
|
||||
statusGoConfig=''
|
||||
if [ -n "${STATUS_GO_SRC_OVERRIDE}" ]; then
|
||||
statusGoConfig+="status_go.src_override=\"${STATUS_GO_SRC_OVERRIDE}\";"
|
||||
fi
|
||||
|
||||
nixOpts=(
|
||||
"--arg config {status_go.src_override=\"${STATUS_GO_SRC_OVERRIDE}\";}"
|
||||
"--arg config {${statusGoConfig}}"
|
||||
"--arg env {BUILD_ENV=\"${BUILD_ENV}\";ANDROID_ABI_SPLIT=\"${ANDROID_ABI_SPLIT}\";ANDROID_ABI_INCLUDE=\"${ANDROID_ABI_INCLUDE}\";}"
|
||||
"--argstr build-type ${BUILD_TYPE}"
|
||||
"--argstr build-number ${BUILD_NUMBER}"
|
||||
|
|
|
@ -343,4 +343,4 @@
|
|||
"Validate that a mnemonic conforms to BIP39 dictionary/checksum standards"
|
||||
[mnemonic callback]
|
||||
(log/debug "[native-module] validate-mnemonic")
|
||||
(.validateMnemonic (status) mnemonic callback))
|
||||
(.validateMnemonic (status) mnemonic callback))
|
||||
|
|
Loading…
Reference in New Issue