Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning before proceeding to crypto payment #1917

Merged
merged 7 commits into from
Feb 5, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useMemo } from "react"
import { makeStyles, createStyles } from "@chainsafe/common-theme"
import { CSFTheme } from "../../../../../Themes/types"
import { Product, ProductPrice } from "@chainsafe/files-api-client"
import { Button, CreditCardIcon, Divider, formatBytes, Typography } from "@chainsafe/common-components"
import { Button, InfoCircleIcon, CreditCardIcon, Divider, formatBytes, Typography } from "@chainsafe/common-components"
import { t, Trans } from "@lingui/macro"
import dayjs from "dayjs"
import { PaymentMethod, useBilling } from "../../../../../Contexts/BillingContext"
Expand Down Expand Up @@ -86,6 +86,17 @@ const useStyles = makeStyles(({ constants, palette }: CSFTheme) =>
error: {
marginTop: constants.generalUnit,
color: palette.error.main
},
warningText: {
marginTop: constants.generalUnit * 2,
maxWidth: constants.generalUnit * 56
},
icon : {
verticalAlign: "middle",
fill: palette.error.main,
"& > svg": {
height: constants.generalUnit * 2.25
}
}
})
)
Expand Down Expand Up @@ -291,6 +302,19 @@ const ConfirmPlan = ({
</Typography>
</div>
</div>
{paymentMethod === "crypto" && <div className={classes.rowBox}>
<Typography
variant="body1"
component="p"
className={classes.warningText}
>
<InfoCircleIcon className={classes.icon} />
<Trans>
Once you proceed, your account is expected to make a payment within 60 minutes. If no payment is received, your plan will not change.
Tbaut marked this conversation as resolved.
Show resolved Hide resolved
</Trans>
</Typography>
</div>
}
{isSubscriptionError &&
<Typography
component="p"
Expand Down
3 changes: 3 additions & 0 deletions packages/files-ui/src/locales/de/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,9 @@ msgstr ""
msgid "Older notifications"
msgstr ""

msgid "Once you proceed, your account is expected to make a payment within 60 minutes. If no payment is received, your plan will not change."
msgstr ""

msgid "One sec, getting files ready…"
msgstr ""

Expand Down
3 changes: 3 additions & 0 deletions packages/files-ui/src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,9 @@ msgstr "OK"
msgid "Older notifications"
msgstr "Older notifications"

msgid "Once you proceed, your account is expected to make a payment within 60 minutes. If no payment is received, your plan will not change."
msgstr "Once you proceed, your account is expected to make a payment within 60 minutes. If no payment is received, your plan will not change."

msgid "One sec, getting files ready…"
msgstr "One sec, getting files ready…"

Expand Down
3 changes: 3 additions & 0 deletions packages/files-ui/src/locales/es/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,9 @@ msgstr ""
msgid "Older notifications"
msgstr ""

msgid "Once you proceed, your account is expected to make a payment within 60 minutes. If no payment is received, your plan will not change."
msgstr ""

msgid "One sec, getting files ready…"
msgstr ""

Expand Down
3 changes: 3 additions & 0 deletions packages/files-ui/src/locales/fr/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,9 @@ msgstr "OK"
msgid "Older notifications"
msgstr "Autre notifications"

msgid "Once you proceed, your account is expected to make a payment within 60 minutes. If no payment is received, your plan will not change."
msgstr ""

msgid "One sec, getting files ready…"
msgstr "Les fichiers sont presque prêts…"

Expand Down
3 changes: 3 additions & 0 deletions packages/files-ui/src/locales/no/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,9 @@ msgstr ""
msgid "Older notifications"
msgstr ""

msgid "Once you proceed, your account is expected to make a payment within 60 minutes. If no payment is received, your plan will not change."
msgstr ""

msgid "One sec, getting files ready…"
msgstr ""

Expand Down