Skip to content

Commit

Permalink
Update content for connection alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
kkosiorowska committed Nov 28, 2024
1 parent df2b777 commit 416d54a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 22 deletions.
45 changes: 25 additions & 20 deletions dapp/src/components/ConnectWalletModal/ConnectWalletAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,24 @@ export enum ConnectionAlert {
Default = "DEFAULT",
}

function ContactSupport() {
return (
<Box as="span">
If the problem persists, contact{" "}
<Link
// TODO: Define in the new color palette
color="#0E61FE"
textDecoration="underline"
href={EXTERNAL_HREF.DISCORD}
isExternal
>
Acre support
</Link>
.
</Box>
)
}

const CONNECTION_ALERTS = {
[ConnectionAlert.Rejected]: {
title: "Wallet connection rejected.",
Expand All @@ -26,33 +44,20 @@ const CONNECTION_ALERTS = {
[ConnectionAlert.NotSupported]: {
title: "Not supported.",
description:
"Only Native SegWit, Nested SegWit or Legacy addresses supported at this time. Please try a different address or another wallet.",
"Only Native SegWit, Nested SegWit, or Legacy addresses are supported. Please use a compatible address or switch to a different wallet.",
},
[ConnectionAlert.NetworkMismatch]: {
title: "Error!",
title: "Incorrect network detected in your wallet.",
description:
"Incorrect network detected in your wallet. Please choose proper network and try again.",
"Please connect your wallet to the correct Bitcoin network and try again.",
},
[ConnectionAlert.Default]: {
title: "Wallet connection error. Please try again.",
description: (
<Box as="span">
If the problem persists, contact{" "}
<Link
// TODO: Define in the new color palette
color="#0E61FE"
textDecoration="underline"
href={EXTERNAL_HREF.DISCORD}
isExternal
>
Acre support
</Link>
</Box>
),
title: "Wallet connection failed. Please try again.",
description: <ContactSupport />,
},
[ConnectionAlert.InvalidSIWWSignature]: {
title: "Invalid Sign In With Wallet signature",
description: "We encountered an error. Please try again.",
title: "Invalid sign-in signature. Please try again.",
description: <ContactSupport />,
},
}

Expand Down
3 changes: 1 addition & 2 deletions dapp/src/theme/Alert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ const baseStyle = multiStyleConfig.definePartsStyle({
borderWidth: 1,
borderStyle: "solid",
borderColor: $borderColor.reference,
px: 5,
py: 5,
p: 4,
rounded: "xl",
},
description: {
Expand Down

0 comments on commit 416d54a

Please sign in to comment.