@elevenyellow.com/switchain-api-client
Advanced tools
Comparing version 3.4.0 to 3.5.0
{ | ||
"name": "@elevenyellow.com/switchain-api-client", | ||
"version": "3.4.0", | ||
"version": "3.5.0", | ||
"description": "client module to access switchains's api", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -83,6 +83,15 @@ const fetch = require('isomorphic-unfetch') | ||
refundAddress, | ||
pair, | ||
fromAmount, | ||
toAmount | ||
pair | ||
} | ||
if (fromAmount) { | ||
body.fromAmount = fromAmount | ||
} else if (toAmount) { | ||
body.toAmount = toAmount | ||
} else { | ||
throw Error( | ||
'switchainApiClient.postOrder.error.requiredFromAmountOrToAmountField' | ||
) | ||
} | ||
if (signature) body.signature = signature | ||
@@ -89,0 +98,0 @@ |
6421
145