Skip to content

Commit

Permalink
chore: refactoring npub variable
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanjoshi914 committed Jan 8, 2024
1 parent 5c1f7b6 commit 6aef498
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/app/screens/Nostr/ConfirmEncrypt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function NostrConfirmEncrypt() {
const navState = useNavigationState();
const origin = navState.origin as OriginData;

const peer = navState.args?.encrypt.peer;
const recipientNpub = navState.args?.encrypt.recipientNpub;
const message = navState.args?.encrypt.message;

const [loading, setLoading] = useState(false);
Expand Down Expand Up @@ -88,7 +88,7 @@ function NostrConfirmEncrypt() {
</div>
{showDetails && (
<div className="whitespace-pre-wrap break-words p-2 mb-4 shadow bg-white rounded-lg dark:bg-surface-02dp text-gray-500 dark:text-gray-400">
{t("recipient")}: {peer}
{t("recipient")}: {recipientNpub}
</div>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const encryptOrPrompt = async (message: MessageEncryptGet, sender: Sender) => {
action: "public/nostr/confirmEncrypt",
args: {
encrypt: {
peer: nostr.hexToNip19(message.args.peer, "npub"),
recipientNpub: nostr.hexToNip19(message.args.peer, "npub"),
message: message.args.plaintext,
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export type NavigationState = {

// nostr
encrypt: {
peer: string;
recipientNpub: string;
message: string;
};

Expand Down

0 comments on commit 6aef498

Please sign in to comment.