|
@ -11,13 +11,14 @@ let BlueApp = require('../../BlueApp'); |
|
|
let loc = require('../../loc'); |
|
|
let loc = require('../../loc'); |
|
|
|
|
|
|
|
|
export default class SelectWallet extends Component { |
|
|
export default class SelectWallet extends Component { |
|
|
static navigationOptions = () => ({ |
|
|
static navigationOptions = ({ navigation }) => ({ |
|
|
...BlueNavigationStyle(), |
|
|
...BlueNavigationStyle(navigation, true, navigation.getParam('dismissAcion')), |
|
|
title: loc.wallets.select_wallet, |
|
|
title: loc.wallets.select_wallet, |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
constructor(props) { |
|
|
constructor(props) { |
|
|
super(props); |
|
|
super(props); |
|
|
|
|
|
props.navigation.setParams({ dismissAcion: this.dismissComponent }); |
|
|
this.state = { |
|
|
this.state = { |
|
|
isLoading: true, |
|
|
isLoading: true, |
|
|
data: [], |
|
|
data: [], |
|
@ -25,6 +26,10 @@ export default class SelectWallet extends Component { |
|
|
this.chainType = props.navigation.getParam('chainType'); |
|
|
this.chainType = props.navigation.getParam('chainType'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
dismissComponent = () => { |
|
|
|
|
|
this.props.navigation.goBack(null); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
componentDidMount() { |
|
|
componentDidMount() { |
|
|
const wallets = this.chainType |
|
|
const wallets = this.chainType |
|
|
? BlueApp.getWallets().filter(item => item.chain === this.chainType && item.allowSend()) |
|
|
? BlueApp.getWallets().filter(item => item.chain === this.chainType && item.allowSend()) |
|
@ -165,8 +170,8 @@ export default class SelectWallet extends Component { |
|
|
SelectWallet.propTypes = { |
|
|
SelectWallet.propTypes = { |
|
|
navigation: PropTypes.shape({ |
|
|
navigation: PropTypes.shape({ |
|
|
navigate: PropTypes.func, |
|
|
navigate: PropTypes.func, |
|
|
|
|
|
goBack: PropTypes.func, |
|
|
setParams: PropTypes.func, |
|
|
setParams: PropTypes.func, |
|
|
dismiss: PropTypes.func, |
|
|
|
|
|
getParam: PropTypes.func, |
|
|
getParam: PropTypes.func, |
|
|
}), |
|
|
}), |
|
|
}; |
|
|
}; |
|
|