File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ interface TokenClaim {
1818}
1919
2020interface ClaimFromFaucetOptions {
21- sdk : GearboxSDK ;
21+ sdk ? : GearboxSDK ;
2222 publicClient : PublicClient ;
2323 wallet : WalletClient ;
2424 faucet : Address ;
@@ -67,7 +67,10 @@ export async function claimFromFaucet(
6767 amnt = amount
6868 . map ( v => {
6969 try {
70- return sdk . tokensMeta . formatBN ( v . token , v . amount , { symbol : true } ) ;
70+ return (
71+ sdk ?. tokensMeta . formatBN ( v . token , v . amount , { symbol : true } ) ??
72+ `${ v . amount } of ${ v . token } `
73+ ) ;
7174 } catch {
7275 return `${ v . amount } of ${ v . token } ` ;
7376 }
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ import { peripheryCompressorAbi } from "../../abi/compressors/peripheryCompresso
99import type { IGearboxSDKPlugin } from "../../sdk/index.js" ;
1010import {
1111 AddressMap ,
12- AddressSet ,
1312 AP_BYTECODE_REPOSITORY ,
1413 AP_PERIPHERY_COMPRESSOR ,
1514 AP_TREASURY ,
You can’t perform that action at this time.
0 commit comments