diff --git a/backend/grant/proposal/models.py b/backend/grant/proposal/models.py index 567002db..ed05567d 100644 --- a/backend/grant/proposal/models.py +++ b/backend/grant/proposal/models.py @@ -717,12 +717,7 @@ class Proposal(db.Model): @hybrid_property def is_staked(self): - # Don't use self.contributed since that ignores stake contributions - contributions = ProposalContribution.query \ - .filter_by(proposal_id=self.id, status=ContributionStatus.CONFIRMED) \ - .all() - funded = reduce(lambda prev, c: prev + Decimal(c.amount), contributions, 0) - return Decimal(funded) >= PROPOSAL_STAKING_AMOUNT + return True @hybrid_property def is_funded(self): diff --git a/backend/grant/proposal/views.py b/backend/grant/proposal/views.py index 763baf9f..90b460bc 100644 --- a/backend/grant/proposal/views.py +++ b/backend/grant/proposal/views.py @@ -264,12 +264,14 @@ def update_proposal(milestones, proposal_id, rfp_opt_in, **kwargs): @blueprint.route("//tips", methods=["PUT"]) @requires_team_member_auth @body({ - "address": fields.Str(required=False, missing=None, - validate=lambda r: validate_blockchain_get('/validate/address', {'address': r})), + "address": fields.Str(required=False, missing=None), "viewKey": fields.Str(required=False, missing=None) }) def update_proposal_tip_jar(proposal_id, address, view_key): if address is not None: + if address is not '': + validate_blockchain_get('/validate/address', {'address': address}) + g.current_proposal.tip_jar_address = address if view_key is not None: g.current_proposal.tip_jar_view_key = view_key diff --git a/backend/grant/user/views.py b/backend/grant/user/views.py index dafb83d3..ea4cb74d 100644 --- a/backend/grant/user/views.py +++ b/backend/grant/user/views.py @@ -365,8 +365,7 @@ def get_user_settings(user_id): "emailSubscriptions": fields.Dict(required=False, missing=None), "refundAddress": fields.Str(required=False, missing=None, validate=lambda r: validate_blockchain_get('/validate/address', {'address': r})), - "tipJarAddress": fields.Str(required=False, missing=None, - validate=lambda r: validate_blockchain_get('/validate/address', {'address': r})), + "tipJarAddress": fields.Str(required=False, missing=None), "tipJarViewKey": fields.Str(required=False, missing=None) # TODO: add viewkey validation here }) def set_user_settings(user_id, email_subscriptions, refund_address, tip_jar_address, tip_jar_view_key): @@ -382,8 +381,10 @@ def set_user_settings(user_id, email_subscriptions, refund_address, tip_jar_addr if refund_address: g.current_user.settings.refund_address = refund_address - # TODO: is additional validation needed similar to refund_address? if tip_jar_address is not None: + if tip_jar_address is not '': + validate_blockchain_get('/validate/address', {'address': tip_jar_address}) + g.current_user.settings.tip_jar_address = tip_jar_address if tip_jar_view_key is not None: g.current_user.settings.tip_jar_view_key = tip_jar_view_key diff --git a/frontend/client/components/Profile/ProfilePendingCCR.tsx b/frontend/client/components/Profile/ProfilePendingCCR.tsx index 1a6198a7..bb8d8446 100644 --- a/frontend/client/components/Profile/ProfilePendingCCR.tsx +++ b/frontend/client/components/Profile/ProfilePendingCCR.tsx @@ -39,10 +39,10 @@ class ProfilePendingCCR extends React.Component { const st = { [STATUS.REJECTED]: { color: 'red', - tag: 'Rejected', + tag: 'Changes Requested', blurb: ( <> -
This request was rejected for the following reason:
+
This request has changes requested for the following reason:
{rejectReason}
You may edit this request and re-submit it for approval.
@@ -50,7 +50,7 @@ class ProfilePendingCCR extends React.Component { }, [STATUS.PENDING]: { color: 'purple', - tag: 'Pending', + tag: 'Pending Request', blurb: (
You will receive an email when this request has completed the review process. @@ -63,7 +63,7 @@ class ProfilePendingCCR extends React.Component {
- {title} {st[status].tag} Request + {title} {st[status].tag}
{st[status].blurb} diff --git a/frontend/client/components/Proposal/index.less b/frontend/client/components/Proposal/index.less index ffc53bde..9a68cd75 100644 --- a/frontend/client/components/Proposal/index.less +++ b/frontend/client/components/Proposal/index.less @@ -81,8 +81,7 @@ @media (min-width: @collapse-width) { overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; + text-overflow: unset; } @media (max-width: @collapse-width) {