Skip to content

Commit 8d76606

Browse files
committed
Fix bug reading from options.slippagePercentage
1 parent 3940d82 commit 8d76606

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/api/utils/tradeQuoter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export class TradeQuoter {
156156
calldata,
157157
gas: gas.toString(),
158158
gasPrice: options.gasPrice.toString(),
159-
slippagePercentage: this.formatAsPercentage(options.slippagePercentage),
159+
slippagePercentage: this.formatAsPercentage(slippagePercentage),
160160
fromTokenAmount: fromUnits.toString(),
161161
toTokenAmount: toUnits.toString(),
162162
display: {

test/api/TradeQuoter.spec.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ describe('TradeQuoteAPI', () => {
108108
let subjectRawAmount: string;
109109
let subjectSetTokenAddress: Address;
110110
let subjectChainId: number;
111-
let subjectSlippagePercentage: number;
112111
let subjectSetToken: SetTokenAPI;
113112

114113
beforeEach(async () => {
@@ -119,7 +118,6 @@ describe('TradeQuoteAPI', () => {
119118
subjectSetTokenAddress = DPI_ETH; // DPI
120119
subjectRawAmount = '.5';
121120
subjectChainId = 1;
122-
subjectSlippagePercentage = 2,
123121
subjectSetToken = setTokenAPI;
124122
});
125123

@@ -132,7 +130,6 @@ describe('TradeQuoteAPI', () => {
132130
rawAmount: subjectRawAmount,
133131
fromAddress: subjectSetTokenAddress,
134132
chainId: subjectChainId,
135-
slippagePercentage: subjectSlippagePercentage,
136133
setToken: subjectSetToken,
137134
tradeModule: tradeModuleWrapper,
138135
provider: provider,

0 commit comments

Comments
 (0)