Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gnosis.pm/safe-apps-react-sdk

Package Overview
Dependencies
Maintainers
17
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gnosis.pm/safe-apps-react-sdk - npm Package Compare versions

Comparing version 4.0.3 to 4.0.4-next.0

7

CHANGELOG.md
# @gnosis.pm/safe-apps-react-sdk
## 4.0.4-next.0
### Patch Changes
- Updated dependencies [035159a]
- @gnosis.pm/safe-apps-sdk@4.3.0-next.0
## 4.0.3

@@ -4,0 +11,0 @@

16

dist/index.js

@@ -19,9 +19,9 @@ "use strict";

const safe_apps_sdk_1 = __importDefault(require("@gnosis.pm/safe-apps-sdk"));
const SafeContext = react_1.createContext(undefined);
const SafeContext = (0, react_1.createContext)(undefined);
const SafeProvider = ({ loader = null, opts, children }) => {
const [sdk] = react_1.useState(() => new safe_apps_sdk_1.default(opts));
const [connected, setConnected] = react_1.useState(false);
const [safe, setSafe] = react_1.useState({ safeAddress: '', chainId: 1, threshold: 1, owners: [] });
const contextValue = react_1.useMemo(() => ({ sdk, connected, safe }), [sdk, connected, safe]);
react_1.useEffect(() => {
const [sdk] = (0, react_1.useState)(() => new safe_apps_sdk_1.default(opts));
const [connected, setConnected] = (0, react_1.useState)(false);
const [safe, setSafe] = (0, react_1.useState)({ safeAddress: '', chainId: 1, threshold: 1, owners: [] });
const contextValue = (0, react_1.useMemo)(() => ({ sdk, connected, safe }), [sdk, connected, safe]);
(0, react_1.useEffect)(() => {
let active = true;

@@ -52,7 +52,7 @@ const fetchSafeInfo = () => __awaiter(void 0, void 0, void 0, function* () {

}
return jsx_runtime_1.jsx(SafeContext.Provider, Object.assign({ value: contextValue }, { children: children }), void 0);
return (0, jsx_runtime_1.jsx)(SafeContext.Provider, Object.assign({ value: contextValue }, { children: children }), void 0);
};
exports.SafeProvider = SafeProvider;
const useSafeAppsSDK = () => {
const value = react_1.useContext(SafeContext);
const value = (0, react_1.useContext)(SafeContext);
if (value === undefined) {

@@ -59,0 +59,0 @@ throw new Error('You probably forgot to put <SafeProvider>.');

{
"name": "@gnosis.pm/safe-apps-react-sdk",
"private": false,
"version": "4.0.3",
"version": "4.0.4-next.0",
"main": "dist/index.js",

@@ -14,3 +14,3 @@ "types": "dist/index.d.ts",

"dependencies": {
"@gnosis.pm/safe-apps-sdk": "4.2.0"
"@gnosis.pm/safe-apps-sdk": "4.3.0-next.0"
},

@@ -24,7 +24,7 @@ "peerDependencies": {

"devDependencies": {
"@types/jest": "^26.0.24",
"@types/jest": "^27.0.1",
"@types/react-dom": "^17.0.9",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-flowtype": "^5.8.2",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-flowtype": "^5.9.0",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-jsx-a11y": "^6.3.1",

@@ -31,0 +31,0 @@ "eslint-plugin-react": "^7.24.0",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc