@shapeshiftoss/swapper 16.0.0 → 16.0.2
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.
package/dist/swappers/index.d.ts
CHANGED
package/dist/swappers/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.getInboundAddressDataForChain = void 0;
|
|
17
|
+
exports.isRune = exports.getInboundAddressDataForChain = void 0;
|
|
18
18
|
__exportStar(require("./zrx/ZrxSwapper"), exports);
|
|
19
19
|
__exportStar(require("./thorchain/ThorchainSwapper"), exports);
|
|
20
20
|
var getInboundAddressDataForChain_1 = require("./thorchain/utils/getInboundAddressDataForChain");
|
|
@@ -22,3 +22,5 @@ Object.defineProperty(exports, "getInboundAddressDataForChain", { enumerable: tr
|
|
|
22
22
|
__exportStar(require("./test/TestSwapper"), exports);
|
|
23
23
|
__exportStar(require("./osmosis/OsmosisSwapper"), exports);
|
|
24
24
|
__exportStar(require("./cow/CowSwapper"), exports);
|
|
25
|
+
var isRune_1 = require("./thorchain/utils/isRune/isRune");
|
|
26
|
+
Object.defineProperty(exports, "isRune", { enumerable: true, get: function () { return isRune_1.isRune; } });
|
|
@@ -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
|
-
|
|
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 :
|
|
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