-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into update-theme-names
- Loading branch information
Showing
33 changed files
with
207 additions
and
417 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
export * from "./useInitializeAcreSdk" | ||
export * from "./useFetchMinDepositAmount" | ||
export * from "./useInitDataFromSdk" | ||
export * from "./useFetchActivities" | ||
export * from "./useMinWithdrawAmount" | ||
export { default as useBitcoinPosition } from "./useBitcoinPosition" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,5 @@ | ||
import { useEffect } from "react" | ||
import { useInterval } from "@chakra-ui/react" | ||
import { logPromiseFailure } from "#/utils" | ||
import { REFETCH_INTERVAL_IN_MILLISECONDS } from "#/constants" | ||
import { useFetchMinDepositAmount } from "./useFetchMinDepositAmount" | ||
import { useFetchActivities } from "./useFetchActivities" | ||
import { useWallet } from "../useWallet" | ||
|
||
export function useInitDataFromSdk() { | ||
const { address } = useWallet() | ||
const fetchActivities = useFetchActivities() | ||
|
||
useEffect(() => { | ||
if (address) { | ||
logPromiseFailure(fetchActivities()) | ||
} | ||
}, [address, fetchActivities]) | ||
|
||
useFetchMinDepositAmount() | ||
useInterval( | ||
() => logPromiseFailure(fetchActivities()), | ||
REFETCH_INTERVAL_IN_MILLISECONDS, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { selectWalletAddress } from "#/store/wallet" | ||
import { useAppSelector } from "./useAppSelector" | ||
|
||
export default function useWalletAddress() { | ||
return useAppSelector(selectWalletAddress) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { queryKeysFactory, REFETCH_INTERVAL_IN_MILLISECONDS } from "#/constants" | ||
import { useQuery } from "@tanstack/react-query" | ||
import { acreApi } from "#/utils" | ||
|
||
const { acreKeys } = queryKeysFactory | ||
|
||
export default function useAcrePointsData() { | ||
return useQuery({ | ||
queryKey: [...acreKeys.pointsData()], | ||
queryFn: async () => acreApi.getPointsData(), | ||
refetchInterval: REFETCH_INTERVAL_IN_MILLISECONDS, | ||
}) | ||
} |
Oops, something went wrong.