Skip to content

Commit

Permalink
feat: refactor nostr confirm to nostrEncryptOrDecrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanjoshi914 committed Dec 18, 2023
1 parent 821c26b commit d2f3395
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
7 changes: 5 additions & 2 deletions src/app/router/Prompt/Prompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import LNURLWithdraw from "@screens/LNURLWithdraw";
import LiquidConfirmGetAddress from "@screens/Liquid/ConfirmGetAddress";
import ConfirmSignPset from "@screens/Liquid/ConfirmSignPset";
import MakeInvoice from "@screens/MakeInvoice";
import NostrConfirm from "@screens/Nostr/Confirm";
import NostrConfirmGetPublicKey from "@screens/Nostr/ConfirmGetPublicKey";
import NostrConfirmSignMessage from "@screens/Nostr/ConfirmSignMessage";
import NostrConfirmSignSchnorr from "@screens/Nostr/ConfirmSignSchnorr";
Expand All @@ -29,6 +28,7 @@ import LiquidEnable from "~/app/screens/Enable/LiquidEnable";
import NostrEnable from "~/app/screens/Enable/NostrEnable";
import WebbtcEnable from "~/app/screens/Enable/WebbtcEnable";
import WeblnEnable from "~/app/screens/Enable/WeblnEnable";
import NostrConfirmEncryptOrDecrypt from "~/app/screens/Nostr/ConfirmEncryptOrDecrypt";
import type { NavigationState, OriginData } from "~/types";

// Parse out the parameters from the querystring.
Expand Down Expand Up @@ -123,7 +123,10 @@ function Prompt() {
path="public/liquid/confirmSignPset"
element={<ConfirmSignPset />}
/>
<Route path="public/nostr/confirm" element={<NostrConfirm />} />
<Route
path="public/nostr/confirmEncryptOrDecrypt"
element={<NostrConfirmEncryptOrDecrypt />}
/>
<Route
path="public/nostr/confirmGetPublicKey"
element={<NostrConfirmGetPublicKey />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { USER_REJECTED_ERROR } from "~/common/constants";
import msg from "~/common/lib/msg";
import { OriginData } from "~/types";

function NostrConfirm() {
function NostrConfirmEncryptOrDecrypt() {
const { t } = useTranslation("translation", {
keyPrefix: "nostr",
});
Expand Down Expand Up @@ -133,4 +133,4 @@ function NostrConfirm() {
);
}

export default NostrConfirm;
export default NostrConfirmEncryptOrDecrypt;
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const decryptOrPrompt = async (message: MessageDecryptGet, sender: Sender) => {
rememberPermission: boolean;
}>({
...message,
action: "public/nostr/confirm",
action: "public/nostr/confirmEncryptOrDecrypt",
args: {
description: {
action: i18n.t("permissions:nostr.nip04decrypt"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const encryptOrPrompt = async (message: MessageEncryptGet, sender: Sender) => {
rememberPermission: boolean;
}>({
...message,
action: "public/nostr/confirm",
action: "public/nostr/confirmEncryptOrDecrypt",
args: {
description: {
action: i18n.t("permissions:nostr.nip04encrypt"),
Expand Down

0 comments on commit d2f3395

Please sign in to comment.