@shapeshiftoss/swapper 16.0.0 → 16.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@ const constants_2 = require("../utils/constants");
9
9
  const grantAllowanceForAmount = async ({ adapter, web3 }, { quote, wallet }, approvalAmount) => {
10
10
  const approvalQuote = {
11
11
  ...quote,
12
- sellAmount: approvalAmount,
12
+ sellAmountBeforeFeesCryptoBaseUnit: approvalAmount,
13
13
  feeData: {
14
14
  ...quote.feeData,
15
15
  chainSpecific: {
@@ -31,9 +31,8 @@ const grantAllowanceForAmount = async ({ adapter, web3 }, { quote, wallet }, app
31
31
  async function zrxApproveAmount(deps, args) {
32
32
  var _a;
33
33
  try {
34
- const sellAmount = args.quote.sellAmountBeforeFeesCryptoBaseUnit;
35
34
  // If no amount is specified we use the quotes sell amount
36
- const approvalAmount = (_a = args.amount) !== null && _a !== void 0 ? _a : sellAmount;
35
+ const approvalAmount = (_a = args.amount) !== null && _a !== void 0 ? _a : args.quote.sellAmountBeforeFeesCryptoBaseUnit;
37
36
  return grantAllowanceForAmount(deps, args, approvalAmount);
38
37
  }
39
38
  catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapeshiftoss/swapper",
3
- "version": "16.0.0",
3
+ "version": "16.0.1",
4
4
  "description": "An interface and implementations to trade coins via various protocols",
5
5
  "repository": "https://github.com/shapeshift/lib",
6
6
  "license": "MIT",