diff --git a/src/components/modules/Donate.jsx b/src/components/modules/Donate.jsx index b9a325d1..a7d51de1 100644 --- a/src/components/modules/Donate.jsx +++ b/src/components/modules/Donate.jsx @@ -49,11 +49,14 @@ class Donate extends React.Component { const { sym } = opts if (sym === 'GOLOS') { if (currentAccount) { - res = Asset(currentAccount.get('tip_balance')) + const tip = currentAccount.get('tip_balance') + if (tip) { + res = Asset(tip) + } } } else { const uias = this.props.uias && this.props.uias.toJS() - if (uias) { + if (uias && uias[sym]) { res = Asset(uias[sym].tip_balance) } } @@ -110,6 +113,8 @@ class Donate extends React.Component { const { sym } = opts const { activeConfetti } = this.state + const balVal = this.balanceValue() + const form = ( this.onPresetChange(amountStr, values, setFieldValue)} /> - + /> : null}
diff --git a/src/utils/groups.js b/src/utils/groups.js index 7a7fd348..fd2878ae 100644 --- a/src/utils/groups.js +++ b/src/utils/groups.js @@ -56,7 +56,7 @@ const getRoleInGroup = (group, username) => { const opGroup = (op) => { let group = '' if (!op) return group - const { extensions } = op + const { extensions, memo } = op if (extensions) { for (const ext of extensions) { if (ext && ext[0] === 0) { @@ -64,6 +64,13 @@ const opGroup = (op) => { } } } + if (group) return group + if (memo) { // donate + const { target } = memo + if (target && target.group) { + return target.group + } + } return group }