Add SideShift.ai exchange plugin #100
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds the SideShift.ai exchange plugin to Edge Wallet.
makeSideshiftPluginfunction is defined and added to theindex.jsfile as described in the swap plugin integration Wiki page. The plugin utilizes the SideShift.ai REST API, first fetching/ratesand/permissionsto determine if the users location isn't restricted by SideShift.ai and the amount that the user is trying to exchange is between theminandmaxamount possible to shift. Then the/quoteendpoint creates a fixedquoteand based on that anorderis created with the/ordersendpoint. The data returned by SideShift.ai API is processed to anEdgeSpendInfoobject as required by Edge.SideShift.ai plugin only returns fixed rate orders.
The
READMEhas also been updated to ease the process of testing.Accompanying pull requests: