Skip to content

Commit

Permalink
Merge pull request #1036 from tallycash/fix-read-only-sign-blank
Browse files Browse the repository at this point in the history
Fix blank signing page if read-only account

dApp requests for signatures caused blank screen if the current account is
read-only (see below). Fixed.
  • Loading branch information
Shadowfiend authored Feb 25, 2022
2 parents 0df335b + 2bc909d commit 483c0dd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ui/pages/SignTransaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ export default function SignTransaction({
const signingMethod = signerAccountTotal?.signingMethod ?? null
if (
typeof transactionDetails === "undefined" ||
typeof signerAccountTotal === "undefined" ||
signingMethod === null
typeof signerAccountTotal === "undefined"
) {
// TODO Some sort of unexpected state error if we end up here... Or do we
// go back in history? That won't work for dApp popovers though.
Expand All @@ -122,7 +121,11 @@ export default function SignTransaction({
await dispatch(rejectTransactionSignature())
}
const handleConfirm = async () => {
if (isTransactionDataReady && transactionDetails) {
if (
isTransactionDataReady &&
transactionDetails &&
signingMethod !== null
) {
dispatch(
signTransaction({
transaction: transactionDetails,
Expand Down

0 comments on commit 483c0dd

Please sign in to comment.