fixed undefined props required for markHiveNotifications call

This commit is contained in:
noumantahir 2022-02-20 22:12:02 +05:00
parent 5800162ab2
commit fc800ff04b
2 changed files with 7 additions and 7 deletions

View File

@ -1236,8 +1236,8 @@ export const unfollowUser = async (currentAccount, pin, data) => {
);
};
export const markHiveNotifications = async (currentAccount, pin) => {
const digitPinCode = getDigitPinCode(pin);
export const markHiveNotifications = async (currentAccount, pinHash) => {
const digitPinCode = getDigitPinCode(pinHash);
const key = getAnyPrivateKey(currentAccount.local, digitPinCode);
const now = new Date().toISOString();

View File

@ -170,11 +170,11 @@ class NotificationContainer extends Component {
UNSAFE_componentWillReceiveProps(nextProps) {
const { selectedFilter } = this.state;
const { username } = this.props;
const { currentAccount } = this.props;
if (
(nextProps.activeBottomTab === ROUTES.TABBAR.NOTIFICATION && nextProps.username) ||
(nextProps.username !== username && nextProps.username)
(nextProps.activeBottomTab === ROUTES.TABBAR.NOTIFICATION && nextProps.currentAccount.name) ||
(nextProps.currentAccount.name !== currentAccount.name && nextProps.currentAccount.name)
) {
this.setState({ endOfNotification: false }, () => this._getActivities(selectedFilter));
}
@ -203,8 +203,8 @@ class NotificationContainer extends Component {
const mapStateToProps = (state) => ({
isLoggedIn: state.application.isLoggedIn,
isConnected: state.application.isConnected,
username: state.account.currentAccount.name,
pinCode: state.application.pin,
currentAccount: state.account.currentAccount,
activeBottomTab: state.ui.activeBottomTab,
});