Skip to content

Commit

Permalink
Merge branch 'main' into tbtc-api-retries
Browse files Browse the repository at this point in the history
  • Loading branch information
r-czajkowski authored Dec 9, 2024
2 parents 915124a + 83b81ed commit 923caca
Show file tree
Hide file tree
Showing 31 changed files with 32 additions and 255 deletions.
6 changes: 3 additions & 3 deletions dapp/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Acre dApp

The application is integrate with OrangeKit and allows people to earn yield on their Bitcoin via yield farming on Ethereum.
The application is integrated with OrangeKit and allows people to earn yield on their Bitcoin via yield farming on Ethereum.

This project was bootstrapped with [Create Vite](https://github.com/vitejs/vite/tree/main/packages/create-vite).

To access the dApp in Ledger Live import manifest as described in the
To access the dApp in Ledger Live import the manifest as described in the
[Ledger Live Setup](#ledger-live-setup) section.

### Development
Expand All @@ -29,7 +29,7 @@ Install dependencies and start the dApp:

### Environmental variables

To make sure dApp is running correctly, include the following variables in `.env` file:
To make sure dApp is running correctly, include the following variables in the `.env` file:

```bash
VITE_TBTC_API_ENDPOINT=
Expand Down
2 changes: 1 addition & 1 deletion dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@ledgerhq/wallet-api-acre-module": "0.1.0",
"@ledgerhq/wallet-api-client": "1.6.0",
"@orangekit/react": "1.0.0-beta.34",
"@orangekit/sign-in-with-wallet": "1.0.0-beta.6",
"@orangekit/sign-in-with-wallet": "1.0.0-beta.7",
"@reduxjs/toolkit": "^2.2.0",
"@rehooks/local-storage": "^2.4.5",
"@safe-global/safe-core-sdk-types": "^5.0.1",
Expand Down
17 changes: 7 additions & 10 deletions dapp/src/DApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { AcreSdkProvider } from "./acre-react/contexts"
import GlobalStyles from "./components/GlobalStyles"
import {
DocsDrawerContextProvider,
SidebarContextProvider,
WalletConnectionAlertContextProvider,
} from "./contexts"
import { useInitApp } from "./hooks"
Expand Down Expand Up @@ -67,15 +66,13 @@ function DAppProviders() {
<QueryClientProvider client={queryClient}>
<AcreSdkProvider>
<DocsDrawerContextProvider>
<SidebarContextProvider>
<WalletConnectionAlertContextProvider>
<ReduxProvider store={store}>
<PostHogProvider>
<DApp />
</PostHogProvider>
</ReduxProvider>
</WalletConnectionAlertContextProvider>
</SidebarContextProvider>
<WalletConnectionAlertContextProvider>
<ReduxProvider store={store}>
<PostHogProvider>
<DApp />
</PostHogProvider>
</ReduxProvider>
</WalletConnectionAlertContextProvider>
</DocsDrawerContextProvider>
</AcreSdkProvider>
</QueryClientProvider>
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions dapp/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { usePostHogPageViewCapture } from "#/hooks/posthog"
import DocsDrawer from "./DocsDrawer"
import Header from "./Header"
import ModalRoot from "./ModalRoot"
import Sidebar from "./Sidebar"
import MobileModeBanner from "./MobileModeBanner"
import Footer from "./Footer"

Expand Down Expand Up @@ -51,7 +50,6 @@ function Layout() {
>
<Outlet />

<Sidebar />
<DocsDrawer />
<ModalRoot />
</Flex>
Expand Down
11 changes: 2 additions & 9 deletions dapp/src/components/ModalRoot/withBaseModal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ComponentType, useCallback } from "react"
import { Modal, ModalContent, ModalOverlay, ModalProps } from "@chakra-ui/react"
import { BaseModalProps } from "#/types"
import { useAppNavigate, useSidebar } from "#/hooks"
import { useAppNavigate } from "#/hooks"

const MODAL_BASE_SIZE = "lg"

Expand All @@ -12,7 +12,6 @@ function withBaseModal<T extends BaseModalProps>(
return function ModalBase(props: T) {
const { closeModal, closeOnEsc, navigateToOnClose } = props

const { isOpen: isSidebarOpen } = useSidebar()
const navigate = useAppNavigate()

const handleCloseModal = useCallback(() => {
Expand All @@ -33,13 +32,7 @@ function withBaseModal<T extends BaseModalProps>(
{...modalProps}
>
<ModalOverlay zIndex="modalOverlay" />
<ModalContent
zIndex="modalContent"
mr={{
base: isSidebarOpen ? "var(--chakra-sizes-sidebar_width)" : 0,
xl: 0,
}}
>
<ModalContent>
<WrappedModalContent {...props} closeModal={handleCloseModal} />
</ModalContent>
</Modal>
Expand Down
70 changes: 0 additions & 70 deletions dapp/src/components/Sidebar.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react"
import { List } from "@chakra-ui/react"
import TransactionDetailsAmountItem from "#/components/shared/TransactionDetails/AmountItem"
import FeesDetailsAmountItem from "#/components/shared/FeesDetails/FeesItem"
import TransactionDetailsAmountItem from "#/components/shared/TransactionDetails/TransactionDetailsAmountItem"
import FeesDetailsAmountItem from "#/components/shared/FeesDetails/FeesDetailsAmountItem"
import { TOKEN_AMOUNT_FIELD_NAME } from "#/components/shared/TokenAmountForm/TokenAmountFormBase"
import { FeesTooltip } from "#/components/TransactionModal/FeesTooltip"
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from "react"
import { List } from "@chakra-ui/react"
import TransactionDetailsAmountItem from "#/components/shared/TransactionDetails/AmountItem"
import { TOKEN_AMOUNT_FIELD_NAME } from "#/components/shared/TokenAmountForm/TokenAmountFormBase"
import {
useFormField,
Expand All @@ -9,7 +8,8 @@ import {
} from "#/hooks"
import { ACTION_FLOW_TYPES, CurrencyType } from "#/types"
import { DESIRED_DECIMALS_FOR_FEE } from "#/constants"
import FeesDetailsAmountItem from "#/components/shared/FeesDetails/FeesItem"
import FeesDetailsAmountItem from "#/components/shared/FeesDetails/FeesDetailsAmountItem"
import TransactionDetailsAmountItem from "#/components/shared/TransactionDetails/TransactionDetailsAmountItem"
import { FeesTooltip } from "../../FeesTooltip"

function UnstakeDetails({ currency }: { currency: CurrencyType }) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
numberToLocaleString,
} from "#/utils"
import { CurrencyType, AmountType } from "#/types"
import Tooltip from "../Tooltip"
import Tooltip from "./Tooltip"

export type CurrencyBalanceProps = {
currency: CurrencyType
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react"
import { useCurrencyConversion } from "#/hooks"
import { CurrencyBalance, CurrencyBalanceProps } from "../CurrencyBalance"
import { CurrencyBalance, CurrencyBalanceProps } from "./CurrencyBalance"

export function CurrencyBalanceWithConversion({
from,
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import { useCurrencyConversion } from "#/hooks"
import NumberFormatInput, {
NumberFormatInputValues,
NumberFormatInputProps,
} from "../NumberFormatInput"
import { CurrencyBalance } from "../CurrencyBalance"
import HelperErrorText, { HelperErrorTextProps } from "../Form/HelperErrorText"
} from "./NumberFormatInput"
import { CurrencyBalance } from "./CurrencyBalance"
import HelperErrorText, { HelperErrorTextProps } from "./Form/HelperErrorText"

type FiatCurrencyBalanceProps = {
amount: bigint
Expand Down
49 changes: 0 additions & 49 deletions dapp/src/contexts/SidebarContext.tsx

This file was deleted.

1 change: 0 additions & 1 deletion dapp/src/contexts/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from "./DocsDrawerContext"
export * from "./SidebarContext"
export * from "./StakeFlowContext"
export * from "./PaginationContext"
export * from "./WalletConnectionAlertContext"
2 changes: 0 additions & 2 deletions dapp/src/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export * from "./store"
export * from "./sdk"
export * from "./orangeKit"
export * from "./useDetectThemeMode"
export * from "./useSidebar"
export * from "./useDocsDrawer"
export * from "./useTransactionDetails"
export * from "./useStakeFlowContext"
Expand Down Expand Up @@ -34,7 +33,6 @@ export { default as useTriggerConnectWalletModal } from "./useTriggerConnectWall
export { default as useLastUsedBtcAddress } from "./useLastUsedBtcAddress"
export { default as useAcrePoints } from "./useAcrePoints"
export { default as useSignMessageAndCreateSession } from "./useSignMessageAndCreateSession"
export { default as useScrollbarVisibility } from "./useScrollbarVisibility"
export { default as useAccessCode } from "./useAccessCode"
export { default as useFormField } from "./useFormField"
export { default as useDepositBTCTransaction } from "./useDepositBTCTransaction"
Expand Down
32 changes: 0 additions & 32 deletions dapp/src/hooks/useScrollbarVisibility.ts

This file was deleted.

12 changes: 0 additions & 12 deletions dapp/src/hooks/useSidebar.ts

This file was deleted.

38 changes: 0 additions & 38 deletions dapp/src/theme/Sidebar.ts

This file was deleted.

Loading

0 comments on commit 923caca

Please sign in to comment.