Wallet history refresh OK
This commit is contained in:
parent
b0f0c6c8be
commit
1241951647
|
@ -93,6 +93,38 @@ class WalletDetail extends Component {
|
|||
else
|
||||
this.props.getWalletTransactionHistory(this.props.navigation.state.params.wallet.id, false);
|
||||
}
|
||||
|
||||
this.willFocus = this.props.navigation.addListener(
|
||||
'willFocus',
|
||||
payload => {
|
||||
const { result } = this.props;
|
||||
console.log("will focus");
|
||||
if (result !== null) {
|
||||
if (typeof result.response !== 'undefined') {
|
||||
const wallet = result.response[0];
|
||||
readUser().then((user) => {
|
||||
if (user !== null && user !== undefined) {
|
||||
if (user.category !== undefined) {
|
||||
switch (user.category) {
|
||||
case "super":
|
||||
this.props.getHyperSuperTransactionHistoryAction(result.response.id, false);
|
||||
break;
|
||||
case "hyper":
|
||||
this.props.getHyperSuperTransactionHistoryAction(user.network_id, true);
|
||||
break;
|
||||
}
|
||||
this.setState({});
|
||||
}
|
||||
}
|
||||
});
|
||||
this.setState({
|
||||
wallet: wallet,
|
||||
isTriggerRefresh: false
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
/*
|
||||
static options(passProps) {
|
||||
|
|
|
@ -106,6 +106,9 @@ class WalletDetailUser extends Component {
|
|||
this.props.getWalletDetailActivated(this.props.navigation.state.params.userId, null);
|
||||
this.props.getUserIdentificationResetAction();
|
||||
|
||||
this.willFocus = this.props.navigation.addListener(
|
||||
'willFocus',
|
||||
payload => {
|
||||
readUser().then((user) => {
|
||||
if (user) {
|
||||
if (user !== undefined) {
|
||||
|
@ -115,6 +118,8 @@ class WalletDetailUser extends Component {
|
|||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
static navigatorStyle = {
|
||||
|
|
|
@ -442,6 +442,7 @@ class EnvoieWalletToWalletUser extends Component {
|
|||
|
||||
this.props.getCommissionUserWalletToWalletAction({
|
||||
type: 1,
|
||||
network_destinataire: (this.state.walletActifs.filter(element => element.name === this.state.walletActifSelect))[0].id,
|
||||
id_wallet_user: this.state.wallet.id,
|
||||
final_country: (this.state.paysDestination.filter(element => element.name === this.state.paysDestinationSelect))[0].id,
|
||||
id_destinataire: this.state.numeroTelephoneOrWalletCode,
|
||||
|
@ -564,8 +565,8 @@ class EnvoieWalletToWalletUser extends Component {
|
|||
onChangeText={(value, index, data) => {
|
||||
this.setState({ typeIdDestinataireSelect: value });
|
||||
}}
|
||||
valueExtractor={(value) => { return value.name }}
|
||||
labelExtractor={(value) => { return value.name }}
|
||||
valueExtractor={(value) => { return I18n.t(value.name) }}
|
||||
labelExtractor={(value) => { return I18n.t(value.name) }}
|
||||
/>
|
||||
</Animatable.View>
|
||||
|
||||
|
|
|
@ -369,6 +369,14 @@ export const optionRetraitUserScreen = {
|
|||
screen: route.retraitCarteVersWalletUser,
|
||||
icon: 'credit-card',
|
||||
title: 'WITHDRAWAL_CARD_TO_WALLET',
|
||||
}, {
|
||||
screen: '',
|
||||
icon: 'credit-card',
|
||||
title: 'WITHDRAWAL_BANK_TO_WALLET',
|
||||
}, {
|
||||
screen: '',
|
||||
icon: 'credit-card',
|
||||
title: 'WITHDRAWAL_BANK_TO_CASH',
|
||||
},
|
||||
]
|
||||
}
|
||||
|
|
|
@ -93,6 +93,8 @@
|
|||
"WITHDRAWAL_CARD_TO_WALLET": "Withdrawal card to wallet",
|
||||
"WITHDRAWAL_CARD_TO_WALLET_DESCRIPTION": "Withdrawal money from your card to your wallet",
|
||||
"WITHDRAWAL_CARD_TO_CASH": "Withdrawal card to cash",
|
||||
"WITHDRAWAL_BANK_TO_WALLET": "Withdrawal bank to wallet",
|
||||
"WITHDRAWAL_BANK_TO_CASH": "Withdrawal bank to cash",
|
||||
"WITHDRAWAL_CARD_TO_CASH_AGENT": "Withdrawal card to cash",
|
||||
"WITHDRAWAL_CARD_TO_CASH_DESCRIPTION": "Withdrawal money from card to cash",
|
||||
"WITHDRAWAL_CARD_TO_CASH_DESCRIPTION_AGENT": "Withdrawal money from card to cash",
|
||||
|
|
|
@ -97,6 +97,8 @@
|
|||
"WITHDRAWAL_WALLET_TO_CASH": "Retrait de votre wallet vers cash",
|
||||
"WITHDRAWAL_WALLET_TO_CASH_DESCRIPTION": "Retirer de l'argent de votre Wallet vers cash",
|
||||
"WITHDRAWAL_CARD_TO_WALLET": "Retrait de votre carte vers wallet",
|
||||
"WITHDRAWAL_BANK_TO_WALLET": "Retrait de votre banque vers wallet",
|
||||
"WITHDRAWAL_BANK_TO_CASH": "Retrait de votre banque vers cash",
|
||||
"WITHDRAWAL_CARD_TO_WALLET_DESCRIPTION": "Retrait d'argent de votre carte vers wallet",
|
||||
"WITHDRAWAL_CARD_TO_CASH": "Retrait de votre carte vers cash",
|
||||
"WITHDRAWAL_CARD_TO_CASH_AGENT": "Retrait carte vers cash",
|
||||
|
|
Loading…
Reference in New Issue