Skip to content

Commit 0fe4670

Browse files
authored
Various bridge page improvements (#274)
* Fix bridge confirmation modal icon bg in dark mode * Add link to Chainport terms of service * Change Receiving to estimate with tooltip * Change destination chain to target network
1 parent 3f5a3a6 commit 0fe4670

File tree

2 files changed

+48
-9
lines changed

2 files changed

+48
-9
lines changed

renderer/components/BridgeAssetsForm/BridgeConfirmationModal/StepIdle.tsx

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
Flex,
77
Code,
88
Text,
9+
Box,
910
} from "@chakra-ui/react";
1011
import { UseTRPCQueryResult } from "@trpc/react-query/dist/shared";
1112
import { ReactNode } from "react";
@@ -30,6 +31,10 @@ const messages = defineMessages({
3031
bridgeProviderLabel: {
3132
defaultMessage: "Bridge Provider",
3233
},
34+
bridgeProviderTerms: {
35+
defaultMessage:
36+
"By bridging your assets, you agree to Chainport's <link>terms of service</link>.",
37+
},
3338
sourceNetworkLabel: {
3439
defaultMessage: "Source Network",
3540
},
@@ -40,7 +45,11 @@ const messages = defineMessages({
4045
defaultMessage: "Sending",
4146
},
4247
receivingLabel: {
43-
defaultMessage: "Receiving",
48+
defaultMessage: "Receiving (Estimated)",
49+
},
50+
receivingTooltip: {
51+
defaultMessage:
52+
"Sending amount minus the bridge fee. This is an estimate, and you may receive a slightly different amount.",
4453
},
4554
targetAddressLabel: {
4655
defaultMessage: "Target Address",
@@ -49,7 +58,7 @@ const messages = defineMessages({
4958
defaultMessage: "Gas fee",
5059
},
5160
gasFeeTooltip: {
52-
defaultMessage: "The fee for transacting on the destination chain",
61+
defaultMessage: "The fee for transacting on the target network",
5362
},
5463
bridgeFeeLabel: {
5564
defaultMessage: "Bridge fee",
@@ -125,6 +134,27 @@ export function StepIdle({
125134
href="https://www.chainport.io/"
126135
/>
127136

137+
<Text
138+
color={COLORS.GRAY_MEDIUM}
139+
_dark={{
140+
color: COLORS.DARK_MODE.GRAY_LIGHT,
141+
}}
142+
>
143+
{formatMessage(messages.bridgeProviderTerms, {
144+
link: (msg: ReactNode) => (
145+
<Box
146+
as="a"
147+
rel="noreferrer"
148+
target="_blank"
149+
textDecoration="underline"
150+
href="https://www.chainport.io/terms-of-services"
151+
>
152+
{msg}
153+
</Box>
154+
),
155+
})}
156+
</Text>
157+
128158
<Divider />
129159

130160
<Grid templateColumns="auto 1fr auto">
@@ -152,9 +182,11 @@ export function StepIdle({
152182
mx={8}
153183
>
154184
<Flex
185+
_dark={{
186+
bg: "#431848",
187+
}}
155188
bg="#F3DEF5"
156189
color={COLORS.ORCHID}
157-
border="3px solid white"
158190
borderRadius={4}
159191
alignItems="center"
160192
justifyContent="center"
@@ -175,6 +207,7 @@ export function StepIdle({
175207
<LineItem
176208
label={formatMessage(messages.receivingLabel)}
177209
content={amountReceiving}
210+
tooltip={formatMessage(messages.receivingTooltip)}
178211
icon={chainportIcon}
179212
/>
180213
</GridItem>

renderer/intl/locales/en-US.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@
9393
"3euoRJ": {
9494
"message": "Recovery Phrase"
9595
},
96+
"3v74IM": {
97+
"message": "By bridging your assets, you agree to Chainport's <link>terms of service</link>."
98+
},
9699
"47FYwb": {
97100
"message": "Cancel"
98101
},
@@ -150,6 +153,9 @@
150153
"6q3tCn": {
151154
"message": "Connecting"
152155
},
156+
"6ugwQB": {
157+
"message": "Receiving (Estimated)"
158+
},
153159
"7/GPHF": {
154160
"message": "Iron Fish transaction fee"
155161
},
@@ -340,6 +346,9 @@
340346
"description": "Change as in the money that is returned to the sender after a transaction",
341347
"message": "Change"
342348
},
349+
"KIbwgQ": {
350+
"message": "Sending amount minus the bridge fee. This is an estimate, and you may receive a slightly different amount."
351+
},
343352
"KJMlfb": {
344353
"message": "Destination network"
345354
},
@@ -433,9 +442,6 @@
433442
"OC6jXV": {
434443
"message": "Transaction Expiration Delta"
435444
},
436-
"OEEl0G": {
437-
"message": "Receiving"
438-
},
439445
"OfA95/": {
440446
"message": "Selected file: {fileName}"
441447
},
@@ -655,9 +661,6 @@
655661
"c/KktL": {
656662
"message": "Resources"
657663
},
658-
"cwqQqt": {
659-
"message": "The fee for transacting on the destination chain"
660-
},
661664
"dJMieh": {
662665
"message": "Connect account"
663666
},
@@ -868,6 +871,9 @@
868871
"rqrhXg": {
869872
"message": "Confirm Your Recovery Phrase"
870873
},
874+
"ru6717": {
875+
"message": "The fee for transacting on the target network"
876+
},
871877
"sXlL42": {
872878
"message": "Encrypted Wallets Unsupported"
873879
},

0 commit comments

Comments
 (0)