Skip to content

Conversation

@paullinator
Copy link
Member

No description provided.

@paullinator
Copy link
Member Author

paullinator commented Aug 22, 2022

@CriptointercambioDev Please look at my fixup commit. Also, the original PR is missing some proper error handling. You need to properly detect when the requested amount is above or below the limit and return the min/max amount accordingly using the SwapAboveLimitError or SwapBelowLimitError. As well, if there are any georestriction, return the SwapPermissionError. See https://github.com/EdgeApp/edge-exchange-plugins/blob/1396f800bc11db2fa918a4af0af07826bfa6de5a/src/swap/sideshift.js for examples

Also, the code/API doesn't properly handle the case when a user is specifying the to amount. This specific call disregards whether the amount is from or to

https://github.com/EdgeApp/edge-exchange-plugins/pull/199/files#diff-0c7395b6d304a8e331a13d676f9936b14fd7677f5959beb7af66a04c9f5e3d8cR238

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants