mirror of
https://github.com/ecency/ecency-mobile.git
synced 2025-01-02 19:06:39 +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 navigateTo = ROUTES.SCREENS.TRANSFER
|
||||||
let navigateParams = {};
|
let navigateParams = {};
|
||||||
|
|
||||||
if(coinId === COIN_IDS.ECENCY){
|
if(coinId === COIN_IDS.ECENCY && transferType !== 'dropdown_transfer'){
|
||||||
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'
|
|
||||||
}
|
|
||||||
navigateTo = ROUTES.SCREENS.REDEEM;
|
navigateTo = ROUTES.SCREENS.REDEEM;
|
||||||
navigateParams = {
|
navigateParams = {
|
||||||
balance:coinData.balance,
|
balance:coinData.balance,
|
||||||
redeemType,
|
redeemType:transferType === 'dropdown_promote'?'promote':'boost',
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const balance = transferType === 'withdraw_hive' || transferType === 'withdraw_hbd'
|
const balance = transferType === 'withdraw_hive' || transferType === 'withdraw_hbd'
|
||||||
? coinData.savings : coinData.balance;
|
? 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) {
|
if (isPinCodeOpen) {
|
||||||
dispatch(
|
dispatch(
|
||||||
openPinCodeModal({
|
openPinCodeModal({
|
||||||
|
Loading…
Reference in New Issue
Block a user