Skip to content

Commit

Permalink
solve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
aburkut committed Oct 27, 2023
1 parent 8febe66 commit f5c79f3
Show file tree
Hide file tree
Showing 4 changed files with 14 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": "@paraswap/dex-lib",
"version": "2.17.0",
"version": "2.42.0",
"main": "build/index.js",
"types": "build/index.d.ts",
"repository": "https://github.com/paraswap/paraswap-dex-lib",
Expand Down
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ const baseConfigs: { [network: number]: BaseConfig } = {
rfqConfigs: {},
rpcPollingMaxAllowedStateDelayInBlocks: 5,
rpcPollingBlocksBackToTriggerUpdate: 3,
forceRpcFallbackDexs: [],
},
[Network.BSC]: {
network: Network.BSC,
Expand Down
12 changes: 12 additions & 0 deletions src/router/buy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ export class Buy extends PayloadEncoder implements IRouter<BuyParam> {
minMaxAmount,
priceRoute.srcAmount,
);

const [partner, feePercent] = referrerAddress
? [referrerAddress, encodeFeePercentForReferrer(SwapSide.BUY)]
: [
encodePartnerAddressForFeeLogic({
partnerAddress,
partnerFeePercent,
takeSurplus,
}),
encodeFeePercent(partnerFeePercent, takeSurplus, SwapSide.BUY),
];

const buyData: ContractBuyData = {
adapter,
fromToken: priceRoute.srcToken,
Expand Down
2 changes: 0 additions & 2 deletions tests/utils-e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,6 @@ export async function testE2E(
poolIdentifiers,
transferFees,
);
// uncomment to avoid tenderly simulation
// process.exit()
expect(parseFloat(priceRoute.destAmount)).toBeGreaterThan(0);

// Calculate slippage. Default is 1%
Expand Down

0 comments on commit f5c79f3

Please sign in to comment.