Skip to content

Commit

Permalink
Merge pull request #2644 from getAlby/fix/prompt-cleanup
Browse files Browse the repository at this point in the history
fix: remove "only connect with sites you trust"
  • Loading branch information
bumi authored Aug 14, 2023
2 parents 13a5d3f + 127aee3 commit d4a33ba
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 58 deletions.
6 changes: 0 additions & 6 deletions src/app/screens/ConfirmPayment/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ function ConfirmPayment() {
const { t } = useTranslation("translation", {
keyPrefix: "confirm_payment",
});
const { t: tComponents } = useTranslation("components", {
keyPrefix: "confirm_or_cancel",
});
const { t: tCommon } = useTranslation("common");

const navState = useNavigationState();
Expand Down Expand Up @@ -184,9 +181,6 @@ function ConfirmPayment() {
onCancel={reject}
label={t("actions.pay_now")}
/>
<p className="mb-4 text-center text-sm text-gray-400">
<em>{tComponents("only_trusted")}</em>
</p>
</div>
</Container>
</form>
Expand Down
6 changes: 3 additions & 3 deletions src/app/screens/Enable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { CheckIcon } from "@bitcoin-design/bitcoin-icons-react/filled";
import ConfirmOrCancel from "@components/ConfirmOrCancel";
import Container from "@components/Container";
import PublisherCard from "@components/PublisherCard";
import { useState, useEffect, useCallback, useRef } from "react";
import { useCallback, useEffect, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { toast } from "react-toastify";
import ScreenHeader from "~/app/components/ScreenHeader";
Expand Down Expand Up @@ -86,7 +86,7 @@ function Enable(props: Props) {
isSmall={false}
/>

<div className="dark:text-white pt-6 mb-4">
<div className="dark:text-white pt-6">
<p className="mb-2">{t("allow")}</p>

<div className="mb-2 flex items-center">
Expand All @@ -99,7 +99,7 @@ function Enable(props: Props) {
</div>
</div>
</div>
<div className="mb-4 text-center flex flex-col">
<div className="text-center flex flex-col">
<ConfirmOrCancel
disabled={loading}
loading={loading}
Expand Down
24 changes: 7 additions & 17 deletions src/app/screens/LNURLAuth/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ import type { LNURLAuthServiceResponse } from "~/types";

function LNURLAuth() {
const { t } = useTranslation("translation", { keyPrefix: "lnurlauth" });
const { t: tComponents } = useTranslation("components", {
keyPrefix: "confirm_or_cancel",
});
const { t: tCommon } = useTranslation("common");

const navigate = useNavigate();
Expand Down Expand Up @@ -115,20 +112,13 @@ function LNURLAuth() {
<p className="my-2 mx-5 text-red-500">{errorMessage}</p>
)}
</div>

<div>
<ConfirmOrCancel
label={t("submit")}
onConfirm={confirm}
onCancel={reject}
disabled={loading}
loading={loading}
/>

<p className="mb-4 text-center text-sm text-gray-400">
<em>{tComponents("only_trusted")}</em>
</p>
</div>
<ConfirmOrCancel
label={t("submit")}
onConfirm={confirm}
onCancel={reject}
disabled={loading}
loading={loading}
/>
</Container>
</>
) : (
Expand Down
22 changes: 6 additions & 16 deletions src/app/screens/LNURLChannel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ import type { LNURLChannelServiceResponse } from "~/types";

function LNURLChannel() {
const { t } = useTranslation("translation", { keyPrefix: "lnurlchannel" });
const { t: tComponents } = useTranslation("components", {
keyPrefix: "confirm_or_cancel",
});
const { t: tCommon } = useTranslation("common");

const navigate = useNavigate();
Expand Down Expand Up @@ -118,19 +115,12 @@ function LNURLChannel() {
content={uri}
/>
</div>

<div>
<ConfirmOrCancel
disabled={loadingConfirm || !uri}
loading={loadingConfirm}
onConfirm={confirm}
onCancel={reject}
/>

<p className="mb-4 text-center text-sm text-gray-400">
<em>{tComponents("only_trusted")}</em>
</p>
</div>
<ConfirmOrCancel
disabled={loadingConfirm || !uri}
loading={loadingConfirm}
onConfirm={confirm}
onCancel={reject}
/>
</Container>
) : (
<Container justifyBetween maxWidth="sm">
Expand Down
18 changes: 5 additions & 13 deletions src/app/screens/MakeInvoice/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ function MakeInvoice() {
const [fiatValue, setFiatValue] = useState("");
const [memo, setMemo] = useState(invoiceAttributes.memo || "");
const [error, setError] = useState("");
const { t: tComponents } = useTranslation("components");
const { t: tCommon } = useTranslation("common");
const { t } = useTranslation("translation", {
keyPrefix: "make_invoice",
Expand Down Expand Up @@ -163,18 +162,11 @@ function MakeInvoice() {
</div>
</div>
</div>

<div>
<ConfirmOrCancel
disabled={!valueSat || loading || Boolean(error)}
loading={loading}
onCancel={reject}
/>

<p className="mb-4 text-center text-sm text-gray-400">
<em>{tComponents("confirm_or_cancel.only_trusted")}</em>
</p>
</div>
<ConfirmOrCancel
disabled={!valueSat || loading || Boolean(error)}
loading={loading}
onCancel={reject}
/>
</Container>
</form>
</div>
Expand Down
3 changes: 0 additions & 3 deletions src/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1030,9 +1030,6 @@
"incoming": "Incoming"
}
},
"confirm_or_cancel": {
"only_trusted": "Only connect with sites you trust."
},
"budget_control": {
"remember": {
"label": "Remember and set a budget",
Expand Down

0 comments on commit d4a33ba

Please sign in to comment.