@gearbox-protocol/sdk 16.4.0-next.7 → 16.4.0
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/cjs/onchain/accounts/CreditAccountsServiceV310.js +0 -1
- package/dist/cjs/onchain/validation/bundles/checkMidasAccountGreenlist.js +1 -3
- package/dist/esm/onchain/accounts/CreditAccountsServiceV310.js +0 -1
- package/dist/esm/onchain/validation/bundles/checkMidasAccountGreenlist.js +1 -3
- package/dist/types/onchain/validation/bundles/checkMidasAccountGreenlist.d.ts +1 -2
- package/package.json +1 -1
|
@@ -213,7 +213,6 @@ var CreditAccountsServiceV310 = class extends require_onchain_base_SDKConstruct.
|
|
|
213
213
|
}),
|
|
214
214
|
...callsAfter ?? []
|
|
215
215
|
];
|
|
216
|
-
calls = await this.#prependMidasReceiveGreenlist(cm.address, calls);
|
|
217
216
|
calls = await this.prependPriceUpdates(cm.address, calls);
|
|
218
217
|
const tx = reopenCreditAccount ? cmSuite.multicallTx(reopenCreditAccount, calls, rwaOptions) : cmSuite.openCreditAccountTx(to, calls, referralCode, rwaOptions);
|
|
219
218
|
tx.value = ethAmount.toString(10);
|
|
@@ -7,13 +7,11 @@ require("../helpers/index.js");
|
|
|
7
7
|
//#region src/onchain/validation/bundles/checkMidasAccountGreenlist.ts
|
|
8
8
|
/**
|
|
9
9
|
* Whether the credit account already holds the Midas greenlisted role
|
|
10
|
-
* this permissioned mToken requires of its holder
|
|
11
|
-
* grants it via `receiveGreenlist()`.
|
|
10
|
+
* this permissioned mToken requires of its holder.
|
|
12
11
|
*/
|
|
13
12
|
async function checkMidasAccountGreenlist(input) {
|
|
14
13
|
const { sdk, preview, nft, tokens } = input;
|
|
15
14
|
if (nft.protocol !== "midas") return [];
|
|
16
|
-
if (preview.midasGreenlistsAccount) return [];
|
|
17
15
|
if (tokens.length === 0) return [];
|
|
18
16
|
const account = preview.creditAccount;
|
|
19
17
|
if (!account) return tokens.map((token) => require_model_errors_operation_errors.accountNotMidasGreenlisted({
|
|
@@ -212,7 +212,6 @@ var CreditAccountsServiceV310 = class extends SDKConstruct {
|
|
|
212
212
|
}),
|
|
213
213
|
...callsAfter ?? []
|
|
214
214
|
];
|
|
215
|
-
calls = await this.#prependMidasReceiveGreenlist(cm.address, calls);
|
|
216
215
|
calls = await this.prependPriceUpdates(cm.address, calls);
|
|
217
216
|
const tx = reopenCreditAccount ? cmSuite.multicallTx(reopenCreditAccount, calls, rwaOptions) : cmSuite.openCreditAccountTx(to, calls, referralCode, rwaOptions);
|
|
218
217
|
tx.value = ethAmount.toString(10);
|
|
@@ -6,13 +6,11 @@ import "../helpers/index.js";
|
|
|
6
6
|
//#region src/onchain/validation/bundles/checkMidasAccountGreenlist.ts
|
|
7
7
|
/**
|
|
8
8
|
* Whether the credit account already holds the Midas greenlisted role
|
|
9
|
-
* this permissioned mToken requires of its holder
|
|
10
|
-
* grants it via `receiveGreenlist()`.
|
|
9
|
+
* this permissioned mToken requires of its holder.
|
|
11
10
|
*/
|
|
12
11
|
async function checkMidasAccountGreenlist(input) {
|
|
13
12
|
const { sdk, preview, nft, tokens } = input;
|
|
14
13
|
if (nft.protocol !== "midas") return [];
|
|
15
|
-
if (preview.midasGreenlistsAccount) return [];
|
|
16
14
|
if (tokens.length === 0) return [];
|
|
17
15
|
const account = preview.creditAccount;
|
|
18
16
|
if (!account) return tokens.map((token) => accountNotMidasGreenlisted({
|
|
@@ -15,8 +15,7 @@ interface CheckMidasAccountGreenlistInput {
|
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Whether the credit account already holds the Midas greenlisted role
|
|
18
|
-
* this permissioned mToken requires of its holder
|
|
19
|
-
* grants it via `receiveGreenlist()`.
|
|
18
|
+
* this permissioned mToken requires of its holder.
|
|
20
19
|
*/
|
|
21
20
|
declare function checkMidasAccountGreenlist(input: CheckMidasAccountGreenlistInput): Promise<(AccountNotMidasGreenlistedError | UnexpectedFailureError)[]>;
|
|
22
21
|
//#endregion
|