@gnosis.pm/safe-apps-react-sdk
Advanced tools
Comparing version 4.0.3 to 4.0.4-next.0
# @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 @@ |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8448
2
+ Added@babel/runtime@7.26.0(transitive)
+ Added@changesets/apply-release-plan@7.0.6(transitive)
+ Added@changesets/assemble-release-plan@6.0.5(transitive)
+ Added@changesets/changelog-git@0.2.0(transitive)
+ Added@changesets/cli@2.27.10(transitive)
+ Added@changesets/config@3.0.4(transitive)
+ Added@changesets/errors@0.2.0(transitive)
+ Added@changesets/get-dependents-graph@2.1.2(transitive)
+ Added@changesets/get-release-plan@4.0.5(transitive)
+ Added@changesets/get-version-range-type@0.4.0(transitive)
+ Added@changesets/git@3.0.2(transitive)
+ Added@changesets/logger@0.1.1(transitive)
+ Added@changesets/parse@0.4.0(transitive)
+ Added@changesets/pre@2.0.1(transitive)
+ Added@changesets/read@0.6.2(transitive)
+ Added@changesets/should-skip-package@0.1.1(transitive)
+ Added@changesets/types@4.1.06.0.0(transitive)
+ Added@changesets/write@0.3.2(transitive)
+ Added@ethersproject/abi@5.7.0(transitive)
+ Added@ethersproject/abstract-provider@5.7.0(transitive)
+ Added@ethersproject/abstract-signer@5.7.0(transitive)
+ Added@ethersproject/address@5.7.0(transitive)
+ Added@ethersproject/base64@5.7.0(transitive)
+ Added@ethersproject/basex@5.7.0(transitive)
+ Added@ethersproject/bignumber@5.7.0(transitive)
+ Added@ethersproject/bytes@5.7.0(transitive)
+ Added@ethersproject/constants@5.7.0(transitive)
+ Added@ethersproject/contracts@5.7.0(transitive)
+ Added@ethersproject/hash@5.7.0(transitive)
+ Added@ethersproject/hdnode@5.7.0(transitive)
+ Added@ethersproject/json-wallets@5.7.0(transitive)
+ Added@ethersproject/keccak256@5.7.0(transitive)
+ Added@ethersproject/logger@5.7.0(transitive)
+ Added@ethersproject/networks@5.7.1(transitive)
+ Added@ethersproject/pbkdf2@5.7.0(transitive)
+ Added@ethersproject/properties@5.7.0(transitive)
+ Added@ethersproject/providers@5.7.2(transitive)
+ Added@ethersproject/random@5.7.0(transitive)
+ Added@ethersproject/rlp@5.7.0(transitive)
+ Added@ethersproject/sha2@5.7.0(transitive)
+ Added@ethersproject/signing-key@5.7.0(transitive)
+ Added@ethersproject/solidity@5.7.0(transitive)
+ Added@ethersproject/strings@5.7.0(transitive)
+ Added@ethersproject/transactions@5.7.0(transitive)
+ Added@ethersproject/units@5.7.0(transitive)
+ Added@ethersproject/wallet@5.7.0(transitive)
+ Added@ethersproject/web@5.7.1(transitive)
+ Added@ethersproject/wordlists@5.7.0(transitive)
+ Added@gnosis.pm/safe-apps-sdk@4.3.0-next.0(transitive)
+ Added@manypkg/find-root@1.1.0(transitive)
+ Added@manypkg/get-packages@1.1.3(transitive)
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(transitive)
+ Added@types/node@12.20.55(transitive)
+ Addedaes-js@3.0.0(transitive)
+ Addedansi-colors@4.1.3(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedargparse@1.0.10(transitive)
+ Addedarray-union@2.1.0(transitive)
+ Addedbech32@1.1.4(transitive)
+ Addedbetter-path-resolve@1.0.0(transitive)
+ Addedbn.js@4.12.15.2.1(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedbrorand@1.1.0(transitive)
+ Addedchardet@0.7.0(transitive)
+ Addedci-info@3.9.0(transitive)
+ Addedcross-spawn@7.0.6(transitive)
+ Addeddetect-indent@6.1.0(transitive)
+ Addeddir-glob@3.0.1(transitive)
+ Addedelliptic@6.5.4(transitive)
+ Addedenquirer@2.4.1(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedethers@5.7.2(transitive)
+ Addedextendable-error@0.1.7(transitive)
+ Addedexternal-editor@3.1.0(transitive)
+ Addedfast-glob@3.3.2(transitive)
+ Addedfastq@1.17.1(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedfind-up@4.1.0(transitive)
+ Addedfs-extra@7.0.18.1.0(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedglobby@11.1.0(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhash.js@1.1.7(transitive)
+ Addedhmac-drbg@1.0.1(transitive)
+ Addedhuman-id@1.0.2(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedignore@5.3.2(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedis-subdir@1.2.0(transitive)
+ Addedis-windows@1.0.2(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedjs-sha3@0.8.0(transitive)
+ Addedjs-yaml@3.14.1(transitive)
+ Addedjsonfile@4.0.0(transitive)
+ Addedlocate-path@5.0.0(transitive)
+ Addedlodash.startcase@4.4.0(transitive)
+ Addedmerge2@1.4.1(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedminimalistic-assert@1.0.1(transitive)
+ Addedminimalistic-crypto-utils@1.0.1(transitive)
+ Addedmri@1.2.0(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedoutdent@0.5.0(transitive)
+ Addedp-filter@2.1.0(transitive)
+ Addedp-limit@2.3.0(transitive)
+ Addedp-locate@4.1.0(transitive)
+ Addedp-map@2.1.0(transitive)
+ Addedp-try@2.2.0(transitive)
+ Addedpackage-manager-detector@0.2.6(transitive)
+ Addedpath-exists@4.0.0(transitive)
+ Addedpath-key@3.1.1(transitive)
+ Addedpath-type@4.0.0(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedpify@4.0.1(transitive)
+ Addedprettier@2.8.8(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedread-yaml-file@1.1.0(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
+ Addedresolve-from@5.0.0(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedscrypt-js@3.0.1(transitive)
+ Addedsemver@7.6.3(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedsignal-exit@4.1.0(transitive)
+ Addedslash@3.0.0(transitive)
+ Addedspawndamnit@3.0.1(transitive)
+ Addedsprintf-js@1.0.3(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedstrip-bom@3.0.0(transitive)
+ Addedterm-size@2.2.1(transitive)
+ Addedtmp@0.0.33(transitive)
+ Addedto-regex-range@5.0.1(transitive)
+ Addeduniversalify@0.1.2(transitive)
+ Addedwhich@2.0.2(transitive)
+ Addedws@7.4.6(transitive)
- Removed@gnosis.pm/safe-apps-sdk@4.2.0(transitive)