Skip to content

Commit

Permalink
2198, callContract rango (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
axtezy authored Feb 14, 2024
2 parents 3c76c5d + 981dc2e commit c815a84
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rubic-sdk",
"version": "5.0.0",
"version": "5.0.1",
"description": "Simplify dApp creation",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export interface RangoSwapQueryParams {
* Indicates include/exclude mode for the swappers param
*/
swappersGroupsExclude?: boolean;
/* true means sending tx only via rango-contracts */
contractCall?: boolean;
}

export interface RangoBestRouteQueryParams {
Expand All @@ -24,6 +26,8 @@ export interface RangoBestRouteQueryParams {
slippage?: number;
swapperGroups?: string;
swappersGroupsExclude?: boolean;
/* true means sending tx only via rango-contracts */
contractCall?: boolean;
}

/**
Expand Down
6 changes: 4 additions & 2 deletions src/features/common/providers/rango/services/rango-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export class RangoCommonParser {
amount: amountParam,
...(options.slippageTolerance && { slippage: options.slippageTolerance * 100 }),
...(swapperGroups?.length && { swapperGroups }),
swappersGroupsExclude: options?.swappersGroupsExclude ?? true
swappersGroupsExclude: options?.swappersGroupsExclude ?? true,
contractCall: true
};
}

Expand Down Expand Up @@ -78,7 +79,8 @@ export class RangoCommonParser {
slippage,
toAddress,
...(swapperGroups?.length && { swapperGroups }),
swappersGroupsExclude: options?.swappersGroupsExclude ?? true
swappersGroupsExclude: options?.swappersGroupsExclude ?? true,
contractCall: true
};
}

Expand Down

0 comments on commit c815a84

Please sign in to comment.