-
-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #210 from ZeusLN/master
v0.2.0
- Loading branch information
Showing
77 changed files
with
6,300 additions
and
5,601 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,4 @@ | |
android:src="@mipmap/ic_launcher"/> | ||
</item> | ||
|
||
</layer-list> | ||
</layer-list> |
Binary file modified
BIN
+8.54 KB
(420%)
android/app/src/main/res/mipmap-hdpi/zeus.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+13 KB
(380%)
android/app/src/main/res/mipmap-hdpi/zeus_round.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.68 KB
(740%)
android/app/src/main/res/mipmap-mdpi/zeus.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+15.1 KB
(710%)
android/app/src/main/res/mipmap-mdpi/zeus_round.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7.51 KB
(300%)
android/app/src/main/res/mipmap-xhdpi/zeus.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+11.3 KB
(280%)
android/app/src/main/res/mipmap-xhdpi/zeus_round.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.51 KB
(170%)
android/app/src/main/res/mipmap-xxhdpi/zeus.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+6.14 KB
(150%)
android/app/src/main/res/mipmap-xxhdpi/zeus_round.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,197 @@ | ||
import * as React from 'react'; | ||
import { StyleSheet, Text, TextInput, View } from 'react-native'; | ||
import { Button } from 'react-native-elements'; | ||
|
||
import FeeStore from './../stores/FeeStore'; | ||
import SettingsStore from './../stores/SettingsStore'; | ||
|
||
interface SetFeesFormProps { | ||
SettingsStore: SettingsStore; | ||
FeeStore: FeeStore; | ||
baseFeeMsat?: string; | ||
feeRate?: string; | ||
channelPoint?: string; | ||
channelId?: string; | ||
} | ||
|
||
interface SetFeesFormState { | ||
showNewFeesForm: boolean; | ||
feesSubmitted: boolean; | ||
newBaseFeeMsat: string; | ||
newFeeRateMiliMsat: string; | ||
} | ||
|
||
export default class SetFeesForm extends React.Component< | ||
SetFeesFormProps, | ||
SetFeesFormState | ||
> { | ||
state = { | ||
showNewFeesForm: false, | ||
feesSubmitted: false, | ||
newBaseFeeMsat: '1', | ||
newFeeRateMiliMsat: '1000000' | ||
}; | ||
|
||
render() { | ||
const { | ||
showNewFeesForm, | ||
feesSubmitted, | ||
newBaseFeeMsat, | ||
newFeeRateMiliMsat | ||
} = this.state; | ||
const { | ||
SettingsStore, | ||
FeeStore, | ||
baseFeeMsat, | ||
feeRate, | ||
channelPoint, | ||
channelId | ||
} = this.props; | ||
const { settings } = SettingsStore; | ||
const { theme } = settings; | ||
const { setFees, loading, setFeesError, setFeesSuccess } = FeeStore; | ||
|
||
return ( | ||
<React.Fragment> | ||
<View style={styles.button}> | ||
<Button | ||
title={ | ||
showNewFeesForm | ||
? 'Hide Set New Fees Form' | ||
: 'Set New Fees' | ||
} | ||
onPress={() => | ||
this.setState({ showNewFeesForm: !showNewFeesForm }) | ||
} | ||
buttonStyle={{ | ||
backgroundColor: showNewFeesForm | ||
? 'black' | ||
: 'green', | ||
borderRadius: 30 | ||
}} | ||
/> | ||
</View> | ||
|
||
{showNewFeesForm && ( | ||
<React.Fragment> | ||
{loading && ( | ||
<Text | ||
style={{ | ||
color: theme === 'dark' ? 'white' : 'black' | ||
}} | ||
> | ||
Setting fees, please wait... | ||
</Text> | ||
)} | ||
{feesSubmitted && setFeesSuccess && ( | ||
<Text | ||
style={{ | ||
color: 'green' | ||
}} | ||
> | ||
Succesfully set fees! | ||
</Text> | ||
)} | ||
{feesSubmitted && setFeesError && ( | ||
<Text | ||
style={{ | ||
color: 'red' | ||
}} | ||
> | ||
Error setting fees | ||
</Text> | ||
)} | ||
|
||
<Text | ||
style={{ | ||
color: theme === 'dark' ? 'white' : 'black' | ||
}} | ||
> | ||
Base Fee msat | ||
</Text> | ||
<TextInput | ||
placeholder={baseFeeMsat || '1'} | ||
placeholderTextColor="darkgray" | ||
value={newBaseFeeMsat} | ||
onChangeText={(text: string) => | ||
this.setState({ | ||
newBaseFeeMsat: text | ||
}) | ||
} | ||
numberOfLines={1} | ||
autoCapitalize="none" | ||
autoCorrect={false} | ||
style={ | ||
theme === 'dark' | ||
? styles.textInputDark | ||
: styles.textInput | ||
} | ||
/> | ||
<Text | ||
style={{ | ||
color: theme === 'dark' ? 'white' : 'black' | ||
}} | ||
> | ||
Fee Rate mili msat | ||
</Text> | ||
<TextInput | ||
placeholder={feeRate || '1000000'} | ||
placeholderTextColor="darkgray" | ||
value={newFeeRateMiliMsat} | ||
onChangeText={(text: string) => | ||
this.setState({ | ||
newFeeRateMiliMsat: text | ||
}) | ||
} | ||
numberOfLines={1} | ||
autoCapitalize="none" | ||
autoCorrect={false} | ||
style={ | ||
theme === 'dark' | ||
? styles.textInputDark | ||
: styles.textInput | ||
} | ||
/> | ||
|
||
<View style={styles.button}> | ||
<Button | ||
title={'Submit New Fees'} | ||
onPress={() => { | ||
setFees( | ||
newBaseFeeMsat, | ||
newFeeRateMiliMsat, | ||
channelPoint, | ||
channelId | ||
); | ||
this.setState({ feesSubmitted: true }); | ||
}} | ||
buttonStyle={{ | ||
backgroundColor: | ||
theme === 'dark' | ||
? '#261339' | ||
: 'rgba(92, 99,216, 1)', | ||
borderRadius: 30 | ||
}} | ||
/> | ||
</View> | ||
</React.Fragment> | ||
)} | ||
</React.Fragment> | ||
); | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
textInput: { | ||
fontSize: 20, | ||
color: 'black' | ||
}, | ||
textInputDark: { | ||
fontSize: 20, | ||
color: 'white' | ||
}, | ||
button: { | ||
paddingTop: 15, | ||
paddingBottom: 10 | ||
} | ||
}); |
Oops, something went wrong.