File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,8 @@ export class AaveClient {
6060 * @param options - The options to configure the client.
6161 * @returns The new instance of the client.
6262 */
63- static create ( options : ClientConfig ) : AaveClient {
64- return new AaveClient ( configureContext ( options ) ) ;
63+ static create ( options ? : ClientConfig ) : AaveClient {
64+ return new AaveClient ( configureContext ( options ?? { } ) ) ;
6565 }
6666
6767 /**
Original file line number Diff line number Diff line change @@ -6,9 +6,10 @@ import type { TypedDocumentNode } from '@urql/core';
66 */
77export type ClientConfig = {
88 /**
9- * The environment configuration to use (e.g. `mainnet`, `testnet`).
9+ * @internal
10+ * @defaultValue `production`
1011 */
11- environment : EnvironmentConfig ;
12+ environment ? : EnvironmentConfig ;
1213 /**
1314 * Whether to enable caching.
1415 *
@@ -23,6 +24,8 @@ export type ClientConfig = {
2324 debug ?: boolean ;
2425 /**
2526 * The custom fragments to use.
27+ *
28+ * @experimental This is an experimental API and may be subject to breaking changes.
2629 */
2730 fragments ?: TypedDocumentNode [ ] ;
2831} ;
Original file line number Diff line number Diff line change 1- import type { EnvironmentConfig } from '@aave/env' ;
1+ import { type EnvironmentConfig , production } from '@aave/env' ;
22
33import type { ClientConfig } from './config' ;
44import { FragmentResolver } from './fragments' ;
@@ -18,7 +18,7 @@ export type Context = {
1818 */
1919export function configureContext ( from : ClientConfig ) : Context {
2020 return {
21- environment : from . environment ,
21+ environment : from . environment ?? production ,
2222 cache : from . cache ?? false ,
2323 debug : from . debug ?? false ,
2424 fragments : FragmentResolver . from ( from . fragments ?? [ ] ) ,
You can’t perform that action at this time.
0 commit comments