hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

[BUG] no check to ensure that to and from currency in convert function arent same

Open Gulshan1-3 opened this issue 3 months ago • 1 comments

Bug Description

https://github.com/juspay/hyperswitch/blob/main/crates/currency_conversion/src/conversion.rs#L10 no check performed on this function if base currency is different and to and from are same,I am confused why isnt there a check on it.

Expected Behavior

It should return back the amount as it is if to and from currency is same instead of performing operation on it

Actual Behavior

It is actually letting the user pass to and from currencies that are same

Steps To Reproduce

Provide an unambiguous set of steps to reproduce this bug. Include code or configuration to reproduce, if relevant.

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'

Context For The Bug

No response

Environment

Are you using hyperswitch hosted version? Yes/No If yes, please provide the value of the x-request-id response header to help us debug your issue.

If not (or if building/running locally), please provide the following details:

  1. Operating System or Linux distribution:
  2. Rust version (output of rustc --version): ``
  3. App version (output of cargo r --features vergen -- --version): ``

Have you spent some time checking if this bug has been raised before?

  • [x] I checked and didn't find a similar issue

Have you read the Contributing Guidelines?

Are you willing to submit a PR?

Yes, I am willing to submit a PR!

Gulshan1-3 avatar Sep 04 '25 10:09 Gulshan1-3

Hello there!! I'm interested to work on above issue. Kindly assign it to me!!

Jatan196 avatar Sep 04 '25 11:09 Jatan196