mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-29 22:07:46 +03:00
fixed undefined props required for markHiveNotifications call
This commit is contained in:
parent
5800162ab2
commit
fc800ff04b
@ -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();
|
||||
|
@ -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,
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user