Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
case errorNames.SwapBelowLimitError: {
const settings = SETTINGS_SELECTORS.getSettings(state)
const currentCurrencyDenomination = SETTINGS_SELECTORS.getDisplayDenominationFromSettings(settings, fromCurrencyCode)
const nativeMin: string = error.nativeMin
const displayDenomination = SETTINGS_SELECTORS.getDisplayDenomination(state, fromCurrencyCode)
const nativeToDisplayRatio = displayDenomination.multiplier
const displayMin = UTILS.convertNativeToDisplay(nativeToDisplayRatio)(nativeMin)
return dispatch({
type: 'GENERIC_SHAPE_SHIFT_ERROR',
data: sprintf(s.strings.amount_below_limit, displayMin, currentCurrencyDenomination.name)
})
}
case errorNames.SwapCurrencyError: {
return dispatch({
type: 'GENERIC_SHAPE_SHIFT_ERROR',
data: sprintf(s.strings.ss_unable, fromCurrencyCode, toCurrencyCode)
})
}
case errorNames.SwapPermissionError: {
switch (error.reason) {
case 'geoRestriction': {
return dispatch({
type: 'GENERIC_SHAPE_SHIFT_ERROR',
data: s.strings.ss_geolock
})
}
case 'needsActivation': {