Browse Source

FIX: broken buy-bitcoin button

master
Overtorment 5 years ago
parent
commit
92cc2c8411
  1. 3
      screen/wallets/buyBitcoin.js
  2. 1
      screen/wallets/details.js
  3. 2
      screen/wallets/list.js
  4. 5
      screen/wallets/transactions.js

3
screen/wallets/buyBitcoin.js

@ -17,6 +17,7 @@ export default class BuyBitcoin extends Component {
constructor(props) {
super(props);
let wallet = props.navigation.state.params.wallet;
if (!wallet) console.warn('wallet was not passed to buyBitcoin');
this.state = {
isLoading: true,
@ -105,7 +106,7 @@ BuyBitcoin.propTypes = {
goBack: PropTypes.func,
state: PropTypes.shape({
params: PropTypes.shape({
wallet: PropTypes.object,
wallet: PropTypes.object.isRequired,
safelloStateToken: PropTypes.string,
}),
}),

1
screen/wallets/details.js

@ -268,6 +268,7 @@ export default class WalletDetails extends Component {
<BlueSpacing20 />
{this.renderMarketplaceButton()}
<BlueSpacing20 />
</React.Fragment>
)}
<BlueButton onPress={() => this.props.navigation.navigate('Broadcast')} title="Broadcast transaction" />

2
screen/wallets/list.js

@ -352,7 +352,7 @@ export default class WalletsList extends Component {
>
<View style={{ flexDirection: 'column' }}>
<Text style={{ fontSize: 16, fontWeight: '600', color: '#0C2550' }}>Local Trader</Text>
<Text style={{ fontSize: 13, fontWeight: '500', color: '#9AA0AA' }}>A p2p marketplace</Text>
<Text style={{ fontSize: 13, fontWeight: '500', color: '#9AA0AA' }}>A p2p exchange</Text>
</View>
<View style={{ flexDirection: 'column', backgroundColor: '#007AFF', borderRadius: 16 }}>
<Text style={{ paddingHorizontal: 16, paddingVertical: 8, fontSize: 13, color: '#fff', fontWeight: '600' }}>New</Text>

5
screen/wallets/transactions.js

@ -218,7 +218,7 @@ export default class WalletTransactions extends Component {
return (
<View style={{ flex: 1 }}>
<View style={{ flexDirection: 'row', margin: 16, justifyContent: 'space-evenly' }}>
{this.state.wallet.getBalance() > 0 && this.renderSellFiat()}
{this.state.wallet.getTransactions().length > 0 && this.renderSellFiat()}
{this.state.wallet.type === LightningCustodianWallet.type && this.renderMarketplaceButton()}
{this.state.wallet.type === LightningCustodianWallet.type && Platform.OS === 'ios' && this.renderLappBrowserButton()}
</View>
@ -382,8 +382,7 @@ export default class WalletTransactions extends Component {
<TouchableOpacity
onPress={() =>
this.props.navigation.navigate('BuyBitcoin', {
address: this.state.wallet.getAddress(),
secret: this.state.wallet.getSecret(),
wallet: this.state.wallet,
})
}
style={{

Loading…
Cancel
Save