This commit is contained in:
Georges KABBOUCHI 2021-08-25 22:51:05 +03:00
parent a24c42cd0d
commit 204e7abb8e
2 changed files with 5 additions and 1 deletions

View File

@ -12,6 +12,7 @@ export interface IStrategyContext {
convertTokenAmountToBigNumber?: (value: any, decimals: any) => string; convertTokenAmountToBigNumber?: (value: any, decimals: any) => string;
getTokenByKey?: (key: string) => IStrategyToken; getTokenByKey?: (key: string) => IStrategyToken;
position?: any; position?: any;
variables?: object;
} }
export interface IStrategyToken { export interface IStrategyToken {
@ -77,6 +78,8 @@ export interface IStrategy {
inputs: IStrategyInput<StrategyInputType>[]; inputs: IStrategyInput<StrategyInputType>[];
variables?: object;
spells: (context: IStrategyContext) => Promise<Spell[]> | Spell[]; spells: (context: IStrategyContext) => Promise<Spell[]> | Spell[];
submitText?: string; submitText?: string;

View File

@ -27,7 +27,8 @@ export class Strategy {
getBaseContext(): Omit<IStrategyContext, "inputs"> { getBaseContext(): Omit<IStrategyContext, "inputs"> {
return { return {
...this.context, ...this.context,
...this.props ...this.props,
variables: this.schema.variables || {}
}; };
} }