Skip to content

Commit

Permalink
feat: persist amount in and out
Browse files Browse the repository at this point in the history
Signed-off-by: Griko Nibras <griko@nibras.co>
  • Loading branch information
grikomsn committed Jan 12, 2024
1 parent bfc6702 commit 820a309
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/SwapWidget/useSwapWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,10 @@ const useFormValuesStore = create(
persist(() => defaultValues, {
name: "SwapWidgetState",
version: 1,
storage: createJSONStorage(() => sessionStorage),
storage: createJSONStorage(() => window.sessionStorage),
partialize: (state): Partial<FormValues> => ({
amountIn: state.amountIn,
amountOut: state.amountOut,
sourceChain: state.sourceChain,
sourceAsset: state.sourceAsset,
destinationChain: state.destinationChain,
Expand Down

0 comments on commit 820a309

Please sign in to comment.