@gearbox-protocol/sdk 9.10.4 → 9.10.5
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.
|
@@ -37,10 +37,13 @@ class DealMinter extends import_AbstractMinter.default {
|
|
|
37
37
|
super(sdk, anvil, "DealMinter");
|
|
38
38
|
}
|
|
39
39
|
async mint(token, dest, amount) {
|
|
40
|
+
const { deal } = await import("viem-deal").catch(() => ({ deal: null }));
|
|
41
|
+
if (!deal) {
|
|
42
|
+
throw new Error("peer dependency viem-deal is not installed");
|
|
43
|
+
}
|
|
40
44
|
let balance = await this.balanceOf(token, dest);
|
|
41
45
|
balance += amount;
|
|
42
46
|
this.logger?.debug(`set balance of ${dest} to ${this.fmt(token, balance)}`);
|
|
43
|
-
const { deal } = await import("viem-deal");
|
|
44
47
|
await deal(this.anvil, {
|
|
45
48
|
erc20: token,
|
|
46
49
|
account: dest,
|
|
@@ -4,10 +4,13 @@ class DealMinter extends AbstractMinter {
|
|
|
4
4
|
super(sdk, anvil, "DealMinter");
|
|
5
5
|
}
|
|
6
6
|
async mint(token, dest, amount) {
|
|
7
|
+
const { deal } = await import("viem-deal").catch(() => ({ deal: null }));
|
|
8
|
+
if (!deal) {
|
|
9
|
+
throw new Error("peer dependency viem-deal is not installed");
|
|
10
|
+
}
|
|
7
11
|
let balance = await this.balanceOf(token, dest);
|
|
8
12
|
balance += amount;
|
|
9
13
|
this.logger?.debug(`set balance of ${dest} to ${this.fmt(token, balance)}`);
|
|
10
|
-
const { deal } = await import("viem-deal");
|
|
11
14
|
await deal(this.anvil, {
|
|
12
15
|
erc20: token,
|
|
13
16
|
account: dest,
|