mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-21 12:21:31 +03:00
simplified action press logic
This commit is contained in:
parent
d653a14ab5
commit
ac4544b109
@ -62,33 +62,23 @@ const CoinDetailsScreen = ({navigation}:CoinDetailsScreenProps) => {
|
||||
let navigateTo = ROUTES.SCREENS.TRANSFER
|
||||
let navigateParams = {};
|
||||
|
||||
if(coinId === COIN_IDS.ECENCY){
|
||||
if(transferType === 'dropdown_transfer'){
|
||||
navigateParams = {
|
||||
transferType: 'points',
|
||||
fundType:'ESTM',
|
||||
balance: coinData.balance
|
||||
}
|
||||
} else{
|
||||
let redeemType = '';
|
||||
if(transferType === 'dropdown_promote'){
|
||||
redeemType = 'promote';
|
||||
} else if(transferType === 'dropdown_boost'){
|
||||
redeemType = 'boost'
|
||||
}
|
||||
if(coinId === COIN_IDS.ECENCY && transferType !== 'dropdown_transfer'){
|
||||
navigateTo = ROUTES.SCREENS.REDEEM;
|
||||
navigateParams = {
|
||||
balance:coinData.balance,
|
||||
redeemType,
|
||||
redeemType:transferType === 'dropdown_promote'?'promote':'boost',
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const balance = transferType === 'withdraw_hive' || transferType === 'withdraw_hbd'
|
||||
? coinData.savings : coinData.balance;
|
||||
navigateParams = { transferType, fundType:symbol, balance, tokenAddress };
|
||||
navigateParams = {
|
||||
transferType:coinId === COIN_IDS.ECENCY?'points':transferType,
|
||||
fundType:coinId === COIN_IDS.ECENCY?'ESTM':symbol,
|
||||
balance,
|
||||
tokenAddress
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
if (isPinCodeOpen) {
|
||||
dispatch(
|
||||
openPinCodeModal({
|
||||
|
Loading…
Reference in New Issue
Block a user