Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-orbs committed Nov 7, 2024
1 parent 6782b9a commit f996f5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/trade/twap/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const useTwapState = () => {

const useConfig = () => {
const chainId = useAccount().chainId;

return useMemo(
() =>
Object.values(Configs).find((it: any) => it.chainId === chainId) ||
Expand All @@ -118,7 +119,7 @@ export const TwapContextProvider = ({

const [currentTime, setCurrentTime] = useState(Date.now());
const config = useConfig();

const twapSDK = useMemo(() => constructSDK({ config }), [config]);

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/trade/twap/useSubmitOrderCallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const useCreateOrder = () => {
const askParams = twapSDK
.prepareOrderArgs({
fillDelay: derivedValues.fillDelay,
deadline: 1733401003000,
deadline: derivedValues.deadline,
srcAmount: parsedInputAmount ?? "0",
destTokenMinAmount: derivedValues.destTokenMinAmount,
srcChunkAmount: derivedValues.srcChunkAmount,
Expand Down

0 comments on commit f996f5d

Please sign in to comment.