Skip to content

Commit

Permalink
FIX: Change propType to correct type. Fixed an issue where goBack wou…
Browse files Browse the repository at this point in the history
…ldnt pop the stack navigation
  • Loading branch information
marcosrdz committed Feb 1, 2019
1 parent 157c407 commit a440c61
Show file tree
Hide file tree
Showing 17 changed files with 45 additions and 45 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"react-native-fs": "^2.13.3",
"react-native-gesture-handler": "^1.0.15",
"react-native-google-analytics-bridge": "^7.0.0",
"react-native-haptic-feedback": "^1.4.2",
"react-native-haptic-feedback": "^1.5.0",
"react-native-image-picker": "^0.28.0",
"react-native-level-fs": "^3.0.1",
"react-native-linear-gradient": "^2.5.3",
Expand Down
2 changes: 1 addition & 1 deletion screen/lnd/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ export default class Browser extends Component {

Browser.propTypes = {
navigation: PropTypes.shape({
getParam: PropTypes.function,
getParam: PropTypes.func,
navigate: PropTypes.func,
}),
};
2 changes: 1 addition & 1 deletion screen/lnd/lndCreateInvoice.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default class LNDCreateInvoice extends Component {

LNDCreateInvoice.propTypes = {
navigation: PropTypes.shape({
goBack: PropTypes.function,
goBack: PropTypes.func,
navigate: PropTypes.func,
getParam: PropTypes.func,
}),
Expand Down
6 changes: 3 additions & 3 deletions screen/lnd/lndViewAdditionalInvoiceInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ export default class LNDViewAdditionalInvoiceInformation extends Component {

LNDViewAdditionalInvoiceInformation.propTypes = {
navigation: PropTypes.shape({
goBack: PropTypes.function,
getParam: PropTypes.function,
dismiss: PropTypes.function,
goBack: PropTypes.func,
getParam: PropTypes.func,
dismiss: PropTypes.func,
}),
};
8 changes: 4 additions & 4 deletions screen/lnd/lndViewInvoice.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ export default class LNDViewInvoice extends Component {

LNDViewInvoice.propTypes = {
navigation: PropTypes.shape({
goBack: PropTypes.function,
navigate: PropTypes.function,
getParam: PropTypes.function,
dismiss: PropTypes.function,
goBack: PropTypes.func,
navigate: PropTypes.func,
getParam: PropTypes.func,
dismiss: PropTypes.func,
}),
};
8 changes: 4 additions & 4 deletions screen/lnd/manageFunds.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ export default class ManageFunds extends Component {

ManageFunds.propTypes = {
navigation: PropTypes.shape({
goBack: PropTypes.function,
dismiss: PropTypes.function,
navigate: PropTypes.function,
getParam: PropTypes.function,
goBack: PropTypes.func,
dismiss: PropTypes.func,
navigate: PropTypes.func,
getParam: PropTypes.func,
state: PropTypes.shape({
params: PropTypes.shape({
fromSecret: PropTypes.string,
Expand Down
8 changes: 4 additions & 4 deletions screen/lnd/scanLndInvoice.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ export default class ScanLndInvoice extends React.Component {

ScanLndInvoice.propTypes = {
navigation: PropTypes.shape({
goBack: PropTypes.function,
navigate: PropTypes.function,
getParam: PropTypes.function,
dismiss: PropTypes.function,
goBack: PropTypes.func,
navigate: PropTypes.func,
getParam: PropTypes.func,
dismiss: PropTypes.func,
state: PropTypes.shape({
params: PropTypes.shape({
uri: PropTypes.string,
Expand Down
4 changes: 2 additions & 2 deletions screen/receive/details.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ export default class ReceiveDetails extends Component {

ReceiveDetails.propTypes = {
navigation: PropTypes.shape({
goBack: PropTypes.function,
navigate: PropTypes.function,
goBack: PropTypes.func,
navigate: PropTypes.func,
state: PropTypes.shape({
params: PropTypes.shape({
address: PropTypes.string,
Expand Down
8 changes: 4 additions & 4 deletions screen/send/confirm.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ const styles = StyleSheet.create({

Confirm.propTypes = {
navigation: PropTypes.shape({
goBack: PropTypes.function,
getParam: PropTypes.function,
navigate: PropTypes.function,
dismiss: PropTypes.function,
goBack: PropTypes.func,
getParam: PropTypes.func,
navigate: PropTypes.func,
dismiss: PropTypes.func,
state: PropTypes.shape({
params: PropTypes.shape({
amount: PropTypes.string,
Expand Down
8 changes: 4 additions & 4 deletions screen/send/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ const styles = StyleSheet.create({

SendCreate.propTypes = {
navigation: PropTypes.shape({
goBack: PropTypes.function,
getParam: PropTypes.function,
navigate: PropTypes.function,
dismiss: PropTypes.function,
goBack: PropTypes.func,
getParam: PropTypes.func,
navigate: PropTypes.func,
dismiss: PropTypes.func,
state: PropTypes.shape({
params: PropTypes.shape({
amount: PropTypes.string,
Expand Down
12 changes: 6 additions & 6 deletions screen/send/details.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export default class SendDetails extends Component {
try {
const cachedNetworkTransactionFees = JSON.parse(await AsyncStorage.getItem(NetworkTransactionFee.StorageKey));

if (cachedNetworkTransactionFees.halfHourFee) {
if (cachedNetworkTransactionFees && cachedNetworkTransactionFees.hasOwnProperty('halfHourFee')) {
this.setState({
fee: cachedNetworkTransactionFees.halfHourFee,
networkTransactionFees: cachedNetworkTransactionFees,
Expand All @@ -142,7 +142,7 @@ export default class SendDetails extends Component {
} catch (_) {}

let recommendedFees = await NetworkTransactionFees.recommendedFees();
if (recommendedFees.halfHourFee) {
if (recommendedFees && recommendedFees.hasOwnProperty('halfHourFee')) {
await AsyncStorage.setItem(NetworkTransactionFee.StorageKey, JSON.stringify(recommendedFees));
this.setState({
fee: recommendedFees.halfHourFee,
Expand Down Expand Up @@ -408,9 +408,9 @@ export default class SendDetails extends Component {
}

onWalletSelect = wallet => {
this.setState({ fromAddress: wallet.getAddress(), fromSecret: wallet.getSecret(), fromWallet: wallet }, () =>
this.props.navigation.goBack(),
);
this.setState({ fromAddress: wallet.getAddress(), fromSecret: wallet.getSecret(), fromWallet: wallet }, () => {
this.props.navigation.pop();
});
};

useAllFundsPressed = async () => {
Expand Down Expand Up @@ -663,7 +663,7 @@ const styles = StyleSheet.create({

SendDetails.propTypes = {
navigation: PropTypes.shape({
goBack: PropTypes.func,
pop: PropTypes.func,
navigate: PropTypes.func,
getParam: PropTypes.func,
state: PropTypes.shape({
Expand Down
8 changes: 4 additions & 4 deletions screen/send/success.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ export default class Success extends Component {

Success.propTypes = {
navigation: PropTypes.shape({
goBack: PropTypes.function,
getParam: PropTypes.function,
navigate: PropTypes.function,
dismiss: PropTypes.function,
goBack: PropTypes.func,
getParam: PropTypes.func,
navigate: PropTypes.func,
dismiss: PropTypes.func,
state: PropTypes.shape({
params: PropTypes.shape({
amount: PropTypes.string,
Expand Down
2 changes: 1 addition & 1 deletion screen/transactions/RBF-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export default class SendCreate extends Component {

SendCreate.propTypes = {
navigation: PropTypes.shape({
goBack: PropTypes.function,
goBack: PropTypes.func,
navigate: PropTypes.func,
state: PropTypes.shape({
params: PropTypes.shape({
Expand Down
2 changes: 1 addition & 1 deletion screen/transactions/RBF.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export default class RBF extends Component {

RBF.propTypes = {
navigation: PropTypes.shape({
goBack: PropTypes.function,
goBack: PropTypes.func,
navigate: PropTypes.func,
state: PropTypes.shape({
params: PropTypes.shape({
Expand Down
2 changes: 1 addition & 1 deletion screen/transactions/details.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export default class TransactionsDetails extends Component {

TransactionsDetails.propTypes = {
navigation: PropTypes.shape({
goBack: PropTypes.function,
goBack: PropTypes.func,
navigate: PropTypes.func,
state: PropTypes.shape({
params: PropTypes.shape({
Expand Down
2 changes: 1 addition & 1 deletion screen/wallets/buyBitcoin.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default class BuyBitcoin extends Component {

BuyBitcoin.propTypes = {
navigation: PropTypes.shape({
goBack: PropTypes.function,
goBack: PropTypes.func,
state: PropTypes.shape({
params: PropTypes.shape({
address: PropTypes.string,
Expand Down

0 comments on commit a440c61

Please sign in to comment.