diff --git a/core/strategies/helpers/index.ts b/core/strategies/helpers/index.ts index c331516..054fb43 100644 --- a/core/strategies/helpers/index.ts +++ b/core/strategies/helpers/index.ts @@ -12,6 +12,7 @@ export interface IStrategyContext { convertTokenAmountToBigNumber?: (value: any, decimals: any) => string; getTokenByKey?: (key: string) => IStrategyToken; position?: any; + variables?: object; } export interface IStrategyToken { @@ -77,6 +78,8 @@ export interface IStrategy { inputs: IStrategyInput[]; + variables?: object; + spells: (context: IStrategyContext) => Promise | Spell[]; submitText?: string; diff --git a/core/strategies/helpers/strategy.ts b/core/strategies/helpers/strategy.ts index 4e29953..7673fb3 100644 --- a/core/strategies/helpers/strategy.ts +++ b/core/strategies/helpers/strategy.ts @@ -27,7 +27,8 @@ export class Strategy { getBaseContext(): Omit { return { ...this.context, - ...this.props + ...this.props, + variables: this.schema.variables || {} }; }