From fb919344ff9144662a4b24988f93b060f59b4416 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 10 Dec 2020 17:12:18 +0400 Subject: [PATCH 01/18] updating react sdk wip --- packages/safe-app-cra-template/template.json | 8 +- packages/safe-apps-react-sdk/package.json | 6 +- packages/safe-apps-react-sdk/src/safe.tsx | 29 +- packages/safe-apps-react-sdk/yarn.lock | 636 ------------------- yarn.lock | 342 +++++----- 5 files changed, 160 insertions(+), 861 deletions(-) delete mode 100644 packages/safe-apps-react-sdk/yarn.lock diff --git a/packages/safe-app-cra-template/template.json b/packages/safe-app-cra-template/template.json index b82b17f0..37298986 100644 --- a/packages/safe-app-cra-template/template.json +++ b/packages/safe-app-cra-template/template.json @@ -2,7 +2,7 @@ "package": { "homepage": "./", "dependencies": { - "@gnosis.pm/safe-apps-sdk": "^0.3.1", + "@gnosis.pm/safe-apps-sdk": "1.0.0-beta.4", "@gnosis.pm/safe-react-components": "^0.2.0", "@material-ui/core": "^4.11.0", "@rmeissner/safe-apps-react-sdk": "0.4.0", @@ -32,11 +32,7 @@ }, "browserslist": { "production": [">0.2%", "not dead", "not op_mini all"], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] + "development": ["last 1 chrome version", "last 1 firefox version", "last 1 safari version"] } } } diff --git a/packages/safe-apps-react-sdk/package.json b/packages/safe-apps-react-sdk/package.json index d8aaf20a..90eed1d4 100644 --- a/packages/safe-apps-react-sdk/package.json +++ b/packages/safe-apps-react-sdk/package.json @@ -11,10 +11,8 @@ ], "author": "Gnosis (https://gnosis.pm)", "dependencies": { - "@gnosis.pm/safe-apps-sdk": "0.4.1", - "@types/jest": "^24.0.0", - "@types/uuid": "^8.3.0", - "uuid": "^8.3.0" + "@gnosis.pm/safe-apps-sdk": "1.0.0-beta.4", + "@types/jest": "^24.0.0" }, "peerDependencies": { "@types/node": "^12.0.0", diff --git a/packages/safe-apps-react-sdk/src/safe.tsx b/packages/safe-apps-react-sdk/src/safe.tsx index 543d9549..f0c4af51 100644 --- a/packages/safe-apps-react-sdk/src/safe.tsx +++ b/packages/safe-apps-react-sdk/src/safe.tsx @@ -1,47 +1,26 @@ -import initSdk, { +import SafeAppsSDK, { SdkInstance, Transaction as SDKTransaction, SafeInfo, - TxConfirmationEvent, - TxRejectionEvent, - RequestId, TxServiceModel, } from '@gnosis.pm/safe-apps-sdk'; -import { v4 as uuidv4 } from 'uuid'; export type Transaction = SDKTransaction; export type SafeTransaction = TxServiceModel; -export interface IgnorablePromise extends Promise { - ignore: () => void; -} - export interface Safe { readonly info: SafeInfo; activate(onSafeInfo: (info: SafeInfo) => void): void; deactivate(): void; - sendTransactions(txs: Transaction[]): IgnorablePromise; + sendTransactions(txs: Transaction[]): string; loadSafeTransaction(safeTxHash: string): Promise; isConnected(): boolean; } -interface Callback { - confirm: (safeTxHash: string) => void; - reject: (error?: any) => void; -} - -const rejectCallbackWithReason = (callbacks: Map, requestId: RequestId, reason: string) => { - const callback = callbacks.get(requestId); - if (callback) { - callbacks.delete(requestId); - callback.reject(new Error(reason)); - } -}; - class State implements Safe { _info: SafeInfo | undefined; sdk: SdkInstance; - callbacks = new Map(); + get info(): SafeInfo { const info = this._info; if (info === undefined) throw Error('Not connected to a Safe'); @@ -49,7 +28,7 @@ class State implements Safe { } constructor() { - this.sdk = initSdk([/.*localhost.*/]); + this.sdk = new SafeAppsSDK(); } activate(onUpdate: (update: any) => void) { diff --git a/packages/safe-apps-react-sdk/yarn.lock b/packages/safe-apps-react-sdk/yarn.lock deleted file mode 100644 index e76b9e0a..00000000 --- a/packages/safe-apps-react-sdk/yarn.lock +++ /dev/null @@ -1,636 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/code-frame@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" - integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== - dependencies: - "@babel/highlight" "^7.10.4" - -"@babel/helper-validator-identifier@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" - integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== - -"@babel/highlight@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" - integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== - dependencies: - "@babel/helper-validator-identifier" "^7.10.4" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/runtime-corejs3@^7.10.2": - version "7.11.2" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.11.2.tgz#02c3029743150188edeb66541195f54600278419" - integrity sha512-qh5IR+8VgFz83VBa6OkaET6uN/mJOhHONuy3m1sgF0CV6mXdPSEBdA7e1eUbVvyNtANjMbg22JUv71BaDXLY6A== - dependencies: - core-js-pure "^3.0.0" - regenerator-runtime "^0.13.4" - -"@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.5.1", "@babel/runtime@^7.8.4": - version "7.11.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736" - integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw== - dependencies: - regenerator-runtime "^0.13.4" - -"@gnosis.pm/safe-apps-sdk@0.4.1": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-apps-sdk/-/safe-apps-sdk-0.4.1.tgz#c3a8f1957d11b243329ebcb7a47823fc10ff8595" - integrity sha512-dteNaqGrtaGQ2uLKfiDvf23nfvhg6IJqPjIwqNUz3qZzlxUHCC14eCNHdXFeDXHs8uCB02sUcIWCbroblAGxVQ== - -"@jest/types@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-24.9.0.tgz#63cb26cb7500d069e5a389441a7c6ab5e909fc59" - integrity sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^1.1.1" - "@types/yargs" "^13.0.0" - -"@jest/types@^25.5.0": - version "25.5.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.5.0.tgz#4d6a4793f7b9599fc3680877b856a97dbccf2a9d" - integrity sha512-OXD0RgQ86Tu3MazKo8bnrkDRaDXXMGUqd+kTtLtK1Zb7CRzQcaSRPPPV37SvYTdevXEBVxe0HXylEjs8ibkmCw== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^1.1.1" - "@types/yargs" "^15.0.0" - chalk "^3.0.0" - -"@jest/types@^26.3.0": - version "26.3.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.3.0.tgz#97627bf4bdb72c55346eef98e3b3f7ddc4941f71" - integrity sha512-BDPG23U0qDeAvU4f99haztXwdAg3hz4El95LkAM+tHAqqhiVzRpEGHHU8EDxT/AnxOrA65YjLBwDahdJ9pTLJQ== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^15.0.0" - chalk "^4.0.0" - -"@sheerun/mutationobserver-shim@^0.3.2": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@sheerun/mutationobserver-shim/-/mutationobserver-shim-0.3.3.tgz#5405ee8e444ed212db44e79351f0c70a582aae25" - integrity sha512-DetpxZw1fzPD5xUBrIAoplLChO2VB8DlL5Gg+I1IR9b2wPqYIca2WSUxL5g1vLeR4MsQq1NeWriXAVffV+U1Fw== - -"@testing-library/dom@*": - version "7.24.1" - resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-7.24.1.tgz#0e8acd042070f2c1b183fbfe5c0d38b3194ad3c0" - integrity sha512-TemHWY59gvzcScGiE5eooZpzYk9GaED0TuuK4WefbIc/DQg0L5wOpnj7MIEeAGF3B7Ekf1kvmVnQ97vwz4Lmhg== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/runtime" "^7.10.3" - "@types/aria-query" "^4.2.0" - aria-query "^4.2.2" - chalk "^4.1.0" - dom-accessibility-api "^0.5.1" - pretty-format "^26.4.2" - -"@testing-library/dom@^6.15.0": - version "6.16.0" - resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-6.16.0.tgz#04ada27ed74ad4c0f0d984a1245bb29b1fd90ba9" - integrity sha512-lBD88ssxqEfz0wFL6MeUyyWZfV/2cjEZZV3YRpb2IoJRej/4f1jB0TzqIOznTpfR1r34CNesrubxwIlAQ8zgPA== - dependencies: - "@babel/runtime" "^7.8.4" - "@sheerun/mutationobserver-shim" "^0.3.2" - "@types/testing-library__dom" "^6.12.1" - aria-query "^4.0.2" - dom-accessibility-api "^0.3.0" - pretty-format "^25.1.0" - wait-for-expect "^3.0.2" - -"@testing-library/jest-dom@^4.2.4": - version "4.2.4" - resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-4.2.4.tgz#00dfa0cbdd837d9a3c2a7f3f0a248ea6e7b89742" - integrity sha512-j31Bn0rQo12fhCWOUWy9fl7wtqkp7In/YP2p5ZFyRuiiB9Qs3g+hS4gAmDWONbAHcRmVooNJ5eOHQDCOmUFXHg== - dependencies: - "@babel/runtime" "^7.5.1" - chalk "^2.4.1" - css "^2.2.3" - css.escape "^1.5.1" - jest-diff "^24.0.0" - jest-matcher-utils "^24.0.0" - lodash "^4.17.11" - pretty-format "^24.0.0" - redent "^3.0.0" - -"@testing-library/react@^9.3.2": - version "9.5.0" - resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-9.5.0.tgz#71531655a7890b61e77a1b39452fbedf0472ca5e" - integrity sha512-di1b+D0p+rfeboHO5W7gTVeZDIK5+maEgstrZbWZSSvxDyfDRkkyBE1AJR5Psd6doNldluXlCWqXriUfqu/9Qg== - dependencies: - "@babel/runtime" "^7.8.4" - "@testing-library/dom" "^6.15.0" - "@types/testing-library__react" "^9.1.2" - -"@testing-library/user-event@^7.1.2": - version "7.2.1" - resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-7.2.1.tgz#2ad4e844175a3738cb9e7064be5ea070b8863a1c" - integrity sha512-oZ0Ib5I4Z2pUEcoo95cT1cr6slco9WY7yiPpG+RGNkj8YcYgJnM7pXmYmorNOReh8MIGcKSqXyeGjxnr8YiZbA== - -"@types/aria-query@^4.2.0": - version "4.2.0" - resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-4.2.0.tgz#14264692a9d6e2fa4db3df5e56e94b5e25647ac0" - integrity sha512-iIgQNzCm0v7QMhhe4Jjn9uRh+I6GoPmt03CbEtwx3ao8/EfoQcmgtqH4vQ5Db/lxiIGaWDv6nwvunuh0RyX0+A== - -"@types/color-name@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" - integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== - -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz#4ba8ddb720221f432e443bd5f9117fd22cfd4762" - integrity sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw== - -"@types/istanbul-lib-report@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" - integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== - dependencies: - "@types/istanbul-lib-coverage" "*" - -"@types/istanbul-reports@^1.1.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-1.1.2.tgz#e875cc689e47bce549ec81f3df5e6f6f11cfaeb2" - integrity sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw== - dependencies: - "@types/istanbul-lib-coverage" "*" - "@types/istanbul-lib-report" "*" - -"@types/istanbul-reports@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz#508b13aa344fa4976234e75dddcc34925737d821" - integrity sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA== - dependencies: - "@types/istanbul-lib-report" "*" - -"@types/jest@^24.0.0": - version "24.9.1" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-24.9.1.tgz#02baf9573c78f1b9974a5f36778b366aa77bd534" - integrity sha512-Fb38HkXSVA4L8fGKEZ6le5bB8r6MRWlOCZbVuWZcmOMSCd2wCYOwN1ibj8daIoV9naq7aaOZjrLCoCMptKU/4Q== - dependencies: - jest-diff "^24.3.0" - -"@types/node@*": - version "14.10.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.10.0.tgz#15815dff82c8dc30827f6b1286f865902945095a" - integrity sha512-SOIyrdADB4cq6eY1F+9iU48iIomFAPltu11LCvA9PKcyEwHadjCFzNVPotAR+oEJA0bCP4Xvvgy+vwu1ZjVh8g== - -"@types/prop-types@*": - version "15.7.3" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" - integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== - -"@types/react-dom@*": - version "16.9.8" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.8.tgz#fe4c1e11dfc67155733dfa6aa65108b4971cb423" - integrity sha512-ykkPQ+5nFknnlU6lDd947WbQ6TE3NNzbQAkInC2EKY1qeYdTKp7onFusmYZb+ityzx2YviqT6BXSu+LyWWJwcA== - dependencies: - "@types/react" "*" - -"@types/react@*": - version "16.9.49" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.49.tgz#09db021cf8089aba0cdb12a49f8021a69cce4872" - integrity sha512-DtLFjSj0OYAdVLBbyjhuV9CdGVHCkHn2R+xr3XkBvK2rS1Y1tkc14XSGjYgm5Fjjr90AxH9tiSzc1pCFMGO06g== - dependencies: - "@types/prop-types" "*" - csstype "^3.0.2" - -"@types/testing-library__dom@*", "@types/testing-library__dom@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@types/testing-library__dom/-/testing-library__dom-7.5.0.tgz#e0a00dd766983b1d6e9d10d33e708005ce6ad13e" - integrity sha512-mj1aH4cj3XUpMEgVpognma5kHVtbm6U6cHZmEFzCRiXPvKkuHrFr3+yXdGLXvfFRBaQIVshPGHI+hGTOJlhS/g== - dependencies: - "@testing-library/dom" "*" - -"@types/testing-library__dom@^6.12.1": - version "6.14.0" - resolved "https://registry.yarnpkg.com/@types/testing-library__dom/-/testing-library__dom-6.14.0.tgz#1aede831cb4ed4a398448df5a2c54b54a365644e" - integrity sha512-sMl7OSv0AvMOqn1UJ6j1unPMIHRXen0Ita1ujnMX912rrOcawe4f7wu0Zt9GIQhBhJvH2BaibqFgQ3lP+Pj2hA== - dependencies: - pretty-format "^24.3.0" - -"@types/testing-library__react@^9.1.2": - version "9.1.3" - resolved "https://registry.yarnpkg.com/@types/testing-library__react/-/testing-library__react-9.1.3.tgz#35eca61cc6ea923543796f16034882a1603d7302" - integrity sha512-iCdNPKU3IsYwRK9JieSYAiX0+aYDXOGAmrC/3/M7AqqSDKnWWVv07X+Zk1uFSL7cMTUYzv4lQRfohucEocn5/w== - dependencies: - "@types/react-dom" "*" - "@types/testing-library__dom" "*" - pretty-format "^25.1.0" - -"@types/uuid@^8.3.0": - version "8.3.0" - resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.0.tgz#215c231dff736d5ba92410e6d602050cce7e273f" - integrity sha512-eQ9qFW/fhfGJF8WKHGEHZEyVWfZxrT+6CLIJGBcZPfxUh/+BnEj+UCGYMlr9qZuX/2AltsvwrGqp0LhEW8D0zQ== - -"@types/yargs-parser@*": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d" - integrity sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw== - -"@types/yargs@^13.0.0": - version "13.0.10" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-13.0.10.tgz#e77bf3fc73c781d48c2eb541f87c453e321e5f4b" - integrity sha512-MU10TSgzNABgdzKvQVW1nuuT+sgBMWeXNc3XOs5YXV5SDAK+PPja2eUuBNB9iqElu03xyEDqlnGw0jgl4nbqGQ== - dependencies: - "@types/yargs-parser" "*" - -"@types/yargs@^15.0.0": - version "15.0.5" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.5.tgz#947e9a6561483bdee9adffc983e91a6902af8b79" - integrity sha512-Dk/IDOPtOgubt/IaevIUbTgV7doaKkoorvOyYM2CMwuDyP89bekI7H4xLIwunNYiK9jhCkmc6pUrJk3cj2AB9w== - dependencies: - "@types/yargs-parser" "*" - -ansi-regex@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" - integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== - -ansi-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" - integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== - -ansi-styles@^3.2.0, ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" - integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== - dependencies: - "@types/color-name" "^1.1.1" - color-convert "^2.0.1" - -aria-query@^4.0.2, aria-query@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-4.2.2.tgz#0d2ca6c9aceb56b8977e9fed6aed7e15bbd2f83b" - integrity sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA== - dependencies: - "@babel/runtime" "^7.10.2" - "@babel/runtime-corejs3" "^7.10.2" - -atob@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^4.0.0, chalk@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" - integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -core-js-pure@^3.0.0: - version "3.6.5" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.6.5.tgz#c79e75f5e38dbc85a662d91eea52b8256d53b813" - integrity sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA== - -css.escape@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb" - integrity sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s= - -css@^2.2.3: - version "2.2.4" - resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929" - integrity sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw== - dependencies: - inherits "^2.0.3" - source-map "^0.6.1" - source-map-resolve "^0.5.2" - urix "^0.1.0" - -csstype@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.3.tgz#2b410bbeba38ba9633353aff34b05d9755d065f8" - integrity sha512-jPl+wbWPOWJ7SXsWyqGRk3lGecbar0Cb0OvZF/r/ZU011R4YqiRehgkQ9p4eQfo9DSDLqLL3wHwfxeJiuIsNag== - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - -diff-sequences@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-24.9.0.tgz#5715d6244e2aa65f48bba0bc972db0b0b11e95b5" - integrity sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew== - -dom-accessibility-api@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.3.0.tgz#511e5993dd673b97c87ea47dba0e3892f7e0c983" - integrity sha512-PzwHEmsRP3IGY4gv/Ug+rMeaTIyTJvadCb+ujYXYeIylbHJezIyNToe8KfEgHTCEYyC+/bUghYOGg8yMGlZ6vA== - -dom-accessibility-api@^0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.2.tgz#ef3cdb5d3f0d599d8f9c8b18df2fb63c9793739d" - integrity sha512-k7hRNKAiPJXD2aBqfahSo4/01cTsKWXf+LqJgglnkN2Nz8TsxXKQBXHhKe0Ye9fEfHEZY49uSA5Sr3AqP/sWKA== - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -glob@^7.1.3: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -jest-diff@^24.0.0, jest-diff@^24.3.0, jest-diff@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-24.9.0.tgz#931b7d0d5778a1baf7452cb816e325e3724055da" - integrity sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ== - dependencies: - chalk "^2.0.1" - diff-sequences "^24.9.0" - jest-get-type "^24.9.0" - pretty-format "^24.9.0" - -jest-get-type@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-24.9.0.tgz#1684a0c8a50f2e4901b6644ae861f579eed2ef0e" - integrity sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q== - -jest-matcher-utils@^24.0.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz#f5b3661d5e628dffe6dd65251dfdae0e87c3a073" - integrity sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA== - dependencies: - chalk "^2.0.1" - jest-diff "^24.9.0" - jest-get-type "^24.9.0" - pretty-format "^24.9.0" - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -lodash@^4.17.11: - version "4.17.20" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" - integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== - -min-indent@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" - integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== - -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -pretty-format@^24.0.0, pretty-format@^24.3.0, pretty-format@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9" - integrity sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA== - dependencies: - "@jest/types" "^24.9.0" - ansi-regex "^4.0.0" - ansi-styles "^3.2.0" - react-is "^16.8.4" - -pretty-format@^25.1.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.5.0.tgz#7873c1d774f682c34b8d48b6743a2bf2ac55791a" - integrity sha512-kbo/kq2LQ/A/is0PQwsEHM7Ca6//bGPPvU6UnsdDRSKTWxT/ru/xb88v4BJf6a69H+uTytOEsTusT9ksd/1iWQ== - dependencies: - "@jest/types" "^25.5.0" - ansi-regex "^5.0.0" - ansi-styles "^4.0.0" - react-is "^16.12.0" - -pretty-format@^26.4.2: - version "26.4.2" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.4.2.tgz#d081d032b398e801e2012af2df1214ef75a81237" - integrity sha512-zK6Gd8zDsEiVydOCGLkoBoZuqv8VTiHyAbKznXe/gaph/DAeZOmit9yMfgIz5adIgAMMs5XfoYSwAX3jcCO1tA== - dependencies: - "@jest/types" "^26.3.0" - ansi-regex "^5.0.0" - ansi-styles "^4.0.0" - react-is "^16.12.0" - -react-is@^16.12.0, react-is@^16.8.4: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== - -redent@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" - integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg== - dependencies: - indent-string "^4.0.0" - strip-indent "^3.0.0" - -regenerator-runtime@^0.13.4: - version "0.13.7" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" - integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -source-map-resolve@^0.5.2: - version "0.5.3" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" - integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== - dependencies: - atob "^2.1.2" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= - -source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -strip-indent@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" - integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== - dependencies: - min-indent "^1.0.0" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -typescript@^3.9.7: - version "3.9.7" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" - integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - -uuid@^8.3.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.0.tgz#ab738085ca22dc9a8c92725e459b1d507df5d6ea" - integrity sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ== - -wait-for-expect@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/wait-for-expect/-/wait-for-expect-3.0.2.tgz#d2f14b2f7b778c9b82144109c8fa89ceaadaa463" - integrity sha512-cfS1+DZxuav1aBYbaO/kE06EOS8yRw7qOFoD3XtjTkYvCvh3zUvNST8DXK/nPaeqIzIv3P3kL3lRJn8iwOiSag== - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= diff --git a/yarn.lock b/yarn.lock index 01aa0632..a7ddefb1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,24 +10,23 @@ "@babel/highlight" "^7.10.4" "@babel/core@^7.1.0", "@babel/core@^7.7.5": - version "7.12.9" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.9.tgz#fd450c4ec10cdbb980e2928b7aa7a28484593fc8" - integrity sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ== + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.10.tgz#b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd" + integrity sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w== dependencies: "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.5" + "@babel/generator" "^7.12.10" "@babel/helper-module-transforms" "^7.12.1" "@babel/helpers" "^7.12.5" - "@babel/parser" "^7.12.7" + "@babel/parser" "^7.12.10" "@babel/template" "^7.12.7" - "@babel/traverse" "^7.12.9" - "@babel/types" "^7.12.7" + "@babel/traverse" "^7.12.10" + "@babel/types" "^7.12.10" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" json5 "^2.1.2" lodash "^4.17.19" - resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" @@ -40,15 +39,6 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/generator@^7.12.5": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.5.tgz#a2c50de5c8b6d708ab95be5e6053936c1884a4de" - integrity sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A== - dependencies: - "@babel/types" "^7.12.5" - jsesc "^2.5.1" - source-map "^0.5.0" - "@babel/helper-function-name@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a" @@ -59,11 +49,11 @@ "@babel/types" "^7.10.4" "@babel/helper-get-function-arity@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2" - integrity sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A== + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz#b158817a3165b5faa2047825dfa61970ddcc16cf" + integrity sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag== dependencies: - "@babel/types" "^7.10.4" + "@babel/types" "^7.12.10" "@babel/helper-member-expression-to-functions@^7.12.1": version "7.12.7" @@ -95,11 +85,11 @@ lodash "^4.17.19" "@babel/helper-optimise-call-expression@^7.10.4": - version "7.12.7" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.7.tgz#7f94ae5e08721a49467346aa04fd22f750033b9c" - integrity sha512-I5xc9oSJ2h59OwyUqjv95HRyzxj53DAubUERgQMrpcCEYQyToeHA+NEcUEsVWB4j53RDeskeBJ0SgRAYHDBckw== + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.10.tgz#94ca4e306ee11a7dd6e9f42823e2ac6b49881e2d" + integrity sha512-4tpbU0SrSTjjt65UMWSrUOPZTsgvPgGG4S8QSTNHacKzpS51IVWGDj0yCwyeZND/i+LSN2g/O63jEXEWm49sYQ== dependencies: - "@babel/types" "^7.12.7" + "@babel/types" "^7.12.10" "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0": version "7.10.4" @@ -153,12 +143,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.12.7": - version "7.12.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.7.tgz#fee7b39fe809d0e73e5b25eecaf5780ef3d73056" - integrity sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg== - -"@babel/parser@^7.12.10", "@babel/parser@^7.7.0": +"@babel/parser@^7.1.0", "@babel/parser@^7.12.10", "@babel/parser@^7.12.7", "@babel/parser@^7.7.0": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.10.tgz#824600d59e96aea26a5a2af5a9d812af05c3ae81" integrity sha512-PJdRPwyoOqFAWfLytxrWwGrAxghCgh/yTNCYciOz8QgjflA7aZhECPZAa2VUedKg2+QMWkI0L9lynh2SNmNEgA== @@ -271,22 +256,7 @@ "@babel/parser" "^7.12.7" "@babel/types" "^7.12.7" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.5", "@babel/traverse@^7.12.9": - version "7.12.9" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.9.tgz#fad26c972eabbc11350e0b695978de6cc8e8596f" - integrity sha512-iX9ajqnLdoU1s1nHt36JDI9KG4k+vmI8WgjK5d+aDTwQbL2fUnzedNedssA645Ede3PM2ma1n8Q4h2ohwXgMXw== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.5" - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/parser" "^7.12.7" - "@babel/types" "^7.12.7" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.19" - -"@babel/traverse@^7.7.0": +"@babel/traverse@^7.1.0", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5", "@babel/traverse@^7.7.0": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.10.tgz#2d1f4041e8bf42ea099e5b2dc48d6a594c00017a" integrity sha512-6aEtf0IeRgbYWzta29lePeYSk+YAFIC3kyqESeft8o5CkFlYIMX+EQDDWEiAQ9LHOA3d0oHdgrSsID/CKqXJlg== @@ -301,16 +271,7 @@ globals "^11.1.0" lodash "^4.17.19" -"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.5", "@babel/types@^7.12.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.12.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.7.tgz#6039ff1e242640a29452c9ae572162ec9a8f5d13" - integrity sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ== - dependencies: - "@babel/helper-validator-identifier" "^7.10.4" - lodash "^4.17.19" - to-fast-properties "^2.0.0" - -"@babel/types@^7.12.10", "@babel/types@^7.7.0": +"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.5", "@babel/types@^7.12.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.7.0": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.10.tgz#7965e4a7260b26f09c56bcfcb0498af1f6d9b260" integrity sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw== @@ -509,11 +470,6 @@ unique-filename "^1.1.1" which "^1.3.1" -"@gnosis.pm/safe-apps-sdk@0.4.1": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-apps-sdk/-/safe-apps-sdk-0.4.1.tgz#c3a8f1957d11b243329ebcb7a47823fc10ff8595" - integrity sha512-dteNaqGrtaGQ2uLKfiDvf23nfvhg6IJqPjIwqNUz3qZzlxUHCC14eCNHdXFeDXHs8uCB02sUcIWCbroblAGxVQ== - "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -1430,21 +1386,26 @@ fastq "^1.6.0" "@octokit/auth-token@^2.4.0": - version "2.4.3" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.3.tgz#b868b5f2366533a7e62933eaa1181a8924228cc4" - integrity sha512-fdGoOQ3kQJh+hrilc0Plg50xSfaCKOeYN9t6dpJKXN9BxhhfquL0OzoQXg3spLYymL5rm29uPeI3KEXRaZQ9zg== + version "2.4.4" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.4.tgz#ee31c69b01d0378c12fd3ffe406030f3d94d3b56" + integrity sha512-LNfGu3Ro9uFAYh10MUZVaT7X2CnNm2C8IDQmabx+3DygYIQjs9FwzFAHN/0t6mu5HEPhxcb1XOuxdpY82vCg2Q== dependencies: - "@octokit/types" "^5.0.0" + "@octokit/types" "^6.0.0" "@octokit/endpoint@^6.0.1": - version "6.0.9" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.9.tgz#c6a772e024202b1bd19ab69f90e0536a2598b13e" - integrity sha512-3VPLbcCuqji4IFTclNUtGdp9v7g+nspWdiCUbK3+iPMjJCZ6LEhn1ts626bWLOn0GiDb6j+uqGvPpqLnY7pBgw== + version "6.0.10" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.10.tgz#741ce1fa2f4fb77ce8ebe0c6eaf5ce63f565f8e8" + integrity sha512-9+Xef8nT7OKZglfkOMm7IL6VwxXUQyR7DUSU0LH/F7VNqs8vyd7es5pTfz9E7DwUIx7R3pGscxu1EBhYljyu7Q== dependencies: - "@octokit/types" "^5.0.0" + "@octokit/types" "^6.0.0" is-plain-object "^5.0.0" universal-user-agent "^6.0.0" +"@octokit/openapi-types@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-2.0.0.tgz#6d8f8ad9db3b75a39115f5def2654df8bed39f28" + integrity sha512-J4bfM7lf8oZvEAdpS71oTvC1ofKxfEZgU5vKVwzZKi4QPiL82udjpseJwxPid9Pu2FNmyRQOX4iEj6W1iOSnPw== + "@octokit/plugin-enterprise-rest@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz#e07896739618dab8da7d4077c658003775f95437" @@ -1480,22 +1441,22 @@ once "^1.4.0" "@octokit/request-error@^2.0.0": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.3.tgz#b51b200052bf483f6fa56c9e7e3aa51ead36ecd8" - integrity sha512-GgD5z8Btm301i2zfvJLk/mkhvGCdjQ7wT8xF9ov5noQY8WbKZDH9cOBqXzoeKd1mLr1xH2FwbtGso135zGBgTA== + version "2.0.4" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.4.tgz#07dd5c0521d2ee975201274c472a127917741262" + integrity sha512-LjkSiTbsxIErBiRh5wSZvpZqT4t0/c9+4dOe0PII+6jXR+oj/h66s7E4a/MghV7iT8W9ffoQ5Skoxzs96+gBPA== dependencies: - "@octokit/types" "^5.0.1" + "@octokit/types" "^6.0.0" deprecation "^2.0.0" once "^1.4.0" "@octokit/request@^5.2.0": - version "5.4.10" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.10.tgz#402d2c53768bde12b99348329ba4129746aebb9c" - integrity sha512-egA49HkqEORVGDZGav1mh+VD+7uLgOxtn5oODj6guJk0HCy+YBSYapFkSLFgeYj3Fr18ZULKGURkjyhkAChylw== + version "5.4.12" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.12.tgz#b04826fa934670c56b135a81447be2c1723a2ffc" + integrity sha512-MvWYdxengUWTGFpfpefBBpVmmEYfkwMoxonIB3sUGp5rhdgwjXL1ejo6JbgzG/QD9B/NYt/9cJX1pxXeSIUCkg== dependencies: "@octokit/endpoint" "^6.0.1" "@octokit/request-error" "^2.0.0" - "@octokit/types" "^5.0.0" + "@octokit/types" "^6.0.3" deprecation "^2.0.0" is-plain-object "^5.0.0" node-fetch "^2.6.1" @@ -1531,11 +1492,12 @@ dependencies: "@types/node" ">= 8" -"@octokit/types@^5.0.0", "@octokit/types@^5.0.1": - version "5.5.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.5.0.tgz#e5f06e8db21246ca102aa28444cdb13ae17a139b" - integrity sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ== +"@octokit/types@^6.0.0", "@octokit/types@^6.0.3": + version "6.1.1" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.1.1.tgz#bc88b3eb5f447b025a2a1a8177a72db216e8d4ca" + integrity sha512-btm3D6S7VkRrgyYF31etUtVY/eQ1KzrNRqhFt25KSe2mKlXuLXJilglRC6eDA2P6ou94BUnk/Kz5MPEolXgoiw== dependencies: + "@octokit/openapi-types" "^2.0.0" "@types/node" ">= 8" "@sinonjs/commons@^1.7.0": @@ -1579,9 +1541,9 @@ "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": - version "7.0.16" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.16.tgz#0bbbf70c7bc4193210dd27e252c51260a37cd6a7" - integrity sha512-S63Dt4CZOkuTmpLGGWtT/mQdVORJOpx6SZWGVaP56dda/0Nx5nEe82K7/LAm8zYr6SfMq+1N2OreIOrHAx656w== + version "7.11.0" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.11.0.tgz#b9a1efa635201ba9bc850323a8793ee2d36c04a0" + integrity sha512-kSjgDMZONiIfSH1Nxcr5JIRMwUetDki63FSQfpTCz8ogF3Ulqm8+mr5f78dUYs6vMiB6gBusQqfQmBvHZj/lwg== dependencies: "@babel/types" "^7.3.0" @@ -1635,9 +1597,9 @@ "@types/istanbul-lib-report" "*" "@types/jest@26.x", "@types/jest@^26.0.15": - version "26.0.15" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.15.tgz#12e02c0372ad0548e07b9f4e19132b834cb1effe" - integrity sha512-s2VMReFXRg9XXxV+CW9e5Nz8fH2K1aEhwgjUqPPbQd7g95T0laAcvLv032EhFHIa5GHsZ8W7iJEQVaJq6k3Gog== + version "26.0.18" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.18.tgz#3c5f9228e9ac15bd42f903f1acf2ad6ea5ed73d9" + integrity sha512-scDPs+mELZgsFetTgBSsIxKGrlitn9t/d2ecP+S1QSIGD+31fkMBEftLfOAX5k3tU06/0PjreJIQ+gWEbbHqpw== dependencies: jest-diff "^26.0.0" pretty-format "^26.0.0" @@ -1670,14 +1632,14 @@ integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg== "@types/node@*", "@types/node@>= 8", "@types/node@^14.14.8": - version "14.14.10" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.10.tgz#5958a82e41863cfc71f2307b3748e3491ba03785" - integrity sha512-J32dgx2hw8vXrSbu4ZlVhn1Nm3GbeCFNw2FWL8S5QKucHGY0cyNwjdQdO+KMBZ4wpmC7KhLCiNsdk1RFRIYUQQ== + version "14.14.12" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.12.tgz#0b1d86f8c40141091285dea02e4940df73bba43f" + integrity sha512-ASH8OPHMNlkdjrEdmoILmzFfsJICvhBsFfAum4aKZ/9U4B6M6tTmTPh+f3ttWdD74CEGV5XvXWkbyfSdXaTd7g== "@types/node@^12.12.6": - version "12.19.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.7.tgz#cf8b6ac088dd9182ac9a1d765f787a8d12490c04" - integrity sha512-zvjOU1g4CpPilbTDUATnZCUb/6lARMRAqzT7ILwl1P3YvU2leEcZ2+fw9+Jrw/paXB1CgQyXTrN4hWDtqT9O2A== + version "12.19.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.8.tgz#efd6d1a90525519fc608c9db16c8a78f7693a978" + integrity sha512-D4k2kNi0URNBxIRCb1khTnkWNHv8KSL1owPmS/K5e5t8B2GzMReY7AsJIY1BnP5KdlgC4rj9jk2IkDMasIE7xg== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -1742,9 +1704,9 @@ "@types/yargs-parser" "*" "@types/yargs@^15.0.0": - version "15.0.10" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.10.tgz#0fe3c8173a0d5c3e780b389050140c3f5ea6ea74" - integrity sha512-z8PNtlhrj7eJNLmrAivM7rjBESG6JwC5xP3RVk12i/8HVP7Xnx/sEmERnRImyEuUaJfO942X0qMOYsoupaJbZQ== + version "15.0.11" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.11.tgz#361d7579ecdac1527687bcebf9946621c12ab78c" + integrity sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA== dependencies: "@types/yargs-parser" "*" @@ -1853,7 +1815,7 @@ acorn-globals@^6.0.0: acorn "^7.1.1" acorn-walk "^7.1.1" -acorn-jsx@^5.2.0, acorn-jsx@^5.3.1: +acorn-jsx@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== @@ -3322,7 +3284,7 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.17.0-next.1, es-abstract@^1.17.5: +es-abstract@^1.17.0-next.1: version "1.17.7" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.7.tgz#a4de61b2f66989fc7421676c1cb9787573ace54c" integrity sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g== @@ -3595,16 +3557,7 @@ eslint@7.15.0, eslint@^7.5.0: text-table "^0.2.0" v8-compile-cache "^2.0.3" -espree@^7.3.0: - version "7.3.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.0.tgz#dc30437cf67947cf576121ebd780f15eeac72348" - integrity sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw== - dependencies: - acorn "^7.4.0" - acorn-jsx "^5.2.0" - eslint-visitor-keys "^1.3.0" - -espree@^7.3.1: +espree@^7.3.0, espree@^7.3.1: version "7.3.1" resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== @@ -4219,13 +4172,13 @@ glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" -global@~4.3.0: - version "4.3.2" - resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" - integrity sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8= +global@~4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" + integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== dependencies: min-document "^2.19.0" - process "~0.5.1" + process "^0.11.10" globals@^11.1.0: version "11.12.0" @@ -4452,9 +4405,9 @@ humanize-ms@^1.2.1: ms "^2.0.0" husky@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.0.tgz#0b2ec1d66424e9219d359e26a51c58ec5278f0de" - integrity sha512-tTMeLCLqSBqnflBZnlVDhpaIMucSGaYyX6855jM4AguGeWCeSzNdb1mfyWduTZ3pe3SJVvVWGL0jO1iKZVPfTA== + version "4.3.5" + resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.5.tgz#ab8d2a0eb6b62fef2853ee3d442c927d89290902" + integrity sha512-E5S/1HMoDDaqsH8kDF5zeKEQbYqe3wL9zJDyqyYqc8I4vHBtAoxkDBGXox0lZ9RI+k5GyB728vZdmnM4bYap+g== dependencies: chalk "^4.0.0" ci-info "^2.0.0" @@ -4576,9 +4529,9 @@ inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== ini@^1.3.2, ini@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + version "1.3.7" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84" + integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ== init-package-json@^1.10.3: version "1.10.3" @@ -4669,9 +4622,9 @@ is-ci@^2.0.0: ci-info "^2.0.0" is-core-module@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.1.0.tgz#a4cc031d9b1aca63eecbd18a650e13cb4eeab946" - integrity sha512-YcV7BgVMRFRua2FqQzKtTDMz8iCuLEyGKjr70q8Zm1yy2qKcurbFEd79PAdHV77oL3NrAaOVQIbMmiHQCHB7ZA== + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" + integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== dependencies: has "^1.0.3" @@ -4791,9 +4744,9 @@ is-hex-prefixed@1.0.0: integrity sha1-fY035q135dEnFIkTxXPggtd39VQ= is-negative-zero@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.0.tgz#9553b121b0fac28869da9ed459e20c7543788461" - integrity sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE= + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== is-number@^3.0.0: version "3.0.0" @@ -5381,9 +5334,9 @@ js-sha3@^0.8.0: integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -5596,9 +5549,9 @@ lines-and-columns@^1.1.6: integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= lint-staged@^10.5.1: - version "10.5.2" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.5.2.tgz#acfaa0093af3262aee3130b2e22438941530bdd1" - integrity sha512-e8AYR1TDlzwB8VVd38Xu2lXDZf6BcshVqKVuBQThDJRaJLobqKnpbm4dkwJ2puypQNbLr9KF/9mfA649mAGvjA== + version "10.5.3" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.5.3.tgz#c682838b3eadd4c864d1022da05daa0912fb1da5" + integrity sha512-TanwFfuqUBLufxCc3RUtFEkFraSPNR3WzWcGF39R3f2J7S9+iF9W0KTVLfSy09lYGmZS5NDCxjNvhGMSJyFCWg== dependencies: chalk "^4.1.0" cli-truncate "^2.1.0" @@ -5617,9 +5570,9 @@ lint-staged@^10.5.1: stringify-object "^3.3.0" listr2@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.2.2.tgz#d20feb75015e506992b55af40722ba1af168b8f1" - integrity sha512-AajqcZEUikF2ioph6PfH3dIuxJclhr3i3kHgTOP0xeXdWQohrvJAAmqVcV43/GI987HFY/vzT73jYXoa4esDHg== + version "3.2.3" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.2.3.tgz#ef9e0d790862f038dde8a9837be552b1adfd1c07" + integrity sha512-vUb80S2dSUi8YxXahO8/I/s29GqnOL8ozgHVLjfWQXa03BNEeS1TpBLjh2ruaqq5ufx46BRGvfymdBSuoXET5w== dependencies: chalk "^4.1.0" cli-truncate "^2.1.0" @@ -6127,11 +6080,16 @@ ms@2.0.0: resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= -ms@2.1.2, ms@^2.0.0, ms@^2.1.1: +ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.0.0, ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + multimatch@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-3.0.0.tgz#0e2534cc6bc238d9ab67e1b9cd5fcd85a6dbf70b" @@ -6417,9 +6375,9 @@ object-copy@^0.1.0: kind-of "^3.0.3" object-inspect@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" - integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== + version "1.9.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.9.0.tgz#c90521d74e1127b67266ded3394ad6116986533a" + integrity sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw== object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" @@ -6444,31 +6402,33 @@ object.assign@^4.1.1: object-keys "^1.1.1" object.entries@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.2.tgz#bc73f00acb6b6bb16c203434b10f9a7e797d3add" - integrity sha512-BQdB9qKmb/HyNdMNWVr7O3+z5MUIx3aiegEIJqjMBbBf0YT9RRxTJSim4mzFqtyr7PDAHigq0N9dO0m0tRakQA== + version "1.1.3" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.3.tgz#c601c7f168b62374541a07ddbd3e2d5e4f7711a6" + integrity sha512-ym7h7OZebNS96hn5IJeyUmaWhaSM4SVtAPPfNLQEI2MYWCO2egsITb9nab2+i/Pwibx+R0mtn+ltKJXRSeTMGg== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.17.5" + es-abstract "^1.18.0-next.1" has "^1.0.3" object.fromentries@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.2.tgz#4a09c9b9bb3843dd0f89acdb517a794d4f355ac9" - integrity sha512-r3ZiBH7MQppDJVLx6fhD618GKNG40CZYH9wgwdhKxBDDbQgjeWGGd4AtkZad84d291YxvWe7bJGuE65Anh0dxQ== + version "2.0.3" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.3.tgz#13cefcffa702dc67750314a3305e8cb3fad1d072" + integrity sha512-IDUSMXs6LOSJBWE++L0lzIbSqHl9KDCfff2x/JSEIDtEUavUnyMYC2ZGay/04Zq4UT8lvd4xNhU4/YHKibAOlw== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - function-bind "^1.1.1" + es-abstract "^1.18.0-next.1" has "^1.0.3" object.getownpropertydescriptors@^2.0.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" - integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== + version "2.1.1" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.1.tgz#0dfda8d108074d9c563e80490c883b6661091544" + integrity sha512-6DtXgZ/lIZ9hqx4GtZETobXLR/ZLaa0aqV0kzbn80Rf8Z2e/XFnhA0I7p07N2wH8bBBltr2xQPi6sbKWAY2Eng== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" + es-abstract "^1.18.0-next.1" object.pick@^1.3.0: version "1.3.0" @@ -6478,13 +6438,13 @@ object.pick@^1.3.0: isobject "^3.0.1" object.values@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" - integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== + version "1.1.2" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.2.tgz#7a2015e06fcb0f546bd652486ce8583a4731c731" + integrity sha512-MYC0jvJopr8EK6dPBiO8Nb9mvjdypOachO5REGk6MXzujbBrAisKo3HmdEI6kZDL6fC31Mwee/5YbtMebixeag== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - function-bind "^1.1.1" + es-abstract "^1.18.0-next.1" has "^1.0.3" oboe@2.1.5: @@ -6917,9 +6877,9 @@ prettier-linter-helpers@^1.0.0: fast-diff "^1.1.2" prettier@^2.1.2: - version "2.2.0" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.0.tgz#8a03c7777883b29b37fb2c4348c66a78e980418b" - integrity sha512-yYerpkvseM4iKD/BXLYUkQV5aKt4tQPqaGW6EsZjzyu0r7sVZZNPJW4Y8MyKmicp6t42XUPcBVA+H6sB3gqndw== + version "2.2.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" + integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== pretty-format@^24.9.0: version "24.9.0" @@ -6946,10 +6906,10 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -process@~0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" - integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8= +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= progress@^2.0.0: version "2.0.3" @@ -7384,7 +7344,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.3.2: +resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.18.1: version "1.19.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== @@ -7526,9 +7486,11 @@ semver-regex@^2.0.0: integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== semver@7.x, semver@^7.2.1, semver@^7.3.2: - version "7.3.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" - integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== + version "7.3.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: version "6.3.0" @@ -7779,9 +7741,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.6" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz#c80757383c28abf7296744998cbc106ae8b854ce" - integrity sha512-+orQK83kyMva3WyPf59k1+Y525csj5JejicWut55zeTWANuN17qSiSLUXWtzHeNWORSvT7GLDJ/E/XiIWoXBTw== + version "3.0.7" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz#e9c18a410e5ed7e12442a549fbd8afa767038d65" + integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ== split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" @@ -8438,9 +8400,9 @@ typescript@^4.0.5, typescript@~4.1.2: integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ== uglify-js@^3.1.4: - version "3.12.0" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.12.0.tgz#b943f129275c41d435eb54b643bbffee71dccf57" - integrity sha512-8lBMSkFZuAK7gGF8LswsXmir8eX8d2AAMOnxSDWjKBx/fBR6MypQjs78m6ML9zQVp1/hD4TBdfeMZMC7nW1TAA== + version "3.12.1" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.12.1.tgz#78307f539f7b9ca5557babb186ea78ad30cc0375" + integrity sha512-o8lHP20KjIiQe5b/67Rh68xEGRrc2SRsCuuoYclXXoC74AfSRGblU1HKzJWH3HxPZ+Ort85fWHpSX7KwBUC9CQ== uid-number@0.0.6: version "0.0.6" @@ -8563,9 +8525,9 @@ uuid@^3.0.1, uuid@^3.3.2: integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== uuid@^8.3.0: - version "8.3.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.1.tgz#2ba2e6ca000da60fce5a196954ab241131e05a31" - integrity sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg== + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== v8-compile-cache@^2.0.3: version "2.2.0" @@ -8759,9 +8721,9 @@ webidl-conversions@^6.1.0: integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== websocket@^1.0.32: - version "1.0.32" - resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.32.tgz#1f16ddab3a21a2d929dec1687ab21cfdc6d3dbb1" - integrity sha512-i4yhcllSP4wrpoPMU2N0TQ/q0O94LRG/eUQjEAamRltjQ1oT1PFFKOG4i877OlJgCG8rw6LrrowJp+TYCEWF7Q== + version "1.0.33" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.33.tgz#407f763fc58e74a3fa41ca3ae5d78d3f5e3b82a5" + integrity sha512-XwNqM2rN5eh3G2CUQE3OHZj+0xfdH42+OFK6LdC2yqiC0YU8e5UK0nYre220T0IyyN031V/XOvtHvXozvJYFWA== dependencies: bufferutil "^4.0.1" debug "^2.2.0" @@ -8923,9 +8885,9 @@ write-pkg@^3.1.0: write-json-file "^2.2.0" ws@^7.2.3: - version "7.4.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.0.tgz#a5dd76a24197940d4a8bb9e0e152bb4503764da7" - integrity sha512-kyFwXuV/5ymf+IXhS6f0+eAFvydbaBW3zjpT6hUdAh/hbVjTIB5EHBGi0bPoCLSK2wcuz3BrEkB9LrYv1Nm4NQ== + version "7.4.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.1.tgz#a333be02696bd0e54cea0434e21dcc8a9ac294bb" + integrity sha512-pTsP8UAfhy3sk1lSk/O/s4tjD0CRwvMnzvwr4OKGX7ZvqZtUyx4KIJB5JWbkykPoc55tixMGgTNoh3k4FkNGFQ== xhr-request-promise@^0.1.2: version "0.1.3" @@ -8955,11 +8917,11 @@ xhr2-cookies@1.1.0: cookiejar "^2.1.1" xhr@^2.0.4: - version "2.5.0" - resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.5.0.tgz#bed8d1676d5ca36108667692b74b316c496e49dd" - integrity sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ== + version "2.6.0" + resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d" + integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== dependencies: - global "~4.3.0" + global "~4.4.0" is-function "^1.0.1" parse-headers "^2.0.0" xtend "^4.0.0" @@ -8980,9 +8942,9 @@ xtend@^4.0.0, xtend@~4.0.1: integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== y18n@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" - integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + version "4.0.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" + integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== yaeti@^0.0.6: version "0.0.6" From 735c0af266f4388970abd19dcf68cb5146490b32 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Mon, 14 Dec 2020 15:29:16 +0400 Subject: [PATCH 02/18] react sdk updates --- package.json | 3 +- packages/safe-apps-react-sdk/package.json | 2 +- packages/safe-apps-react-sdk/src/index.tsx | 26 ++++--- packages/safe-apps-react-sdk/src/safe.tsx | 85 ---------------------- packages/safe-apps-react-sdk/src/sdk.tsx | 5 ++ yarn.lock | 84 ++++----------------- 6 files changed, 36 insertions(+), 169 deletions(-) delete mode 100644 packages/safe-apps-react-sdk/src/safe.tsx create mode 100644 packages/safe-apps-react-sdk/src/sdk.tsx diff --git a/package.json b/package.json index 83f8bfa0..1b0f8f24 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,6 @@ "eslint-plugin-react": "^7.21.5", "eslint-plugin-react-hooks": "^4.2.0", "jest": "^26.6.3", - "ts-jest": "^26.4.4", - "typescript": "~4.1.2" + "ts-jest": "^26.4.4" } } diff --git a/packages/safe-apps-react-sdk/package.json b/packages/safe-apps-react-sdk/package.json index 90eed1d4..43546bb6 100644 --- a/packages/safe-apps-react-sdk/package.json +++ b/packages/safe-apps-react-sdk/package.json @@ -12,7 +12,7 @@ "author": "Gnosis (https://gnosis.pm)", "dependencies": { "@gnosis.pm/safe-apps-sdk": "1.0.0-beta.4", - "@types/jest": "^24.0.0" + "@types/jest": "^26.0.19" }, "peerDependencies": { "@types/node": "^12.0.0", diff --git a/packages/safe-apps-react-sdk/src/index.tsx b/packages/safe-apps-react-sdk/src/index.tsx index 89326f3d..d6c01774 100644 --- a/packages/safe-apps-react-sdk/src/index.tsx +++ b/packages/safe-apps-react-sdk/src/index.tsx @@ -1,30 +1,36 @@ import React, { ReactNode } from 'react'; -import connectSafe, { Safe } from './safe'; +import SafeAppsSDK from '@gnosis.pm/safe-apps-sdk/dist/src/sdk'; +import { safeAppsSDK } from './sdk'; -const SafeContext = React.createContext(undefined); +const SafeContext = React.createContext<[SafeAppsSDK, boolean] | undefined>(undefined); interface Props { loading?: ReactNode; } export const SafeProvider: React.FC = ({ loading, children }) => { - const [safe] = React.useState(connectSafe()); const [connected, setConnected] = React.useState(false); React.useEffect(() => { - safe.activate(() => { - setConnected(safe.isConnected()); - }); + const fetchSafeInfo = async () => { + try { + await safeAppsSDK.getSafeInfo(); + setConnected(true); + } catch (err) { + setConnected(false); + } + }; - return () => safe.deactivate(); - }, [safe]); + fetchSafeInfo(); + }, []); return (
- {connected ? {children} : loading} + {connected ? {children} : loading}
); }; -export const useSafe = (): Safe => { + +export const useSafeAppsSDK = (): [SafeAppsSDK, boolean] => { const value = React.useContext(SafeContext); if (value === undefined) { throw new Error('You probably forgot to put .'); diff --git a/packages/safe-apps-react-sdk/src/safe.tsx b/packages/safe-apps-react-sdk/src/safe.tsx deleted file mode 100644 index f0c4af51..00000000 --- a/packages/safe-apps-react-sdk/src/safe.tsx +++ /dev/null @@ -1,85 +0,0 @@ -import SafeAppsSDK, { - SdkInstance, - Transaction as SDKTransaction, - SafeInfo, - TxServiceModel, -} from '@gnosis.pm/safe-apps-sdk'; - -export type Transaction = SDKTransaction; -export type SafeTransaction = TxServiceModel; - -export interface Safe { - readonly info: SafeInfo; - activate(onSafeInfo: (info: SafeInfo) => void): void; - deactivate(): void; - sendTransactions(txs: Transaction[]): string; - loadSafeTransaction(safeTxHash: string): Promise; - isConnected(): boolean; -} - -class State implements Safe { - _info: SafeInfo | undefined; - sdk: SdkInstance; - - get info(): SafeInfo { - const info = this._info; - if (info === undefined) throw Error('Not connected to a Safe'); - return info; - } - - constructor() { - this.sdk = new SafeAppsSDK(); - } - - activate(onUpdate: (update: any) => void) { - const onSafeInfo = (info: SafeInfo) => { - this._info = info; - console.debug({ info }); - onUpdate({}); - }; - const onTransactionConfirmation = (confirmation: TxConfirmationEvent) => { - console.debug({ confirmation }); - const callback = this.callbacks.get(confirmation.requestId); - if (callback) { - this.callbacks.delete(confirmation.requestId); - callback.confirm(confirmation.safeTxHash); - } - }; - const onTransactionRejection = (rejection: TxRejectionEvent) => { - console.debug({ rejection }); - rejectCallbackWithReason(this.callbacks, rejection.requestId, 'User rejected transaction'); - }; - this.sdk.addListeners({ onSafeInfo, onTransactionConfirmation, onTransactionRejection }); - } - - deactivate() { - this.sdk.removeListeners(); - } - - sendTransactions(txs: Transaction[]): IgnorablePromise { - const requestId = uuidv4(); - const ignore = () => { - this.callbacks.delete(requestId); - }; - const promise = new Promise((confirm, reject) => { - this.callbacks.set(requestId, { confirm, reject }); - this.sdk.sendTransactions(txs, requestId); - }); - const ignorablePromise = Object.assign(promise, { ignore }); - return ignorablePromise; - } - - loadSafeTransaction(safeTxHash: string): Promise { - return this.sdk.txs.getBySafeTxHash(safeTxHash); - } - - isConnected(): boolean { - return this._info !== undefined; - } -} - -const connectSafe = (): Safe => { - return new State(); -}; - -export default connectSafe; diff --git a/packages/safe-apps-react-sdk/src/sdk.tsx b/packages/safe-apps-react-sdk/src/sdk.tsx new file mode 100644 index 00000000..ed33f865 --- /dev/null +++ b/packages/safe-apps-react-sdk/src/sdk.tsx @@ -0,0 +1,5 @@ +import SafeAppsSDK from '@gnosis.pm/safe-apps-sdk'; + +const safeAppsSDK = new SafeAppsSDK(); + +export { safeAppsSDK }; diff --git a/yarn.lock b/yarn.lock index a7ddefb1..065bc6fa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -646,15 +646,6 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/types@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-24.9.0.tgz#63cb26cb7500d069e5a389441a7c6ab5e909fc59" - integrity sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^1.1.1" - "@types/yargs" "^13.0.0" - "@jest/types@^26.6.2": version "26.6.2" resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" @@ -1581,14 +1572,6 @@ dependencies: "@types/istanbul-lib-coverage" "*" -"@types/istanbul-reports@^1.1.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-1.1.2.tgz#e875cc689e47bce549ec81f3df5e6f6f11cfaeb2" - integrity sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw== - dependencies: - "@types/istanbul-lib-coverage" "*" - "@types/istanbul-lib-report" "*" - "@types/istanbul-reports@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz#508b13aa344fa4976234e75dddcc34925737d821" @@ -1604,12 +1587,13 @@ jest-diff "^26.0.0" pretty-format "^26.0.0" -"@types/jest@^24.0.0": - version "24.9.1" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-24.9.1.tgz#02baf9573c78f1b9974a5f36778b366aa77bd534" - integrity sha512-Fb38HkXSVA4L8fGKEZ6le5bB8r6MRWlOCZbVuWZcmOMSCd2wCYOwN1ibj8daIoV9naq7aaOZjrLCoCMptKU/4Q== +"@types/jest@^26.0.19": + version "26.0.19" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.19.tgz#e6fa1e3def5842ec85045bd5210e9bb8289de790" + integrity sha512-jqHoirTG61fee6v6rwbnEuKhpSKih0tuhqeFbCmMmErhtu3BYlOZaXWjffgOstMM4S/3iQD31lI5bGLTrs97yQ== dependencies: - jest-diff "^24.3.0" + jest-diff "^26.0.0" + pretty-format "^26.0.0" "@types/json-schema@^7.0.3": version "7.0.6" @@ -1686,23 +1670,11 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff" integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw== -"@types/uuid@^8.3.0": - version "8.3.0" - resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.0.tgz#215c231dff736d5ba92410e6d602050cce7e273f" - integrity sha512-eQ9qFW/fhfGJF8WKHGEHZEyVWfZxrT+6CLIJGBcZPfxUh/+BnEj+UCGYMlr9qZuX/2AltsvwrGqp0LhEW8D0zQ== - "@types/yargs-parser@*": version "15.0.0" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d" integrity sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw== -"@types/yargs@^13.0.0": - version "13.0.11" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-13.0.11.tgz#def2f0c93e4bdf2c61d7e34899b17e34be28d3b1" - integrity sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ== - dependencies: - "@types/yargs-parser" "*" - "@types/yargs@^15.0.0": version "15.0.11" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.11.tgz#361d7579ecdac1527687bcebf9946621c12ab78c" @@ -1896,7 +1868,7 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= -ansi-regex@^4.0.0, ansi-regex@^4.1.0: +ansi-regex@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== @@ -2479,7 +2451,7 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.3.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -3113,11 +3085,6 @@ dezalgo@^1.0.0: asap "^2.0.0" wrappy "1" -diff-sequences@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-24.9.0.tgz#5715d6244e2aa65f48bba0bc972db0b0b11e95b5" - integrity sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew== - diff-sequences@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1" @@ -3461,9 +3428,9 @@ eslint-plugin-jsx-a11y@^6.3.1: language-tags "^1.0.5" eslint-plugin-prettier@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.2.0.tgz#af391b2226fa0e15c96f36c733f6e9035dbd952c" - integrity sha512-kOUSJnFjAUFKwVxuzy6sA5yyMx6+o9ino4gCdShzBNx4eyFRudWRYKCFolKjoM40PEiuU6Cn7wBLfq3WsGg7qg== + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.0.tgz#61e295349a65688ffac0b7808ef0a8244bdd8d40" + integrity sha512-tMTwO8iUWlSRZIwS9k7/E4vrTsfvsrcM5p1eftyuqWH25nKsz/o6/54I7jwQ/3zobISyC7wMy9ZsFwgTxOcOpQ== dependencies: prettier-linter-helpers "^1.0.0" @@ -4982,16 +4949,6 @@ jest-config@^26.6.3: micromatch "^4.0.2" pretty-format "^26.6.2" -jest-diff@^24.3.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-24.9.0.tgz#931b7d0d5778a1baf7452cb816e325e3724055da" - integrity sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ== - dependencies: - chalk "^2.0.1" - diff-sequences "^24.9.0" - jest-get-type "^24.9.0" - pretty-format "^24.9.0" - jest-diff@^26.0.0, jest-diff@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.2.tgz#1aa7468b52c3a68d7d5c5fdcdfcd5e49bd164394" @@ -5045,11 +5002,6 @@ jest-environment-node@^26.6.2: jest-mock "^26.6.2" jest-util "^26.6.2" -jest-get-type@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-24.9.0.tgz#1684a0c8a50f2e4901b6644ae861f579eed2ef0e" - integrity sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q== - jest-get-type@^26.3.0: version "26.3.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" @@ -6881,16 +6833,6 @@ prettier@^2.1.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== -pretty-format@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9" - integrity sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA== - dependencies: - "@jest/types" "^24.9.0" - ansi-regex "^4.0.0" - ansi-styles "^3.2.0" - react-is "^16.8.4" - pretty-format@^26.0.0, pretty-format@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" @@ -7041,7 +6983,7 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -react-is@^16.8.1, react-is@^16.8.4: +react-is@^16.8.1: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -8394,7 +8336,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^4.0.5, typescript@~4.1.2: +typescript@^4.0.5: version "4.1.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9" integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ== From e9c54bc6747942e343780f673f0904420c796485 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Mon, 14 Dec 2020 17:43:10 +0400 Subject: [PATCH 03/18] react sdk updates --- packages/safe-apps-react-sdk/src/index.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/safe-apps-react-sdk/src/index.tsx b/packages/safe-apps-react-sdk/src/index.tsx index d6c01774..a35cbe7f 100644 --- a/packages/safe-apps-react-sdk/src/index.tsx +++ b/packages/safe-apps-react-sdk/src/index.tsx @@ -1,14 +1,14 @@ -import React, { ReactNode } from 'react'; +import React, { ReactElement } from 'react'; import SafeAppsSDK from '@gnosis.pm/safe-apps-sdk/dist/src/sdk'; import { safeAppsSDK } from './sdk'; const SafeContext = React.createContext<[SafeAppsSDK, boolean] | undefined>(undefined); interface Props { - loading?: ReactNode; + loader?: ReactElement; } -export const SafeProvider: React.FC = ({ loading, children }) => { +export const SafeProvider: React.FC = ({ loader = null, children }) => { const [connected, setConnected] = React.useState(false); React.useEffect(() => { const fetchSafeInfo = async () => { @@ -23,11 +23,11 @@ export const SafeProvider: React.FC = ({ loading, children }) => { fetchSafeInfo(); }, []); - return ( -
- {connected ? {children} : loading} -
- ); + if (!connected) { + return loader; + } + + return {children}; }; export const useSafeAppsSDK = (): [SafeAppsSDK, boolean] => { From 5d6dfbc4a3b4d6d11fc5e2bc0ae77c575aa3fe07 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Mon, 14 Dec 2020 18:19:27 +0400 Subject: [PATCH 04/18] export opts from sdk --- packages/safe-apps-react-sdk/src/index.tsx | 2 +- packages/safe-apps-sdk/package.json | 2 +- packages/safe-apps-sdk/src/sdk.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/safe-apps-react-sdk/src/index.tsx b/packages/safe-apps-react-sdk/src/index.tsx index a35cbe7f..087d6609 100644 --- a/packages/safe-apps-react-sdk/src/index.tsx +++ b/packages/safe-apps-react-sdk/src/index.tsx @@ -1,5 +1,5 @@ import React, { ReactElement } from 'react'; -import SafeAppsSDK from '@gnosis.pm/safe-apps-sdk/dist/src/sdk'; +import SafeAppsSDK, { Opts } from '@gnosis.pm/safe-apps-sdk/dist/src/sdk'; import { safeAppsSDK } from './sdk'; const SafeContext = React.createContext<[SafeAppsSDK, boolean] | undefined>(undefined); diff --git a/packages/safe-apps-sdk/package.json b/packages/safe-apps-sdk/package.json index 9ec83df4..b6b93a72 100644 --- a/packages/safe-apps-sdk/package.json +++ b/packages/safe-apps-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@gnosis.pm/safe-apps-sdk", - "version": "1.0.0-beta.4", + "version": "1.0.0-beta.5", "description": "SDK developed to integrate third-party apps with Safe-Multisig app.", "main": "dist/src/index.js", "typings": "dist/src/index.d.ts", diff --git a/packages/safe-apps-sdk/src/sdk.ts b/packages/safe-apps-sdk/src/sdk.ts index 5b8276ec..b22fcee9 100644 --- a/packages/safe-apps-sdk/src/sdk.ts +++ b/packages/safe-apps-sdk/src/sdk.ts @@ -4,7 +4,7 @@ import InterfaceCommunicator from './communication'; import { TXs } from './txs'; import { Eth } from './eth'; -type Opts = { +export type Opts = { whitelistedDomains?: RegExp[]; }; From c5ced50e9d414a327e5cfc70f93f47821e37a6d3 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Mon, 14 Dec 2020 19:32:03 +0400 Subject: [PATCH 05/18] useSafe -> useSafeAppsSdk, update typescript config --- packages/safe-apps-sdk/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/safe-apps-sdk/package.json b/packages/safe-apps-sdk/package.json index b6b93a72..6710f2c8 100644 --- a/packages/safe-apps-sdk/package.json +++ b/packages/safe-apps-sdk/package.json @@ -34,8 +34,7 @@ "jest": "^26.6.3", "lint-staged": "^10.5.1", "prettier": "^2.1.2", - "rimraf": "^3.0.2", - "typescript": "^4.0.5" + "rimraf": "^3.0.2" }, "peerDependencies": { "web3-core": "^1.3.0" From 4bb63eec56e859afbc419aa0ec884e816899e70f Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Mon, 14 Dec 2020 19:37:52 +0400 Subject: [PATCH 06/18] bump react sdk to beta version --- package.json | 6 ++--- packages/safe-apps-react-sdk/package.json | 4 ++-- packages/safe-apps-react-sdk/src/index.tsx | 27 ++++++++++++---------- packages/safe-apps-react-sdk/tsconfig.json | 11 +++------ tsconfig.json | 3 ++- 5 files changed, 24 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index 1b0f8f24..360f19da 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,6 @@ "packages/*" ] }, - "peerDependencies": { - "react": "^16.8.2" - }, "dependencies": { "lerna": "^3.22.1" }, @@ -30,6 +27,7 @@ "eslint-plugin-react": "^7.21.5", "eslint-plugin-react-hooks": "^4.2.0", "jest": "^26.6.3", - "ts-jest": "^26.4.4" + "ts-jest": "^26.4.4", + "typescript": "^4.0.5" } } diff --git a/packages/safe-apps-react-sdk/package.json b/packages/safe-apps-react-sdk/package.json index 43546bb6..af54bb3b 100644 --- a/packages/safe-apps-react-sdk/package.json +++ b/packages/safe-apps-react-sdk/package.json @@ -1,7 +1,7 @@ { "name": "@gnosis.pm/safe-apps-react-sdk", "private": false, - "version": "0.4.0", + "version": "1.0.0-beta.0", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -11,7 +11,7 @@ ], "author": "Gnosis (https://gnosis.pm)", "dependencies": { - "@gnosis.pm/safe-apps-sdk": "1.0.0-beta.4", + "@gnosis.pm/safe-apps-sdk": "1.0.0-beta.5", "@types/jest": "^26.0.19" }, "peerDependencies": { diff --git a/packages/safe-apps-react-sdk/src/index.tsx b/packages/safe-apps-react-sdk/src/index.tsx index 087d6609..dd246e7f 100644 --- a/packages/safe-apps-react-sdk/src/index.tsx +++ b/packages/safe-apps-react-sdk/src/index.tsx @@ -1,19 +1,20 @@ -import React, { ReactElement } from 'react'; -import SafeAppsSDK, { Opts } from '@gnosis.pm/safe-apps-sdk/dist/src/sdk'; -import { safeAppsSDK } from './sdk'; - -const SafeContext = React.createContext<[SafeAppsSDK, boolean] | undefined>(undefined); +import { createContext, useState, useEffect, useContext, ReactElement } from 'react'; +import SafeAppsSDK, { Opts as SDKOpts } from '@gnosis.pm/safe-apps-sdk/dist/src/sdk'; +const SafeContext = createContext<[SafeAppsSDK, boolean] | undefined>(undefined); interface Props { loader?: ReactElement; + opts?: SDKOpts; } -export const SafeProvider: React.FC = ({ loader = null, children }) => { - const [connected, setConnected] = React.useState(false); - React.useEffect(() => { +export const SafeProvider: React.FC = ({ loader = null, opts, children }) => { + const [sdk] = useState(new SafeAppsSDK(opts)); + const [connected, setConnected] = useState(false); + + useEffect(() => { const fetchSafeInfo = async () => { try { - await safeAppsSDK.getSafeInfo(); + await sdk.getSafeInfo(); setConnected(true); } catch (err) { setConnected(false); @@ -21,20 +22,22 @@ export const SafeProvider: React.FC = ({ loader = null, children }) => { }; fetchSafeInfo(); - }, []); + }, [sdk]); if (!connected) { return loader; } - return {children}; + return {children}; }; export const useSafeAppsSDK = (): [SafeAppsSDK, boolean] => { - const value = React.useContext(SafeContext); + const value = useContext(SafeContext); + if (value === undefined) { throw new Error('You probably forgot to put .'); } + return value; }; diff --git a/packages/safe-apps-react-sdk/tsconfig.json b/packages/safe-apps-react-sdk/tsconfig.json index 8848f4ff..533b860e 100644 --- a/packages/safe-apps-react-sdk/tsconfig.json +++ b/packages/safe-apps-react-sdk/tsconfig.json @@ -15,13 +15,8 @@ "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, "experimentalDecorators": true /* Enables experimental support for ES7 decorators. */, "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, - "jsx": "react" + "jsx": "react-jsx" }, - "include": [ - "src" - ], - "exclude": [ - "node_modules", - "dist" - ] + "include": ["src"], + "exclude": ["node_modules", "dist"] } diff --git a/tsconfig.json b/tsconfig.json index 541f383f..a83ac5b5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,7 +15,8 @@ "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, "experimentalDecorators": true /* Enables experimental support for ES7 decorators. */, "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, - "resolveJsonModule": true + "resolveJsonModule": true, + "jsx": "react-jsx" }, "exclude": ["dist", "node_modules"] } From 18127ffcc8d8605a7754ae442846e6a5cc638fe9 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Mon, 14 Dec 2020 23:13:05 +0400 Subject: [PATCH 07/18] set target to es6 --- packages/safe-apps-react-sdk/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/safe-apps-react-sdk/tsconfig.json b/packages/safe-apps-react-sdk/tsconfig.json index 533b860e..f886083d 100644 --- a/packages/safe-apps-react-sdk/tsconfig.json +++ b/packages/safe-apps-react-sdk/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, + "target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, "lib": ["dom", "ES2015"], "allowJs": false /* Allow javascript files to be compiled. */, From d71241a792a81066626edaf1ef205e06e4ddc6e0 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 15 Dec 2020 14:28:02 +0400 Subject: [PATCH 08/18] update react sdk --- packages/safe-apps-react-sdk/package.json | 2 +- packages/safe-apps-react-sdk/src/index.tsx | 24 +++++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/packages/safe-apps-react-sdk/package.json b/packages/safe-apps-react-sdk/package.json index af54bb3b..bbaceb33 100644 --- a/packages/safe-apps-react-sdk/package.json +++ b/packages/safe-apps-react-sdk/package.json @@ -1,7 +1,7 @@ { "name": "@gnosis.pm/safe-apps-react-sdk", "private": false, - "version": "1.0.0-beta.0", + "version": "1.0.0-beta.1", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", diff --git a/packages/safe-apps-react-sdk/src/index.tsx b/packages/safe-apps-react-sdk/src/index.tsx index dd246e7f..9bee007e 100644 --- a/packages/safe-apps-react-sdk/src/index.tsx +++ b/packages/safe-apps-react-sdk/src/index.tsx @@ -1,6 +1,13 @@ -import { createContext, useState, useEffect, useContext, ReactElement } from 'react'; -import SafeAppsSDK, { Opts as SDKOpts } from '@gnosis.pm/safe-apps-sdk/dist/src/sdk'; -const SafeContext = createContext<[SafeAppsSDK, boolean] | undefined>(undefined); +import { createContext, useState, useEffect, useContext, useMemo, ReactElement } from 'react'; +import SafeAppsSDK, { Opts as SDKOpts, SafeInfo } from '@gnosis.pm/safe-apps-sdk'; + +type SafeReactSDKContext = { + sdk: SafeAppsSDK; + connected: boolean; + safe: SafeInfo; +}; + +const SafeContext = createContext(undefined); interface Props { loader?: ReactElement; @@ -10,12 +17,15 @@ interface Props { export const SafeProvider: React.FC = ({ loader = null, opts, children }) => { const [sdk] = useState(new SafeAppsSDK(opts)); const [connected, setConnected] = useState(false); + const [safe, setSafe] = useState({ safeAddress: '', network: 'rinkeby' }); + const contextValue = useMemo(() => ({ sdk, connected, safe }), [sdk, connected, safe]); useEffect(() => { const fetchSafeInfo = async () => { try { - await sdk.getSafeInfo(); + const safeInfo = await sdk.getSafeInfo(); setConnected(true); + setSafe(safeInfo); } catch (err) { setConnected(false); } @@ -24,14 +34,14 @@ export const SafeProvider: React.FC = ({ loader = null, opts, children }) fetchSafeInfo(); }, [sdk]); - if (!connected) { + if (!connected && loader) { return loader; } - return {children}; + return {children}; }; -export const useSafeAppsSDK = (): [SafeAppsSDK, boolean] => { +export const useSafeAppsSDK = (): SafeReactSDKContext => { const value = useContext(SafeContext); if (value === undefined) { From 6bddc28e4fc99b3e109c7de51d3037c326bf353b Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 15 Dec 2020 14:43:57 +0400 Subject: [PATCH 09/18] use new react sdk --- packages/safe-app-cra-template/package.json | 2 +- packages/safe-app-cra-template/template.json | 3 +-- .../template/src/App.tsx | 26 +++++++++++-------- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/packages/safe-app-cra-template/package.json b/packages/safe-app-cra-template/package.json index aa2de801..95f73ddb 100644 --- a/packages/safe-app-cra-template/package.json +++ b/packages/safe-app-cra-template/package.json @@ -1,6 +1,6 @@ { "name": "@gnosis.pm/safe-app-cra-template", - "version": "1.0.1", + "version": "2.0.0-beta.0", "description": "Gnosis Safe App Starter", "author": "Gnosis (https://gnosis.pm)", "license": "MIT", diff --git a/packages/safe-app-cra-template/template.json b/packages/safe-app-cra-template/template.json index 37298986..90d6e9b8 100644 --- a/packages/safe-app-cra-template/template.json +++ b/packages/safe-app-cra-template/template.json @@ -2,10 +2,9 @@ "package": { "homepage": "./", "dependencies": { - "@gnosis.pm/safe-apps-sdk": "1.0.0-beta.4", + "@gnosis.pm/safe-apps--react-sdk": "1.0.0-beta.0", "@gnosis.pm/safe-react-components": "^0.2.0", "@material-ui/core": "^4.11.0", - "@rmeissner/safe-apps-react-sdk": "0.4.0", "@testing-library/jest-dom": "^5.11.4", "@testing-library/react": "^10.4.9", "@testing-library/user-event": "^12.1.3", diff --git a/packages/safe-app-cra-template/template/src/App.tsx b/packages/safe-app-cra-template/template/src/App.tsx index 39251dcc..c0ff489d 100644 --- a/packages/safe-app-cra-template/template/src/App.tsx +++ b/packages/safe-app-cra-template/template/src/App.tsx @@ -1,7 +1,7 @@ import React, { useCallback, useState } from 'react'; import styled from 'styled-components'; import { Button, Loader, Title } from '@gnosis.pm/safe-react-components'; -import { useSafe } from '@rmeissner/safe-apps-react-sdk'; +import { useSafeAppsSDK } from '@gnosis.pm/safe-apps-react-sdk'; const Container = styled.form` margin-bottom: 2rem; @@ -15,29 +15,33 @@ const Container = styled.form` `; const App: React.FC = () => { - const safe = useSafe(); + const { sdk, safe } = useSafeAppsSDK(); const [submitting, setSubmitting] = useState(false); + const submitTx = useCallback(async () => { setSubmitting(true); try { - const safeTxHash = await safe.sendTransactions([ - { - to: safe.info.safeAddress, - value: '0', - data: '0x', - }, - ]); + const { safeTxHash } = await sdk.txs.send({ + txs: [ + { + to: safe.safeAddress, + value: '0', + data: '0x', + }, + ], + }); console.log({ safeTxHash }); - const safeTx = await safe.loadSafeTransaction(safeTxHash); + const safeTx = await sdk.txs.getBySafeTxHash(safeTxHash); console.log({ safeTx }); } catch (e) { console.error(e); } setSubmitting(false); }, [safe]); + return ( - {safe.info.safeAddress} + {safe?.safeAddress} {submitting ? ( <> From 74814f91fbefea2845ec73d7c1f13d4cf4198349 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 15 Dec 2020 15:45:55 +0400 Subject: [PATCH 10/18] rename back cra template --- .../LICENSE | 0 .../README.md | 0 .../package.json | 2 +- .../template.json | 0 .../template/.env.sample | 0 .../template/README.md | 0 .../template/config-overrides.js | 0 .../template/gitignore | 0 .../template/public/favicon.ico | Bin .../template/public/index.html | 0 .../template/public/logo.svg | 0 .../template/public/logo192.png | Bin .../template/public/logo512.png | Bin .../template/public/manifest.json | 0 .../template/public/robots.txt | 0 .../template/src/App.tsx | 0 .../template/src/GlobalStyle.ts | 0 .../template/src/fonts.d.ts | 0 .../template/src/index.tsx | 0 .../template/src/react-app-env.d.ts | 0 .../template/src/setupTests.ts | 0 .../template/tsconfig.json | 0 22 files changed, 1 insertion(+), 1 deletion(-) rename packages/{safe-app-cra-template => cra-template-safe-app}/LICENSE (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/README.md (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/package.json (78%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template.json (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template/.env.sample (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template/README.md (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template/config-overrides.js (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template/gitignore (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template/public/favicon.ico (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template/public/index.html (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template/public/logo.svg (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template/public/logo192.png (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template/public/logo512.png (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template/public/manifest.json (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template/public/robots.txt (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template/src/App.tsx (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template/src/GlobalStyle.ts (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template/src/fonts.d.ts (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template/src/index.tsx (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template/src/react-app-env.d.ts (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template/src/setupTests.ts (100%) rename packages/{safe-app-cra-template => cra-template-safe-app}/template/tsconfig.json (100%) diff --git a/packages/safe-app-cra-template/LICENSE b/packages/cra-template-safe-app/LICENSE similarity index 100% rename from packages/safe-app-cra-template/LICENSE rename to packages/cra-template-safe-app/LICENSE diff --git a/packages/safe-app-cra-template/README.md b/packages/cra-template-safe-app/README.md similarity index 100% rename from packages/safe-app-cra-template/README.md rename to packages/cra-template-safe-app/README.md diff --git a/packages/safe-app-cra-template/package.json b/packages/cra-template-safe-app/package.json similarity index 78% rename from packages/safe-app-cra-template/package.json rename to packages/cra-template-safe-app/package.json index 95f73ddb..b4073a21 100644 --- a/packages/safe-app-cra-template/package.json +++ b/packages/cra-template-safe-app/package.json @@ -1,5 +1,5 @@ { - "name": "@gnosis.pm/safe-app-cra-template", + "name": "@gnosis.pm/cra-template-safe-app", "version": "2.0.0-beta.0", "description": "Gnosis Safe App Starter", "author": "Gnosis (https://gnosis.pm)", diff --git a/packages/safe-app-cra-template/template.json b/packages/cra-template-safe-app/template.json similarity index 100% rename from packages/safe-app-cra-template/template.json rename to packages/cra-template-safe-app/template.json diff --git a/packages/safe-app-cra-template/template/.env.sample b/packages/cra-template-safe-app/template/.env.sample similarity index 100% rename from packages/safe-app-cra-template/template/.env.sample rename to packages/cra-template-safe-app/template/.env.sample diff --git a/packages/safe-app-cra-template/template/README.md b/packages/cra-template-safe-app/template/README.md similarity index 100% rename from packages/safe-app-cra-template/template/README.md rename to packages/cra-template-safe-app/template/README.md diff --git a/packages/safe-app-cra-template/template/config-overrides.js b/packages/cra-template-safe-app/template/config-overrides.js similarity index 100% rename from packages/safe-app-cra-template/template/config-overrides.js rename to packages/cra-template-safe-app/template/config-overrides.js diff --git a/packages/safe-app-cra-template/template/gitignore b/packages/cra-template-safe-app/template/gitignore similarity index 100% rename from packages/safe-app-cra-template/template/gitignore rename to packages/cra-template-safe-app/template/gitignore diff --git a/packages/safe-app-cra-template/template/public/favicon.ico b/packages/cra-template-safe-app/template/public/favicon.ico similarity index 100% rename from packages/safe-app-cra-template/template/public/favicon.ico rename to packages/cra-template-safe-app/template/public/favicon.ico diff --git a/packages/safe-app-cra-template/template/public/index.html b/packages/cra-template-safe-app/template/public/index.html similarity index 100% rename from packages/safe-app-cra-template/template/public/index.html rename to packages/cra-template-safe-app/template/public/index.html diff --git a/packages/safe-app-cra-template/template/public/logo.svg b/packages/cra-template-safe-app/template/public/logo.svg similarity index 100% rename from packages/safe-app-cra-template/template/public/logo.svg rename to packages/cra-template-safe-app/template/public/logo.svg diff --git a/packages/safe-app-cra-template/template/public/logo192.png b/packages/cra-template-safe-app/template/public/logo192.png similarity index 100% rename from packages/safe-app-cra-template/template/public/logo192.png rename to packages/cra-template-safe-app/template/public/logo192.png diff --git a/packages/safe-app-cra-template/template/public/logo512.png b/packages/cra-template-safe-app/template/public/logo512.png similarity index 100% rename from packages/safe-app-cra-template/template/public/logo512.png rename to packages/cra-template-safe-app/template/public/logo512.png diff --git a/packages/safe-app-cra-template/template/public/manifest.json b/packages/cra-template-safe-app/template/public/manifest.json similarity index 100% rename from packages/safe-app-cra-template/template/public/manifest.json rename to packages/cra-template-safe-app/template/public/manifest.json diff --git a/packages/safe-app-cra-template/template/public/robots.txt b/packages/cra-template-safe-app/template/public/robots.txt similarity index 100% rename from packages/safe-app-cra-template/template/public/robots.txt rename to packages/cra-template-safe-app/template/public/robots.txt diff --git a/packages/safe-app-cra-template/template/src/App.tsx b/packages/cra-template-safe-app/template/src/App.tsx similarity index 100% rename from packages/safe-app-cra-template/template/src/App.tsx rename to packages/cra-template-safe-app/template/src/App.tsx diff --git a/packages/safe-app-cra-template/template/src/GlobalStyle.ts b/packages/cra-template-safe-app/template/src/GlobalStyle.ts similarity index 100% rename from packages/safe-app-cra-template/template/src/GlobalStyle.ts rename to packages/cra-template-safe-app/template/src/GlobalStyle.ts diff --git a/packages/safe-app-cra-template/template/src/fonts.d.ts b/packages/cra-template-safe-app/template/src/fonts.d.ts similarity index 100% rename from packages/safe-app-cra-template/template/src/fonts.d.ts rename to packages/cra-template-safe-app/template/src/fonts.d.ts diff --git a/packages/safe-app-cra-template/template/src/index.tsx b/packages/cra-template-safe-app/template/src/index.tsx similarity index 100% rename from packages/safe-app-cra-template/template/src/index.tsx rename to packages/cra-template-safe-app/template/src/index.tsx diff --git a/packages/safe-app-cra-template/template/src/react-app-env.d.ts b/packages/cra-template-safe-app/template/src/react-app-env.d.ts similarity index 100% rename from packages/safe-app-cra-template/template/src/react-app-env.d.ts rename to packages/cra-template-safe-app/template/src/react-app-env.d.ts diff --git a/packages/safe-app-cra-template/template/src/setupTests.ts b/packages/cra-template-safe-app/template/src/setupTests.ts similarity index 100% rename from packages/safe-app-cra-template/template/src/setupTests.ts rename to packages/cra-template-safe-app/template/src/setupTests.ts diff --git a/packages/safe-app-cra-template/template/tsconfig.json b/packages/cra-template-safe-app/template/tsconfig.json similarity index 100% rename from packages/safe-app-cra-template/template/tsconfig.json rename to packages/cra-template-safe-app/template/tsconfig.json From b82537ac82b29ff1e25b6e4609a6d8064e849a66 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 15 Dec 2020 15:51:00 +0400 Subject: [PATCH 11/18] fix react sdk dependency --- packages/cra-template-safe-app/package.json | 2 +- packages/cra-template-safe-app/template.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cra-template-safe-app/package.json b/packages/cra-template-safe-app/package.json index b4073a21..428e07aa 100644 --- a/packages/cra-template-safe-app/package.json +++ b/packages/cra-template-safe-app/package.json @@ -1,6 +1,6 @@ { "name": "@gnosis.pm/cra-template-safe-app", - "version": "2.0.0-beta.0", + "version": "2.0.0-beta.1", "description": "Gnosis Safe App Starter", "author": "Gnosis (https://gnosis.pm)", "license": "MIT", diff --git a/packages/cra-template-safe-app/template.json b/packages/cra-template-safe-app/template.json index 90d6e9b8..abaedaa1 100644 --- a/packages/cra-template-safe-app/template.json +++ b/packages/cra-template-safe-app/template.json @@ -2,7 +2,7 @@ "package": { "homepage": "./", "dependencies": { - "@gnosis.pm/safe-apps--react-sdk": "1.0.0-beta.0", + "@gnosis.pm/safe-apps-react-sdk": "1.0.0-beta.1", "@gnosis.pm/safe-react-components": "^0.2.0", "@material-ui/core": "^4.11.0", "@testing-library/jest-dom": "^5.11.4", From 9e32202ff82d9ea629db0eecc9efa2dfd13a3289 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 15 Dec 2020 16:04:33 +0400 Subject: [PATCH 12/18] fix cra template import --- packages/cra-template-safe-app/package.json | 2 +- packages/cra-template-safe-app/template/src/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cra-template-safe-app/package.json b/packages/cra-template-safe-app/package.json index 428e07aa..ea630c19 100644 --- a/packages/cra-template-safe-app/package.json +++ b/packages/cra-template-safe-app/package.json @@ -1,6 +1,6 @@ { "name": "@gnosis.pm/cra-template-safe-app", - "version": "2.0.0-beta.1", + "version": "2.0.0-beta.2", "description": "Gnosis Safe App Starter", "author": "Gnosis (https://gnosis.pm)", "license": "MIT", diff --git a/packages/cra-template-safe-app/template/src/index.tsx b/packages/cra-template-safe-app/template/src/index.tsx index 5f742a87..efbbda6c 100644 --- a/packages/cra-template-safe-app/template/src/index.tsx +++ b/packages/cra-template-safe-app/template/src/index.tsx @@ -3,7 +3,7 @@ import ReactDOM from 'react-dom'; import { ThemeProvider } from 'styled-components'; import { theme } from '@gnosis.pm/safe-react-components'; import { Loader, Title } from '@gnosis.pm/safe-react-components'; -import SafeProvider from '@rmeissner/safe-apps-react-sdk'; +import SafeProvider from '@gnosis.pm/safe-apps-react-sdk'; import GlobalStyle from './GlobalStyle'; import App from './App'; From 8dd4c841448ddbefe6eb3b3e782da35ffc4142a3 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 15 Dec 2020 16:19:34 +0400 Subject: [PATCH 13/18] fix wrong prop --- packages/cra-template-safe-app/package.json | 2 +- packages/cra-template-safe-app/template.json | 16 ++++++++-------- .../cra-template-safe-app/template/src/index.tsx | 5 ++--- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/packages/cra-template-safe-app/package.json b/packages/cra-template-safe-app/package.json index ea630c19..49f1789f 100644 --- a/packages/cra-template-safe-app/package.json +++ b/packages/cra-template-safe-app/package.json @@ -1,6 +1,6 @@ { "name": "@gnosis.pm/cra-template-safe-app", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "description": "Gnosis Safe App Starter", "author": "Gnosis (https://gnosis.pm)", "license": "MIT", diff --git a/packages/cra-template-safe-app/template.json b/packages/cra-template-safe-app/template.json index abaedaa1..e2579776 100644 --- a/packages/cra-template-safe-app/template.json +++ b/packages/cra-template-safe-app/template.json @@ -3,22 +3,22 @@ "homepage": "./", "dependencies": { "@gnosis.pm/safe-apps-react-sdk": "1.0.0-beta.1", - "@gnosis.pm/safe-react-components": "^0.2.0", + "@gnosis.pm/safe-react-components": "^0.3.0", "@material-ui/core": "^4.11.0", "@testing-library/jest-dom": "^5.11.4", - "@testing-library/react": "^10.4.9", + "@testing-library/react": "^11.2.2", "@testing-library/user-event": "^12.1.3", "@types/jest": "^26.0.10", "@types/node": "^14.6.2", - "@types/react": "^16.9.0", - "@types/react-dom": "^16.9.0", + "@types/react": "^17.0.0", + "@types/react-dom": "^17.0.0", "@types/styled-components": "^5.1.2", - "react": "^16.13.1", + "react": "^17.0.1", "react-app-rewired": "^2.1.6", - "react-dom": "^16.13.1", - "react-scripts": "3.4.3", + "react-dom": "^17.0.1", + "react-scripts": "4.0.1", "styled-components": "^5.1.1", - "typescript": "~4.0.2" + "typescript": "~4.1.3" }, "scripts": { "start": "react-app-rewired start", diff --git a/packages/cra-template-safe-app/template/src/index.tsx b/packages/cra-template-safe-app/template/src/index.tsx index efbbda6c..53a7b110 100644 --- a/packages/cra-template-safe-app/template/src/index.tsx +++ b/packages/cra-template-safe-app/template/src/index.tsx @@ -1,8 +1,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; import { ThemeProvider } from 'styled-components'; -import { theme } from '@gnosis.pm/safe-react-components'; -import { Loader, Title } from '@gnosis.pm/safe-react-components'; +import { theme, Loader, Title } from '@gnosis.pm/safe-react-components'; import SafeProvider from '@gnosis.pm/safe-apps-react-sdk'; import GlobalStyle from './GlobalStyle'; @@ -13,7 +12,7 @@ ReactDOM.render( Waiting for Safe... From 3b98c480d398b6e2fd26124acc648019e6a27a66 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 15 Dec 2020 16:32:34 +0400 Subject: [PATCH 14/18] fix hoook dependency --- packages/cra-template-safe-app/package.json | 2 +- packages/cra-template-safe-app/template/src/App.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cra-template-safe-app/package.json b/packages/cra-template-safe-app/package.json index 49f1789f..eae19818 100644 --- a/packages/cra-template-safe-app/package.json +++ b/packages/cra-template-safe-app/package.json @@ -1,6 +1,6 @@ { "name": "@gnosis.pm/cra-template-safe-app", - "version": "2.0.0-beta.3", + "version": "2.0.0-beta.4", "description": "Gnosis Safe App Starter", "author": "Gnosis (https://gnosis.pm)", "license": "MIT", diff --git a/packages/cra-template-safe-app/template/src/App.tsx b/packages/cra-template-safe-app/template/src/App.tsx index c0ff489d..b596b439 100644 --- a/packages/cra-template-safe-app/template/src/App.tsx +++ b/packages/cra-template-safe-app/template/src/App.tsx @@ -37,7 +37,7 @@ const App: React.FC = () => { console.error(e); } setSubmitting(false); - }, [safe]); + }, [safe, sdk]); return ( From cdfea6c93e9320ab8b8c99a59adec2ac33319ede Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 15 Dec 2020 16:42:03 +0400 Subject: [PATCH 15/18] dep bump --- package.json | 6 ++-- yarn.lock | 90 ++++++++++++++++++++++++++-------------------------- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/package.json b/package.json index 360f19da..3db87a4e 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,8 @@ "devDependencies": { "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", - "@typescript-eslint/eslint-plugin": "^4.9.1", - "@typescript-eslint/parser": "^4.9.1", + "@typescript-eslint/eslint-plugin": "^4.10.0", + "@typescript-eslint/parser": "^4.10.0", "eslint": "7.15.0", "eslint-config-prettier": "^7.0.0", "eslint-plugin-prettier": "^3.2.0", @@ -28,6 +28,6 @@ "eslint-plugin-react-hooks": "^4.2.0", "jest": "^26.6.3", "ts-jest": "^26.4.4", - "typescript": "^4.0.5" + "typescript": "^4.1.3" } } diff --git a/yarn.lock b/yarn.lock index 065bc6fa..306cfa05 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1682,61 +1682,61 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.9.1.tgz#66758cbe129b965fe9c63b04b405d0cf5280868b" - integrity sha512-QRLDSvIPeI1pz5tVuurD+cStNR4sle4avtHhxA+2uyixWGFjKzJ+EaFVRW6dA/jOgjV5DTAjOxboQkRDE8cRlQ== +"@typescript-eslint/eslint-plugin@^4.10.0": + version "4.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.10.0.tgz#19ed3baf4bc4232c5a7fcd32eaca75c3a5baf9f3" + integrity sha512-h6/V46o6aXpKRlarP1AiJEXuCJ7cMQdlpfMDrcllIgX3dFkLwEBTXAoNP98ZoOmqd1xvymMVRAI4e7yVvlzWEg== dependencies: - "@typescript-eslint/experimental-utils" "4.9.1" - "@typescript-eslint/scope-manager" "4.9.1" + "@typescript-eslint/experimental-utils" "4.10.0" + "@typescript-eslint/scope-manager" "4.10.0" debug "^4.1.1" functional-red-black-tree "^1.0.1" regexpp "^3.0.0" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.9.1.tgz#86633e8395191d65786a808dc3df030a55267ae2" - integrity sha512-c3k/xJqk0exLFs+cWSJxIjqLYwdHCuLWhnpnikmPQD2+NGAx9KjLYlBDcSI81EArh9FDYSL6dslAUSwILeWOxg== +"@typescript-eslint/experimental-utils@4.10.0": + version "4.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.10.0.tgz#dbf5d0f89802d5feaf7d11e5b32df29bbc2f3a0e" + integrity sha512-opX+7ai1sdWBOIoBgpVJrH5e89ra1KoLrJTz0UtWAa4IekkKmqDosk5r6xqRaNJfCXEfteW4HXQAwMdx+jjEmw== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.9.1" - "@typescript-eslint/types" "4.9.1" - "@typescript-eslint/typescript-estree" "4.9.1" + "@typescript-eslint/scope-manager" "4.10.0" + "@typescript-eslint/types" "4.10.0" + "@typescript-eslint/typescript-estree" "4.10.0" eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@^4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.9.1.tgz#2d74c4db5dd5117379a9659081a4d1ec02629055" - integrity sha512-Gv2VpqiomvQ2v4UL+dXlQcZ8zCX4eTkoIW+1aGVWT6yTO+6jbxsw7yQl2z2pPl/4B9qa5JXeIbhJpONKjXIy3g== +"@typescript-eslint/parser@^4.10.0": + version "4.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.10.0.tgz#1a622b0847b765b2d8f0ede6f0cdd85f03d76031" + integrity sha512-amBvUUGBMadzCW6c/qaZmfr3t9PyevcSWw7hY2FuevdZVp5QPw/K76VSQ5Sw3BxlgYCHZcK6DjIhSZK0PQNsQg== dependencies: - "@typescript-eslint/scope-manager" "4.9.1" - "@typescript-eslint/types" "4.9.1" - "@typescript-eslint/typescript-estree" "4.9.1" + "@typescript-eslint/scope-manager" "4.10.0" + "@typescript-eslint/types" "4.10.0" + "@typescript-eslint/typescript-estree" "4.10.0" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.9.1.tgz#cc2fde310b3f3deafe8436a924e784eaab265103" - integrity sha512-sa4L9yUfD/1sg9Kl8OxPxvpUcqxKXRjBeZxBuZSSV1v13hjfEJkn84n0An2hN8oLQ1PmEl2uA6FkI07idXeFgQ== +"@typescript-eslint/scope-manager@4.10.0": + version "4.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.10.0.tgz#dbd7e1fc63d7363e3aaff742a6f2b8afdbac9d27" + integrity sha512-WAPVw35P+fcnOa8DEic0tQUhoJJsgt+g6DEcz257G7vHFMwmag58EfowdVbiNcdfcV27EFR0tUBVXkDoIvfisQ== dependencies: - "@typescript-eslint/types" "4.9.1" - "@typescript-eslint/visitor-keys" "4.9.1" + "@typescript-eslint/types" "4.10.0" + "@typescript-eslint/visitor-keys" "4.10.0" -"@typescript-eslint/types@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.9.1.tgz#a1a7dd80e4e5ac2c593bc458d75dd1edaf77faa2" - integrity sha512-fjkT+tXR13ks6Le7JiEdagnwEFc49IkOyys7ueWQ4O8k4quKPwPJudrwlVOJCUQhXo45PrfIvIarcrEjFTNwUA== +"@typescript-eslint/types@4.10.0": + version "4.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.10.0.tgz#12f983750ebad867f0c806e705c1953cd6415789" + integrity sha512-+dt5w1+Lqyd7wIPMa4XhJxUuE8+YF+vxQ6zxHyhLGHJjHiunPf0wSV8LtQwkpmAsRi1lEOoOIR30FG5S2HS33g== -"@typescript-eslint/typescript-estree@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.9.1.tgz#6e5b86ff5a5f66809e1f347469fadeec69ac50bf" - integrity sha512-bzP8vqwX6Vgmvs81bPtCkLtM/Skh36NE6unu6tsDeU/ZFoYthlTXbBmpIrvosgiDKlWTfb2ZpPELHH89aQjeQw== +"@typescript-eslint/typescript-estree@4.10.0": + version "4.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.10.0.tgz#1e62e45fd57866afd42daf5e9fb6bd4e8dbcfa75" + integrity sha512-mGK0YRp9TOk6ZqZ98F++bW6X5kMTzCRROJkGXH62d2azhghmq+1LNLylkGe6uGUOQzD452NOAEth5VAF6PDo5g== dependencies: - "@typescript-eslint/types" "4.9.1" - "@typescript-eslint/visitor-keys" "4.9.1" + "@typescript-eslint/types" "4.10.0" + "@typescript-eslint/visitor-keys" "4.10.0" debug "^4.1.1" globby "^11.0.1" is-glob "^4.0.1" @@ -1744,12 +1744,12 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.9.1.tgz#d76374a58c4ead9e92b454d186fea63487b25ae1" - integrity sha512-9gspzc6UqLQHd7lXQS7oWs+hrYggspv/rk6zzEMhCbYwPE/sF7oxo7GAjkS35Tdlt7wguIG+ViWCPtVZHz/ybQ== +"@typescript-eslint/visitor-keys@4.10.0": + version "4.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.10.0.tgz#9478822329a9bc8ebcc80623d7f79a01da5ee451" + integrity sha512-hPyz5qmDMuZWFtHZkjcCpkAKHX8vdu1G3YsCLEd25ryZgnJfj6FQuJ5/O7R+dB1ueszilJmAFMtlU4CA6se3Jg== dependencies: - "@typescript-eslint/types" "4.9.1" + "@typescript-eslint/types" "4.10.0" eslint-visitor-keys "^2.0.0" "@zkochan/cmd-shim@^3.1.0": @@ -8336,10 +8336,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^4.0.5: - version "4.1.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9" - integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ== +typescript@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" + integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== uglify-js@^3.1.4: version "3.12.1" From 352a455d911a8a0ca79cd37aa60345effebad09f Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 15 Dec 2020 19:51:49 +0400 Subject: [PATCH 16/18] update react sdk readme --- packages/safe-apps-react-sdk/README.md | 38 ++++++++++++++++---------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/packages/safe-apps-react-sdk/README.md b/packages/safe-apps-react-sdk/README.md index a5ae7769..5982681b 100644 --- a/packages/safe-apps-react-sdk/README.md +++ b/packages/safe-apps-react-sdk/README.md @@ -7,11 +7,14 @@ This sdk should provide a simple way to write a React.js [Safe app](https://docs ### How to use - Add npm package + ```bash yarn add @rmeissner/safe-apps-react-sdk ``` -- Add `SafeProvider` +- Add `SafeProvider` + Safe provider accepts `loader` and `options` props + ```js // ... other imports import SafeProvider from '@rmeissner/safe-apps-react-sdk'; @@ -22,38 +25,45 @@ ReactDOM.render( // Your app , - document.getElementById('root') + document.getElementById('root'), ); ``` -- Use Safe +- Use Safe Apps SDK Hook + ```js // ... other imports -import { useSafe } from '@rmeissner/safe-apps-react-sdk'; +import { useSafeAppsSDK } from '@rmeissner/safe-apps-react-sdk'; const App = () => { - const safe = useSafe() - return (
{safe.info.safeAddress}
) -} + const { sdk, connected, safe } = useSafeAppsSDK(); + return
{safe.safeAddress}
; +}; ``` ### Usages #### Send transactions + ```js const txs: Transaction[] = [ { - "to": "0x31415629...", - "value": "0", - "data": "0xbaddad" + to: '0x31415629...', + value: '0', + data: '0xbaddad', }, //... -] +]; // Returns a hash to identify the Safe transaction -const safeTxHash: string = await safe.sendTransactions(txs) +const safeTxHash: string = await sdk.txs.send({ txs }); ``` #### Load Safe transaction information + ```js -const safeTx: SafeTransaction = await safe.loadSafeTransaction(safeTxHash) -``` \ No newline at end of file +const safeTx: SafeTransaction = await sdk.txs.getBySafeTxHash(safeTxHash); +``` + +#### More scenarios + +For all available sdk methods, please refer to the [safe-apps-sdk](https://github.com/gnosis/safe-apps-sdk/tree/master/packages/safe-apps-sdk) documentation From f469c8b3060dd0d0dbfad833f14409cad461ba0e Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Wed, 16 Dec 2020 15:45:42 +0400 Subject: [PATCH 17/18] eremove optional chaining for safe address in the template --- packages/cra-template-safe-app/template/src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cra-template-safe-app/template/src/App.tsx b/packages/cra-template-safe-app/template/src/App.tsx index b596b439..a390b387 100644 --- a/packages/cra-template-safe-app/template/src/App.tsx +++ b/packages/cra-template-safe-app/template/src/App.tsx @@ -41,7 +41,7 @@ const App: React.FC = () => { return ( - {safe?.safeAddress} + {safe.safeAddress} {submitting ? ( <> From 5d1812cf0d03df4c36c91af7d8e928ac78e6fcd5 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Wed, 16 Dec 2020 15:50:22 +0400 Subject: [PATCH 18/18] Change order of setState updates in react sdk --- packages/safe-apps-react-sdk/src/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/safe-apps-react-sdk/src/index.tsx b/packages/safe-apps-react-sdk/src/index.tsx index 9bee007e..b5b51fe7 100644 --- a/packages/safe-apps-react-sdk/src/index.tsx +++ b/packages/safe-apps-react-sdk/src/index.tsx @@ -24,8 +24,9 @@ export const SafeProvider: React.FC = ({ loader = null, opts, children }) const fetchSafeInfo = async () => { try { const safeInfo = await sdk.getSafeInfo(); - setConnected(true); + setSafe(safeInfo); + setConnected(true); } catch (err) { setConnected(false); }