Skip to content

Commit

Permalink
Merge branch 'main' into posthog
Browse files Browse the repository at this point in the history
  • Loading branch information
kpyszkowski committed Nov 28, 2024
2 parents b3b99a0 + 524e309 commit 356e990
Show file tree
Hide file tree
Showing 63 changed files with 658 additions and 284 deletions.
1 change: 1 addition & 0 deletions dapp/.env
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ VITE_FEATURE_FLAG_ACRE_POINTS_ENABLED="true"
VITE_FEATURE_FLAG_TVL_ENABLED="true"
VITE_FEATURE_GATING_DAPP_ENABLED="true"
VITE_FEATURE_POSTHOG_ENABLED="true"
VITE_FEATURE_MOBILE_MODE_ENABLED="true"

40 changes: 30 additions & 10 deletions dapp/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/acre.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ACRE</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>

<head>
<title>Acre App</title>
<meta name="title" content="Acre App" />
<meta name="description" content="Bitcoin Rewards Done Right" />

<link rel="icon" type="image/svg+xml" href="/acre.svg" />
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:url" content="https://bitcoin.acre.fi/" />
<meta property="og:title" content="Acre App" />
<meta property="og:description" content="Bitcoin Rewards Done Right" />
<meta property="og:image" content="/meta-image.png" />

<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://bitcoin.acre.fi/" />
<meta property="twitter:title" content="Acre App" />
<meta property="twitter:description" content="Bitcoin Rewards Done Right" />
<meta property="twitter:image" content="/meta-image.png" />
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>

</html>
12 changes: 6 additions & 6 deletions dapp/manifests/ledger-live/ledger-live-manifest-development.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@
"id": "acre-dev",
"name": "Acre [dev]",
"url": "http://localhost:5173/?embed=ledger-live",
"homepageUrl": "https:/acre.fi/",
"homepageUrl": "https://acre.fi/",
"icon": "http://localhost:5173/acre.svg",
"platforms": "desktop",
"platforms": "all",
"apiVersion": "^2.0.0",
"manifestVersion": "2",
"branch": "stable",
"categories": ["staking"],
"currencies": ["bitcoin", "bitcoin_testnet"],
"content": {
"shortDescription": {
"en": "Bitcoin Liquid Staking"
"en": "Bitcoin Rewards Done Right"
},
"description": {
"en": "Bitcoin Liquid Staking"
"en": "Bitcoin Rewards Done Right"
}
},
"permissions": [
"account.request",
"account.list",
"bitcoin.getAddress",
"bitcoin.getPublicKey",
"bitcoin.getXPub",
"transaction.signAndBroadcast",
"custom.acre.messageSign",
"custom.acre.transactionSignAndBroadcast"
],
"domains": ["http://*"],
"type": "walletApp"
"domains": ["https://"]
}
12 changes: 6 additions & 6 deletions dapp/manifests/ledger-live/ledger-live-manifest-mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@
"id": "acre",
"name": "Acre",
"url": "https://bitcoin.acre.fi/?embed=ledger-live",
"homepageUrl": "https:/acre.fi/",
"homepageUrl": "https://acre.fi/",
"icon": "https://bitcoin.acre.fi/acre.svg",
"platforms": "desktop",
"platforms": "all",
"apiVersion": "^2.0.0",
"manifestVersion": "2",
"branch": "stable",
"categories": ["staking"],
"currencies": ["bitcoin", "bitcoin_testnet"],
"content": {
"shortDescription": {
"en": "Bitcoin Liquid Staking"
"en": "Bitcoin Rewards Done Right"
},
"description": {
"en": "Bitcoin Liquid Staking"
"en": "Bitcoin Rewards Done Right"
}
},
"permissions": [
"account.request",
"account.list",
"bitcoin.getAddress",
"bitcoin.getPublicKey",
"bitcoin.getXPub",
"transaction.signAndBroadcast",
"custom.acre.messageSign",
"custom.acre.transactionSignAndBroadcast"
],
"domains": ["http://*"],
"type": "walletApp"
"domains": ["https://"]
}
12 changes: 6 additions & 6 deletions dapp/manifests/ledger-live/ledger-live-manifest-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@
"id": "acre-testnet",
"name": "Acre [testnet]",
"url": "https://bitcoin.test.acre.fi/?embed=ledger-live",
"homepageUrl": "https:/acre.fi/",
"homepageUrl": "https://acre.fi/",
"icon": "https://bitcoin.test.acre.fi/acre.svg",
"platforms": "desktop",
"platforms": "all",
"apiVersion": "^2.0.0",
"manifestVersion": "2",
"branch": "stable",
"categories": ["staking"],
"currencies": ["bitcoin", "bitcoin_testnet"],
"content": {
"shortDescription": {
"en": "Bitcoin Liquid Staking"
"en": "Bitcoin Rewards Done Right"
},
"description": {
"en": "Bitcoin Liquid Staking"
"en": "Bitcoin Rewards Done Right"
}
},
"permissions": [
"account.request",
"account.list",
"bitcoin.getAddress",
"bitcoin.getPublicKey",
"bitcoin.getXPub",
"transaction.signAndBroadcast",
"custom.acre.messageSign",
"custom.acre.transactionSignAndBroadcast"
],
"domains": ["http://*"],
"type": "walletApp"
"domains": ["https://"]
}
12 changes: 6 additions & 6 deletions dapp/manifests/ledger-live/ledger-manifest-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@
"id": "{{id}}",
"name": "{{name}}",
"url": "{{{url}}}?embed=ledger-live",
"homepageUrl": "https:/acre.fi/",
"homepageUrl": "https://acre.fi/",
"icon": "{{{url}}}acre.svg",
"platforms": "desktop",
"platforms": "all",
"apiVersion": "^2.0.0",
"manifestVersion": "2",
"branch": "stable",
"categories": ["staking"],
"currencies": ["bitcoin", "bitcoin_testnet"],
"content": {
"shortDescription": {
"en": "Bitcoin Liquid Staking"
"en": "Bitcoin Rewards Done Right"
},
"description": {
"en": "Bitcoin Liquid Staking"
"en": "Bitcoin Rewards Done Right"
}
},
"permissions": [
"account.request",
"account.list",
"bitcoin.getAddress",
"bitcoin.getPublicKey",
"bitcoin.getXPub",
"transaction.signAndBroadcast",
"custom.acre.messageSign",
"custom.acre.transactionSignAndBroadcast"
],
"domains": ["http://*"],
"type": "walletApp"
"domains": ["https://"]
}
2 changes: 1 addition & 1 deletion dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@emotion/styled": "^11.11.0",
"@ledgerhq/wallet-api-acre-module": "0.1.0",
"@ledgerhq/wallet-api-client": "1.6.0",
"@orangekit/react": "1.0.0-beta.33",
"@orangekit/react": "1.0.0-beta.34",
"@orangekit/sign-in-with-wallet": "1.0.0-beta.6",
"@reduxjs/toolkit": "^2.2.0",
"@rehooks/local-storage": "^2.4.5",
Expand Down
Binary file added dapp/public/meta-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions dapp/src/components/AcrePointsClaimModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function AcrePointsClaimModalBase({
<Box
data-step-value
transformOrigin="bottom"
fontSize="8xl"
fontSize={{ base: "5xl", md: "8xl" }}
lineHeight="6.25rem" // 100px
fontWeight="bold"
color="grey.700"
Expand Down Expand Up @@ -208,7 +208,6 @@ function AcrePointsClaimModalBase({
const AcrePointsClaimModal = withBaseModal(AcrePointsClaimModalBase, {
returnFocusOnClose: false,
variant: "unstyled",
size: "full",
})

export default AcrePointsClaimModal
6 changes: 4 additions & 2 deletions dapp/src/components/ArrivingSoonTooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import React, { ReactNode } from "react"
import { Tooltip } from "@chakra-ui/react"
import Tooltip from "./shared/Tooltip"

export default function ArrivingSoonTooltip({
label,
shouldDisplayTooltip,
children,
}: {
label?: string
shouldDisplayTooltip: boolean
children: ReactNode
}) {
return shouldDisplayTooltip ? (
<Tooltip label="Arriving Soon">{children}</Tooltip>
<Tooltip label={label ?? "Arriving Soon"}>{children}</Tooltip>
) : (
children
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ export default function ConnectWalletButton({
},
onError: (error: OrangeKitError) => {
const errorData = orangeKit.parseOrangeKitConnectionError(error)

if (errorData === CONNECTION_ERRORS.DEFAULT) {
console.error("Failed to connect", error)
}

setConnectionError(errorData)
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function ConnectWalletErrorAlert(
<Alert status="error" mb={6} {...restProps}>
<AlertIcon />
<VStack w="full" align="start" spacing={0}>
<AlertTitle>{title}</AlertTitle>
<AlertTitle textAlign="start">{title}</AlertTitle>
<AlertDescription>{description}</AlertDescription>
</VStack>
</Alert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ export default function ConnectWalletStatusLabel({

return (
<HStack spacing={3}>
<HStack>
<HStack textAlign="start">
{icon}
<TextMd {...statusToLabelProps[status]}>{label}</TextMd>
</HStack>
{isError && (
<HStack color="red.400">
<HStack color="red.400" textAlign="start">
<Icon as={IconInfoCircle} boxSize={boxSize} />
<TextMd>Rejected by user</TextMd>
</HStack>
Expand Down
4 changes: 4 additions & 0 deletions dapp/src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
} from "@chakra-ui/react"
import { EXTERNAL_HREF } from "#/constants"
import { AcreSignIcon, ArrowUpRight } from "#/assets/icons"
import { useMobileMode } from "#/hooks"

type FooterListItem = Pick<LinkProps, "href" | "children">

Expand Down Expand Up @@ -74,6 +75,9 @@ const getItemsList = (

export default function Footer() {
const styles = useMultiStyleConfig("Footer")
const isMobileMode = useMobileMode()

if (isMobileMode) return null

return (
<Box as="footer" __css={styles.container}>
Expand Down
Loading

0 comments on commit 356e990

Please sign in to comment.