Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@wildberries/notifications
Advanced tools
npm install @mihanizm56/notifications
import {notificationsState} from '@wildberries/notifications';
export const rootReducer = {
notificationsState,
...other root reducers
};
import React, { memo } from "react";
import { Notifications, setModalAction } from "@wildberries/notifications";
import { createPortal } from 'react-dom';
import { uniqueId } from 'lodash-es'
const portalElement = document.getElementById('portal');
class Portal extends React.PureComponent{
constructor(props) {
super(props);
this.containerEl = document.createElement('div');
this.containerEl.id = `${props.prefix}_${uniqueId('id_')}`;
portalElement.appendChild(this.containerEl);
}
componentWillUnmount() {
this.containerEl.remove();
}
render() {
return createPortal(this.props.children, this.containerEl);
}
}
const TestComponent = memo(() => (
<div className="TestComponent">
<Portal prefix="notifications">
<Notifications />
</Portal>
</div>
);
})
success | error
- modal status (required)string
- modal test (required)string
- payload of additional action if need to call from modal (not required)any
- type of additional action if need to call from modal (not required)import React from "react";
import { setModalAction } from "@wildberries/notifications";
import { uniqueId } from 'lodash-es'
import { useDispatch } from "react-redux";
function ExampleComponent) {
const dispatch = useDispatch();
const setModal = () => {
dispatch(setModalAction({
status: 'success',
text: 'modal text',
additionalPayload: { foo:'bar' },
additionalActionType: 'SOME_TYPE',
}))
}
return (
<div className="ExampleComponent">
<button onClick={setModal}>button</button>
</div>
);
}
export default App;
FAQs
notifications module
The npm package @wildberries/notifications receives a total of 385 weekly downloads. As such, @wildberries/notifications popularity was classified as not popular.
We found that @wildberries/notifications demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.