-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(universal-router-sdk): handles all ETH/WETH transitions #157
Conversation
This reverts commit 1de6365.
Graphite Automations"Request reviewers once CI passes on sdks monorepo" took an action on this PR • (10/15/24)1 reviewer was added and 1 assignee was added to this PR based on 's automation. |
@@ -65,8 +65,7 @@ export class UniswapTrade implements Command { | |||
|
|||
constructor(public trade: RouterTrade<Currency, Currency, TradeType>, public options: SwapOptions) { | |||
if (!!options.fee && !!options.flatFee) throw new Error('Only one fee option permitted') | |||
if (this.inputRequiresWrap) this.payerIsUser = false | |||
else if (this.options.useRouterBalance) this.payerIsUser = false | |||
if (this.inputRequiresWrap || this.inputRequiresUnwrap || this.options.useRouterBalance) this.payerIsUser = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could just be done using a this.payerIsUser = () ? false : true
might be clearer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linting on this is ugly IMO but could be done...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok fair
now enables: