|
|
@ -326,6 +326,33 @@ export default class WalletTransactions extends Component { |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
renderLappBrowserButton = () => { |
|
|
|
return ( |
|
|
|
<TouchableOpacity |
|
|
|
onPress={() => { |
|
|
|
this.props.navigation.navigate('LappBrowser', { |
|
|
|
fromSecret: this.state.wallet.getSecret(), |
|
|
|
fromWallet: this.state.wallet, |
|
|
|
url: 'about:blank', |
|
|
|
}); |
|
|
|
}} |
|
|
|
style={{ |
|
|
|
marginLeft: 5, |
|
|
|
backgroundColor: '#f2f2f2', |
|
|
|
borderRadius: 9, |
|
|
|
minHeight: 49, |
|
|
|
flex: 1, |
|
|
|
paddingHorizontal: 8, |
|
|
|
justifyContent: 'center', |
|
|
|
flexDirection: 'row', |
|
|
|
alignItems: 'center', |
|
|
|
}} |
|
|
|
> |
|
|
|
<Text style={{ color: '#062453', fontSize: 18 }}>LApp Browser</Text> |
|
|
|
</TouchableOpacity> |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
onWalletSelect = async wallet => { |
|
|
|
NavigationService.navigate('WalletTransactions'); |
|
|
|
/** @type {LightningCustodianWallet} */ |
|
|
@ -394,7 +421,20 @@ export default class WalletTransactions extends Component { |
|
|
|
onManageFundsPressed={() => this.setState({ isManageFundsModalVisible: true })} |
|
|
|
/> |
|
|
|
<View style={{ backgroundColor: '#FFFFFF' }}> |
|
|
|
<View style={{ flexDirection: 'row', margin: 16, justifyContent: 'space-evenly' }}>{this.renderMarketplaceButton()}</View> |
|
|
|
<View style={{ flexDirection: 'row', margin: 16, justifyContent: 'space-evenly' }}> |
|
|
|
{/* |
|
|
|
So the idea here, due to Apple banning native Lapp marketplace, is: |
|
|
|
On Android everythins works as it worked before. Single "Marketplace" button that leads to LappBrowser that |
|
|
|
opens /marketplace/ url of offchain wallet type, and /marketplace-btc/ for onchain. |
|
|
|
On iOS its more complicated - we have one button that opens same page _externally_ (in Safari), and second |
|
|
|
button that opens actual LappBrowser but with _blank_ page. This is important to not trigger Apple. |
|
|
|
Blank page is also the way Trust Wallet does it with Dapp Browser. |
|
|
|
|
|
|
|
For ONCHAIN wallet type no LappBrowser button should be displayed, its Lightning-network specific. |
|
|
|
*/} |
|
|
|
{this.renderMarketplaceButton()} |
|
|
|
{this.state.wallet.type === LightningCustodianWallet.type && Platform.OS === 'ios' && this.renderLappBrowserButton()} |
|
|
|
</View> |
|
|
|
<FlatList |
|
|
|
onEndReachedThreshold={0.3} |
|
|
|
onEndReached={() => { |
|
|
|