Skip to content

Commit

Permalink
chore: revert commit
Browse files Browse the repository at this point in the history
  • Loading branch information
shoom3301 committed Dec 3, 2024
1 parent e6c34b3 commit f5e986c
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions src/composable/orderTypes/Twap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -578,18 +578,7 @@ export function transformDataToStruct(data: TwapData): TwapStruct {
* @returns {TwapStruct} A formatted struct as expected by the smart contract.
*/
export function transformStructToData(struct: TwapStruct): TwapData {
const {
n: numberOfParts,
partSellAmount,
minPartLimit,
t: timeBetweenParts,
t0: startEpoch,
span,
sellToken,
buyToken,
receiver,
appData,
} = struct
const { n: numberOfParts, partSellAmount, minPartLimit, t: timeBetweenParts, t0: startEpoch, span, ...rest } = struct

const durationOfPart: DurationOfPart = span.isZero()
? { durationType: DurationType.AUTO }
Expand All @@ -606,9 +595,6 @@ export function transformStructToData(struct: TwapStruct): TwapData {
numberOfParts,
timeBetweenParts,
durationOfPart,
sellToken,
buyToken,
receiver,
appData,
...rest,
}
}

0 comments on commit f5e986c

Please sign in to comment.