@gearbox-protocol/sdk 11.11.2 → 11.11.3

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.
@@ -48,7 +48,7 @@ async function claimFromFaucet(opts) {
48
48
  args = [amount];
49
49
  amnt = amount.map((v) => {
50
50
  try {
51
- return sdk.tokensMeta.formatBN(v.token, v.amount, { symbol: true });
51
+ return sdk?.tokensMeta.formatBN(v.token, v.amount, { symbol: true }) ?? `${v.amount} of ${v.token}`;
52
52
  } catch {
53
53
  return `${v.amount} of ${v.token}`;
54
54
  }
@@ -27,7 +27,7 @@ async function claimFromFaucet(opts) {
27
27
  args = [amount];
28
28
  amnt = amount.map((v) => {
29
29
  try {
30
- return sdk.tokensMeta.formatBN(v.token, v.amount, { symbol: true });
30
+ return sdk?.tokensMeta.formatBN(v.token, v.amount, { symbol: true }) ?? `${v.amount} of ${v.token}`;
31
31
  } catch {
32
32
  return `${v.amount} of ${v.token}`;
33
33
  }
@@ -5,7 +5,7 @@ interface TokenClaim {
5
5
  amount: bigint;
6
6
  }
7
7
  interface ClaimFromFaucetOptions {
8
- sdk: GearboxSDK;
8
+ sdk?: GearboxSDK;
9
9
  publicClient: PublicClient;
10
10
  wallet: WalletClient;
11
11
  faucet: Address;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "11.11.2",
3
+ "version": "11.11.3",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",