Skip to content

Commit

Permalink
update deadline signature data (#3215)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianlapham authored Feb 2, 2022
1 parent 1b78cee commit fc63707
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib/components/Swap/SwapButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,8 @@ export default function SwapButton({ disabled }: SwapButtonProps) {
return { disabled: true }
}, [approval, approvalHash, chainId, disabled, inputCurrencyAmount, inputCurrencyBalance])

// @TODO(ianlapham): connect deadline from state instead of passing undefined.
const { signatureData } = useERC20PermitFromTrade(optimizedTrade, allowedSlippage, undefined)
const deadline = useTransactionDeadline()
const { signatureData } = useERC20PermitFromTrade(optimizedTrade, allowedSlippage, deadline)

// the callback to execute the swap
const { callback: swapCallback } = useSwapCallback(
Expand Down

0 comments on commit fc63707

Please sign in to comment.