Skip to content

Commit

Permalink
Merge pull request #908 from ZeusLN/master
Browse files Browse the repository at this point in the history
[Releases] v0.6.1-beta1
  • Loading branch information
kaloudis authored Mar 18, 2022
2 parents fec4a45 + df8a8fb commit 5b42a27
Show file tree
Hide file tree
Showing 65 changed files with 2,801 additions and 493 deletions.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Have a feature you want to see in Zeus?
title: ''
labels: ''
assignees: ''

---

**Describe the feature**
A clear and concise description of what the feature is and why it would be beneficial for Zeus to implement it.

**Designs / mockups**
If applicable, supply any designs or mockups of how you would see this feature functioning in Zeus.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions Navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,17 @@ import Nodes from './views/Settings/Nodes';
import Privacy from './views/Settings/Privacy';
import Security from './views/Settings/Security';
import SetPassword from './views/Settings/SetPassword';
import SetDuressPassword from './views/Settings/SetDuressPassword';
import SetPin from './views/Settings/SetPin';
import SetDuressPin from './views/Settings/SetDuressPin';
import Language from './views/Settings/Language';
import Currency from './views/Settings/Currency';
import Theme from './views/Settings/Theme';
import CertInstallInstructions from './views/Settings/CertInstallInstructions';
import SignVerifyMessage from './views/Settings/SignVerifyMessage';
import About from './views/Settings/About';
import Help from './views/Settings/Help';
import Olympians from './views/Settings/Olympians';

// Routing
import Routing from './views/Routing/Routing';
Expand Down Expand Up @@ -93,6 +98,15 @@ const AppScenes = {
SetPassword: {
screen: SetPassword
},
SetDuressPassword: {
screen: SetDuressPassword
},
SetPin: {
screen: SetPin
},
SetDuressPin: {
screen: SetDuressPin
},
Language: {
screen: Language
},
Expand All @@ -102,9 +116,15 @@ const AppScenes = {
Theme: {
screen: Theme
},
About: {
screen: About
},
Help: {
screen: Help
},
Olympians: {
screen: Olympians
},
CertInstallInstructions: {
screen: CertInstallInstructions
},
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ You must provide Zeus with your node's hostname, port number, and the macaroon y

### Tor Connection Guides

On Android Zeus has support for connecting to you node entirely over the Tor network. You can refer to these guides to set up a Tor hidden service on your lnd node. The instructions are generally interchangable and typically only require you to change your Tor path.
Zeus has support for connecting to you node entirely over the Tor network. You can refer to these guides to set up a Tor hidden service on your lnd node. The instructions are generally interchangable and typically only require you to change your Tor path.

* [Zeus over Tor guide for RaspiBolt](https://stadicus.github.io/RaspiBolt/raspibolt_72_zeus-over-tor.html)
* [Zeus over Tor guide for RaspiBolt](https://raspibolt.org/mobile-app.html)
* [Zeus over Tor guide for FreeNAS by Seth586](https://github.com/seth586/guides/blob/master/FreeNAS/wallets/zeusln.md)
* [Zeus over Tor guide for RaspiBlitz by openoms](https://github.com/openoms/bitcoin-tutorials/blob/master/Zeus_to_RaspiBlitz_through_Tor.md)
* [Tor-Only Bitcoin & Lightning Guide by Lopp](https://blog.lopp.net/tor-only-bitcoin-lightning-guide/)
Expand Down Expand Up @@ -126,7 +126,8 @@ All releases and all maintainer commits as of October 20, 2021 are signed by key

## Donations

If you'd like to help us with the cost of running Zeus project (iOS developer account, Google Play developer account, hosting) you can send a payment to us via our [BTCPayServer portal](https://pay.zeusln.app/apps/4JiSAsU4SsHyoM9z5FjqAoA2eRZb/pos), via Lightning Address ([email protected]), or via PayNym ([+holymorning7d1](http://my.paynym.is/+holymorning7d1)).
If you'd like to help us with the cost of running Zeus project (iOS developer account, Google Play developer account, hosting) you can send a payment to us via our [BTCPayServer portal](https://pay.zeusln.app/), via Lightning Address ([email protected]), or via PayNym ([+holymorning7d1](http://my.paynym.is/+holymorning7d1)). You can also become an [Olympian-level community sponsor](https://zeusln.app/about#communitySponsors) and have your Twitter avatar displayed on our website and in-app.

Thank you.

## License
Expand Down
5 changes: 2 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ android {
applicationId "app.zeusln.zeus"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 35
versionName "0.6.0"
versionCode 36
versionName "0.6.1-beta1"
multiDexEnabled true
missingDimensionStrategy 'react-native-camera', 'general'
}
Expand Down Expand Up @@ -200,7 +200,6 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'com.android.support:multidex:1.0.3'
implementation project(':rn-fetch-blob')
implementation project(':react-native-randombytes')
implementation project(':react-native-secure-key-store')
implementation "androidx.core:core:1.1.0"
Expand Down
12 changes: 12 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,24 @@
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="lnurlp" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="keyauth" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="lndconnect" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="zeusln" />
</intent-filter>
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
ext {
minSdkVersion = 26
compileSdkVersion = 31
targetSdkVersion = 31
targetSdkVersion = 29
ndkVersion = "22.1.7171670"
supportLibVersion = "28.0.0"
kotlin_version = '1.4.10'
Expand Down
4 changes: 2 additions & 2 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
rootProject.name = 'zeus'
include ':react-native-blob-util'
project(':react-native-blob-util').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-blob-util/android')
include ':react-native-gesture-handler'
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
include ':rn-fetch-blob'
project(':rn-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/rn-fetch-blob/android')
include ':react-native-randombytes'
project(':react-native-randombytes').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-randombytes/android')
include ':react-native-secure-key-store'
Expand Down
3 changes: 3 additions & 0 deletions assets/images/SVG/PinFilled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/images/SVG/PinHollow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/images/SVG/Success.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions backends/CLightningREST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default class CLightningREST extends LND {
id: data.id,
satoshis: data.satoshis,
feeRate: data.sat_per_byte,
annnounce: data.announce,
announce: !data.private ? 'true' : 'false',
minfConf: data.min_confs,
utxos: data.utxos
};
Expand All @@ -98,7 +98,7 @@ export default class CLightningREST extends LND {
id: data.id,
satoshis: data.satoshis,
feeRate: data.sat_per_byte,
annnounce: data.announce,
announce: !data.private ? 'true' : 'false',
minfConf: data.min_confs
};
}
Expand Down
4 changes: 2 additions & 2 deletions backends/Eclair.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import RNFetchBlob from 'rn-fetch-blob';
import ReactNativeBlobUtil from 'react-native-blob-util';
import querystring from 'querystring-es3';
import stores from '../stores/Stores';
import { doTorRequest, RequestMethod } from '../utils/TorUtils';
Expand Down Expand Up @@ -34,7 +34,7 @@ export default class Eclair {
headers
);
} else {
calls[id] = RNFetchBlob.config({
calls[id] = ReactNativeBlobUtil.config({
trusty: !certVerification
})
.fetch('POST', url + method, headers, body)
Expand Down
6 changes: 3 additions & 3 deletions backends/LND.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import RNFetchBlob from 'rn-fetch-blob';
import ReactNativeBlobUtil from 'react-native-blob-util';
import stores from '../stores/Stores';
import { doTorRequest, RequestMethod } from '../utils/TorUtils';
import OpenChannelRequest from './../models/OpenChannelRequest';
Expand Down Expand Up @@ -44,7 +44,7 @@ export default class LND {
return response;
});
} else {
calls[id] = RNFetchBlob.config({
calls[id] = ReactNativeBlobUtil.config({
trusty: !certVerification
})
.fetch(method, url, headers, data ? JSON.stringify(data) : data)
Expand Down Expand Up @@ -348,7 +348,7 @@ export default class LND {
supportsOnchainSends = () => true;
supportsKeysend = () => true;
supportsChannelManagement = () => true;
supportsMPP = () => this.supports('v0.11.0', 'v0.13.0');
supportsMPP = () => this.supports('v0.10.0');
supportsAMP = () => this.supports('v0.13.0');
supportsHopPicking = () => this.supports('v0.11.0');
supportsRouting = () => true;
Expand Down
4 changes: 2 additions & 2 deletions backends/Spark.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import RNFetchBlob from 'rn-fetch-blob';
import ReactNativeBlobUtil from 'react-native-blob-util';
import stores from '../stores/Stores';
import { doTorRequest, RequestMethod } from '../utils/TorUtils';
import TransactionRequest from './../models/TransactionRequest';
Expand Down Expand Up @@ -28,7 +28,7 @@ export default class Spark {
if (enableTor === true) {
calls[id] = doTorRequest(url, RequestMethod.POST, body, headers);
} else {
calls[id] = RNFetchBlob.config({
calls[id] = ReactNativeBlobUtil.config({
trusty: !certVerification
})
.fetch('POST', url, headers, body)
Expand Down
95 changes: 95 additions & 0 deletions components/Pin.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
import React, { useEffect, useState } from 'react';
import { View } from 'react-native';
import PinPad from './PinPad';
import PinCircles from './PinCircles';

interface PinProps {
onSubmit: (value: string, pinConfirm?: boolean) => void;
onPinChange?: () => void;
hidePinLength: boolean;
pinLength?: number;
pinConfirm?: boolean;
}

export default function Pin({
onSubmit,
onPinChange = () => void 0,
hidePinLength,
pinLength = 4,
pinConfirm = false
}: PinProps) {
const [pinValue, setPinValue] = useState('');
const maxLength = 8;
const minLength = 4;

const appendValue = (newValue: string) => {
if (pinValue.length + 1 <= maxLength) {
setPinValue(`${pinValue}${newValue}`);
}
};

const clearValue = () => {
setPinValue('');
};

const deleteValue = () => {
if (pinValue.length <= 1) {
clearValue();
} else {
setPinValue(`${pinValue.slice(0, pinValue.length - 1)}`);
}
};

const submitValue = () => {
onSubmit(pinValue, pinConfirm);
setPinValue('');
};

useEffect(() => {
if (!hidePinLength && pinValue.length === pinLength) {
onSubmit(pinValue, pinConfirm);
setPinValue('');
} else if (pinValue !== '') {
onPinChange();
}
}, [pinValue]);

return (
<View
style={{
flex: 1,
justifyContent: 'flex-end'
}}
>
<View
style={{
flex: 1,
justifyContent: 'flex-start'
}}
>
<PinCircles
pinLength={pinLength}
numFilled={pinValue.length}
hidePinLength={hidePinLength}
/>
</View>
<View
style={{
flex: 1,
justifyContent: 'flex-end'
}}
>
<PinPad
appendValue={appendValue}
clearValue={clearValue}
deleteValue={deleteValue}
submitValue={submitValue}
shuffle={true}
hidePinLength={hidePinLength}
minLength={minLength}
maxLength={maxLength}
/>
</View>
</View>
);
}
47 changes: 47 additions & 0 deletions components/PinCircles.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import * as React from 'react';
import { StyleSheet, View } from 'react-native';
import { Row } from './layout/Row';
import Filled from './../assets/images/SVG/PinFilled.svg';
import Hollow from './../assets/images/SVG/PinHollow.svg';

interface PinCirclesProps {
pinLength: number;
numFilled: number;
hidePinLength: boolean;
}

export default function PinCircles({
pinLength,
numFilled,
hidePinLength
}: PinCirclesProps) {
const styles = StyleSheet.create({
pinCirclesRow: {
justifyContent: 'center'
},
circles: {
margin: 10
}
});

const filled = [];
for (let i = 0; i < numFilled; i++) {
filled.push(<Filled key={`filled-${i}`} style={styles.circles} />);
}

const hollow = [];
if (!hidePinLength) {
for (let i = 0; i < pinLength - numFilled; i++) {
hollow.push(<Hollow key={`hollow-${i}`} style={styles.circles} />);
}
}

return (
<View>
<Row style={styles.pinCirclesRow}>
{filled}
{hollow}
</Row>
</View>
);
}
Loading

0 comments on commit 5b42a27

Please sign in to comment.