Skip to content

Commit

Permalink
Merge pull request #608 from arconnectio/fix/add-sign-password-check
Browse files Browse the repository at this point in the history
fix: add missing password check in sign auth
  • Loading branch information
pawanpaudel93 authored Jan 9, 2025
2 parents 1d0aa5a + 5b5d8bd commit 7ec395f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/routes/auth/sign.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import { getTagValue } from "~tokens/aoTokens/ao";
import { humanizeTimestampTags } from "~utils/timestamp";
import styled from "styled-components";
import { ChevronDownIcon, ChevronUpIcon } from "@iconicicons/react";
import { checkPassword } from "~wallets/auth";

export function SignAuthRequestView() {
const { authRequest, acceptRequest, rejectRequest } =
Expand Down Expand Up @@ -240,6 +241,17 @@ export function SignAuthRequestView() {

const sign = async () => {
if (!transaction) return;
if (askPassword) {
const checkPw = await checkPassword(passwordInput.state);
if (!checkPw) {
setToast({
type: "error",
content: browser.i18n.getMessage("invalidPassword"),
duration: 2400
});
return;
}
}
if (wallet.type === "hardware") {
// load tx ur
if (!page) await loadTransactionUR();
Expand Down

0 comments on commit 7ec395f

Please sign in to comment.