Skip to content

Commit

Permalink
Removed duplicated switch case
Browse files Browse the repository at this point in the history
  • Loading branch information
Leandro committed Mar 4, 2022
1 parent aa7a392 commit 51fb0c5
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/custom/api/gnosisProtocol/errors/QuoteError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,17 @@ export function mapOperatorErrorToQuoteError(error?: ApiErrorObject): GpQuoteErr
errorType: GpQuoteErrorCodes.InsufficientLiquidity,
description: GpQuoteErrorDetails.InsufficientLiquidity,
}

case ApiErrorCodes.SellAmountDoesNotCoverFee:
return {
errorType: GpQuoteErrorCodes.FeeExceedsFrom,
description: GpQuoteErrorDetails.FeeExceedsFrom,
data: error?.data,
}

case ApiErrorCodes.UnsupportedToken:
return {
errorType: GpQuoteErrorCodes.UnsupportedToken,
description: error.description,
}
case ApiErrorCodes.SellAmountDoesNotCoverFee:
return {
errorType: GpQuoteErrorCodes.FeeExceedsFrom,
description: error.description,
}
default:
return { errorType: GpQuoteErrorCodes.UNHANDLED_ERROR, description: GpQuoteErrorDetails.UNHANDLED_ERROR }
}
Expand Down

0 comments on commit 51fb0c5

Please sign in to comment.