Skip to content

Commit

Permalink
v1.8.5
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapk00 committed Aug 30, 2022
1 parent a78bf28 commit a4d9692
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 40 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ android {
applicationId "com.zecwalletmobile"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 60
versionName "1.7.20"
versionCode 65
versionName "1.8.6"

missingDimensionStrategy 'react-native-camera', 'general'
}
Expand Down
11 changes: 8 additions & 3 deletions app/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,14 @@ export default class RPC {
const download_memos_str = await RPCModule.execute('getoption', 'download_memos');
const download_memos = JSON.parse(download_memos_str).download_memos;

const spam_filter_str = await RPCModule.execute('getoption', 'spam_filter_threshold');
const spam_filter_threshold = JSON.parse(spam_filter_str).spam_filter_threshold;
console.log(`Spam filter threshold: ${spam_filter_threshold}`);
let spam_filter_threshold = '0';
try {
const spam_filter_str = await RPCModule.execute('getoption', 'spam_filter_threshold');
spam_filter_threshold = JSON.parse(spam_filter_str).spam_filter_threshold;
console.log(`Spam filter threshold: ${spam_filter_threshold}`);
} catch (e) {
console.log(`Error getting spam filter threshold: ${e}`);
}

const wallet_settings = new WalletSettings();
wallet_settings.download_memos = download_memos;
Expand Down
2 changes: 1 addition & 1 deletion components/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const AboutModal: React.FunctionComponent<AboutModalProps> = ({closeModal}) => {
}}>
<View>
<View style={{alignItems: 'center', backgroundColor: colors.card, paddingBottom: 25, paddingTop: 25}}>
<Text style={{marginTop: 5, padding: 5, color: colors.text, fontSize: 28}}>Zecwallet Lite v1.7.20</Text>
<Text style={{marginTop: 5, padding: 5, color: colors.text, fontSize: 28}}>Zecwallet Lite v1.8.6</Text>
</View>
<View style={{display: 'flex', alignItems: 'center', marginTop: -25}}>
<Image source={require('../assets/img/logobig.png')} style={{width: 50, height: 50, resizeMode: 'contain'}} />
Expand Down
2 changes: 1 addition & 1 deletion components/InfoModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const InfoModal: React.FunctionComponent<InfoModalProps> = ({info, closeModal})
</View>

<View style={{display: 'flex', margin: 10}}>
<DetailLine label="Wallet Version" value="Zecwallet Lite v1.7.20" />
<DetailLine label="Wallet Version" value="Zecwallet Lite v1.8.6" />
<DetailLine label="Server Version" value={info?.version} />
<DetailLine label="Lightwallet Server URL" value={info?.serverUri} />
<DetailLine label="Network" value={info?.testnet ? 'Testnet' : 'Mainnet'} />
Expand Down
7 changes: 4 additions & 3 deletions components/SettingsModal.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
/* eslint-disable react-native/no-inline-styles */
import React from 'react';
import {View, ScrollView, SafeAreaView, Image, Text} from 'react-native';
import {View, ScrollView, SafeAreaView, Image, Text, TouchableOpacity} from 'react-native';
import {SecondaryButton, RegText, FadeText, BoldText} from './Components';
import {useTheme} from '@react-navigation/native';
import {WalletSettings} from '../app/AppState';
import {TouchableOpacity} from 'react-native-gesture-handler';
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome';
import {faDotCircle} from '@fortawesome/free-solid-svg-icons';
import {faCircle as farCircle} from '@fortawesome/free-regular-svg-icons';
Expand Down Expand Up @@ -65,7 +64,9 @@ const SettingsModal: React.FunctionComponent<SettingsModalProps> = ({
<View style={{display: 'flex', marginLeft: 20}}>
<TouchableOpacity
style={{marginRight: 10, marginBottom: 10}}
onPress={() => set_wallet_option('spam_filter_threshold', '50')}>
onPress={() => {
set_wallet_option('spam_filter_threshold', '50');
}}>
<View style={{display: 'flex', flexDirection: 'row', marginTop: 20}}>
<FontAwesomeIcon icon={spam_allIcon} size={20} color={'#ffffff'} />
<RegText style={{marginLeft: 10}}>Filter out spammy transactions</RegText>
Expand Down
8 changes: 4 additions & 4 deletions ios/ZecwalletMobile.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 60;
CURRENT_PROJECT_VERSION = 65;
DEVELOPMENT_TEAM = 5N76B7JDDT;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = ZecwalletMobile/Info.plist;
Expand All @@ -520,7 +520,7 @@
"$(PROJECT_DIR)",
"$(SDKROOT)/usr/lib/swift",
);
MARKETING_VERSION = 1.7.20;
MARKETING_VERSION = 1.8.6;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -541,7 +541,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 60;
CURRENT_PROJECT_VERSION = 65;
DEVELOPMENT_TEAM = 5N76B7JDDT;
INFOPLIST_FILE = ZecwalletMobile/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -553,7 +553,7 @@
"$(PROJECT_DIR)",
"$(SDKROOT)/usr/lib/swift",
);
MARKETING_VERSION = 1.7.20;
MARKETING_VERSION = 1.8.6;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ZecwalletMobile",
"version": "1.7.20",
"version": "1.8.6",
"private": true,
"scripts": {
"android": "react-native run-android",
Expand Down
2 changes: 1 addition & 1 deletion rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rust/android/emubuild.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

OPENSSL_DIR=/tmp/openssl-1.1.1e/x86 OPENSSL_STATIC=yes cargo build --target i686-linux-android --release
cp ../target/i686-linux-android/release/librust.so ../../android/app/src/main/jniLibs/x86/
OPENSSL_DIR=/tmp/openssl-1.1.1e/x86 OPENSSL_STATIC=yes cargo build --target x86_64-linux-android --release
cp ../target/x86_64-linux-android/release/librust.so ../../android/app/src/main/jniLibs/x86_64/
4 changes: 2 additions & 2 deletions rust/android/localbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

OPENSSL_DIR=/tmp/openssl-1.1.1e/aarch64 OPENSSL_STATIC=yes CC=aarch64-linux-android28-clang cargo build --target aarch64-linux-android --release
OPENSSL_DIR=/tmp/openssl-1.1.1e/armv7 OPENSSL_STATIC=yes CC=armv7a-linux-androideabi28-clang cargo build --target armv7-linux-androideabi --release
OPENSSL_DIR=/tmp/openssl-1.1.1e/x86 OPENSSL_STATIC=yes CC=i686-linux-android28-clang cargo build --target i686-linux-android --release
OPENSSL_DIR=/tmp/openssl-1.1.1e/x86 OPENSSL_STATIC=yes cargo build --target x86_64-linux-android --release

cp ../target/i686-linux-android/release/librust.so ../../android/app/src/main/jniLibs/x86/
cp ../target/x86_64-linux-android/release/librust.so ../../android/app/src/main/jniLibs/x86_64/
cp ../target/armv7-linux-androideabi/release/librust.so ../../android/app/src/main/jniLibs/armeabi-v7a/
cp ../target/aarch64-linux-android/release/librust.so ../../android/app/src/main/jniLibs/arm64-v8a/
2 changes: 1 addition & 1 deletion rust/lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2018"

[dependencies]
jni = { version = "0.10.2", default-features = false }
zecwalletlitelib = { git="https://github.com/adityapk00/zecwallet-light-cli", default-features=false, rev="a4058769a555d38b4c8292f6e007aeda161c57b1" }
zecwalletlitelib = { git="https://github.com/adityapk00/zecwallet-light-cli", default-features=false, rev="a2980d3478a3a753efb6d210edcf413d915be6f8" }
#zecwalletlitelib = { path = "../../../zecwallet-light-cli/lib", default-features=false }
lazy_static = "1.4.0"
android_logger = "0.8.6"
Expand Down
41 changes: 22 additions & 19 deletions rust/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use std::sync::{Arc, Mutex};
use base64::{decode, encode};

use zecwalletlitelib::lightclient::lightclient_config::LightClientConfig;
use zecwalletlitelib::{commands, lightclient::LightClient};
use zecwalletlitelib::MainNetwork;
use zecwalletlitelib::{commands, lightclient::LightClient};

// We'll use a MUTEX to store a global lightclient instance,
// so we don't have to keep creating it. We need to store it here, in rust
Expand All @@ -24,12 +24,13 @@ pub fn init_new(
data_dir: String,
) -> String {
let server = LightClientConfig::<MainNetwork>::get_server_or_default(Some(server_uri));
let (mut config, latest_block_height) = match LightClientConfig::create(MainNetwork, server) {
Ok((c, h)) => (c, h),
Err(e) => {
return format!("Error: {}", e);
}
};
let (mut config, latest_block_height) =
match LightClientConfig::create(MainNetwork, server, None) {
Ok((c, h)) => (c, h),
Err(e) => {
return format!("Error: {}", e);
}
};

config.set_data_dir(data_dir);

Expand Down Expand Up @@ -72,12 +73,13 @@ pub fn init_from_seed(
data_dir: String,
) -> String {
let server = LightClientConfig::<MainNetwork>::get_server_or_default(Some(server_uri));
let (mut config, _latest_block_height) = match LightClientConfig::create(MainNetwork, server) {
Ok((c, h)) => (c, h),
Err(e) => {
return format!("Error: {}", e);
}
};
let (mut config, _latest_block_height) =
match LightClientConfig::create(MainNetwork, server, None) {
Ok((c, h)) => (c, h),
Err(e) => {
return format!("Error: {}", e);
}
};

config.set_data_dir(data_dir);

Expand Down Expand Up @@ -119,12 +121,13 @@ pub fn init_from_b64(
data_dir: String,
) -> String {
let server = LightClientConfig::<MainNetwork>::get_server_or_default(Some(server_uri));
let (mut config, _latest_block_height) = match LightClientConfig::create(MainNetwork, server) {
Ok((c, h)) => (c, h),
Err(e) => {
return format!("Error: {}", e);
}
};
let (mut config, _latest_block_height) =
match LightClientConfig::create(MainNetwork, server, None) {
Ok((c, h)) => (c, h),
Err(e) => {
return format!("Error: {}", e);
}
};

config.set_data_dir(data_dir);

Expand Down

0 comments on commit a4d9692

Please sign in to comment.