Skip to content

Commit

Permalink
dev: expose options for tinny env
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Long committed Sep 17, 2024
1 parent 622d323 commit ba67f78
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/tinny/src/lib/tinny-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,11 @@ export class TinnyEnvironment {
| LitContractResolverContext
| undefined;

constructor(network?: LIT_TESTNET) {
private _config: { useRLI: boolean };
constructor(network?: LIT_TESTNET, config?: { useRLI: boolean }) {
// -- setup networkj
this.network = network || this.processEnvs.NETWORK;

this._config = config ?? { useRLI: true };
if (Object.values(LIT_TESTNET).indexOf(this.network) === -1) {
throw new Error(
`Invalid network environment. Please use one of ${Object.values(
Expand Down Expand Up @@ -391,7 +392,10 @@ export class TinnyEnvironment {
}

await this.setupLitNodeClient();
await this.setupSuperCapacityDelegationAuthSig();
if (this._config.useRLI) {
await this.setupSuperCapacityDelegationAuthSig();
}

await this.setupBareEthAuthSig();
} catch (e) {
const err = toErrorWithMessage(e);
Expand Down

0 comments on commit ba67f78

Please sign in to comment.