@gearbox-protocol/sdk 1.20.16 → 1.20.17
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/lib/core/trade.d.ts +1 -2
- package/lib/core/trade.js +0 -13
- package/package.json +1 -1
package/lib/core/trade.d.ts
CHANGED
|
@@ -37,8 +37,7 @@ export declare class Trade implements BaseTradeInterface {
|
|
|
37
37
|
execute(signer: Signer): Promise<EVMTx>;
|
|
38
38
|
toString(): string;
|
|
39
39
|
static getOperationName(tokenInAddress: string, tokenOutAddress: string): TradeOperations;
|
|
40
|
-
static executeMulticallPath(creditFacade: string | ICreditFacade, signer: Signer, calls: Array<MultiCall>): Promise<import("
|
|
41
|
-
private static executeOnSigner;
|
|
40
|
+
static executeMulticallPath(creditFacade: string | ICreditFacade, signer: Signer, calls: Array<MultiCall>): Promise<import("ethers").ContractTransaction>;
|
|
42
41
|
private static executeOnCreditFacade;
|
|
43
42
|
}
|
|
44
43
|
export {};
|
package/lib/core/trade.js
CHANGED
|
@@ -131,9 +131,6 @@ var Trade = /** @class */ (function () {
|
|
|
131
131
|
return __generator(this, function (_a) {
|
|
132
132
|
if (calls.length < 1)
|
|
133
133
|
throw new Error("No path to execute");
|
|
134
|
-
if (calls.length === 1) {
|
|
135
|
-
return [2 /*return*/, this.executeOnSigner(calls[0], signer)];
|
|
136
|
-
}
|
|
137
134
|
safeCreditFacade = typeof creditFacade === "string"
|
|
138
135
|
? types_1.ICreditFacade__factory.connect(creditFacade, signer)
|
|
139
136
|
: creditFacade;
|
|
@@ -141,16 +138,6 @@ var Trade = /** @class */ (function () {
|
|
|
141
138
|
});
|
|
142
139
|
});
|
|
143
140
|
};
|
|
144
|
-
Trade.executeOnSigner = function (call, signer) {
|
|
145
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
146
|
-
return __generator(this, function (_a) {
|
|
147
|
-
return [2 /*return*/, signer.sendTransaction({
|
|
148
|
-
to: call.target,
|
|
149
|
-
data: call.callData,
|
|
150
|
-
})];
|
|
151
|
-
});
|
|
152
|
-
});
|
|
153
|
-
};
|
|
154
141
|
Trade.executeOnCreditFacade = function (calls, creditFacade) {
|
|
155
142
|
return __awaiter(this, void 0, void 0, function () {
|
|
156
143
|
return __generator(this, function (_a) {
|