From aa7bc540dd0880b344d5bb53e6bfb3430573e42e Mon Sep 17 00:00:00 2001 From: 1aerostorm Date: Wed, 13 Dec 2023 22:54:23 +0000 Subject: [PATCH] Fix decrypt fee --- app/components/elements/EncryptedStub.jsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/components/elements/EncryptedStub.jsx b/app/components/elements/EncryptedStub.jsx index 38070091..9c444ef6 100644 --- a/app/components/elements/EncryptedStub.jsx +++ b/app/components/elements/EncryptedStub.jsx @@ -61,10 +61,6 @@ class EncryptedStub extends React.Component { }) } - if (this.state.submitting) { - return - } - const { err } = this.state return
@@ -111,7 +107,7 @@ class EncryptedStub extends React.Component { _renderDonate = (decrypt_fee, isMy) => { if (isMy || !decrypt_fee) return null decrypt_fee = Asset(decrypt_fee) - if (decrypt_fee.eq(0)) return + if (decrypt_fee.eq(0)) return null return
{tt('poststub.you_can_decrypt_just_this_post')} {decrypt_fee.floatString}.
@@ -142,6 +138,10 @@ class EncryptedStub extends React.Component { const btn = isMy &&
+ if (this.state.submitting) { + return + } + if ((encrypted === EncryptedStates.no_sponsor && !username) || encrypted === EncryptedStates.no_auth) { return (
{this._renderAuthor(tt('poststub.for_sponsors'), author)} @@ -172,8 +172,10 @@ class EncryptedStub extends React.Component { } else if (encrypted === EncryptedStates.no_sub) { const encrypted_decrypt_fee = dis.get('encrypted_decrypt_fee') - return
{tt('postsummary_jsx.no_sub')} - {this._renderDonate(encrypted_decrypt_fee, isMy)} + const donateWay = this._renderDonate(encrypted_decrypt_fee, isMy) + + return
{!donateWay && tt('postsummary_jsx.no_sub')} + {donateWay}
} else if (encrypted === EncryptedStates.wrong_format) { return
{tt('postsummary_jsx.wrong_format')}{btn}