Disable 'Add a Tip with Each Payment' feature on iOS
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import * as React from 'react';
|
||||
import {
|
||||
Platform,
|
||||
ScrollView,
|
||||
StyleSheet,
|
||||
Text,
|
||||
@@ -170,7 +171,8 @@ export default class CashuPaymentRequest extends React.Component<
|
||||
const { CashuStore, SettingsStore, navigation } = this.props;
|
||||
const { settings } = SettingsStore;
|
||||
|
||||
const enableDonations = settings?.payments?.enableDonations;
|
||||
const enableDonations =
|
||||
Platform.OS !== 'ios' && settings?.payments?.enableDonations;
|
||||
const { donationAmount } = this.state;
|
||||
|
||||
CashuStore.payLnInvoiceFromEcash({
|
||||
@@ -253,7 +255,8 @@ export default class CashuPaymentRequest extends React.Component<
|
||||
|
||||
const noBalance = totalBalanceSats === 0;
|
||||
|
||||
const enableDonations = settings?.payments?.enableDonations;
|
||||
const enableDonations =
|
||||
Platform.OS !== 'ios' && settings?.payments?.enableDonations;
|
||||
|
||||
const showZaplockerWarning =
|
||||
isZaplocker ||
|
||||
|
||||
@@ -2,6 +2,7 @@ import * as React from 'react';
|
||||
import {
|
||||
NativeModules,
|
||||
NativeEventEmitter,
|
||||
Platform,
|
||||
ScrollView,
|
||||
StyleSheet,
|
||||
View,
|
||||
@@ -374,7 +375,8 @@ export default class PaymentRequest extends React.Component<
|
||||
|
||||
const { settings } = SettingsStore;
|
||||
|
||||
const enableDonations = settings?.payments?.enableDonations;
|
||||
const enableDonations =
|
||||
Platform.OS !== 'ios' && settings?.payments?.enableDonations;
|
||||
const { donationAmount } = this.state;
|
||||
let feeLimitSat = fee_limit_sat;
|
||||
|
||||
@@ -606,7 +608,8 @@ export default class PaymentRequest extends React.Component<
|
||||
|
||||
const { enableTor, implementation, settings } = SettingsStore;
|
||||
|
||||
const enableDonations = settings?.payments?.enableDonations;
|
||||
const enableDonations =
|
||||
Platform.OS !== 'ios' && settings?.payments?.enableDonations;
|
||||
|
||||
const isLnd: boolean = BackendUtils.isLNDBased();
|
||||
const isCLightning: boolean = implementation === 'cln-rest';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import { View } from 'react-native';
|
||||
import { Platform, View } from 'react-native';
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import { StackNavigationProp } from '@react-navigation/stack';
|
||||
import Slider from '@react-native-community/slider';
|
||||
@@ -412,7 +412,7 @@ export default class PaymentsSettings extends React.Component<
|
||||
disabled={!enableMempoolRates}
|
||||
/>
|
||||
</View>
|
||||
{isMainNet && (
|
||||
{isMainNet && Platform.OS !== 'ios' && (
|
||||
<View
|
||||
style={{
|
||||
flexDirection: 'row',
|
||||
@@ -455,7 +455,7 @@ export default class PaymentsSettings extends React.Component<
|
||||
</View>
|
||||
)}
|
||||
|
||||
{enableDonations && isMainNet && (
|
||||
{enableDonations && isMainNet && Platform.OS !== 'ios' && (
|
||||
<>
|
||||
<View
|
||||
style={{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import { FlatList, View } from 'react-native';
|
||||
import { FlatList, Platform, View } from 'react-native';
|
||||
import { Icon, ListItem } from '@rneui/themed';
|
||||
import { StackNavigationProp } from '@react-navigation/stack';
|
||||
|
||||
@@ -37,7 +37,7 @@ function Support(props: SupportProps) {
|
||||
{
|
||||
label: localeString('views.PaymentRequest.addATip'),
|
||||
path: 'ChangeDonationSettings',
|
||||
condition: nodeInfoStore.nodeInfo.isMainNet
|
||||
condition: nodeInfoStore.nodeInfo.isMainNet && Platform.OS !== 'ios'
|
||||
},
|
||||
{ label: localeString('views.Sponsors.title'), path: 'Sponsors' },
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user