impermax-sdk 2.1.33 → 2.1.34
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.
|
@@ -24,6 +24,7 @@ export default abstract class OnchainInteractionsPoolToken {
|
|
|
24
24
|
approvePoolToken(amount: BigNumber, onTransactionHash: Function): Promise<any>;
|
|
25
25
|
permitPoolToken(amount: BigNumber): Promise<Permit>;
|
|
26
26
|
approveUnderlying(amount: BigNumber, onTransactionHash: Function): Promise<any>;
|
|
27
|
+
approvePermit2(amount: BigNumber, onTransactionHash: Function): Promise<any>;
|
|
27
28
|
permitUnderlying(amount: BigNumber): Promise<Permit>;
|
|
28
29
|
permit2Underlying(amount: BigNumber): Promise<Permit>;
|
|
29
30
|
protected getSendData(permits: Permits): Promise<{
|
|
@@ -104,6 +104,12 @@ class OnchainInteractionsPoolToken {
|
|
|
104
104
|
return this.send(token.methods.approve(spender, amount), onTransactionHash);
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
|
+
approvePermit2(amount, onTransactionHash) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
const token = yield this.poolToken.getToken();
|
|
110
|
+
return this.send(token.methods.approve(general_1.PERMIT2_ADDRESS, amount), onTransactionHash);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
107
113
|
permitUnderlying(amount) {
|
|
108
114
|
return __awaiter(this, void 0, void 0, function* () {
|
|
109
115
|
const { owner, spender } = this.getOwnerSpender();
|