From 3627fb2e81fe7413ca96343a52edeb326f1c2300 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 16 Apr 2020 18:41:00 +0400 Subject: [PATCH 01/65] wop wop --- yarn.lock | 177 +++++------------------------------------------------- 1 file changed, 15 insertions(+), 162 deletions(-) diff --git a/yarn.lock b/yarn.lock index 145d558c..2908b7d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2518,11 +2518,6 @@ abab@^2.0.0: resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a" integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg== -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - abi-decoder@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/abi-decoder/-/abi-decoder-1.2.0.tgz#c42882dbb91b444805f0cd203a87a5cc3c22f4a8" @@ -2772,19 +2767,11 @@ app-module-path@^2.2.0: resolved "https://registry.yarnpkg.com/app-module-path/-/app-module-path-2.2.0.tgz#641aa55dfb7d6a6f0a8141c4b9c0aa50b6c24dd5" integrity sha1-ZBqlXft9am8KgUHEucCqULbCTdU= -aproba@^1.0.3, aproba@^1.1.1: +aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" - integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -4974,11 +4961,6 @@ console-browserify@^1.1.0: resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - constants-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" @@ -5523,7 +5505,7 @@ debug@3.1.0, debug@=3.1.0: dependencies: ms "2.0.0" -debug@3.2.6, debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: +debug@3.2.6, debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -5639,11 +5621,6 @@ deep-equal@^1.0.1, deep-equal@~1.1.1: object-keys "^1.1.1" regexp.prototype.flags "^1.2.0" -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -5754,11 +5731,6 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" @@ -5796,11 +5768,6 @@ detect-installed@^2.0.4: dependencies: get-installed-path "^2.0.3" -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - detect-newline@2.X: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" @@ -8114,20 +8081,6 @@ ganache-core@2.7.0: ethereumjs-wallet "0.6.3" web3 "1.2.1" -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - gensync@^1.0.0-beta.1: version "1.0.0-beta.1" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" @@ -8554,11 +8507,6 @@ has-to-string-tag-x@^1.2.0: dependencies: has-symbol-support-x "^1.4.1" -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= - has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" @@ -8949,7 +8897,7 @@ ice-cap@0.0.4: cheerio "0.20.0" color-logger "0.0.3" -iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: +iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -8985,13 +8933,6 @@ iferr@^0.1.5: resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= -ignore-walk@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" - integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== - dependencies: - minimatch "^3.0.4" - ignore@^3.3.5: version "3.3.10" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" @@ -9119,7 +9060,7 @@ inherits@2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: +ini@^1.3.4, ini@^1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== @@ -11834,15 +11775,6 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -needle@^2.2.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.1.tgz#14af48732463d7475696f937626b1b993247a56a" - integrity sha512-x/gi6ijr4B7fwl6WYL9FwlCvRQKGlUNvnceho8wxkwXqN8jvVmmmATTmZPRRG7b/yC1eode26C2HO9jl78Du9g== - dependencies: - debug "^3.2.6" - iconv-lite "^0.4.4" - sax "^1.2.4" - negotiator@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" @@ -11969,35 +11901,11 @@ node-notifier@^6.0.0: shellwords "^0.1.1" which "^1.3.1" -node-pre-gyp@*: - version "0.14.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83" - integrity sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4.4.2" - node-releases@^1.1.52, node-releases@^1.1.53: version "1.1.53" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.53.tgz#2d821bfa499ed7c5dffc5e2f28c88e78a08ee3f4" integrity sha512-wp8zyQVwef2hpZ/dJH7SfSrIPD6YoJz6BDQDpGEkcA0s3LpAQoxBIYmfIq6QAhC1DhwsyCgTaTTcONwX8qzCuQ== -nopt@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" - integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== - dependencies: - abbrev "1" - osenv "^0.1.4" - normalize-hex@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/normalize-hex/-/normalize-hex-0.0.2.tgz#5491c43759db2f06b7168d8419f4925c271ab27e" @@ -12061,27 +11969,6 @@ normalize-url@^4.1.0: prop-types "^15.7.2" react-is "^16.9.0" -npm-bundled@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" - integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== - dependencies: - npm-normalize-package-bin "^1.0.1" - -npm-normalize-package-bin@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" - integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== - -npm-packlist@^1.1.6: - version "1.4.8" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" - integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - npm-normalize-package-bin "^1.0.1" - npm-programmatic@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/npm-programmatic/-/npm-programmatic-0.0.6.tgz#3c8f4dbb210efd65b99ee6a5ac76f27b4d5d6b78" @@ -12103,16 +11990,6 @@ npm-run-path@^4.0.0: dependencies: path-key "^3.0.0" -npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - nth-check@^1.0.2, nth-check@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" @@ -12443,19 +12320,11 @@ os-locale@^3.0.0, os-locale@^3.1.0: lcid "^2.0.0" mem "^4.0.0" -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: +os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= -osenv@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - p-cancelable@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" @@ -13692,16 +13561,6 @@ raw-body@2.4.0: iconv-lite "0.4.24" unpipe "1.0.0" -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - react-dev-utils@10.2.1: version "10.2.1" resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-10.2.1.tgz#f6de325ae25fa4d546d09df4bb1befdc6dd19c19" @@ -13923,7 +13782,7 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -14515,7 +14374,7 @@ rimraf@2.6.3, rimraf@~2.6.2: dependencies: glob "^7.1.3" -rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.3, rimraf@^2.7.1: +rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.3, rimraf@^2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -14662,7 +14521,7 @@ sane@^4.0.2, sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" -sax@^1.1.4, sax@^1.2.4, sax@~1.2.4: +sax@^1.1.4, sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== @@ -14930,7 +14789,7 @@ servify@^0.1.12: request "^2.79.0" xhr "^2.3.3" -set-blocking@^2.0.0, set-blocking@~2.0.0: +set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= @@ -15508,7 +15367,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: +string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -15706,7 +15565,7 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" -strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: +strip-json-comments@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= @@ -15910,7 +15769,7 @@ tar-stream@^1.5.2: to-buffer "^1.1.1" xtend "^4.0.0" -tar@^4.0.2, tar@^4.4.2: +tar@^4.0.2: version "4.4.13" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== @@ -17584,9 +17443,9 @@ web3-provider-engine@^15.0.4: xhr "^2.2.0" xtend "^4.0.1" -"web3-provider-engine@git+https://github.com/trufflesuite/provider-engine.git#web3-one": +"web3-provider-engine@https://github.com/trufflesuite/provider-engine#web3-one": version "14.0.6" - resolved "git+https://github.com/trufflesuite/provider-engine.git#3538c60bc4836b73ccae1ac3f64c8fed8ef19c1a" + resolved "https://github.com/trufflesuite/provider-engine#3538c60bc4836b73ccae1ac3f64c8fed8ef19c1a" dependencies: async "^2.5.0" backoff "^2.5.0" @@ -17952,6 +17811,7 @@ websocket@1.0.29, "websocket@github:web3-js/WebSocket-Node#polyfill/globalThis": dependencies: debug "^2.2.0" es5-ext "^0.10.50" + gulp "^4.0.2" nan "^2.14.0" typedarray-to-buffer "^3.1.5" yaeti "^0.0.6" @@ -18026,13 +17886,6 @@ which@^2.0.1, which@^2.0.2: dependencies: isexe "^2.0.0" -wide-align@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - window-size@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" From 83b60a60c1990a9a39fba7df47397f722755ad5a Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Mon, 20 Apr 2020 15:19:19 +0400 Subject: [PATCH 02/65] dep bump --- package.json | 52 +- yarn.lock | 1715 ++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 1281 insertions(+), 486 deletions(-) diff --git a/package.json b/package.json index 1b6fbf55..fe0e51b0 100644 --- a/package.json +++ b/package.json @@ -43,37 +43,37 @@ "dependencies": { "@gnosis.pm/safe-contracts": "1.1.1-dev.1", "@gnosis.pm/util-contracts": "2.0.6", - "@material-ui/core": "4.9.8", + "@material-ui/core": "4.9.11", "@material-ui/icons": "4.9.1", "@material-ui/lab": "4.0.0-alpha.39", "@openzeppelin/contracts": "^2.5.0", - "@testing-library/jest-dom": "5.3.0", - "@welldone-software/why-did-you-render": "4.0.5", + "@testing-library/jest-dom": "5.5.0", + "@welldone-software/why-did-you-render": "4.0.8", "async-sema": "^3.1.0", "axios": "0.19.2", "bignumber.js": "9.0.0", - "bnc-onboard": "^1.7.1", + "bnc-onboard": "1.7.5", "connected-react-router": "6.8.0", "currency-flags": "^2.1.1", - "date-fns": "2.11.1", + "date-fns": "2.12.0", "dotenv": "^8.2.0", "ethereum-ens": "0.8.0", - "final-form": "4.18.7", + "final-form": "4.19.1", "history": "4.10.1", "immortal-db": "^1.0.2", "immutable": "^4.0.0-rc.9", "js-cookie": "^2.2.1", - "lint-staged": "10.0.10", + "lint-staged": "10.1.6", "material-ui-search-bar": "^1.0.0-beta.13", "notistack": "https://github.com/gnosis/notistack.git#v0.9.4", "optimize-css-assets-webpack-plugin": "5.0.3", - "polished": "3.5.1", + "polished": "3.5.2", "qrcode.react": "1.0.0", - "query-string": "6.11.1", + "query-string": "6.12.1", "react": "16.13.1", "react-dev-utils": "10.2.1", "react-dom": "16.13.1", - "react-final-form": "6.3.5", + "react-final-form": "6.4.0", "react-final-form-listeners": "^1.0.2", "react-ga": "^2.7.0", "react-hot-loader": "4.12.20", @@ -86,7 +86,7 @@ "redux-actions": "^2.6.5", "redux-thunk": "^2.3.0", "reselect": "^4.0.0", - "semver": "^7.1.1", + "semver": "7.3.2", "styled-components": "^5.0.1", "web3": "1.2.6" }, @@ -112,21 +112,21 @@ "@babel/plugin-transform-member-expression-literals": "7.8.3", "@babel/plugin-transform-property-literals": "7.8.3", "@babel/polyfill": "7.8.7", - "@babel/preset-env": "7.9.0", + "@babel/preset-env": "7.9.5", "@babel/preset-flow": "7.9.0", "@babel/preset-react": "7.9.4", - "@testing-library/react": "10.0.1", - "autoprefixer": "9.7.5", + "@testing-library/react": "10.0.2", + "autoprefixer": "9.7.6", "babel-core": "^7.0.0-bridge.0", "babel-eslint": "10.1.0", - "babel-jest": "25.2.4", + "babel-jest": "25.4.0", "babel-loader": "8.1.0", "babel-plugin-dynamic-import-node": "^2.3.0", "babel-plugin-transform-es3-member-expression-literals": "^6.22.0", "babel-plugin-transform-es3-property-literals": "^6.22.0", "babel-polyfill": "^6.26.0", "classnames": "^2.2.6", - "css-loader": "3.4.2", + "css-loader": "3.5.2", "detect-port": "^1.3.0", "dotenv-expand": "^5.1.0", "eslint": "^6.8.0", @@ -136,32 +136,32 @@ "eslint-plugin-jsx-a11y": "^6.2.3", "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-react": "^7.18.3", - "eslint-plugin-sort-destructure-keys": "^1.3.3", + "eslint-plugin-sort-destructure-keys": "1.3.4", "ethereumjs-abi": "0.6.8", "extract-text-webpack-plugin": "^4.0.0-beta.0", "file-loader": "6.0.0", - "flow-bin": "0.121.0", + "flow-bin": "0.123.0", "fs-extra": "9.0.0", - "html-loader": "1.0.0", - "html-webpack-plugin": "4.0.3", + "html-loader": "1.1.0", + "html-webpack-plugin": "4.2.0", "husky": "^4.2.2", - "jest": "25.2.4", + "jest": "25.4.0", "jest-dom": "4.0.0", "json-loader": "^0.5.7", "mini-css-extract-plugin": "0.9.0", "postcss-loader": "^3.0.0", "postcss-mixins": "6.2.3", "postcss-simple-vars": "^5.0.2", - "prettier": "2.0.2", + "prettier": "2.0.4", "run-with-testrpc": "0.3.1", - "style-loader": "1.1.3", + "style-loader": "1.1.4", "terser-webpack-plugin": "2.3.5", - "truffle": "5.1.19", + "truffle": "5.1.22", "truffle-contract": "4.0.31", "truffle-solidity-loader": "0.1.32", - "url-loader": "4.0.0", + "url-loader": "4.1.0", "webpack": "4.42.1", - "webpack-bundle-analyzer": "3.6.1", + "webpack-bundle-analyzer": "3.7.0", "webpack-cli": "3.3.11", "webpack-dev-server": "3.10.3", "webpack-manifest-plugin": "2.2.0" diff --git a/yarn.lock b/yarn.lock index 2908b7d5..282173b3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -397,7 +397,7 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-numeric-separator" "^7.8.3" -"@babel/plugin-proposal-object-rest-spread@^7.9.0": +"@babel/plugin-proposal-object-rest-spread@^7.9.5": version "7.9.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.5.tgz#3fd65911306d8746014ec0d0cf78f0e39a149116" integrity sha512-VP2oXvAf7KCYTthbUHwBlewbl1Iq059f6seJGsxMizaCdgHIeczOr7FBqELhSqfkIl04Fi8okzWzl63UKbQmmg== @@ -638,7 +638,7 @@ "@babel/helper-plugin-utils" "^7.8.3" lodash "^4.17.13" -"@babel/plugin-transform-classes@^7.9.0": +"@babel/plugin-transform-classes@^7.9.5": version "7.9.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.5.tgz#800597ddb8aefc2c293ed27459c1fcc935a26c2c" integrity sha512-x2kZoIuLC//O5iA7PEvecB105o7TLzZo8ofBVhP79N+DO3jaX+KYfww9TQcfBEZD0nikNyYcGB1IKtRq36rdmg== @@ -659,7 +659,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-destructuring@^7.8.3": +"@babel/plugin-transform-destructuring@^7.9.5": version "7.9.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.9.5.tgz#72c97cf5f38604aea3abf3b935b0e17b1db76a50" integrity sha512-j3OEsGel8nHL/iusv/mRd5fYZ3DrOxWC82x0ogmdN/vHfAP4MYw+AFKYanzWlktNwikKvlzUV//afBW5FTp17Q== @@ -785,7 +785,7 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/helper-replace-supers" "^7.8.3" -"@babel/plugin-transform-parameters@^7.8.7", "@babel/plugin-transform-parameters@^7.9.5": +"@babel/plugin-transform-parameters@^7.9.5": version "7.9.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.5.tgz#173b265746f5e15b2afe527eeda65b73623a0795" integrity sha512-0+1FhHnMfj6lIIhVvS4KGQJeuhe1GI//h5uptK4PvLt+BGBxsoUJbd3/IW002yk//6sZPlFgsG1hY6OHLcy6kA== @@ -919,10 +919,10 @@ core-js "^2.6.5" regenerator-runtime "^0.13.4" -"@babel/preset-env@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.9.0.tgz#a5fc42480e950ae8f5d9f8f2bbc03f52722df3a8" - integrity sha512-712DeRXT6dyKAM/FMbQTV/FvRCms2hPCx+3weRjZ8iQVQWZejWWk1wwG6ViWMyqb/ouBbGOl5b6aCk0+j1NmsQ== +"@babel/preset-env@7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.9.5.tgz#8ddc76039bc45b774b19e2fc548f6807d8a8919f" + integrity sha512-eWGYeADTlPJH+wq1F0wNfPbVS1w1wtmMJiYk55Td5Yu28AsdR9AsC97sZ0Qq8fHqQuslVSIYSGJMcblr345GfQ== dependencies: "@babel/compat-data" "^7.9.0" "@babel/helper-compilation-targets" "^7.8.7" @@ -933,7 +933,7 @@ "@babel/plugin-proposal-json-strings" "^7.8.3" "@babel/plugin-proposal-nullish-coalescing-operator" "^7.8.3" "@babel/plugin-proposal-numeric-separator" "^7.8.3" - "@babel/plugin-proposal-object-rest-spread" "^7.9.0" + "@babel/plugin-proposal-object-rest-spread" "^7.9.5" "@babel/plugin-proposal-optional-catch-binding" "^7.8.3" "@babel/plugin-proposal-optional-chaining" "^7.9.0" "@babel/plugin-proposal-unicode-property-regex" "^7.8.3" @@ -950,9 +950,9 @@ "@babel/plugin-transform-async-to-generator" "^7.8.3" "@babel/plugin-transform-block-scoped-functions" "^7.8.3" "@babel/plugin-transform-block-scoping" "^7.8.3" - "@babel/plugin-transform-classes" "^7.9.0" + "@babel/plugin-transform-classes" "^7.9.5" "@babel/plugin-transform-computed-properties" "^7.8.3" - "@babel/plugin-transform-destructuring" "^7.8.3" + "@babel/plugin-transform-destructuring" "^7.9.5" "@babel/plugin-transform-dotall-regex" "^7.8.3" "@babel/plugin-transform-duplicate-keys" "^7.8.3" "@babel/plugin-transform-exponentiation-operator" "^7.8.3" @@ -967,7 +967,7 @@ "@babel/plugin-transform-named-capturing-groups-regex" "^7.8.3" "@babel/plugin-transform-new-target" "^7.8.3" "@babel/plugin-transform-object-super" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.8.7" + "@babel/plugin-transform-parameters" "^7.9.5" "@babel/plugin-transform-property-literals" "^7.8.3" "@babel/plugin-transform-regenerator" "^7.8.7" "@babel/plugin-transform-reserved-words" "^7.8.3" @@ -978,7 +978,7 @@ "@babel/plugin-transform-typeof-symbol" "^7.8.4" "@babel/plugin-transform-unicode-regex" "^7.8.3" "@babel/preset-modules" "^0.1.3" - "@babel/types" "^7.9.0" + "@babel/types" "^7.9.5" browserslist "^4.9.1" core-js-compat "^3.6.2" invariant "^2.2.2" @@ -1230,43 +1230,44 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jest/console@^25.3.0": - version "25.3.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-25.3.0.tgz#33b56b81238427bf3ebe3f7b3378d2f79cdbd409" - integrity sha512-LvSDNqpmZIZyweFaEQ6wKY7CbexPitlsLHGJtcooNECo0An/w49rFhjCJzu6efeb6+a3ee946xss1Jcd9r03UQ== +"@jest/console@^25.4.0": + version "25.4.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-25.4.0.tgz#e2760b532701137801ba824dcff6bc822c961bac" + integrity sha512-CfE0erx4hdJ6t7RzAcE1wLG6ZzsHSmybvIBQDoCkDM1QaSeWL9wJMzID/2BbHHa7ll9SsbbK43HjbERbBaFX2A== dependencies: - "@jest/source-map" "^25.2.6" + "@jest/types" "^25.4.0" chalk "^3.0.0" - jest-util "^25.3.0" + jest-message-util "^25.4.0" + jest-util "^25.4.0" slash "^3.0.0" -"@jest/core@^25.2.4", "@jest/core@^25.3.0": - version "25.3.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-25.3.0.tgz#80f97a7a8b59dde741a24f30871cc26d0197d426" - integrity sha512-+D5a/tFf6pA/Gqft2DLBp/yeSRgXhlJ+Wpst0X/ZkfTRP54qDR3C61VfHwaex+GzZBiTcE9vQeoZ2v5T10+Mqw== +"@jest/core@^25.4.0": + version "25.4.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-25.4.0.tgz#cc1fe078df69b8f0fbb023bb0bcee23ef3b89411" + integrity sha512-h1x9WSVV0+TKVtATGjyQIMJENs8aF6eUjnCoi4jyRemYZmekLr8EJOGQqTWEX8W6SbZ6Skesy9pGXrKeAolUJw== dependencies: - "@jest/console" "^25.3.0" - "@jest/reporters" "^25.3.0" - "@jest/test-result" "^25.3.0" - "@jest/transform" "^25.3.0" - "@jest/types" "^25.3.0" + "@jest/console" "^25.4.0" + "@jest/reporters" "^25.4.0" + "@jest/test-result" "^25.4.0" + "@jest/transform" "^25.4.0" + "@jest/types" "^25.4.0" ansi-escapes "^4.2.1" chalk "^3.0.0" exit "^0.1.2" graceful-fs "^4.2.3" - jest-changed-files "^25.3.0" - jest-config "^25.3.0" - jest-haste-map "^25.3.0" - jest-message-util "^25.3.0" + jest-changed-files "^25.4.0" + jest-config "^25.4.0" + jest-haste-map "^25.4.0" + jest-message-util "^25.4.0" jest-regex-util "^25.2.6" - jest-resolve "^25.3.0" - jest-resolve-dependencies "^25.3.0" - jest-runner "^25.3.0" - jest-runtime "^25.3.0" - jest-snapshot "^25.3.0" - jest-util "^25.3.0" - jest-validate "^25.3.0" - jest-watcher "^25.3.0" + jest-resolve "^25.4.0" + jest-resolve-dependencies "^25.4.0" + jest-runner "^25.4.0" + jest-runtime "^25.4.0" + jest-snapshot "^25.4.0" + jest-util "^25.4.0" + jest-validate "^25.4.0" + jest-watcher "^25.4.0" micromatch "^4.0.2" p-each-series "^2.1.0" realpath-native "^2.0.0" @@ -1274,36 +1275,36 @@ slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^25.3.0": - version "25.3.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-25.3.0.tgz#587f28ddb4b0dfe97404d3d4a4c9dbfa0245fb2e" - integrity sha512-vgooqwJTHLLak4fE+TaCGeYP7Tz1Y3CKOsNxR1sE0V3nx3KRUHn3NUnt+wbcfd5yQWKZQKAfW6wqbuwQLrXo3g== +"@jest/environment@^25.4.0": + version "25.4.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-25.4.0.tgz#45071f525f0d8c5a51ed2b04fd42b55a8f0c7cb3" + integrity sha512-KDctiak4mu7b4J6BIoN/+LUL3pscBzoUCP+EtSPd2tK9fqyDY5OF+CmkBywkFWezS9tyH5ACOQNtpjtueEDH6Q== dependencies: - "@jest/fake-timers" "^25.3.0" - "@jest/types" "^25.3.0" - jest-mock "^25.3.0" + "@jest/fake-timers" "^25.4.0" + "@jest/types" "^25.4.0" + jest-mock "^25.4.0" -"@jest/fake-timers@^25.3.0": - version "25.3.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-25.3.0.tgz#995aad36d5c8984165ca5db12e740ab8dbf7042a" - integrity sha512-NHAj7WbsyR3qBJPpBwSwqaq2WluIvUQsyzpJTN7XDVk7VnlC/y1BAnaYZL3vbPIP8Nhm0Ae5DJe0KExr/SdMJQ== +"@jest/fake-timers@^25.4.0": + version "25.4.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-25.4.0.tgz#3a9a4289ba836abd084953dca406389a57e00fbd" + integrity sha512-lI9z+VOmVX4dPPFzyj0vm+UtaB8dCJJ852lcDnY0uCPRvZAaVGnMwBBc1wxtf+h7Vz6KszoOvKAt4QijDnHDkg== dependencies: - "@jest/types" "^25.3.0" - jest-message-util "^25.3.0" - jest-mock "^25.3.0" - jest-util "^25.3.0" + "@jest/types" "^25.4.0" + jest-message-util "^25.4.0" + jest-mock "^25.4.0" + jest-util "^25.4.0" lolex "^5.0.0" -"@jest/reporters@^25.3.0": - version "25.3.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-25.3.0.tgz#7f39f0e6911561cc5112a1b54656de18faee269b" - integrity sha512-1u0ZBygs0C9DhdYgLCrRfZfNKQa+9+J7Uo+Z9z0RWLHzgsxhoG32lrmMOtUw48yR6bLNELdvzormwUqSk4H4Vg== +"@jest/reporters@^25.4.0": + version "25.4.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-25.4.0.tgz#836093433b32ce4e866298af2d6fcf6ed351b0b0" + integrity sha512-bhx/buYbZgLZm4JWLcRJ/q9Gvmd3oUh7k2V7gA4ZYBx6J28pIuykIouclRdiAC6eGVX1uRZT+GK4CQJLd/PwPg== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^25.3.0" - "@jest/test-result" "^25.3.0" - "@jest/transform" "^25.3.0" - "@jest/types" "^25.3.0" + "@jest/console" "^25.4.0" + "@jest/test-result" "^25.4.0" + "@jest/transform" "^25.4.0" + "@jest/types" "^25.4.0" chalk "^3.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" @@ -1313,15 +1314,15 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^25.3.0" - jest-resolve "^25.3.0" - jest-util "^25.3.0" - jest-worker "^25.2.6" + jest-haste-map "^25.4.0" + jest-resolve "^25.4.0" + jest-util "^25.4.0" + jest-worker "^25.4.0" slash "^3.0.0" source-map "^0.6.0" string-length "^3.1.0" terminal-link "^2.0.0" - v8-to-istanbul "^4.0.1" + v8-to-istanbul "^4.1.3" optionalDependencies: node-notifier "^6.0.0" @@ -1334,41 +1335,41 @@ graceful-fs "^4.2.3" source-map "^0.6.0" -"@jest/test-result@^25.3.0": - version "25.3.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-25.3.0.tgz#137fab5e5c6fed36e5d40735d1eb029325e3bf06" - integrity sha512-mqrGuiiPXl1ap09Mydg4O782F3ouDQfsKqtQzIjitpwv3t1cHDwCto21jThw6WRRE+dKcWQvLG70GpyLJICfGw== +"@jest/test-result@^25.4.0": + version "25.4.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-25.4.0.tgz#6f2ec2c8da9981ef013ad8651c1c6f0cb20c6324" + integrity sha512-8BAKPaMCHlL941eyfqhWbmp3MebtzywlxzV+qtngQ3FH+RBqnoSAhNEPj4MG7d2NVUrMOVfrwuzGpVIK+QnMAA== dependencies: - "@jest/console" "^25.3.0" - "@jest/types" "^25.3.0" + "@jest/console" "^25.4.0" + "@jest/types" "^25.4.0" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^25.3.0": - version "25.3.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-25.3.0.tgz#271ad5f2b8f8137d092ccedc87e16a50f8676209" - integrity sha512-Xvns3xbji7JCvVcDGvqJ/pf4IpmohPODumoPEZJ0/VgC5gI4XaNVIBET2Dq5Czu6Gk3xFcmhtthh/MBOTljdNg== +"@jest/test-sequencer@^25.4.0": + version "25.4.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-25.4.0.tgz#2b96f9d37f18dc3336b28e3c8070f97f9f55f43b" + integrity sha512-240cI+nsM3attx2bMp9uGjjHrwrpvxxrZi8Tyqp/cfOzl98oZXVakXBgxODGyBYAy/UGXPKXLvNc2GaqItrsJg== dependencies: - "@jest/test-result" "^25.3.0" - jest-haste-map "^25.3.0" - jest-runner "^25.3.0" - jest-runtime "^25.3.0" + "@jest/test-result" "^25.4.0" + jest-haste-map "^25.4.0" + jest-runner "^25.4.0" + jest-runtime "^25.4.0" -"@jest/transform@^25.2.4", "@jest/transform@^25.3.0": - version "25.3.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-25.3.0.tgz#083c5447d5307d9b9494d6968115b647460e71f1" - integrity sha512-W01p8kTDvvEX6kd0tJc7Y5VdYyFaKwNWy1HQz6Jqlhu48z/8Gxp+yFCDVj+H8Rc7ezl3Mg0hDaGuFVkmHOqirg== +"@jest/transform@^25.4.0": + version "25.4.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-25.4.0.tgz#eef36f0367d639e2fd93dccd758550377fbb9962" + integrity sha512-t1w2S6V1sk++1HHsxboWxPEuSpN8pxEvNrZN+Ud/knkROWtf8LeUmz73A4ezE8476a5AM00IZr9a8FO9x1+j3g== dependencies: "@babel/core" "^7.1.0" - "@jest/types" "^25.3.0" + "@jest/types" "^25.4.0" babel-plugin-istanbul "^6.0.0" chalk "^3.0.0" convert-source-map "^1.4.0" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.2.3" - jest-haste-map "^25.3.0" + jest-haste-map "^25.4.0" jest-regex-util "^25.2.6" - jest-util "^25.3.0" + jest-util "^25.4.0" micromatch "^4.0.2" pirates "^4.0.1" realpath-native "^2.0.0" @@ -1376,7 +1377,7 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/types@^25.2.3", "@jest/types@^25.3.0": +"@jest/types@^25.3.0": version "25.3.0" resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.3.0.tgz#88f94b277a1d028fd7117bc1f74451e0fc2131e7" integrity sha512-UkaDNewdqXAmCDbN2GlUM6amDKS78eCqiw/UmF5nE0mmLTd6moJkiZJML/X52Ke3LH7Swhw883IRXq8o9nWjVw== @@ -1386,6 +1387,16 @@ "@types/yargs" "^15.0.0" chalk "^3.0.0" +"@jest/types@^25.4.0": + version "25.4.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.4.0.tgz#5afeb8f7e1cba153a28e5ac3c9fe3eede7206d59" + integrity sha512-XBeaWNzw2PPnGW5aXvZt3+VO60M+34RY3XDsCK5tW7kyj3RK0XClRutCfjqcBuaR2aBQTbluEDME9b5MB9UAPw== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^1.1.1" + "@types/yargs" "^15.0.0" + chalk "^3.0.0" + "@ledgerhq/devices@^5.13.0": version "5.13.0" resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-5.13.0.tgz#94666aff933d5bc5a98a6c190ff1749b37a65dba" @@ -1433,20 +1444,21 @@ resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-5.13.0.tgz#42e848f7c6f662387dfc5f3e86e3e5b4e07a5fae" integrity sha512-yMvzQiMjWDMRma3HPxQQibhvEqMaEdXXkNBk1+eaW+N47Y3neYSSyCJlyihzzMBeeoin4ChlP/5uKQaABwBeTg== -"@material-ui/core@4.9.8": - version "4.9.8" - resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.9.8.tgz#21c37a9aadf4ff8a2719b8cfcad0ae9e6ca53791" - integrity sha512-4cslpG6oLoPWUfwPkX+hvbak4hAGiOfgXOu/UIYeeMrtsTEebC0Mirjoby7zhS4ny86YI3rXEFW6EZDmlj5n5w== +"@material-ui/core@4.9.11": + version "4.9.11" + resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.9.11.tgz#02f45f4dbea6db191fdc0d993323d64cfae613fd" + integrity sha512-S2Ha9GpTxzl29XMeMc8dQX2pj97yApNzuhe/23If53fMdg5Fmd3SgbE1bMbyXeKhxwtXZjOFxd0vU+W/sez8Ew== dependencies: "@babel/runtime" "^7.4.4" - "@material-ui/styles" "^4.9.6" - "@material-ui/system" "^4.9.6" - "@material-ui/types" "^5.0.0" + "@material-ui/react-transition-group" "^4.2.0" + "@material-ui/styles" "^4.9.10" + "@material-ui/system" "^4.9.10" + "@material-ui/types" "^5.0.1" "@material-ui/utils" "^4.9.6" "@types/react-transition-group" "^4.2.0" - clsx "^1.0.2" + clsx "^1.0.4" hoist-non-react-statics "^3.3.2" - popper.js "^1.14.1" + popper.js "^1.16.1-lts" prop-types "^15.7.2" react-is "^16.8.0" react-transition-group "^4.3.0" @@ -1469,7 +1481,17 @@ prop-types "^15.7.2" react-is "^16.8.0" -"@material-ui/styles@^4.9.6": +"@material-ui/react-transition-group@^4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@material-ui/react-transition-group/-/react-transition-group-4.2.0.tgz#afec833bbcc79f05a9b4d4828b3e07965cc7e321" + integrity sha512-4zapZ0gW1ZTws5aH9OGy3IMvtTV/olc7YrVSkM1WFu1FsrEhL+qarEniRjx7LjHt0gukFqoINfElI8v2boVMQA== + dependencies: + "@babel/runtime" "^7.4.5" + dom-helpers "^3.4.0" + loose-envify "^1.4.0" + prop-types "^15.6.2" + +"@material-ui/styles@^4.9.10": version "4.9.10" resolved "https://registry.yarnpkg.com/@material-ui/styles/-/styles-4.9.10.tgz#182ccdd0bc8525a459486499bbaebcd92b0db3ab" integrity sha512-EXIXlqVyFDnjXF6tj72y6ZxiSy+mHtrsCo3Srkm3XUeu3Z01aftDBy7ZSr3TQ02gXHTvDSBvegp3Le6p/tl7eA== @@ -1491,7 +1513,7 @@ jss-plugin-vendor-prefixer "^10.0.3" prop-types "^15.7.2" -"@material-ui/system@^4.9.6": +"@material-ui/system@^4.9.10": version "4.9.10" resolved "https://registry.yarnpkg.com/@material-ui/system/-/system-4.9.10.tgz#5de6ec7bea0f222b10b45e5bd5bb8b9a7b938926" integrity sha512-E+t0baX2TBZk6ALm8twG6objpsxLdMM4MDm1++LMt2m7CetCAEc3aIAfDaprk4+tm5hFT1Cah5dRWk8EeIFQYw== @@ -1500,7 +1522,7 @@ "@material-ui/utils" "^4.9.6" prop-types "^15.7.2" -"@material-ui/types@^5.0.0", "@material-ui/types@^5.0.1": +"@material-ui/types@^5.0.1": version "5.0.1" resolved "https://registry.yarnpkg.com/@material-ui/types/-/types-5.0.1.tgz#c4954063cdc196eb327ee62c041368b1aebb6d61" integrity sha512-wURPSY7/3+MAtng3i26g+WKwwNE3HEeqa/trDBR5+zWKmcjO+u9t7Npu/J1r+3dmIa/OeziN9D/18IrBKvKffw== @@ -1665,7 +1687,7 @@ dependencies: defer-to-connect "^1.0.1" -"@testing-library/dom@^7.0.2": +"@testing-library/dom@^7.1.0": version "7.2.1" resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-7.2.1.tgz#bb3b31d669bbe0c4939dadd95d69caa3c1d0b372" integrity sha512-xIGoHlQ2ZiEL1dJIFKNmLDypzYF+4OJTTASRctl/aoIDaS5y/pRVHRigoqvPUV11mdJoR71IIgi/6UviMgyz4g== @@ -1676,10 +1698,10 @@ dom-accessibility-api "^0.4.2" pretty-format "^25.1.0" -"@testing-library/jest-dom@5.3.0": - version "5.3.0" - resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-5.3.0.tgz#2ae813b8b0eb69e8808f75d3af8efa3f0dc4d7ec" - integrity sha512-Cdhpc3BHL888X55qBNyra9eM0UG63LCm/FqCWTa1Ou/0MpsUbQTM9vW1NU6/jBQFoSLgkFfDG5XVpm2V0dOm/A== +"@testing-library/jest-dom@5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-5.5.0.tgz#4707023e8f572021e8a84f65721303ff60828d88" + integrity sha512-7sWHrpxG4Yd8TmryI7Rtbx8Ff4mbs3ASye3oshQIuHvsCR+QHgr7rTR/PfeXvOmwUwR36wSTTAvrLKsPmr6VEQ== dependencies: "@babel/runtime" "^7.9.2" "@types/testing-library__jest-dom" "^5.0.2" @@ -1691,14 +1713,14 @@ lodash "^4.17.15" redent "^3.0.0" -"@testing-library/react@10.0.1": - version "10.0.1" - resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-10.0.1.tgz#4f5e2a8836257c5bd3df640b21d7bea5a0d83ead" - integrity sha512-sMHWud2dcymOzq2AhEniICSijEwKeTiBX+K0y36FYNY7wH2t0SIP1o732Bf5dDY0jYoMC2hj2UJSVpZC/rDsWg== +"@testing-library/react@10.0.2": + version "10.0.2" + resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-10.0.2.tgz#8eca7aa52d810cf7150048a2829fdc487162006d" + integrity sha512-YT6Mw0oJz7R6vlEkmo1FlUD+K15FeXApOB5Ffm9zooFVnrwkt00w18dUJFMOh1yRp9wTdVRonbor7o4PIpFCmA== dependencies: - "@babel/runtime" "^7.8.7" - "@testing-library/dom" "^7.0.2" - "@types/testing-library__react" "^9.1.3" + "@babel/runtime" "^7.9.2" + "@testing-library/dom" "^7.1.0" + "@types/testing-library__react" "^10.0.0" "@toruslabs/fetch-node-details@^2.2.0": version "2.2.1" @@ -2030,7 +2052,7 @@ resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a" integrity sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA== -"@types/babel__core@^7.1.0", "@types/babel__core@^7.1.7": +"@types/babel__core@^7.1.7": version "7.1.7" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.7.tgz#1dacad8840364a57c98d0dd4855c6dd3752c6b89" integrity sha512-RL62NqSFPCDK2FM1pSDH0scHpJvsXtZNiYlMB73DgPBaG1E38ZYVL+ei5EkWRbr+KC4YNiAUNBnRj+bgwpgjMw== @@ -2147,6 +2169,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.35.tgz#1e61b226c14380f4384f70cfe49a65c2c553ad2b" integrity sha512-ASYsaKecA7TUsDrqIGPNk3JeEox0z/0XR/WsJJ8BIX/9+SkMSImQXKWfU/yBrSyc7ZSE/NPqLu36Nur0miCFfQ== +"@types/normalize-package-data@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" + integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== + "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" @@ -2218,10 +2245,10 @@ dependencies: "@types/jest" "*" -"@types/testing-library__react@^9.1.3": - 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== +"@types/testing-library__react@^10.0.0": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@types/testing-library__react/-/testing-library__react-10.0.1.tgz#92bb4a02394bf44428e35f1da2970ed77f803593" + integrity sha512-RbDwmActAckbujLZeVO/daSfdL1pnjVqas25UueOkAY5r7vriavWf0Zqg7ghXMHa8ycD/kLkv8QOj31LmSYwww== dependencies: "@types/react-dom" "*" "@types/testing-library__dom" "*" @@ -2491,10 +2518,10 @@ "@webassemblyjs/wast-parser" "1.9.0" "@xtuc/long" "4.2.2" -"@welldone-software/why-did-you-render@4.0.5": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@welldone-software/why-did-you-render/-/why-did-you-render-4.0.5.tgz#15a8de16fc84307ab401fb3f859d9a94f2b5334c" - integrity sha512-igBq0kGqKUdwMUQFgPkDzKQS+8MHqhDvF2j2w+05yS7LqcIIZyBL7FRYf1Hvm1QABx86prS7xwiIJa0U0ev5JA== +"@welldone-software/why-did-you-render@4.0.8": + version "4.0.8" + resolved "https://registry.yarnpkg.com/@welldone-software/why-did-you-render/-/why-did-you-render-4.0.8.tgz#a685e7496421b44723f9342046f1b0dbbb39ad39" + integrity sha512-32B1YFqgEOO5fIBKT0uBIjuBAGxov/pwlxEqRZhmtvlyWTl927ouOP4PaxE6RAKuGAkkl6qoTF3yke3CokbZEQ== dependencies: lodash "^4" @@ -2674,6 +2701,13 @@ alphanum-sort@^1.0.0: resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= +ansi-colors@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9" + integrity sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA== + dependencies: + ansi-wrap "^0.1.0" + ansi-colors@^3.0.0: version "3.2.4" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" @@ -2691,6 +2725,13 @@ ansi-escapes@^4.2.1: dependencies: type-fest "^0.11.0" +ansi-gray@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251" + integrity sha1-KWLPVOyXksSFEKPetSRDaGHvclE= + dependencies: + ansi-wrap "0.1.0" + ansi-html@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" @@ -2736,6 +2777,11 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: "@types/color-name" "^1.1.1" color-convert "^2.0.1" +ansi-wrap@0.1.0, ansi-wrap@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" + integrity sha1-qCJQ3bABXponyoLoLqYDu/pF768= + any-observable@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b" @@ -2767,11 +2813,23 @@ app-module-path@^2.2.0: resolved "https://registry.yarnpkg.com/app-module-path/-/app-module-path-2.2.0.tgz#641aa55dfb7d6a6f0a8141c4b9c0aa50b6c24dd5" integrity sha1-ZBqlXft9am8KgUHEucCqULbCTdU= +append-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/append-buffer/-/append-buffer-1.0.2.tgz#d8220cf466081525efea50614f3de6514dfa58f1" + integrity sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE= + dependencies: + buffer-equal "^1.0.0" + aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== +archy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -2807,16 +2865,35 @@ arr-diff@^4.0.0: resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= +arr-filter@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/arr-filter/-/arr-filter-1.1.2.tgz#43fdddd091e8ef11aa4c45d9cdc18e2dff1711ee" + integrity sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4= + dependencies: + make-iterator "^1.0.0" + arr-flatten@^1.0.1, arr-flatten@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== +arr-map@^2.0.0, arr-map@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/arr-map/-/arr-map-2.0.2.tgz#3a77345ffc1cf35e2a91825601f9e58f2e24cac4" + integrity sha1-Onc0X/wc814qkYJWAfnljy4kysQ= + dependencies: + make-iterator "^1.0.0" + arr-union@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= +array-each@^1.0.0, array-each@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" + integrity sha1-p5SvDAWrF1KEbudTofIRoFugxE8= + array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" @@ -2846,6 +2923,35 @@ array-includes@^3.0.3, array-includes@^3.1.1: es-abstract "^1.17.0" is-string "^1.0.5" +array-initial@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/array-initial/-/array-initial-1.1.0.tgz#2fa74b26739371c3947bd7a7adc73be334b3d795" + integrity sha1-L6dLJnOTccOUe9enrcc74zSz15U= + dependencies: + array-slice "^1.0.0" + is-number "^4.0.0" + +array-last@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/array-last/-/array-last-1.3.0.tgz#7aa77073fec565ddab2493f5f88185f404a9d336" + integrity sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg== + dependencies: + is-number "^4.0.0" + +array-slice@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4" + integrity sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w== + +array-sort@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-sort/-/array-sort-1.0.0.tgz#e4c05356453f56f53512a7d1d6123f2c54c0a88a" + integrity sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg== + dependencies: + default-compare "^1.0.0" + get-value "^2.0.6" + kind-of "^5.0.2" + array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" @@ -2935,6 +3041,16 @@ astral-regex@^1.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== +async-done@^1.2.0, async-done@^1.2.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/async-done/-/async-done-1.3.2.tgz#5e15aa729962a4b07414f528a88cdf18e0b290a2" + integrity sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.2" + process-nextick-args "^2.0.0" + stream-exhaust "^1.0.1" + async-each@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" @@ -2957,6 +3073,13 @@ async-sema@^3.1.0: resolved "https://registry.yarnpkg.com/async-sema/-/async-sema-3.1.0.tgz#3a813beb261e4cc58b19213916a48e931e21d21e" integrity sha512-+JpRq3r0zjpRLDruS6q/nC4V5tzsaiu07521677Mdi5i+AkaU/aNJH38rYHJVQ4zvz+SSkjgc8FUI7qIZrR+3g== +async-settle@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/async-settle/-/async-settle-1.0.0.tgz#1d0a914bb02575bec8a8f3a74e5080f72b2c0c6b" + integrity sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs= + dependencies: + async-done "^1.2.2" + async@2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" @@ -3024,13 +3147,13 @@ authereum@^0.0.4-beta.131: web3-provider-engine "^15.0.4" web3-utils "^1.2.1" -autoprefixer@9.7.5: - version "9.7.5" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.5.tgz#8df10b9ff9b5814a8d411a5cfbab9c793c392376" - integrity sha512-URo6Zvt7VYifomeAfJlMFnYDhow1rk2bufwkbamPEAtQFcL11moLk4PnR7n9vlu7M+BkXAZkHFA0mIcY7tjQFg== +autoprefixer@9.7.6: + version "9.7.6" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.6.tgz#63ac5bbc0ce7934e6997207d5bb00d68fa8293a4" + integrity sha512-F7cYpbN7uVVhACZTeeIeealwdGM6wMtfWARVLTy5xmKtgVdBNJvbDRoCK3YO1orcs7gv/KwYlb3iXwu9Ug9BkQ== dependencies: - browserslist "^4.11.0" - caniuse-lite "^1.0.30001036" + browserslist "^4.11.1" + caniuse-lite "^1.0.30001039" chalk "^2.4.2" normalize-range "^0.1.2" num2fraction "^1.2.2" @@ -3250,29 +3373,16 @@ babel-helpers@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-jest@25.2.4: - version "25.2.4" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-25.2.4.tgz#b21b68d3af8f161c3e6e501e91f0dea8e652e344" - integrity sha512-+yDzlyJVWrqih9i2Cvjpt7COaN8vUwCsKGtxJLzg6I0xhxD54K8mvDUCliPKLufyzHh/c5C4MRj4Vk7VMjOjIg== +babel-jest@25.4.0, babel-jest@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-25.4.0.tgz#409eb3e2ddc2ad9a92afdbb00991f1633f8018d0" + integrity sha512-p+epx4K0ypmHuCnd8BapfyOwWwosNCYhedetQey1awddtfmEX0MmdxctGl956uwUmjwXR5VSS5xJcGX9DvdIog== dependencies: - "@jest/transform" "^25.2.4" - "@jest/types" "^25.2.3" - "@types/babel__core" "^7.1.0" - babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^25.2.1" - chalk "^3.0.0" - slash "^3.0.0" - -babel-jest@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-25.3.0.tgz#999d0c19e8427f66b796bf9ea233eedf087b957c" - integrity sha512-qiXeX1Cmw4JZ5yQ4H57WpkO0MZ61Qj+YnsVUwAMnDV5ls+yHon11XjarDdgP7H8lTmiEi6biiZA8y3Tmvx6pCg== - dependencies: - "@jest/transform" "^25.3.0" - "@jest/types" "^25.3.0" + "@jest/transform" "^25.4.0" + "@jest/types" "^25.4.0" "@types/babel__core" "^7.1.7" babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^25.3.0" + babel-preset-jest "^25.4.0" chalk "^3.0.0" slash "^3.0.0" @@ -3319,10 +3429,10 @@ babel-plugin-istanbul@^6.0.0: istanbul-lib-instrument "^4.0.0" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^25.2.6: - version "25.2.6" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-25.2.6.tgz#2af07632b8ac7aad7d414c1e58425d5fc8e84909" - integrity sha512-qE2xjMathybYxjiGFJg0mLFrz0qNp83aNZycWDY/SuHiZNq+vQfRQtuINqyXyue1ELd8Rd+1OhFSLjms8msMbw== +babel-plugin-jest-hoist@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-25.4.0.tgz#0c122c1b93fb76f52d2465be2e8069e798e9d442" + integrity sha512-M3a10JCtTyKevb0MjuH6tU+cP/NVQZ82QPADqI1RQYY1OphztsCeIeQmTsHmF/NS6m0E51Zl4QNsI3odXSQF5w== dependencies: "@types/babel__traverse" "^7.0.6" @@ -3654,12 +3764,12 @@ babel-preset-env@^1.7.0: invariant "^2.2.2" semver "^5.3.0" -babel-preset-jest@^25.2.1, babel-preset-jest@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-25.3.0.tgz#9ab40aee52a19bdc52b8b1ec2403d5914ac3d86b" - integrity sha512-tjdvLKNMwDI9r+QWz9sZUQGTq1dpoxjUqFUpEasAc7MOtHg9XuLT2fx0udFG+k1nvMV0WvHHVAN7VmCZ+1Zxbw== +babel-preset-jest@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-25.4.0.tgz#10037cc32b751b994b260964629e49dc479abf4c" + integrity sha512-PwFiEWflHdu3JCeTr0Pb9NcHHE34qWFnPQRVPvqQITx4CsDCzs6o05923I10XvLvn9nNsRHuiVgB72wG/90ZHQ== dependencies: - babel-plugin-jest-hoist "^25.2.6" + babel-plugin-jest-hoist "^25.4.0" babel-preset-current-node-syntax "^0.1.2" babel-register@^6.26.0: @@ -3732,6 +3842,21 @@ babylon@6.18.0, babylon@^6.18.0: resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== +bach@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/bach/-/bach-1.2.0.tgz#4b3ce96bf27134f79a1b414a51c14e34c3bd9880" + integrity sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA= + dependencies: + arr-filter "^1.1.1" + arr-flatten "^1.0.1" + arr-map "^2.0.0" + array-each "^1.0.0" + array-initial "^1.0.0" + array-last "^1.1.1" + async-done "^1.2.2" + async-settle "^1.0.0" + now-and-later "^2.0.0" + backoff@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/backoff/-/backoff-2.5.0.tgz#f616eda9d3e4b66b8ca7fca79f695722c5f8e26f" @@ -3898,10 +4023,10 @@ bn.js@^5.1.1: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.1.tgz#48efc4031a9c4041b9c99c6941d903463ab62eb5" integrity sha512-IUTD/REb78Z2eodka1QZyyEk66pciRcP6Sroka0aI3tG/iwIdYLrBD62RsubR7vqdt3WyX8p4jxeatzmRSphtA== -bnc-onboard@^1.7.1: - version "1.7.3" - resolved "https://registry.yarnpkg.com/bnc-onboard/-/bnc-onboard-1.7.3.tgz#6a1c53ba48a4061e72fff21a8cec8d7324c974ee" - integrity sha512-lR540qOWSFmr01XUv9tAPBIYG7Hv1z1+Eo3xhaMBtWoddXzOmI8fvJBf3irkUFe+i2RDZGw/B6oDKn+awLUrow== +bnc-onboard@1.7.5: + version "1.7.5" + resolved "https://registry.yarnpkg.com/bnc-onboard/-/bnc-onboard-1.7.5.tgz#e45ae51101e66b29935c16696e1d23478f5a5c4a" + integrity sha512-cxxsMPN2yy4EzaWXJk5TS9A7YYtolE4cuoxjB40Rm9nuP6k03zp1RST3pMMHn7zTXKGfofv99Q+YDJtYrOyCKg== dependencies: "@ledgerhq/hw-app-eth" "^5.7.0" "@ledgerhq/hw-transport-u2f" "^5.7.0" @@ -4116,7 +4241,7 @@ browserslist@^3.2.6: caniuse-lite "^1.0.30000844" electron-to-chromium "^1.3.47" -browserslist@^4.0.0, browserslist@^4.11.0, browserslist@^4.8.5, browserslist@^4.9.1: +browserslist@^4.0.0, browserslist@^4.11.1, browserslist@^4.8.5, browserslist@^4.9.1: version "4.11.1" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.11.1.tgz#92f855ee88d6e050e7e7311d987992014f1a1f1b" integrity sha512-DCTr3kDrKEYNw6Jb9HFxVLQNaue8z+0ZfRBRjmCunKDEXEBajKDj2Y+Uelg+Pi29OnvaSGwjOsnRyNEkXzHg5g== @@ -4192,6 +4317,11 @@ buffer-crc32@~0.2.3: resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= +buffer-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-1.0.0.tgz#59616b498304d556abd466966b22eeda3eca5fbe" + integrity sha1-WWFrSYME1Var1GaWayLu2j7KX74= + buffer-fill@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" @@ -4431,11 +4561,16 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001036, caniuse-lite@^1.0.30001038: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001038: version "1.0.30001041" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001041.tgz#c2ea138dafc6fe03877921ddcddd4a02a14daf76" integrity sha512-fqDtRCApddNrQuBxBS7kEiSGdBsgO4wiVw4G/IClfqzfhW45MbTumfN4cuUJGTM0YGFNn97DCXPJ683PS6zwvA== +caniuse-lite@^1.0.30001039: + version "1.0.30001043" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001043.tgz#1b561de27aefbe6ff99e41866b8d7d87840c513b" + integrity sha512-MrBDRPJPDBYwACtSQvxg9+fkna5jPXhJlKmuxenl/ml9uf8LHKlDmLpElu+zTW/bEz7lC1m0wTDD7jiIB+hgFg== + capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -4548,7 +4683,7 @@ cheerio@1.0.0-rc.2: lodash "^4.15.0" parse5 "^3.0.1" -chokidar@^2.1.8: +chokidar@^2.0.0, chokidar@^2.1.8: version "2.1.8" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== @@ -4702,6 +4837,11 @@ cliui@^6.0.0: strip-ansi "^6.0.0" wrap-ansi "^6.2.0" +clone-buffer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" + integrity sha1-4+JbIHrE5wGvch4staFnksrD3Fg= + clone-response@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" @@ -4714,6 +4854,11 @@ clone-stats@^0.0.1: resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" integrity sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE= +clone-stats@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" + integrity sha1-s3gt/4u1R04Yuba/D9/ngvh3doA= + clone@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb" @@ -4729,6 +4874,15 @@ clone@^1.0.0, clone@^1.0.2: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= +cloneable-readable@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.1.3.tgz#120a00cb053bfb63a222e709f9683ea2e11d8cec" + integrity sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ== + dependencies: + inherits "^2.0.1" + process-nextick-args "^2.0.0" + readable-stream "^2.3.5" + clsx@^1.0.2, clsx@^1.0.4: version "1.1.0" resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.0.tgz#62937c6adfea771247c34b54d320fb99624f5702" @@ -4766,6 +4920,15 @@ collect-v8-coverage@^1.0.0: resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg== +collection-map@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-map/-/collection-map-1.0.0.tgz#aea0f06f8d26c780c2b75494385544b2255af18c" + integrity sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw= + dependencies: + arr-map "^2.0.2" + for-own "^1.0.0" + make-iterator "^1.0.0" + collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" @@ -4816,6 +4979,11 @@ color-string@^1.5.2: color-name "^1.0.0" simple-swizzle "^0.2.2" +color-support@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" + integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== + color@^3.0.0: version "3.1.2" resolved "https://registry.yarnpkg.com/color/-/color-3.1.2.tgz#68148e7f85d41ad7649c5fa8c8106f098d229e10" @@ -4861,6 +5029,11 @@ commander@^4.0.1, commander@^4.1.1: resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== +commander@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-5.0.0.tgz#dbf1909b49e5044f8fdaf0adc809f0c0722bdfd0" + integrity sha512-JrDGPAKjMGSP1G0DUoaceEJ3DZgAfr/q6X7FVk4+U5KxUSKviYGM2k6zWkfyyBHy5rAtzgYJFa1ro2O9PtoxwQ== + commander@~2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" @@ -4922,7 +5095,7 @@ concat-stream@1.5.1: readable-stream "~2.0.0" typedarray "~0.0.5" -concat-stream@^1.5.0, concat-stream@^1.5.1: +concat-stream@^1.5.0, concat-stream@^1.5.1, concat-stream@^1.6.0: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== @@ -4983,7 +5156,7 @@ content-type@~1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== -convert-source-map@1.X, convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.1, convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@1.X, convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== @@ -5022,6 +5195,14 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= +copy-props@^2.0.1: + version "2.0.4" + resolved "https://registry.yarnpkg.com/copy-props/-/copy-props-2.0.4.tgz#93bb1cadfafd31da5bb8a9d4b41f471ec3a72dfe" + integrity sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A== + dependencies: + each-props "^1.3.0" + is-plain-object "^2.0.1" + core-js-compat@^3.6.2: version "3.6.5" resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.6.5.tgz#2a51d9a4e25dfd6e690251aa81f99e3c05481f1c" @@ -5216,23 +5397,24 @@ css-declaration-sorter@^4.0.1: postcss "^7.0.1" timsort "^0.3.0" -css-loader@3.4.2: - version "3.4.2" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.4.2.tgz#d3fdb3358b43f233b78501c5ed7b1c6da6133202" - integrity sha512-jYq4zdZT0oS0Iykt+fqnzVLRIeiPWhka+7BqPn+oSIpWJAHak5tmB/WZrJ2a21JhCeFyNnnlroSl8c+MtVndzA== +css-loader@3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.5.2.tgz#6483ae56f48a7f901fbe07dde2fc96b01eafab3c" + integrity sha512-hDL0DPopg6zQQSRlZm0hyeaqIRnL0wbWjay9BZxoiJBpbfOW4WHfbaYQhwnDmEa0kZUc1CJ3IFo15ot1yULMIQ== dependencies: camelcase "^5.3.1" cssesc "^3.0.0" icss-utils "^4.1.1" loader-utils "^1.2.3" normalize-path "^3.0.0" - postcss "^7.0.23" + postcss "^7.0.27" postcss-modules-extract-imports "^2.0.0" postcss-modules-local-by-default "^3.0.2" - postcss-modules-scope "^2.1.1" + postcss-modules-scope "^2.2.0" postcss-modules-values "^3.0.0" - postcss-value-parser "^4.0.2" - schema-utils "^2.6.0" + postcss-value-parser "^4.0.3" + schema-utils "^2.6.5" + semver "^6.3.0" css-select-base-adapter@^0.1.1: version "0.1.1" @@ -5472,10 +5654,10 @@ data-urls@^1.1.0: whatwg-mimetype "^2.2.0" whatwg-url "^7.0.0" -date-fns@2.11.1: - version "2.11.1" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.11.1.tgz#197b8be1bbf5c5e6fe8bea817f0fe111820e7a12" - integrity sha512-3RdUoinZ43URd2MJcquzBbDQo+J87cSzB8NkXdZiN5ia1UNyep0oCyitfiL88+R7clGTeq/RniXAc16gWyAu1w== +date-fns@2.12.0: + version "2.12.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.12.0.tgz#01754c8a2f3368fc1119cf4625c3dad8c1845ee6" + integrity sha512-qJgn99xxKnFgB1qL4jpxU7Q2t0LOn1p8KMIveef3UZD7kqjT3tpFNNdXJelEHhE+rUgffriXriw/sOSU+cS1Hw== date-fns@^1.27.2: version "1.30.1" @@ -5631,6 +5813,13 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== +default-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-compare/-/default-compare-1.0.0.tgz#cb61131844ad84d84788fb68fd01681ca7781a2f" + integrity sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ== + dependencies: + kind-of "^5.0.2" + default-gateway@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-4.2.0.tgz#167104c7500c2115f6dd69b0a536bb8ed720552b" @@ -5639,6 +5828,11 @@ default-gateway@^4.2.0: execa "^1.0.0" ip-regex "^2.1.0" +default-resolution@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/default-resolution/-/default-resolution-2.0.0.tgz#bcb82baa72ad79b426a76732f1a81ad6df26d684" + integrity sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ= + defaults@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" @@ -5880,6 +6074,13 @@ dom-converter@^0.2: dependencies: utila "~0.4" +dom-helpers@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.4.0.tgz#e9b369700f959f62ecde5a6babde4bccd9169af8" + integrity sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA== + dependencies: + "@babel/runtime" "^7.1.2" + dom-helpers@^5.0.1: version "5.1.4" resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.1.4.tgz#4609680ab5c79a45f2531441f1949b79d6587f4b" @@ -6045,6 +6246,14 @@ duplexify@^3.2.0, duplexify@^3.4.2, duplexify@^3.6.0: readable-stream "^2.0.0" stream-shift "^1.0.0" +each-props@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/each-props/-/each-props-1.3.2.tgz#ea45a414d16dd5cfa419b1a81720d5ca06892333" + integrity sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA== + dependencies: + is-plain-object "^2.0.1" + object.defaults "^1.1.0" + easy-stack@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/easy-stack/-/easy-stack-1.0.0.tgz#12c91b3085a37f0baa336e9486eac4bf94e3e788" @@ -6254,7 +6463,7 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -es5-ext@^0.10.35, es5-ext@^0.10.50: +es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50: version "0.10.53" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== @@ -6263,7 +6472,7 @@ es5-ext@^0.10.35, es5-ext@^0.10.50: es6-symbol "~3.1.3" next-tick "~1.0.0" -es6-iterator@~2.0.3: +es6-iterator@^2.0.1, es6-iterator@^2.0.3, es6-iterator@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= @@ -6285,6 +6494,16 @@ es6-symbol@^3.1.1, es6-symbol@~3.1.3: d "^1.0.1" ext "^1.1.2" +es6-weak-map@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" + integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== + dependencies: + d "1" + es5-ext "^0.10.46" + es6-iterator "^2.0.3" + es6-symbol "^3.1.1" + escape-html@1.0.3, escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -6417,10 +6636,10 @@ eslint-plugin-react@^7.18.3: string.prototype.matchall "^4.0.2" xregexp "^4.3.0" -eslint-plugin-sort-destructure-keys@^1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-sort-destructure-keys/-/eslint-plugin-sort-destructure-keys-1.3.3.tgz#f8396d1665d1eb70b0ace4972a70dcabadc8d29e" - integrity sha512-+ZI4IsCQe1Xfdxo4kTEtXwfHoOOvhV1u6nG7s8Ot1s6KSYlAlx0bnwXSsLgqGzROYkpSAy/a5JI9pPN3pJQXpw== +eslint-plugin-sort-destructure-keys@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-sort-destructure-keys/-/eslint-plugin-sort-destructure-keys-1.3.4.tgz#0e564bec2bcada21a64f1be9eb243b80a880149b" + integrity sha512-isdXh0LxE6WEUkkmNtpXX0W95wqCyYI6PY3w9aEcrWQ2IqUzgHQpCfMcb8BD5Wlp2Y9i91kk2leDiII43C1kww== dependencies: natural-compare-lite "^1.4.0" @@ -7286,7 +7505,7 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^3.2.0, execa@^3.4.0: +execa@^3.2.0: version "3.4.0" resolved "https://registry.yarnpkg.com/execa/-/execa-3.4.0.tgz#c08ed4550ef65d858fac269ffc8572446f37eb89" integrity sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g== @@ -7302,6 +7521,21 @@ execa@^3.2.0, execa@^3.4.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" +execa@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-4.0.0.tgz#7f37d6ec17f09e6b8fc53288611695b6d12b9daf" + integrity sha512-JbDUxwV3BoT5ZVXQrSVbAiaXhXUkIwvbhPIwZ0N13kX+5yCzOhUNdocxB/UQRuYOHRYYwAxKYwJYc0T4D12pDA== + dependencies: + cross-spawn "^7.0.0" + get-stream "^5.0.0" + human-signals "^1.1.1" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.0" + onetime "^5.1.0" + signal-exit "^3.0.2" + strip-final-newline "^2.0.0" + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -7351,16 +7585,16 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" -expect@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-25.3.0.tgz#5fd36e51befd05afb7184bc954f8a4792d184c71" - integrity sha512-buboTXML2h/L0Kh44Ys2Cx49mX20ISc5KDirkxIs3Q9AJv0kazweUAbukegr+nHDOvFRKmxdojjIHCjqAceYfg== +expect@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-25.4.0.tgz#0b16c17401906d1679d173e59f0d4580b22f8dc8" + integrity sha512-7BDIX99BTi12/sNGJXA9KMRcby4iAmu1xccBOhyKCyEhjcVKS3hPmHdA/4nSI9QGIOkUropKqr3vv7WMDM5lvQ== dependencies: - "@jest/types" "^25.3.0" + "@jest/types" "^25.4.0" ansi-styles "^4.0.0" jest-get-type "^25.2.6" - jest-matcher-utils "^25.3.0" - jest-message-util "^25.3.0" + jest-matcher-utils "^25.4.0" + jest-message-util "^25.4.0" jest-regex-util "^25.2.6" express@^4.14.0, express@^4.16.3, express@^4.17.1: @@ -7483,6 +7717,16 @@ fake-merkle-patricia-tree@^1.0.1: dependencies: checkpoint-store "^1.1.0" +fancy-log@^1.3.2: + version "1.3.3" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7" + integrity sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw== + dependencies: + ansi-gray "^0.1.1" + color-support "^1.1.3" + parse-node-version "^1.0.0" + time-stamp "^1.0.0" + fast-deep-equal@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" @@ -7673,10 +7917,10 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -final-form@4.18.7: - version "4.18.7" - resolved "https://registry.yarnpkg.com/final-form/-/final-form-4.18.7.tgz#c30239ac9154cbfbf4f6d19e831f5fc9cbc1ba78" - integrity sha512-XdlYYGDcoUcKKVzRJxLg8N/ZG3wVLZvhO7K7PKQWVMjCiIUWdmtBwApw2NFS4P7RJvg8OdF73qGXhhE3K5PuDQ== +final-form@4.19.1: + version "4.19.1" + resolved "https://registry.yarnpkg.com/final-form/-/final-form-4.19.1.tgz#1aa1a3bf67f7399b54ed6185d56f9a8d74cfda5a" + integrity sha512-C4RldRCUs8YZod91ydtrsT+TOeG3fwU4ip9oBDXhvbWdQ6iXl4cIrTAQkqpWijbnI3XFVA0akV7YTjSFJMJ2uw== dependencies: "@babel/runtime" "^7.8.3" @@ -7748,7 +7992,7 @@ find-versions@^3.2.0: dependencies: semver-regex "^2.0.0" -findup-sync@3.0.0: +findup-sync@3.0.0, findup-sync@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" integrity sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg== @@ -7758,11 +8002,37 @@ findup-sync@3.0.0: micromatch "^3.0.4" resolve-dir "^1.0.1" +findup-sync@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc" + integrity sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw= + dependencies: + detect-file "^1.0.0" + is-glob "^3.1.0" + micromatch "^3.0.4" + resolve-dir "^1.0.1" + +fined@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fined/-/fined-1.2.0.tgz#d00beccf1aa2b475d16d423b0238b713a2c4a37b" + integrity sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng== + dependencies: + expand-tilde "^2.0.2" + is-plain-object "^2.0.3" + object.defaults "^1.1.0" + object.pick "^1.2.0" + parse-filepath "^1.0.1" + first-chunk-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e" integrity sha1-Wb+1DNkF9g18OUzT2ayqtOatk04= +flagged-respawn@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.1.tgz#e7de6f1279ddd9ca9aac8a5971d618606b3aab41" + integrity sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q== + flat-cache@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" @@ -7777,17 +8047,17 @@ flatted@^2.0.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== -flow-bin@0.121.0: - version "0.121.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.121.0.tgz#e206bdc3d510277f9a847920540f72c49e87c130" - integrity sha512-QYRMs+AoMLj/OTaSo9+8c3kzM/u8YgvfrInp0qzhtzC02Sc2jb3BV/QZWZGjPo+XK3twyyqXrcI3s8MuL1UQRg== +flow-bin@0.123.0: + version "0.123.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.123.0.tgz#7ba61a0b8775928cf4943ccf78eed2b1b05f7b3a" + integrity sha512-Ylcf8YDIM/KrqtxkPuq+f8O+6sdYA2Nuz5f+sWHlp539DatZz3YMcsO1EiXaf1C11HJgpT/3YGYe7xZ9/UZmvQ== flow-stoplight@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/flow-stoplight/-/flow-stoplight-1.0.0.tgz#4a292c5bcff8b39fa6cc0cb1a853d86f27eeff7b" integrity sha1-SiksW8/4s5+mzAyxqFPYbyfu/3s= -flush-write-stream@^1.0.0: +flush-write-stream@^1.0.0, flush-write-stream@^1.0.2: version "1.1.1" resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== @@ -7828,6 +8098,13 @@ for-own@^0.1.4: dependencies: for-in "^1.0.1" +for-own@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b" + integrity sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs= + dependencies: + for-in "^1.0.1" + foreach@^2.0.4: version "2.0.5" resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" @@ -7996,6 +8273,14 @@ fs-minipass@^2.0.0: dependencies: minipass "^3.0.0" +fs-mkdirp-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz#0b7815fc3201c6a69e14db98ce098c16935259eb" + integrity sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes= + dependencies: + graceful-fs "^4.1.11" + through2 "^2.0.3" + fs-readdir-recursive@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" @@ -8223,11 +8508,39 @@ glob-stream@^5.3.2: to-absolute-glob "^0.1.1" unique-stream "^2.0.2" +glob-stream@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-6.1.0.tgz#7045c99413b3eb94888d83ab46d0b404cc7bdde4" + integrity sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ= + dependencies: + extend "^3.0.0" + glob "^7.1.1" + glob-parent "^3.1.0" + is-negated-glob "^1.0.0" + ordered-read-streams "^1.0.0" + pumpify "^1.3.5" + readable-stream "^2.1.5" + remove-trailing-separator "^1.0.1" + to-absolute-glob "^2.0.0" + unique-stream "^2.0.2" + glob-to-regexp@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= +glob-watcher@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-5.0.3.tgz#88a8abf1c4d131eb93928994bc4a593c2e5dd626" + integrity sha512-8tWsULNEPHKQ2MR4zXuzSmqbdyV5PtwwCaWSGQ1WwHsJ07ilNeN1JB8ntxhckbnpSHaf9dXFUHzIWvm1I13dsg== + dependencies: + anymatch "^2.0.0" + async-done "^1.2.0" + chokidar "^2.0.0" + is-negated-glob "^1.0.0" + just-debounce "^1.0.0" + object.defaults "^1.1.0" + glob@7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" @@ -8368,6 +8681,13 @@ globby@^6.1.0: pify "^2.0.0" pinkie-promise "^2.0.0" +glogg@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.2.tgz#2d7dd702beda22eb3bffadf880696da6d846313f" + integrity sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA== + dependencies: + sparkles "^1.0.0" + got@9.6.0: version "9.6.0" resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" @@ -8430,6 +8750,30 @@ gud@^1.0.0: resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0" integrity sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw== +gulp-cli@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/gulp-cli/-/gulp-cli-2.2.0.tgz#5533126eeb7fe415a7e3e84a297d334d5cf70ebc" + integrity sha512-rGs3bVYHdyJpLqR0TUBnlcZ1O5O++Zs4bA0ajm+zr3WFCfiSLjGwoCBqFs18wzN+ZxahT9DkOK5nDf26iDsWjA== + dependencies: + ansi-colors "^1.0.1" + archy "^1.0.0" + array-sort "^1.0.0" + color-support "^1.1.3" + concat-stream "^1.6.0" + copy-props "^2.0.1" + fancy-log "^1.3.2" + gulplog "^1.0.0" + interpret "^1.1.0" + isobject "^3.0.1" + liftoff "^3.1.0" + matchdep "^2.0.0" + mute-stdout "^1.0.0" + pretty-hrtime "^1.0.0" + replace-homedir "^1.0.0" + semver-greatest-satisfied-range "^1.1.0" + v8flags "^3.0.1" + yargs "^7.1.0" + gulp-sourcemaps@^1.5.2: version "1.12.1" resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-1.12.1.tgz#b437d1f3d980cf26e81184823718ce15ae6597b6" @@ -8447,6 +8791,23 @@ gulp-sourcemaps@^1.5.2: through2 "2.X" vinyl "1.X" +gulp@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/gulp/-/gulp-4.0.2.tgz#543651070fd0f6ab0a0650c6a3e6ff5a7cb09caa" + integrity sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA== + dependencies: + glob-watcher "^5.0.3" + gulp-cli "^2.2.0" + undertaker "^1.2.1" + vinyl-fs "^3.0.0" + +gulplog@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" + integrity sha1-4oxNRdBey77YGDY86PnFkmIp/+U= + dependencies: + glogg "^1.0.0" + gzip-size@5.1.1, gzip-size@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274" @@ -8706,18 +9067,18 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== -html-loader@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/html-loader/-/html-loader-1.0.0.tgz#40000ff27bfb4fbf087d37f8438cae0b1d8b53b1" - integrity sha512-acPyjP9Mo05jEbe/oejXu5gFwtKWdFewPoaVa47VCnHmRbR43jtdx/kPhPEbCBm2qWtIn+a8uTJAW4Ocnn4olw== +html-loader@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/html-loader/-/html-loader-1.1.0.tgz#91915f4d274caa9d46d1c3dc847cd82bfc037dbd" + integrity sha512-zwLbEgy+i7sgIYTlxI9M7jwkn29IvdsV6f1y7a2aLv/w8l1RigVk0PFijBZLLFsdi2gvL8sf2VJhTjLlfnK8sA== dependencies: - html-minifier-terser "^5.0.4" + html-minifier-terser "^5.0.5" htmlparser2 "^4.1.0" loader-utils "^2.0.0" parse-srcset "^1.0.2" schema-utils "^2.6.5" -html-minifier-terser@^5.0.1, html-minifier-terser@^5.0.4: +html-minifier-terser@^5.0.1, html-minifier-terser@^5.0.5: version "5.0.5" resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-5.0.5.tgz#8f12f639789f04faa9f5cf2ff9b9f65607f21f8b" integrity sha512-cBSFFghQh/uHcfSiL42KxxIRMF7A144+3E44xdlctIjxEmkEfCvouxNyFH2wysXk1fCGBPwtcr3hDWlGTfkDew== @@ -8730,10 +9091,10 @@ html-minifier-terser@^5.0.1, html-minifier-terser@^5.0.4: relateurl "^0.2.7" terser "^4.6.3" -html-webpack-plugin@4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.0.3.tgz#70659c8836210249cb6fa9dd6706a957547666d5" - integrity sha512-XCm5MGK6Yv/ey30fbhqjKIGm1r6G1HxmNorJ/xUdL/Zj3mOLtb9ZHEEIw0e4h3VzgyUrp8szCJh3VN9z1LNx7A== +html-webpack-plugin@4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.2.0.tgz#ea46f15b620d4c1c8c73ea399395c81208e9f823" + integrity sha512-zL7LYTuq/fcJX6vV6tmmvFR508Bd9e6kvVGbS76YAjZ2CPVRzsjkvDYs/SshPevpolSdTWgaDV39D6k6oQoVFw== dependencies: "@types/html-minifier-terser" "^5.0.0" "@types/tapable" "^1.0.5" @@ -9139,7 +9500,7 @@ internal-slot@^1.0.2: has "^1.0.3" side-channel "^1.0.2" -interpret@1.2.0, interpret@^1.0.0: +interpret@1.2.0, interpret@^1.0.0, interpret@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== @@ -9193,6 +9554,14 @@ is-absolute-url@^3.0.3: resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q== +is-absolute@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" + integrity sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA== + dependencies: + is-relative "^1.0.0" + is-windows "^1.0.1" + is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" @@ -9424,6 +9793,11 @@ is-natural-number@^4.0.1: resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg= +is-negated-glob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-negated-glob/-/is-negated-glob-1.0.0.tgz#6910bca5da8c95e784b5751b976cf5a10fee36d2" + integrity sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI= + is-number@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" @@ -9513,7 +9887,7 @@ is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= -is-plain-object@^2.0.3, is-plain-object@^2.0.4: +is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== @@ -9554,6 +9928,13 @@ is-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= +is-relative@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" + integrity sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA== + dependencies: + is-unc-path "^1.0.0" + is-resolvable@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" @@ -9603,7 +9984,14 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= -is-utf8@^0.2.0: +is-unc-path@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d" + integrity sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ== + dependencies: + unc-path-regex "^0.1.2" + +is-utf8@^0.2.0, is-utf8@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= @@ -9613,6 +10001,11 @@ is-valid-glob@^0.3.0: resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-0.3.0.tgz#d4b55c69f51886f9b65c70d6c2622d37e29f48fe" integrity sha1-1LVcafUYhvm2XHDWwmItN+KfSP4= +is-valid-glob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa" + integrity sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao= + is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -9720,56 +10113,56 @@ isurl@^1.0.0-alpha5: has-to-string-tag-x "^1.2.0" is-object "^1.0.1" -jest-changed-files@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-25.3.0.tgz#85d8de6f4bd13dafda9d7f1e3f2565fc0e183c78" - integrity sha512-eqd5hyLbUjIVvLlJ3vQ/MoPxsxfESVXG9gvU19XXjKzxr+dXmZIqCXiY0OiYaibwlHZBJl2Vebkc0ADEMzCXew== +jest-changed-files@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-25.4.0.tgz#e573db32c2fd47d2b90357ea2eda0622c5c5cbd6" + integrity sha512-VR/rfJsEs4BVMkwOTuStRyS630fidFVekdw/lBaBQjx9KK3VZFOZ2c0fsom2fRp8pMCrCTP6LGna00o/DXGlqA== dependencies: - "@jest/types" "^25.3.0" + "@jest/types" "^25.4.0" execa "^3.2.0" throat "^5.0.0" -jest-cli@^25.2.4: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-25.3.0.tgz#d9e11f5700cc5946583cf0d01a9bdebceed448d2" - integrity sha512-XpNQPlW1tzpP7RGG8dxpkRegYDuLjzSiENu92+CYM87nEbmEPb3b4+yo8xcsHOnj0AG7DUt9b3uG8LuHI3MDzw== +jest-cli@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-25.4.0.tgz#5dac8be0fece6ce39f0d671395a61d1357322bab" + integrity sha512-usyrj1lzCJZMRN1r3QEdnn8e6E6yCx/QN7+B1sLoA68V7f3WlsxSSQfy0+BAwRiF4Hz2eHauf11GZG3PIfWTXQ== dependencies: - "@jest/core" "^25.3.0" - "@jest/test-result" "^25.3.0" - "@jest/types" "^25.3.0" + "@jest/core" "^25.4.0" + "@jest/test-result" "^25.4.0" + "@jest/types" "^25.4.0" chalk "^3.0.0" exit "^0.1.2" import-local "^3.0.2" is-ci "^2.0.0" - jest-config "^25.3.0" - jest-util "^25.3.0" - jest-validate "^25.3.0" + jest-config "^25.4.0" + jest-util "^25.4.0" + jest-validate "^25.4.0" prompts "^2.0.1" realpath-native "^2.0.0" yargs "^15.3.1" -jest-config@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-25.3.0.tgz#112b5e2f2e57dec4501dd2fe979044c06fb1317e" - integrity sha512-CmF1JnNWFmoCSPC4tnU52wnVBpuxHjilA40qH/03IHxIevkjUInSMwaDeE6ACfxMPTLidBGBCO3EbxvzPbo8wA== +jest-config@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-25.4.0.tgz#56e5df3679a96ff132114b44fb147389c8c0a774" + integrity sha512-egT9aKYxMyMSQV1aqTgam0SkI5/I2P9qrKexN5r2uuM2+68ypnc+zPGmfUxK7p1UhE7dYH9SLBS7yb+TtmT1AA== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^25.3.0" - "@jest/types" "^25.3.0" - babel-jest "^25.3.0" + "@jest/test-sequencer" "^25.4.0" + "@jest/types" "^25.4.0" + babel-jest "^25.4.0" chalk "^3.0.0" deepmerge "^4.2.2" glob "^7.1.1" - jest-environment-jsdom "^25.3.0" - jest-environment-node "^25.3.0" + jest-environment-jsdom "^25.4.0" + jest-environment-node "^25.4.0" jest-get-type "^25.2.6" - jest-jasmine2 "^25.3.0" + jest-jasmine2 "^25.4.0" jest-regex-util "^25.2.6" - jest-resolve "^25.3.0" - jest-util "^25.3.0" - jest-validate "^25.3.0" + jest-resolve "^25.4.0" + jest-util "^25.4.0" + jest-validate "^25.4.0" micromatch "^4.0.2" - pretty-format "^25.3.0" + pretty-format "^25.4.0" realpath-native "^2.0.0" jest-diff@^25.1.0, jest-diff@^25.2.1, jest-diff@^25.3.0: @@ -9782,6 +10175,16 @@ jest-diff@^25.1.0, jest-diff@^25.2.1, jest-diff@^25.3.0: jest-get-type "^25.2.6" pretty-format "^25.3.0" +jest-diff@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.4.0.tgz#260b70f19a46c283adcad7f081cae71eb784a634" + integrity sha512-kklLbJVXW0y8UKOWOdYhI6TH5MG6QAxrWiBMgQaPIuhj3dNFGirKCd+/xfplBXICQ7fI+3QcqHm9p9lWu1N6ug== + dependencies: + chalk "^3.0.0" + diff-sequences "^25.2.6" + jest-get-type "^25.2.6" + pretty-format "^25.4.0" + jest-docblock@^25.3.0: version "25.3.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-25.3.0.tgz#8b777a27e3477cd77a168c05290c471a575623ef" @@ -9794,39 +10197,39 @@ jest-dom@4.0.0: resolved "https://registry.yarnpkg.com/jest-dom/-/jest-dom-4.0.0.tgz#94eba3cbc6576e7bd6821867c92d176de28920eb" integrity sha512-gBxYZlZB1Jgvf2gP2pRfjjUWF8woGBHj/g5rAQgFPB/0K2atGuhVcPO+BItyjWeKg9zM+dokgcMOH01vrWVMFA== -jest-each@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-25.3.0.tgz#a319eecf1f6076164ab86f99ca166a55b96c0bd4" - integrity sha512-aBfS4VOf/Qs95yUlX6d6WBv0szvOcTkTTyCIaLuQGj4bSHsT+Wd9dDngVHrCe5uytxpN8VM+NAloI6nbPjXfXw== +jest-each@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-25.4.0.tgz#ad4e46164764e8e77058f169a0076a7f86f6b7d4" + integrity sha512-lwRIJ8/vQU/6vq3nnSSUw1Y3nz5tkYSFIywGCZpUBd6WcRgpn8NmJoQICojbpZmsJOJNHm0BKdyuJ6Xdx+eDQQ== dependencies: - "@jest/types" "^25.3.0" + "@jest/types" "^25.4.0" chalk "^3.0.0" jest-get-type "^25.2.6" - jest-util "^25.3.0" - pretty-format "^25.3.0" + jest-util "^25.4.0" + pretty-format "^25.4.0" -jest-environment-jsdom@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-25.3.0.tgz#c493ab8c41f28001520c70ef67dd88b88be6af05" - integrity sha512-jdE4bQN+k2QEZ9sWOxsqDJvMzbdFSCN/4tw8X0TQaCqyzKz58PyEf41oIr4WO7ERdp7WaJGBSUKF7imR3UW1lg== +jest-environment-jsdom@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-25.4.0.tgz#bbfc7f85bb6ade99089062a830c79cb454565cf0" + integrity sha512-KTitVGMDrn2+pt7aZ8/yUTuS333w3pWt1Mf88vMntw7ZSBNDkRS6/4XLbFpWXYfWfp1FjcjQTOKzbK20oIehWQ== dependencies: - "@jest/environment" "^25.3.0" - "@jest/fake-timers" "^25.3.0" - "@jest/types" "^25.3.0" - jest-mock "^25.3.0" - jest-util "^25.3.0" + "@jest/environment" "^25.4.0" + "@jest/fake-timers" "^25.4.0" + "@jest/types" "^25.4.0" + jest-mock "^25.4.0" + jest-util "^25.4.0" jsdom "^15.2.1" -jest-environment-node@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-25.3.0.tgz#9845f0e63991e8498448cb0ae804935689533db9" - integrity sha512-XO09S29Nx1NU7TiMPHMoDIkxoGBuKSTbE+sHp0gXbeLDXhIdhysUI25kOqFFSD9AuDgvPvxWCXrvNqiFsOH33g== +jest-environment-node@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-25.4.0.tgz#188aef01ae6418e001c03fdd1c299961e1439082" + integrity sha512-wryZ18vsxEAKFH7Z74zi/y/SyI1j6UkVZ6QsllBuT/bWlahNfQjLNwFsgh/5u7O957dYFoXj4yfma4n4X6kU9A== dependencies: - "@jest/environment" "^25.3.0" - "@jest/fake-timers" "^25.3.0" - "@jest/types" "^25.3.0" - jest-mock "^25.3.0" - jest-util "^25.3.0" + "@jest/environment" "^25.4.0" + "@jest/fake-timers" "^25.4.0" + "@jest/types" "^25.4.0" + jest-mock "^25.4.0" + jest-util "^25.4.0" semver "^6.3.0" jest-get-type@^25.2.6: @@ -9834,18 +10237,18 @@ jest-get-type@^25.2.6: resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-25.2.6.tgz#0b0a32fab8908b44d508be81681487dbabb8d877" integrity sha512-DxjtyzOHjObRM+sM1knti6or+eOgcGU4xVSb2HNP1TqO4ahsT+rqZg+nyqHWJSvWgKC5cG3QjGFBqxLghiF/Ig== -jest-haste-map@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-25.3.0.tgz#b7683031c9c9ddc0521d311564108b244b11e4c6" - integrity sha512-LjXaRa+F8wwtSxo9G+hHD/Cp63PPQzvaBL9XCVoJD2rrcJO0Zr2+YYzAFWWYJ5GlPUkoaJFJtOuk0sL6MJY80A== +jest-haste-map@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-25.4.0.tgz#da7c309dd7071e0a80c953ba10a0ec397efb1ae2" + integrity sha512-5EoCe1gXfGC7jmXbKzqxESrgRcaO3SzWXGCnvp9BcT0CFMyrB1Q6LIsjl9RmvmJGQgW297TCfrdgiy574Rl9HQ== dependencies: - "@jest/types" "^25.3.0" + "@jest/types" "^25.4.0" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.3" jest-serializer "^25.2.6" - jest-util "^25.3.0" - jest-worker "^25.2.6" + jest-util "^25.4.0" + jest-worker "^25.4.0" micromatch "^4.0.2" sane "^4.0.3" walker "^1.0.7" @@ -9853,38 +10256,38 @@ jest-haste-map@^25.3.0: optionalDependencies: fsevents "^2.1.2" -jest-jasmine2@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-25.3.0.tgz#16ae4f68adef65fb45001b26c864bcbcbf972830" - integrity sha512-NCYOGE6+HNzYFSui52SefgpsnIzvxjn6KAgqw66BdRp37xpMD/4kujDHLNW5bS5i53os5TcMn6jYrzQRO8VPrQ== +jest-jasmine2@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-25.4.0.tgz#3d3d19514022e2326e836c2b66d68b4cb63c5861" + integrity sha512-QccxnozujVKYNEhMQ1vREiz859fPN/XklOzfQjm2j9IGytAkUbSwjFRBtQbHaNZ88cItMpw02JnHGsIdfdpwxQ== dependencies: "@babel/traverse" "^7.1.0" - "@jest/environment" "^25.3.0" + "@jest/environment" "^25.4.0" "@jest/source-map" "^25.2.6" - "@jest/test-result" "^25.3.0" - "@jest/types" "^25.3.0" + "@jest/test-result" "^25.4.0" + "@jest/types" "^25.4.0" chalk "^3.0.0" co "^4.6.0" - expect "^25.3.0" + expect "^25.4.0" is-generator-fn "^2.0.0" - jest-each "^25.3.0" - jest-matcher-utils "^25.3.0" - jest-message-util "^25.3.0" - jest-runtime "^25.3.0" - jest-snapshot "^25.3.0" - jest-util "^25.3.0" - pretty-format "^25.3.0" + jest-each "^25.4.0" + jest-matcher-utils "^25.4.0" + jest-message-util "^25.4.0" + jest-runtime "^25.4.0" + jest-snapshot "^25.4.0" + jest-util "^25.4.0" + pretty-format "^25.4.0" throat "^5.0.0" -jest-leak-detector@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-25.3.0.tgz#5b6bf04903b35be56038915a55f47291771f769f" - integrity sha512-jk7k24dMIfk8LUSQQGN8PyOy9+J0NAfHZWiDmUDYVMctY8FLJQ1eQ8+PjMoN8PgwhLIggUqgYJnyRFvUz3jLRw== +jest-leak-detector@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-25.4.0.tgz#cf94a160c78e53d810e7b2f40b5fd7ee263375b3" + integrity sha512-7Y6Bqfv2xWsB+7w44dvZuLs5SQ//fzhETgOGG7Gq3TTGFdYvAgXGwV8z159RFZ6fXiCPm/szQ90CyfVos9JIFQ== dependencies: jest-get-type "^25.2.6" - pretty-format "^25.3.0" + pretty-format "^25.4.0" -jest-matcher-utils@^25.1.0, jest-matcher-utils@^25.3.0: +jest-matcher-utils@^25.1.0: version "25.3.0" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-25.3.0.tgz#76765788a26edaa8bc5f0100aea52ae383559648" integrity sha512-ZBUJ2fchNIZt+fyzkuCFBb8SKaU//Rln45augfUtbHaGyVxCO++ANARdBK9oPGXU3hEDgyy7UHnOP/qNOJXFUg== @@ -9894,25 +10297,35 @@ jest-matcher-utils@^25.1.0, jest-matcher-utils@^25.3.0: jest-get-type "^25.2.6" pretty-format "^25.3.0" -jest-message-util@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-25.3.0.tgz#e3836826fe5ca538a337b87d9bd2648190867f85" - integrity sha512-5QNy9Id4WxJbRITEbA1T1kem9bk7y2fD0updZMSTNHtbEDnYOGLDPAuFBhFgVmOZpv0n6OMdVkK+WhyXEPCcOw== +jest-matcher-utils@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-25.4.0.tgz#dc3e7aec402a1e567ed80b572b9ad285878895e6" + integrity sha512-yPMdtj7YDgXhnGbc66bowk8AkQ0YwClbbwk3Kzhn5GVDrciiCr27U4NJRbrqXbTdtxjImONITg2LiRIw650k5A== + dependencies: + chalk "^3.0.0" + jest-diff "^25.4.0" + jest-get-type "^25.2.6" + pretty-format "^25.4.0" + +jest-message-util@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-25.4.0.tgz#2899e8bc43f5317acf8dfdfe89ea237d354fcdab" + integrity sha512-LYY9hRcVGgMeMwmdfh9tTjeux1OjZHMusq/E5f3tJN+dAoVVkJtq5ZUEPIcB7bpxDUt2zjUsrwg0EGgPQ+OhXQ== dependencies: "@babel/code-frame" "^7.0.0" - "@jest/types" "^25.3.0" + "@jest/types" "^25.4.0" "@types/stack-utils" "^1.0.1" chalk "^3.0.0" micromatch "^4.0.2" slash "^3.0.0" stack-utils "^1.0.1" -jest-mock@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-25.3.0.tgz#d72644509e40987a732a9a2534a1054f4649402c" - integrity sha512-yRn6GbuqB4j3aYu+Z1ezwRiZfp0o9om5uOcBovVtkcRLeBCNP5mT0ysdenUsxAHnQUgGwPOE1wwhtQYe6NKirQ== +jest-mock@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-25.4.0.tgz#ded7d64b5328d81d78d2138c825d3a45e30ec8ca" + integrity sha512-MdazSfcYAUjJjuVTTnusLPzE0pE4VXpOUzWdj8sbM+q6abUjm3bATVPXFqTXrxSieR8ocpvQ9v/QaQCftioQFg== dependencies: - "@jest/types" "^25.3.0" + "@jest/types" "^25.4.0" jest-pnp-resolver@^1.2.1: version "1.2.1" @@ -9924,78 +10337,80 @@ jest-regex-util@^25.2.6: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-25.2.6.tgz#d847d38ba15d2118d3b06390056028d0f2fd3964" integrity sha512-KQqf7a0NrtCkYmZZzodPftn7fL1cq3GQAFVMn5Hg8uKx/fIenLEobNanUxb7abQ1sjADHBseG/2FGpsv/wr+Qw== -jest-resolve-dependencies@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-25.3.0.tgz#b0e4ae053dd44ddacc18c6ee12b5b7c28e445a90" - integrity sha512-bDUlLYmHW+f7J7KgcY2lkq8EMRqKonRl0XoD4Wp5SJkgAxKJnsaIOlrrVNTfXYf+YOu3VCjm/Ac2hPF2nfsCIA== +jest-resolve-dependencies@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-25.4.0.tgz#783937544cfc40afcc7c569aa54748c4b3f83f5a" + integrity sha512-A0eoZXx6kLiuG1Ui7wITQPl04HwjLErKIJTt8GR3c7UoDAtzW84JtCrgrJ6Tkw6c6MwHEyAaLk7dEPml5pf48A== dependencies: - "@jest/types" "^25.3.0" + "@jest/types" "^25.4.0" jest-regex-util "^25.2.6" - jest-snapshot "^25.3.0" + jest-snapshot "^25.4.0" -jest-resolve@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-25.3.0.tgz#cb90a5bbea54a02eccdbbf4126a819595dcf91d6" - integrity sha512-IHoQAAybulsJ+ZgWis+ekYKDAoFkVH5Nx/znpb41zRtpxj4fr2WNV9iDqavdSm8GIpMlsfZxbC/fV9DhW0q9VQ== +jest-resolve@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-25.4.0.tgz#6f4540ce0d419c4c720e791e871da32ba4da7a60" + integrity sha512-wOsKqVDFWUiv8BtLMCC6uAJ/pHZkfFgoBTgPtmYlsprAjkxrr2U++ZnB3l5ykBMd2O24lXvf30SMAjJIW6k2aA== dependencies: - "@jest/types" "^25.3.0" + "@jest/types" "^25.4.0" browser-resolve "^1.11.3" chalk "^3.0.0" jest-pnp-resolver "^1.2.1" + read-pkg-up "^7.0.1" realpath-native "^2.0.0" resolve "^1.15.1" + slash "^3.0.0" -jest-runner@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-25.3.0.tgz#673ef2ac79d2810eb6b2c1a3f82398375a3d1174" - integrity sha512-csDqSC9qGHYWDrzrElzEgFbteztFeZJmKhSgY5jlCIcN0+PhActzRNku0DA1Xa1HxGOb0/AfbP1EGJlP4fGPtA== +jest-runner@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-25.4.0.tgz#6ca4a3d52e692bbc081228fa68f750012f1f29e5" + integrity sha512-wWQSbVgj2e/1chFdMRKZdvlmA6p1IPujhpLT7TKNtCSl1B0PGBGvJjCaiBal/twaU2yfk8VKezHWexM8IliBfA== dependencies: - "@jest/console" "^25.3.0" - "@jest/environment" "^25.3.0" - "@jest/test-result" "^25.3.0" - "@jest/types" "^25.3.0" + "@jest/console" "^25.4.0" + "@jest/environment" "^25.4.0" + "@jest/test-result" "^25.4.0" + "@jest/types" "^25.4.0" chalk "^3.0.0" exit "^0.1.2" graceful-fs "^4.2.3" - jest-config "^25.3.0" + jest-config "^25.4.0" jest-docblock "^25.3.0" - jest-haste-map "^25.3.0" - jest-jasmine2 "^25.3.0" - jest-leak-detector "^25.3.0" - jest-message-util "^25.3.0" - jest-resolve "^25.3.0" - jest-runtime "^25.3.0" - jest-util "^25.3.0" - jest-worker "^25.2.6" + jest-haste-map "^25.4.0" + jest-jasmine2 "^25.4.0" + jest-leak-detector "^25.4.0" + jest-message-util "^25.4.0" + jest-resolve "^25.4.0" + jest-runtime "^25.4.0" + jest-util "^25.4.0" + jest-worker "^25.4.0" source-map-support "^0.5.6" throat "^5.0.0" -jest-runtime@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-25.3.0.tgz#af4d40dbcc590fa5de9910cb6a120a13d131050b" - integrity sha512-gn5KYB1wxXRM3nfw8fVpthFu60vxQUCr+ShGq41+ZBFF3DRHZRKj3HDWVAVB4iTNBj2y04QeAo5cZ/boYaPg0w== +jest-runtime@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-25.4.0.tgz#1e5227a9e2159d26ae27dcd426ca6bc041983439" + integrity sha512-lgNJlCDULtXu9FumnwCyWlOub8iytijwsPNa30BKrSNtgoT6NUMXOPrZvsH06U6v0wgD/Igwz13nKA2wEKU2VA== dependencies: - "@jest/console" "^25.3.0" - "@jest/environment" "^25.3.0" + "@jest/console" "^25.4.0" + "@jest/environment" "^25.4.0" "@jest/source-map" "^25.2.6" - "@jest/test-result" "^25.3.0" - "@jest/transform" "^25.3.0" - "@jest/types" "^25.3.0" + "@jest/test-result" "^25.4.0" + "@jest/transform" "^25.4.0" + "@jest/types" "^25.4.0" "@types/yargs" "^15.0.0" chalk "^3.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.3" - jest-config "^25.3.0" - jest-haste-map "^25.3.0" - jest-message-util "^25.3.0" - jest-mock "^25.3.0" + jest-config "^25.4.0" + jest-haste-map "^25.4.0" + jest-message-util "^25.4.0" + jest-mock "^25.4.0" jest-regex-util "^25.2.6" - jest-resolve "^25.3.0" - jest-snapshot "^25.3.0" - jest-util "^25.3.0" - jest-validate "^25.3.0" + jest-resolve "^25.4.0" + jest-snapshot "^25.4.0" + jest-util "^25.4.0" + jest-validate "^25.4.0" realpath-native "^2.0.0" slash "^3.0.0" strip-bom "^4.0.0" @@ -10006,61 +10421,61 @@ jest-serializer@^25.2.6: resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-25.2.6.tgz#3bb4cc14fe0d8358489dbbefbb8a4e708ce039b7" integrity sha512-RMVCfZsezQS2Ww4kB5HJTMaMJ0asmC0BHlnobQC6yEtxiFKIxohFA4QSXSabKwSggaNkqxn6Z2VwdFCjhUWuiQ== -jest-snapshot@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-25.3.0.tgz#d4feb457494f4aaedcc83fbbf1ca21808fc3df71" - integrity sha512-GGpR6Oro2htJPKh5RX4PR1xwo5jCEjtvSPLW1IS7N85y+2bWKbiknHpJJRKSdGXghElb5hWaeQASJI4IiRayGg== +jest-snapshot@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-25.4.0.tgz#e0b26375e2101413fd2ccb4278a5711b1922545c" + integrity sha512-J4CJ0X2SaGheYRZdLz9CRHn9jUknVmlks4UBeu270hPAvdsauFXOhx9SQP2JtRzhnR3cvro/9N9KP83/uvFfRg== dependencies: "@babel/types" "^7.0.0" - "@jest/types" "^25.3.0" + "@jest/types" "^25.4.0" "@types/prettier" "^1.19.0" chalk "^3.0.0" - expect "^25.3.0" - jest-diff "^25.3.0" + expect "^25.4.0" + jest-diff "^25.4.0" jest-get-type "^25.2.6" - jest-matcher-utils "^25.3.0" - jest-message-util "^25.3.0" - jest-resolve "^25.3.0" + jest-matcher-utils "^25.4.0" + jest-message-util "^25.4.0" + jest-resolve "^25.4.0" make-dir "^3.0.0" natural-compare "^1.4.0" - pretty-format "^25.3.0" + pretty-format "^25.4.0" semver "^6.3.0" -jest-util@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-25.3.0.tgz#e3b0064165818f10d78514696fd25efba82cf049" - integrity sha512-dc625P/KS/CpWTJJJxKc4bA3A6c+PJGBAqS8JTJqx4HqPoKNqXg/Ec8biL2Z1TabwK7E7Ilf0/ukSEXM1VwzNA== +jest-util@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-25.4.0.tgz#6a093d09d86d2b41ef583e5fe7dd3976346e1acd" + integrity sha512-WSZD59sBtAUjLv1hMeKbNZXmMcrLRWcYqpO8Dz8b4CeCTZpfNQw2q9uwrYAD+BbJoLJlu4ezVPwtAmM/9/SlZA== dependencies: - "@jest/types" "^25.3.0" + "@jest/types" "^25.4.0" chalk "^3.0.0" is-ci "^2.0.0" make-dir "^3.0.0" -jest-validate@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-25.3.0.tgz#eb95fdee0039647bcd5d4be641b21e4a142a880c" - integrity sha512-3WuXgIZ4HXUvW6gk9twFFkT9j6zUorKnF2oEY8VEsHb7x5LGvVlN3WUsbqazVKuyXwvikO2zFJ/YTySMsMje2w== +jest-validate@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-25.4.0.tgz#2e177a93b716a137110eaf2768f3d9095abd3f38" + integrity sha512-hvjmes/EFVJSoeP1yOl8qR8mAtMR3ToBkZeXrD/ZS9VxRyWDqQ/E1C5ucMTeSmEOGLipvdlyipiGbHJ+R1MQ0g== dependencies: - "@jest/types" "^25.3.0" + "@jest/types" "^25.4.0" camelcase "^5.3.1" chalk "^3.0.0" jest-get-type "^25.2.6" leven "^3.1.0" - pretty-format "^25.3.0" + pretty-format "^25.4.0" -jest-watcher@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-25.3.0.tgz#fd03fd5ca52f02bd3161ab177466bf1bfdd34e5c" - integrity sha512-dtFkfidFCS9Ucv8azOg2hkiY3sgJEHeTLtGFHS+jfBEE7eRtrO6+2r1BokyDkaG2FOD7485r/SgpC1MFAENfeA== +jest-watcher@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-25.4.0.tgz#63ec0cd5c83bb9c9d1ac95be7558dd61c995ff05" + integrity sha512-36IUfOSRELsKLB7k25j/wutx0aVuHFN6wO94gPNjQtQqFPa2rkOymmx9rM5EzbF3XBZZ2oqD9xbRVoYa2w86gw== dependencies: - "@jest/test-result" "^25.3.0" - "@jest/types" "^25.3.0" + "@jest/test-result" "^25.4.0" + "@jest/types" "^25.4.0" ansi-escapes "^4.2.1" chalk "^3.0.0" - jest-util "^25.3.0" + jest-util "^25.4.0" string-length "^3.1.0" -jest-worker@^25.1.0, jest-worker@^25.2.6: +jest-worker@^25.1.0: version "25.2.6" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.2.6.tgz#d1292625326794ce187c38f51109faced3846c58" integrity sha512-FJn9XDUSxcOR4cwDzRfL1z56rUofNTFs539FGASpd50RHdb6EVkhxQqktodW2mI49l+W3H+tFJDotCHUQF6dmA== @@ -10068,14 +10483,22 @@ jest-worker@^25.1.0, jest-worker@^25.2.6: merge-stream "^2.0.0" supports-color "^7.0.0" -jest@25.2.4: - version "25.2.4" - resolved "https://registry.yarnpkg.com/jest/-/jest-25.2.4.tgz#d10941948a2b57eb7accc2e7ae78af4a0e11b40a" - integrity sha512-Lu4LXxf4+durzN/IFilcAoQSisOwgHIXgl9vffopePpSSwFqfj1Pj4y+k3nL8oTbnvjxgDIsEcepy6he4bWqnQ== +jest-worker@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.4.0.tgz#ee0e2ceee5a36ecddf5172d6d7e0ab00df157384" + integrity sha512-ghAs/1FtfYpMmYQ0AHqxV62XPvKdUDIBBApMZfly+E9JEmYh2K45G0R5dWxx986RN12pRCxsViwQVtGl+N4whw== dependencies: - "@jest/core" "^25.2.4" + merge-stream "^2.0.0" + supports-color "^7.0.0" + +jest@25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-25.4.0.tgz#fb96892c5c4e4a6b9bcb12068849cddf4c5f8cc7" + integrity sha512-XWipOheGB4wai5JfCYXd6vwsWNwM/dirjRoZgAa7H2wd8ODWbli2AiKjqG8AYhyx+8+5FBEdpO92VhGlBydzbw== + dependencies: + "@jest/core" "^25.4.0" import-local "^3.0.2" - jest-cli "^25.2.4" + jest-cli "^25.4.0" js-cookie@^2.2.1: version "2.2.1" @@ -10455,6 +10878,11 @@ just-curry-it@^3.1.0: resolved "https://registry.yarnpkg.com/just-curry-it/-/just-curry-it-3.1.0.tgz#ab59daed308a58b847ada166edd0a2d40766fbc5" integrity sha512-mjzgSOFzlrurlURaHVjnQodyPNvrHrf1TbQP2XU9NSqBtHQPuHZ+Eb6TAJP7ASeJN9h9K0KXoRTs8u6ouHBKvg== +just-debounce@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/just-debounce/-/just-debounce-1.0.0.tgz#87fccfaeffc0b68cd19d55f6722943f929ea35ea" + integrity sha1-h/zPrv/AtozRnVX2cilD+SnqNeo= + keccak256@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/keccak256/-/keccak256-1.0.0.tgz#1ba55ce78ed3d63fb7091d045469007da984171d" @@ -10517,7 +10945,7 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" -kind-of@^5.0.0: +kind-of@^5.0.0, kind-of@^5.0.2: version "5.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== @@ -10547,6 +10975,14 @@ last-call-webpack-plugin@^3.0.0: lodash "^4.17.5" webpack-sources "^1.1.0" +last-run@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/last-run/-/last-run-1.1.1.tgz#45b96942c17b1c79c772198259ba943bebf8ca5b" + integrity sha1-RblpQsF7HHnHchmCWbqUO+v4yls= + dependencies: + default-resolution "^2.0.0" + es6-weak-map "^2.0.1" + lazy-debug-legacy@0.0.X: version "0.0.1" resolved "https://registry.yarnpkg.com/lazy-debug-legacy/-/lazy-debug-legacy-0.0.1.tgz#537716c0776e4cf79e3ed1b621f7658c2911b1b1" @@ -10573,6 +11009,13 @@ lcid@^2.0.0: dependencies: invert-kv "^2.0.0" +lead@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lead/-/lead-1.0.0.tgz#6f14f99a37be3a9dd784f5495690e5903466ee42" + integrity sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI= + dependencies: + flush-write-stream "^1.0.2" + left-pad@^1.1.3: version "1.3.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" @@ -10727,6 +11170,20 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +liftoff@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-3.1.0.tgz#c9ba6081f908670607ee79062d700df062c52ed3" + integrity sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog== + dependencies: + extend "^3.0.0" + findup-sync "^3.0.0" + fined "^1.0.1" + flagged-respawn "^1.0.0" + is-plain-object "^2.0.4" + object.map "^1.0.0" + rechoir "^0.6.2" + resolve "^1.1.7" + lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" @@ -10737,17 +11194,17 @@ linked-list@0.1.0: resolved "https://registry.yarnpkg.com/linked-list/-/linked-list-0.1.0.tgz#798b0ff97d1b92a4fd08480f55aea4e9d49d37bf" integrity sha1-eYsP+X0bkqT9CEgPVa6k6dSdN78= -lint-staged@10.0.10: - version "10.0.10" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.0.10.tgz#d14d33ee02a31a31ad36cf9aa7973fc156c461b5" - integrity sha512-91vNy3eYStExElLWw1Idva5lghKpFaXh9AJqjcyrJXf7AYZrThi4EhQ+GpmiHdPmJJauKhZMMSzQR1bMB90MtA== +lint-staged@10.1.6: + version "10.1.6" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.1.6.tgz#086db5e4f5906642ccf648e9b54375d794a9be81" + integrity sha512-45zaGxf4XZuwdUk87yRFE/1b4vTZmH2UnYmUPmindsgdAljOFpWWb0yEjxngmqERUS/MGauJexFF6BjLVg9VMA== dependencies: - chalk "^3.0.0" - commander "^4.0.1" + chalk "^4.0.0" + commander "^5.0.0" cosmiconfig "^6.0.0" debug "^4.1.1" dedent "^0.7.0" - execa "^3.4.0" + execa "^4.0.0" listr "^0.14.3" log-symbols "^3.0.0" micromatch "^4.0.2" @@ -11160,6 +11617,13 @@ make-dir@^3.0.0, make-dir@^3.0.2: dependencies: semver "^6.0.0" +make-iterator@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6" + integrity sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw== + dependencies: + kind-of "^6.0.2" + makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" @@ -11174,7 +11638,7 @@ map-age-cleaner@^0.1.1: dependencies: p-defer "^1.0.0" -map-cache@^0.2.2: +map-cache@^0.2.0, map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= @@ -11206,6 +11670,16 @@ marked@0.3.19: resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.19.tgz#5d47f709c4c9fc3c216b6d46127280f40b39d790" integrity sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg== +matchdep@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/matchdep/-/matchdep-2.0.0.tgz#c6f34834a0d8dbc3b37c27ee8bbcb27c7775582e" + integrity sha1-xvNINKDY28OzfCfui7yyfHd1WC4= + dependencies: + findup-sync "^2.0.0" + micromatch "^3.0.4" + resolve "^1.4.0" + stack-trace "0.0.10" + material-ui-search-bar@^1.0.0-beta.13: version "1.0.0-beta.14" resolved "https://registry.yarnpkg.com/material-ui-search-bar/-/material-ui-search-bar-1.0.0-beta.14.tgz#6ab53f3c2c58c0c634b13a96f7ebaf068dcbb27e" @@ -11718,6 +12192,11 @@ multicast-dns@^6.0.1: dns-packet "^1.3.1" thunky "^1.0.2" +mute-stdout@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mute-stdout/-/mute-stdout-1.0.1.tgz#acb0300eb4de23a7ddeec014e3e96044b3472331" + integrity sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg== + mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" @@ -11913,7 +12392,7 @@ normalize-hex@0.0.2: dependencies: bn.js "^4.11.8" -normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== @@ -11969,6 +12448,13 @@ normalize-url@^4.1.0: prop-types "^15.7.2" react-is "^16.9.0" +now-and-later@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/now-and-later/-/now-and-later-2.0.1.tgz#8e579c8685764a7cc02cb680380e94f43ccb1f7c" + integrity sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ== + dependencies: + once "^1.3.2" + npm-programmatic@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/npm-programmatic/-/npm-programmatic-0.0.6.tgz#3c8f4dbb210efd65b99ee6a5ac76f27b4d5d6b78" @@ -12085,7 +12571,7 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.1.0: +object.assign@^4.0.4, object.assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== @@ -12095,6 +12581,16 @@ object.assign@^4.1.0: has-symbols "^1.0.0" object-keys "^1.0.11" +object.defaults@^1.0.0, object.defaults@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/object.defaults/-/object.defaults-1.1.0.tgz#3a7f868334b407dea06da16d88d5cd29e435fecf" + integrity sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8= + dependencies: + array-each "^1.0.1" + array-slice "^1.0.0" + for-own "^1.0.0" + isobject "^3.0.0" + object.entries@^1.1.0, object.entries@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.1.tgz#ee1cf04153de02bb093fec33683900f57ce5399b" @@ -12123,6 +12619,14 @@ object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.0 define-properties "^1.1.3" es-abstract "^1.17.0-next.1" +object.map@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz#cf83e59dc8fcc0ad5f4250e1f78b3b81bd801d37" + integrity sha1-z4Plncj8wK1fQlDh94s7gb2AHTc= + dependencies: + for-own "^1.0.0" + make-iterator "^1.0.0" + object.omit@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" @@ -12131,13 +12635,21 @@ object.omit@^2.0.0: for-own "^0.1.4" is-extendable "^0.1.1" -object.pick@^1.3.0: +object.pick@^1.2.0, object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= dependencies: isobject "^3.0.1" +object.reduce@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object.reduce/-/object.reduce-1.0.1.tgz#6fe348f2ac7fa0f95ca621226599096825bb03ad" + integrity sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60= + dependencies: + for-own "^1.0.0" + make-iterator "^1.0.0" + object.values@^1.1.0, object.values@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" @@ -12182,7 +12694,7 @@ on-headers@~1.0.2: resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== -once@^1.3.0, once@^1.3.1, once@^1.4.0: +once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= @@ -12273,6 +12785,13 @@ ordered-read-streams@^0.3.0: is-stream "^1.0.1" readable-stream "^2.0.1" +ordered-read-streams@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz#77c0cb37c41525d64166d990ffad7ec6a0e1363e" + integrity sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4= + dependencies: + readable-stream "^2.0.1" + original-require@1.0.1, original-require@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/original-require/-/original-require-1.0.1.tgz#0f130471584cd33511c5ec38c8d59213f9ac5e20" @@ -12472,6 +12991,15 @@ parse-asn1@^5.0.0: pbkdf2 "^3.0.3" safe-buffer "^5.1.1" +parse-filepath@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891" + integrity sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE= + dependencies: + is-absolute "^1.0.0" + map-cache "^0.2.0" + path-root "^0.1.1" + parse-glob@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" @@ -12512,6 +13040,11 @@ parse-json@^5.0.0: json-parse-better-errors "^1.0.1" lines-and-columns "^1.1.6" +parse-node-version@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz#e2b5dbede00e7fa9bc363607f53327e8b073189b" + integrity sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA== + parse-passwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" @@ -12609,6 +13142,18 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== +path-root-regex@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" + integrity sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0= + +path-root@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7" + integrity sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc= + dependencies: + path-root-regex "^0.1.0" + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -12788,14 +13333,14 @@ pocket-js-core@0.0.3: dependencies: axios "^0.18.0" -polished@3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/polished/-/polished-3.5.1.tgz#657b6faf4c2308f3e0b1951196803a5e5d67b122" - integrity sha512-GVbvskpBiDV5TknurGL6OyFfLHsCknxbU8w5iMppT8rW0tLEoQHrIRfrPNPqGXNj3HGhkjRvhmg59Fy7HSnCAw== +polished@3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/polished/-/polished-3.5.2.tgz#ca132b8cd68f7ffa95ae9d423f03e7a14fda1062" + integrity sha512-vWoRDg3gY5RQBtUfcj9MRN10VCIf4EkdUikGxyXItg2Hnwk+eIVtdBiLajN0ldFeT3Vq4r/QNbjrQdhqBKrTug== dependencies: "@babel/runtime" "^7.8.7" -popper.js@^1.14.1: +popper.js@^1.16.1-lts: version "1.16.1" resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.1.tgz#2a223cb3dc7b6213d740e40372be40de43e65b1b" integrity sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ== @@ -12993,7 +13538,7 @@ postcss-modules-local-by-default@^3.0.2: postcss-selector-parser "^6.0.2" postcss-value-parser "^4.0.0" -postcss-modules-scope@^2.1.1: +postcss-modules-scope@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz#385cae013cc7743f5a7d7602d1073a89eaae62ee" integrity sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ== @@ -13173,7 +13718,7 @@ postcss-value-parser@^4.0.0, postcss-value-parser@^4.0.2, postcss-value-parser@^ resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz#651ff4593aa9eda8d5d0d66593a2417aeaeb325d" integrity sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg== -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.18, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.23, postcss@^7.0.27, postcss@^7.0.5, postcss@^7.0.6: +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.18, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.27, postcss@^7.0.5, postcss@^7.0.6: version "7.0.27" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.27.tgz#cc67cdc6b0daa375105b7c424a85567345fc54d9" integrity sha512-WuQETPMcW9Uf1/22HWUWP9lgsIC+KEHg2kozMflKjbeUtw9ujvFX6QmIfozaErDkmLWS9WEnEdEe6Uo9/BNTdQ== @@ -13214,10 +13759,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.2.tgz#1ba8f3eb92231e769b7fcd7cb73ae1b6b74ade08" - integrity sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg== +prettier@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.4.tgz#2d1bae173e355996ee355ec9830a7a1ee05457ef" + integrity sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w== pretty-error@^2.1.1: version "2.1.1" @@ -13237,21 +13782,36 @@ pretty-format@^25.1.0, pretty-format@^25.2.1, pretty-format@^25.3.0: ansi-styles "^4.0.0" react-is "^16.12.0" +pretty-format@^25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.4.0.tgz#c58801bb5c4926ff4a677fe43f9b8b99812c7830" + integrity sha512-PI/2dpGjXK5HyXexLPZU/jw5T9Q6S1YVXxxVxco+LIqzUFHXIbKZKdUVt7GcX7QUCr31+3fzhi4gN4/wUYPVxQ== + dependencies: + "@jest/types" "^25.4.0" + ansi-regex "^5.0.0" + ansi-styles "^4.0.0" + react-is "^16.12.0" + +pretty-hrtime@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" + integrity sha1-t+PqQkNaTJsnWdmeDyAesZWALuE= + private@^0.1.6, private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== +process-nextick-args@^2.0.0, process-nextick-args@~2.0.0: + version "2.0.1" + 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-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" integrity sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M= -process-nextick-args@~2.0.0: - version "2.0.1" - 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.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" @@ -13403,7 +13963,7 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" -pumpify@^1.3.3: +pumpify@^1.3.3, pumpify@^1.3.5: version "1.5.1" resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== @@ -13471,10 +14031,10 @@ qs@~6.5.2: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== -query-string@6.11.1: - version "6.11.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.11.1.tgz#ab021f275d463ce1b61e88f0ce6988b3e8fe7c2c" - integrity sha512-1ZvJOUl8ifkkBxu2ByVM/8GijMIPx+cef7u3yroO3Ogm4DOdZcF5dcrWTIlSHe3Pg/mtlt6/eFjObDfJureZZA== +query-string@6.12.1: + version "6.12.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.12.1.tgz#2ae4d272db4fba267141665374e49a1de09e8a7c" + integrity sha512-OHj+zzfRMyj3rmo/6G8a5Ifvw3AleL/EbcHMD27YA31Q+cO5lfmQxECkImuNVjcskLcvBRVHNAB3w6udMs1eAA== dependencies: decode-uri-component "^0.2.0" split-on-first "^1.0.0" @@ -13613,13 +14173,13 @@ react-final-form-listeners@^1.0.2: dependencies: "@babel/runtime" "^7.1.5" -react-final-form@6.3.5: - version "6.3.5" - resolved "https://registry.yarnpkg.com/react-final-form/-/react-final-form-6.3.5.tgz#772781071d26d26493b0c8ef4f97f76f06fc1c0f" - integrity sha512-btqEp1+n1WO4bUDopBdvUoIuoGHf91n/EOJg0QU5YjhX9CK+4RIsBI0M41lmyT3H6hWv6NELdX5n5zBJyOIXoA== +react-final-form@6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/react-final-form/-/react-final-form-6.4.0.tgz#7f9064c10a8bee6a02cd3e9b8aff06fa07f9c908" + integrity sha512-M7J7f0pnoj0o8sBq3iG6jsWJEh08pNUyl2D4wBC9SJvCNkGdol2UdyjMiEFYD3rz9LIFzQqFSG0kbRBCadqzhA== dependencies: - "@babel/runtime" "^7.8.3" - ts-essentials "^5.0.0" + "@babel/runtime" "^7.9.2" + ts-essentials "^6.0.3" react-ga@^2.7.0: version "2.7.0" @@ -13755,6 +14315,15 @@ read-pkg-up@^3.0.0: find-up "^2.0.0" read-pkg "^3.0.0" +read-pkg-up@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" + integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== + dependencies: + find-up "^4.1.0" + read-pkg "^5.2.0" + type-fest "^0.8.1" + read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" @@ -13782,6 +14351,16 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" +read-pkg@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" + integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== + dependencies: + "@types/normalize-package-data" "^2.4.0" + normalize-package-data "^2.5.0" + parse-json "^5.0.0" + type-fest "^0.6.0" + "readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" @@ -14127,7 +14706,24 @@ remotedev-serialize@^0.1.8: dependencies: jsan "^3.1.13" -remove-trailing-separator@^1.0.1: +remove-bom-buffer@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz#c2bf1e377520d324f623892e33c10cac2c252b53" + integrity sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ== + dependencies: + is-buffer "^1.1.5" + is-utf8 "^0.2.1" + +remove-bom-stream@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz#05f1a593f16e42e1fb90ebf59de8e569525f9523" + integrity sha1-BfGlk/FuQuH7kOv1nejlaVJflSM= + dependencies: + remove-bom-buffer "^3.0.0" + safe-buffer "^5.1.0" + through2 "^2.0.3" + +remove-trailing-separator@^1.0.1, remove-trailing-separator@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= @@ -14165,6 +14761,20 @@ replace-ext@0.0.1: resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" integrity sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ= +replace-ext@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" + integrity sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs= + +replace-homedir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/replace-homedir/-/replace-homedir-1.0.0.tgz#e87f6d513b928dde808260c12be7fec6ff6e798c" + integrity sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw= + dependencies: + homedir-polyfill "^1.0.1" + is-absolute "^1.0.0" + remove-trailing-separator "^1.1.0" + request-promise-core@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.3.tgz#e9a3c081b51380dfea677336061fea879a829ee9" @@ -14295,6 +14905,13 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== +resolve-options@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/resolve-options/-/resolve-options-1.1.0.tgz#32bb9e39c06d67338dc9378c0d6d6074566ad131" + integrity sha1-MrueOcBtZzONyTeMDW1gdFZq0TE= + dependencies: + value-or-function "^3.0.0" + resolve-pathname@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd" @@ -14317,6 +14934,13 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.12.0, resolve@^1.13 dependencies: path-parse "^1.0.6" +resolve@^1.1.7, resolve@^1.4.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.16.1.tgz#49fac5d8bacf1fd53f200fa51247ae736175832c" + integrity sha512-rmAglCSqWWMrrBv/XM6sW0NuRFiKViw/W4d9EbC4pt+49H8JwHy+mcGmALTEg504AUDcLTvb1T2q3E9AnmY+ig== + dependencies: + path-parse "^1.0.6" + responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" @@ -14575,7 +15199,7 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -schema-utils@^2.6.0, schema-utils@^2.6.4, schema-utils@^2.6.5: +schema-utils@^2.6.4, schema-utils@^2.6.5: version "2.6.5" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.5.tgz#c758f0a7e624263073d396e29cd40aa101152d8a" integrity sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ== @@ -14696,6 +15320,13 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= +semver-greatest-satisfied-range@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz#13e8c2658ab9691cb0cd71093240280d36f77a5b" + integrity sha1-E+jCZYq5aRywzXEJMkAoDTb3els= + dependencies: + sver-compat "^1.5.0" + semver-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" @@ -14716,16 +15347,16 @@ semver@7.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== +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== + semver@^6.0.0, semver@^6.1.2, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.1.1: - version "7.2.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.2.2.tgz#d01432d74ed3010a20ffaf909d63a691520521cd" - integrity sha512-Zo84u6o2PebMSK3zjJ6Zp5wi8VnQZnEaCP13Ul/lt1ANsLACxnJxq4EEm1PY94/por1Hm9+7xpIswdS5AkieMA== - semver@~5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" @@ -15125,6 +15756,11 @@ sourcemap-codec@^1.4.4: resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== +sparkles@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.1.tgz#008db65edce6c50eec0c5e228e1945061dd0437c" + integrity sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw== + spawn-args@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/spawn-args/-/spawn-args-0.1.0.tgz#3e0232a0571b387907f8b3f544aa531c6224848c" @@ -15267,6 +15903,11 @@ stable@^0.1.8: resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== +stack-trace@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= + stack-utils@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" @@ -15311,6 +15952,11 @@ stream-each@^1.1.0: end-of-stream "^1.1.0" stream-shift "^1.0.0" +stream-exhaust@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/stream-exhaust/-/stream-exhaust-1.0.2.tgz#acdac8da59ef2bc1e17a2c0ccf6c320d120e555d" + integrity sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw== + stream-http@^2.7.2: version "2.8.3" resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" @@ -15358,7 +16004,7 @@ string-length@^3.1.0: astral-regex "^1.0.0" strip-ansi "^5.2.0" -string-width@^1.0.1: +string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= @@ -15582,13 +16228,13 @@ sturdy-websocket@^0.1.12: dependencies: lodash.defaults "^4.2.0" -style-loader@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.1.3.tgz#9e826e69c683c4d9bf9db924f85e9abb30d5e200" - integrity sha512-rlkH7X/22yuwFYK357fMN/BxYOorfnfq0eD7+vqlemSK4wEcejFF1dg4zxP0euBW8NrYx2WZzZ8PPFevr7D+Kw== +style-loader@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.1.4.tgz#1ad81283cefe51096756fd62697258edad933230" + integrity sha512-SbBHRD8fwK3pX+4UDF4ETxUF0+rCvk29LWTTI7Rt0cgsDjAj3SWM76ByTe6u2+4IlJ/WwluB7wuslWETCoPQdg== dependencies: - loader-utils "^1.2.3" - schema-utils "^2.6.4" + loader-utils "^2.0.0" + schema-utils "^2.6.5" styled-components@^5.0.1: version "5.1.0" @@ -15663,6 +16309,14 @@ supports-hyperlinks@^2.0.0: has-flag "^4.0.0" supports-color "^7.0.0" +sver-compat@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/sver-compat/-/sver-compat-1.5.0.tgz#3cf87dfeb4d07b4a3f14827bc186b3fd0c645cd8" + integrity sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg= + dependencies: + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" + svgo@^1.0.0: version "1.3.2" resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" @@ -15909,6 +16563,11 @@ tildify@1.2.0: dependencies: os-homedir "^1.0.0" +time-stamp@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" + integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= + timed-out@^4.0.0, timed-out@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" @@ -15962,6 +16621,14 @@ to-absolute-glob@^0.1.1: dependencies: extend-shallow "^2.0.1" +to-absolute-glob@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1865f43d9e74b0822db9f145b78cff7d0f7c849b" + integrity sha1-GGX0PZ50sIItufFFt4z/fQ98hJs= + dependencies: + is-absolute "^1.0.0" + is-negated-glob "^1.0.0" + to-arraybuffer@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" @@ -16045,6 +16712,13 @@ to-space-case@^1.0.0: dependencies: to-no-case "^1.0.0" +to-through@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-through/-/to-through-2.0.0.tgz#fc92adaba072647bc0b67d6b03664aa195093af6" + integrity sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY= + dependencies: + through2 "^2.0.3" + toidentifier@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" @@ -16406,10 +17080,10 @@ truffle-solidity-loader@0.1.32: truffle-config "^1.1.19" truffle-core "^5.0.33" -truffle@5.1.19: - version "5.1.19" - resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.1.19.tgz#daf0aca071b9e2cdd88f456f10c1a81e840794aa" - integrity sha512-H4S7GbKCN56eW5ftLo+l160c+SLyF8C205hUF9VRfulxFBdXvmTIeHdRO/zcnBWiKfEbXzuHWSI9gyFkPtkvmw== +truffle@5.1.22: + version "5.1.22" + resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.1.22.tgz#564e3e245b9b5ceb53ad1075e00ec68682bd3509" + integrity sha512-E1Kz7b2y1ApxytKmEDL04Xdmz+zEjTqWNTbp0DLFh928yzxL47xzDmuZyinx4pPNrt9vnnhoHMHqeh36IFkK1Q== dependencies: app-module-path "^2.2.0" mocha "5.2.0" @@ -16420,10 +17094,10 @@ tryer@^1.0.1: resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8" integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA== -ts-essentials@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-5.0.0.tgz#531d590c9cd62652c9d96284904cbdb2a1dd5ca8" - integrity sha512-ftKWOm6Jq+/UCBekDfxUjLODEd5XGN2EM/+TIQV9LJ5xSV12je4GqdRyv7pXXGGYmEt/nQa6F00xTWYJ5PMjIQ== +ts-essentials@^6.0.3: + version "6.0.4" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-6.0.4.tgz#d36055bf0a7620b1338da6aafd2268787e208aab" + integrity sha512-ZtU9zgSnn8DcAxDZY1DJF8rnxsen8M0IVkO7dVB5fTEOVs7o/0RA4V6i99PIg99bpX81Sgb0FCLjQqD5Ufz3rQ== tslib@^1.10.0, tslib@^1.9.0: version "1.11.1" @@ -16479,6 +17153,11 @@ type-fest@^0.11.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== +type-fest@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" + integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== + type-fest@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" @@ -16573,6 +17252,11 @@ unbzip2-stream@^1.0.9: buffer "^5.2.1" through "^2.3.8" +unc-path-regex@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" + integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo= + underscore@1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" @@ -16583,6 +17267,26 @@ underscore@^1.8.3: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.10.2.tgz#73d6aa3668f3188e4adb0f1943bd12cfd7efaaaf" integrity sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg== +undertaker-registry@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/undertaker-registry/-/undertaker-registry-1.0.1.tgz#5e4bda308e4a8a2ae584f9b9a4359a499825cc50" + integrity sha1-XkvaMI5KiirlhPm5pDWaSZglzFA= + +undertaker@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/undertaker/-/undertaker-1.2.1.tgz#701662ff8ce358715324dfd492a4f036055dfe4b" + integrity sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA== + dependencies: + arr-flatten "^1.0.1" + arr-map "^2.0.0" + bach "^1.0.0" + collection-map "^1.0.0" + es6-weak-map "^2.0.1" + last-run "^1.1.0" + object.defaults "^1.0.0" + object.reduce "^1.0.0" + undertaker-registry "^1.0.0" + unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" @@ -16714,10 +17418,10 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= -url-loader@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-4.0.0.tgz#946719464089e35804009270339f21124e8dd27e" - integrity sha512-sPsoBs8NkSJt9k/2zLUMDAf0rYaG00EtrFQpHRIphKrR6stGsO92LUJf/uUeQNKEoxqoJ4R4qDLqHl+AOEqolA== +url-loader@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-4.1.0.tgz#c7d6b0d6b0fccd51ab3ffc58a78d32b8d89a7be2" + integrity sha512-IzgAAIC8wRrg6NYkFIJY09vtktQcsvU8V6HhtQj9PTefbYImzLB1hufqo4m+RyM5N3mLx5BqJKccgxJS+W3kqw== dependencies: loader-utils "^2.0.0" mime-types "^2.1.26" @@ -16877,7 +17581,7 @@ v8-compile-cache@^2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== -v8-to-istanbul@^4.0.1: +v8-to-istanbul@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-4.1.3.tgz#22fe35709a64955f49a08a7c7c959f6520ad6f20" integrity sha512-sAjOC+Kki6aJVbUOXJbcR0MnbfjvBzwKZazEJymA2IX49uoOdEdk+4fBq5cXgYgiyKtAyrrJNtBZdOeDIF+Fng== @@ -16886,6 +17590,13 @@ v8-to-istanbul@^4.0.1: convert-source-map "^1.6.0" source-map "^0.7.3" +v8flags@^3.0.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.1.3.tgz#fc9dc23521ca20c5433f81cc4eb9b3033bb105d8" + integrity sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w== + dependencies: + homedir-polyfill "^1.0.1" + vali-date@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/vali-date/-/vali-date-1.0.0.tgz#1b904a59609fb328ef078138420934f6b86709a6" @@ -16904,6 +17615,11 @@ value-equal@^1.0.1: resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-1.0.1.tgz#1e0b794c734c5c0cade179c437d356d931a34d6c" integrity sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw== +value-or-function@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813" + integrity sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM= + vary@^1, vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -16951,6 +17667,42 @@ vinyl-fs@2.4.3: vali-date "^1.0.0" vinyl "^1.0.0" +vinyl-fs@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-3.0.3.tgz#c85849405f67428feabbbd5c5dbdd64f47d31bc7" + integrity sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng== + dependencies: + fs-mkdirp-stream "^1.0.0" + glob-stream "^6.1.0" + graceful-fs "^4.0.0" + is-valid-glob "^1.0.0" + lazystream "^1.0.0" + lead "^1.0.0" + object.assign "^4.0.4" + pumpify "^1.3.5" + readable-stream "^2.3.3" + remove-bom-buffer "^3.0.0" + remove-bom-stream "^1.2.0" + resolve-options "^1.1.0" + through2 "^2.0.0" + to-through "^2.0.0" + value-or-function "^3.0.0" + vinyl "^2.0.0" + vinyl-sourcemap "^1.1.0" + +vinyl-sourcemap@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz#92a800593a38703a8cdb11d8b300ad4be63b3e16" + integrity sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY= + dependencies: + append-buffer "^1.0.2" + convert-source-map "^1.5.0" + graceful-fs "^4.1.6" + normalize-path "^2.1.1" + now-and-later "^2.0.0" + remove-bom-buffer "^3.0.0" + vinyl "^2.0.0" + vinyl@1.X, vinyl@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" @@ -16960,6 +17712,18 @@ vinyl@1.X, vinyl@^1.0.0: clone-stats "^0.0.1" replace-ext "0.0.1" +vinyl@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.0.tgz#d85b07da96e458d25b2ffe19fece9f2caa13ed86" + integrity sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg== + dependencies: + clone "^2.1.1" + clone-buffer "^1.0.0" + clone-stats "^1.0.0" + cloneable-readable "^1.0.0" + remove-trailing-separator "^1.0.1" + replace-ext "^1.0.0" + vm-browserify@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" @@ -17642,10 +18406,10 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webpack-bundle-analyzer@3.6.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.6.1.tgz#bdb637c2304424f2fbff9a950c7be42a839ae73b" - integrity sha512-Nfd8HDwfSx1xBwC+P8QMGvHAOITxNBSvu/J/mCJvOwv+G4VWkU7zir9SSenTtyCi0LnVtmsc7G5SZo1uV+bxRw== +webpack-bundle-analyzer@3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.7.0.tgz#84da434e89442899b884d9ad38e466d0db02a56f" + integrity sha512-mETdjZ30a3Yf+NTB/wqTgACK7rAYQl5uxKK0WVTNmF0sM3Uv8s3R58YZMW7Rhu0Lk2Rmuhdj5dcH5Q76zCDVdA== dependencies: acorn "^7.1.1" acorn-walk "^7.1.1" @@ -17862,6 +18626,11 @@ whatwg-url@^7.0.0: tr46 "^1.0.1" webidl-conversions "^4.0.2" +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + integrity sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= + which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" @@ -18172,6 +18941,13 @@ yargs-parser@^2.4.0: camelcase "^3.0.0" lodash.assign "^4.0.6" +yargs-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" + integrity sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo= + dependencies: + camelcase "^3.0.0" + yargs-parser@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" @@ -18249,6 +19025,25 @@ yargs@^15.3.1: y18n "^4.0.0" yargs-parser "^18.1.1" +yargs@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" + integrity sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg= + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^5.0.0" + yargs@^8.0.2: version "8.0.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" From d2f80ead6131e4c6b9fc8b45f1c40ba265a6d63c Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Mon, 20 Apr 2020 18:27:26 +0400 Subject: [PATCH 03/65] Sync notifications and state: createTransaction WIP --- src/logic/safe/transactions/gasNew.js | 13 ++++++++- .../safe/store/actions/createTransaction.js | 29 +++++++++++++++++-- .../safe/store/actions/updateTransaction.js | 8 +++++ src/routes/safe/store/reducer/transactions.js | 21 ++++++++++++++ 4 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 src/routes/safe/store/actions/updateTransaction.js diff --git a/src/logic/safe/transactions/gasNew.js b/src/logic/safe/transactions/gasNew.js index 15c33c17..f04a5a32 100644 --- a/src/logic/safe/transactions/gasNew.js +++ b/src/logic/safe/transactions/gasNew.js @@ -54,7 +54,18 @@ export const estimateTxGasCosts = async ( '', )}000000000000000000000000000000000000000000000000000000000000000001` txData = await safeInstance.methods - .execTransaction(to, tx ? tx.value : 0, data, CALL, 0, 0, 0, ZERO_ADDRESS, ZERO_ADDRESS, signatures) + .execTransaction( + to, + tx ? tx.value : 0, + data, + CALL, + tx ? tx.safeTxGas : 0, + 0, + 0, + ZERO_ADDRESS, + ZERO_ADDRESS, + signatures, + ) .encodeABI() } else { const txHash = await safeInstance.methods diff --git a/src/routes/safe/store/actions/createTransaction.js b/src/routes/safe/store/actions/createTransaction.js index 105e3f07..29ff6a68 100644 --- a/src/routes/safe/store/actions/createTransaction.js +++ b/src/routes/safe/store/actions/createTransaction.js @@ -1,8 +1,13 @@ // @flow import { push } from 'connected-react-router' +import { List } from 'immutable' import type { GetState, Dispatch as ReduxDispatch } from 'redux' import semverSatisfies from 'semver/functions/satisfies' +import { makeConfirmation } from '../models/confirmation' + +import updateTransaction from './updateTransaction' + import { onboardUser } from '~/components/ConnectButton' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import { type NotificationsQueue, getNotificationsFromTxType, showSnackbar } from '~/logic/notifications' @@ -105,7 +110,7 @@ const createTransaction = ({ // Couldn't find an issue for trezor but the error is almost the same const canTryOffchainSigning = !isExecution && !smartContractWallet && semverSatisfies(safeVersion, SAFE_VERSION_FOR_OFFCHAIN_SIGNATURES) - if (canTryOffchainSigning) { + if (false) { const signature = await tryOffchainSigning({ ...txArgs, safeAddress }, hardwareWallet) if (signature) { @@ -151,7 +156,7 @@ const createTransaction = ({ txHash, origin, }) - dispatch(fetchTransactions(safeAddress)) + await dispatch(fetchTransactions(safeAddress)) } catch (err) { console.error(err) } @@ -160,7 +165,27 @@ const createTransaction = ({ console.error('Tx error: ', error) }) .then((receipt) => { + console.log(receipt) closeSnackbar(pendingExecutionKey) + const safeTxHash = isExecution ? 'lol' : receipt.events.ApproveHash.returnValues[0] + + dispatch( + updateTransaction({ + safeAddress, + transaction: { + safeTxHash, + confirmations: List([ + makeConfirmation({ + type: 'confirmation', + hash: receipt.transactionHash, + signature: sigs, + owner: { address: '0x000', name: 'Test' }, + }), + ]), + }, + }), + ) + showSnackbar( isExecution ? notificationsQueue.afterExecution.noMoreConfirmationsNeeded diff --git a/src/routes/safe/store/actions/updateTransaction.js b/src/routes/safe/store/actions/updateTransaction.js new file mode 100644 index 00000000..9b2b050e --- /dev/null +++ b/src/routes/safe/store/actions/updateTransaction.js @@ -0,0 +1,8 @@ +// @flow +import { createAction } from 'redux-actions' + +export const UPDATE_TRANSACTION = 'UPDATE_TRANSACTION' + +const updateTransaction = createAction(UPDATE_TRANSACTION) + +export default updateTransaction diff --git a/src/routes/safe/store/reducer/transactions.js b/src/routes/safe/store/reducer/transactions.js index bc08a7bb..f52bdac6 100644 --- a/src/routes/safe/store/reducer/transactions.js +++ b/src/routes/safe/store/reducer/transactions.js @@ -3,6 +3,7 @@ import { List, Map } from 'immutable' import { type ActionType, handleActions } from 'redux-actions' import { ADD_TRANSACTIONS } from '~/routes/safe/store/actions/addTransactions' +import { UPDATE_TRANSACTION } from '~/routes/safe/store/actions/updateTransaction' import { type Transaction } from '~/routes/safe/store/models/transaction' export const TRANSACTIONS_REDUCER_ID = 'transactions' @@ -12,6 +13,26 @@ export type State = Map> export default handleActions( { [ADD_TRANSACTIONS]: (state: State, action: ActionType): State => action.payload, + [UPDATE_TRANSACTION]: (state: State, action: ActionType): State => { + const { safeAddress, transaction } = action.payload + + const transactionList = state.get(safeAddress) + + if (!transaction) { + return state + } + + const storedTransactionIndex = transactionList.findIndex((tx) => tx.safeTxHash === transaction.safeTxHash) + + if (!storedTransactionIndex < 0) { + return state + } + + return state.set( + safeAddress, + transactionList.update(storedTransactionIndex, (tx) => tx.merge(transaction)), + ) + }, }, Map(), ) From db5c69be59df5f5743533d58d97d8d6b55a6323b Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 21 Apr 2020 15:29:42 +0400 Subject: [PATCH 04/65] optimistic updates in createTransaction.js wip --- package.json | 6 ++--- .../addressBook/store/selectors/index.js | 10 ++++++++ .../safe/store/actions/createTransaction.js | 11 +++++++-- yarn.lock | 23 ++++++++++++------- 4 files changed, 37 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index fe0e51b0..d8fbe348 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@material-ui/core": "4.9.11", "@material-ui/icons": "4.9.1", "@material-ui/lab": "4.0.0-alpha.39", - "@openzeppelin/contracts": "^2.5.0", + "@openzeppelin/contracts": "3.0.0", "@testing-library/jest-dom": "5.5.0", "@welldone-software/why-did-you-render": "4.0.8", "async-sema": "^3.1.0", @@ -115,13 +115,13 @@ "@babel/preset-env": "7.9.5", "@babel/preset-flow": "7.9.0", "@babel/preset-react": "7.9.4", - "@testing-library/react": "10.0.2", + "@testing-library/react": "10.0.3", "autoprefixer": "9.7.6", "babel-core": "^7.0.0-bridge.0", "babel-eslint": "10.1.0", "babel-jest": "25.4.0", "babel-loader": "8.1.0", - "babel-plugin-dynamic-import-node": "^2.3.0", + "babel-plugin-dynamic-import-node": "2.3.2", "babel-plugin-transform-es3-member-expression-literals": "^6.22.0", "babel-plugin-transform-es3-property-literals": "^6.22.0", "babel-polyfill": "^6.26.0", diff --git a/src/logic/addressBook/store/selectors/index.js b/src/logic/addressBook/store/selectors/index.js index edef7837..70739435 100644 --- a/src/logic/addressBook/store/selectors/index.js +++ b/src/logic/addressBook/store/selectors/index.js @@ -36,6 +36,16 @@ export const getAddressBookListSelector: Selector { + const adbkEntry = addressBook.find((entry) => entry.address === address) + + return adbkEntry ? adbkEntry.name : 'UNKNOWN' + }, +) + export const getNameFromAddressBook = (userAddress: string): string | null => { if (!userAddress) { return null diff --git a/src/routes/safe/store/actions/createTransaction.js b/src/routes/safe/store/actions/createTransaction.js index 29ff6a68..287b428d 100644 --- a/src/routes/safe/store/actions/createTransaction.js +++ b/src/routes/safe/store/actions/createTransaction.js @@ -9,6 +9,7 @@ import { makeConfirmation } from '../models/confirmation' import updateTransaction from './updateTransaction' import { onboardUser } from '~/components/ConnectButton' +import { nameFromAddressBookSelector } from '~/logic/addressBook/store/selectors/index' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import { type NotificationsQueue, getNotificationsFromTxType, showSnackbar } from '~/logic/notifications' import { @@ -167,19 +168,25 @@ const createTransaction = ({ .then((receipt) => { console.log(receipt) closeSnackbar(pendingExecutionKey) - const safeTxHash = isExecution ? 'lol' : receipt.events.ApproveHash.returnValues[0] + const safeTxHash = isExecution + ? receipt.events.ExecutionSuccess.returnValues[0] + : receipt.events.ApproveHash.returnValues[0] dispatch( updateTransaction({ safeAddress, transaction: { safeTxHash, + isExecuted: isExecution, + isSuccessful: isExecution ? true : null, + executionTxHash: isExecution ? receipt.transactionHash : null, + executor: isExecution ? from : null, confirmations: List([ makeConfirmation({ type: 'confirmation', hash: receipt.transactionHash, signature: sigs, - owner: { address: '0x000', name: 'Test' }, + owner: { address: from, name: nameFromAddressBookSelector(state, from) }, }), ]), }, diff --git a/yarn.lock b/yarn.lock index 168656f4..a8537015 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1549,10 +1549,10 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== -"@openzeppelin/contracts@^2.5.0": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-2.5.0.tgz#e327a98ba1d26b7756ff62885a0aa0967a375449" - integrity sha512-t3jm8FrhL9tkkJTofkznTqo/XXdHi21w5yXwalEnaMOp22ZwZ0f/mmKdlgMMLPFa6bSVHbY88mKESwJT/7m5Lg== +"@openzeppelin/contracts@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.0.0.tgz#89bc0d32fc9eb257cf6499f2497a1b4a6715f186" + integrity sha512-u7oATjUK6jffDOoIjVQ7vJ2fnFKlfDS1CJzrMpp+YtGQ2fhdSk0kXjZTxk8Pj1SPVZRNES3yo0r144v8BsuRhQ== "@portis/eth-json-rpc-middleware@^4.1.2": version "4.1.2" @@ -1713,10 +1713,10 @@ lodash "^4.17.15" redent "^3.0.0" -"@testing-library/react@10.0.2": - version "10.0.2" - resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-10.0.2.tgz#8eca7aa52d810cf7150048a2829fdc487162006d" - integrity sha512-YT6Mw0oJz7R6vlEkmo1FlUD+K15FeXApOB5Ffm9zooFVnrwkt00w18dUJFMOh1yRp9wTdVRonbor7o4PIpFCmA== +"@testing-library/react@10.0.3": + version "10.0.3" + resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-10.0.3.tgz#7781adc75cce172f8cda28faa77be29c6270ab43" + integrity sha512-EVmd3ghDFBEjOSLnISUdi7OcLdP6tsqjmTprpMaBz5TreoM8jnxGKIPkLD579CE0LYGqK01iffQiy6wwW/RUig== dependencies: "@babel/runtime" "^7.9.2" "@testing-library/dom" "^7.1.0" @@ -3411,6 +3411,13 @@ babel-plugin-check-es2015-constants@^6.22.0: dependencies: babel-runtime "^6.22.0" +babel-plugin-dynamic-import-node@2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.2.tgz#14fb5accb300f9aac0151949f6192259f1403c4a" + integrity sha512-yvczAMjbc73xira9yTyF1XnEmkX8QwlUhmxuhimeMUeAaA6s7busTPRVDzhVG7eeBdNcRiZ/mAwFrJ9It4vQcg== + dependencies: + object.assign "^4.1.0" + babel-plugin-dynamic-import-node@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" From db37333f6f27a232f31a430bd1e6abd849dbd00e Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Wed, 22 Apr 2020 18:24:41 +0400 Subject: [PATCH 05/65] move whenfieldchanges to forms components --- src/components/{ => forms}/WhenFieldChanges/index.jsx | 0 .../Balances/SendModal/screens/SendCollectible/index.jsx | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename src/components/{ => forms}/WhenFieldChanges/index.jsx (100%) diff --git a/src/components/WhenFieldChanges/index.jsx b/src/components/forms/WhenFieldChanges/index.jsx similarity index 100% rename from src/components/WhenFieldChanges/index.jsx rename to src/components/forms/WhenFieldChanges/index.jsx diff --git a/src/routes/safe/components/Balances/SendModal/screens/SendCollectible/index.jsx b/src/routes/safe/components/Balances/SendModal/screens/SendCollectible/index.jsx index 80b07e40..64cf16da 100644 --- a/src/routes/safe/components/Balances/SendModal/screens/SendCollectible/index.jsx +++ b/src/routes/safe/components/Balances/SendModal/screens/SendCollectible/index.jsx @@ -14,8 +14,8 @@ import CopyBtn from '~/components/CopyBtn' import EtherscanBtn from '~/components/EtherscanBtn' import Identicon from '~/components/Identicon' import ScanQRModal from '~/components/ScanQRModal' -import WhenFieldChanges from '~/components/WhenFieldChanges' import GnoForm from '~/components/forms/GnoForm' +import WhenFieldChanges from '~/components/forms/WhenFieldChanges' import Block from '~/components/layout/Block' import Button from '~/components/layout/Button' import Col from '~/components/layout/Col' From 71e4db1345bc01db0d5fffc73e1ed8ed70b9a91a Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Wed, 22 Apr 2020 18:38:58 +0400 Subject: [PATCH 06/65] moving transaction related actions to transactions folder WIP --- .../Balances/SendModal/screens/ReviewCollectible/index.jsx | 2 +- .../Balances/SendModal/screens/ReviewCustomTx/index.jsx | 2 +- .../Balances/SendModal/screens/ReviewTx/index.jsx | 2 +- .../safe/components/Settings/UpdateSafeModal/index.jsx | 2 +- src/routes/safe/container/actions.js | 6 +++--- .../{ => transactions}/addCancellationTransactions.js | 0 .../actions/{ => transactions}/addIncomingTransactions.js | 0 .../store/actions/{ => transactions}/addTransactions.js | 0 .../store/actions/{ => transactions}/createTransaction.js | 2 +- .../store/actions/{ => transactions}/fetchTransactions.js | 0 .../store/actions/{ => transactions}/processTransaction.js | 2 +- .../store/actions/{ => transactions}/updateTransaction.js | 0 src/routes/safe/store/reducer/transactions.js | 4 ++-- src/test/builder/safe.dom.utils.js | 2 +- 14 files changed, 12 insertions(+), 12 deletions(-) rename src/routes/safe/store/actions/{ => transactions}/addCancellationTransactions.js (100%) rename src/routes/safe/store/actions/{ => transactions}/addIncomingTransactions.js (100%) rename src/routes/safe/store/actions/{ => transactions}/addTransactions.js (100%) rename src/routes/safe/store/actions/{ => transactions}/createTransaction.js (98%) rename src/routes/safe/store/actions/{ => transactions}/fetchTransactions.js (100%) rename src/routes/safe/store/actions/{ => transactions}/processTransaction.js (98%) rename src/routes/safe/store/actions/{ => transactions}/updateTransaction.js (100%) diff --git a/src/routes/safe/components/Balances/SendModal/screens/ReviewCollectible/index.jsx b/src/routes/safe/components/Balances/SendModal/screens/ReviewCollectible/index.jsx index 8c1cddf6..fce14ae0 100644 --- a/src/routes/safe/components/Balances/SendModal/screens/ReviewCollectible/index.jsx +++ b/src/routes/safe/components/Balances/SendModal/screens/ReviewCollectible/index.jsx @@ -34,7 +34,7 @@ import { SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH } from '~/logic/tokens/utils/token import { getWeb3 } from '~/logic/wallets/getWeb3' import SafeInfo from '~/routes/safe/components/Balances/SendModal/SafeInfo' import { setImageToPlaceholder } from '~/routes/safe/components/Balances/utils' -import createTransaction from '~/routes/safe/store/actions/createTransaction' +import createTransaction from '~/routes/safe/store/actions/transactions/createTransaction' import { safeSelector } from '~/routes/safe/store/selectors' import { sm } from '~/theme/variables' import { textShortener } from '~/utils/strings' diff --git a/src/routes/safe/components/Balances/SendModal/screens/ReviewCustomTx/index.jsx b/src/routes/safe/components/Balances/SendModal/screens/ReviewCustomTx/index.jsx index 5e2c11b1..1788bdda 100644 --- a/src/routes/safe/components/Balances/SendModal/screens/ReviewCustomTx/index.jsx +++ b/src/routes/safe/components/Balances/SendModal/screens/ReviewCustomTx/index.jsx @@ -27,7 +27,7 @@ import { getEthAsToken } from '~/logic/tokens/utils/tokenHelpers' import { getWeb3 } from '~/logic/wallets/getWeb3' import SafeInfo from '~/routes/safe/components/Balances/SendModal/SafeInfo' import { setImageToPlaceholder } from '~/routes/safe/components/Balances/utils' -import createTransaction from '~/routes/safe/store/actions/createTransaction' +import createTransaction from '~/routes/safe/store/actions/transactions/createTransaction' import { safeSelector } from '~/routes/safe/store/selectors' import { sm } from '~/theme/variables' diff --git a/src/routes/safe/components/Balances/SendModal/screens/ReviewTx/index.jsx b/src/routes/safe/components/Balances/SendModal/screens/ReviewTx/index.jsx index 5e837447..3d6cee74 100644 --- a/src/routes/safe/components/Balances/SendModal/screens/ReviewTx/index.jsx +++ b/src/routes/safe/components/Balances/SendModal/screens/ReviewTx/index.jsx @@ -31,7 +31,7 @@ import { getWeb3 } from '~/logic/wallets/getWeb3' import SafeInfo from '~/routes/safe/components/Balances/SendModal/SafeInfo' import { setImageToPlaceholder } from '~/routes/safe/components/Balances/utils' import { extendedSafeTokensSelector } from '~/routes/safe/container/selector' -import createTransaction from '~/routes/safe/store/actions/createTransaction' +import createTransaction from '~/routes/safe/store/actions/transactions/createTransaction' import { safeSelector } from '~/routes/safe/store/selectors' import { sm } from '~/theme/variables' diff --git a/src/routes/safe/components/Settings/UpdateSafeModal/index.jsx b/src/routes/safe/components/Settings/UpdateSafeModal/index.jsx index 570f49fb..66f848b5 100644 --- a/src/routes/safe/components/Settings/UpdateSafeModal/index.jsx +++ b/src/routes/safe/components/Settings/UpdateSafeModal/index.jsx @@ -15,7 +15,7 @@ import Hairline from '~/components/layout/Hairline' import Paragraph from '~/components/layout/Paragraph' import Row from '~/components/layout/Row' import { upgradeSafeToLatestVersion } from '~/logic/safe/utils/upgradeSafe' -import createTransaction from '~/routes/safe/store/actions/createTransaction' +import createTransaction from '~/routes/safe/store/actions/transactions/createTransaction' type Props = { onClose: Function, diff --git a/src/routes/safe/container/actions.js b/src/routes/safe/container/actions.js index 4118b9fb..fa9dc93e 100644 --- a/src/routes/safe/container/actions.js +++ b/src/routes/safe/container/actions.js @@ -7,13 +7,13 @@ import addViewedSafe from '~/logic/currentSession/store/actions/addViewedSafe' import activateAssetsByBalance from '~/logic/tokens/store/actions/activateAssetsByBalance' import activateTokensByBalance from '~/logic/tokens/store/actions/activateTokensByBalance' import fetchTokens from '~/logic/tokens/store/actions/fetchTokens' -import createTransaction from '~/routes/safe/store/actions/createTransaction' import fetchEtherBalance from '~/routes/safe/store/actions/fetchEtherBalance' import fetchLatestMasterContractVersion from '~/routes/safe/store/actions/fetchLatestMasterContractVersion' import fetchSafe, { checkAndUpdateSafe } from '~/routes/safe/store/actions/fetchSafe' import fetchTokenBalances from '~/routes/safe/store/actions/fetchTokenBalances' -import fetchTransactions from '~/routes/safe/store/actions/fetchTransactions' -import processTransaction from '~/routes/safe/store/actions/processTransaction' +import createTransaction from '~/routes/safe/store/actions/transactions/createTransaction' +import fetchTransactions from '~/routes/safe/store/actions/transactions/fetchTransactions' +import processTransaction from '~/routes/safe/store/actions/transactions/processTransaction' import updateSafe from '~/routes/safe/store/actions/updateSafe' export type Actions = { diff --git a/src/routes/safe/store/actions/addCancellationTransactions.js b/src/routes/safe/store/actions/transactions/addCancellationTransactions.js similarity index 100% rename from src/routes/safe/store/actions/addCancellationTransactions.js rename to src/routes/safe/store/actions/transactions/addCancellationTransactions.js diff --git a/src/routes/safe/store/actions/addIncomingTransactions.js b/src/routes/safe/store/actions/transactions/addIncomingTransactions.js similarity index 100% rename from src/routes/safe/store/actions/addIncomingTransactions.js rename to src/routes/safe/store/actions/transactions/addIncomingTransactions.js diff --git a/src/routes/safe/store/actions/addTransactions.js b/src/routes/safe/store/actions/transactions/addTransactions.js similarity index 100% rename from src/routes/safe/store/actions/addTransactions.js rename to src/routes/safe/store/actions/transactions/addTransactions.js diff --git a/src/routes/safe/store/actions/createTransaction.js b/src/routes/safe/store/actions/transactions/createTransaction.js similarity index 98% rename from src/routes/safe/store/actions/createTransaction.js rename to src/routes/safe/store/actions/transactions/createTransaction.js index 287b428d..af05dd3f 100644 --- a/src/routes/safe/store/actions/createTransaction.js +++ b/src/routes/safe/store/actions/transactions/createTransaction.js @@ -26,7 +26,7 @@ import { ZERO_ADDRESS } from '~/logic/wallets/ethAddresses' import { EMPTY_DATA } from '~/logic/wallets/ethTransactions' import { providerSelector } from '~/logic/wallets/store/selectors' import { SAFELIST_ADDRESS } from '~/routes/routes' -import fetchTransactions from '~/routes/safe/store/actions/fetchTransactions' +import fetchTransactions from '~/routes/safe/store/actions/transactionsfetchTransactions' import { getLastTx, getNewTxNonce, shouldExecuteTransaction } from '~/routes/safe/store/actions/utils' import { type GlobalState } from '~/store' import { getErrorMessage } from '~/test/utils/ethereumErrors' diff --git a/src/routes/safe/store/actions/fetchTransactions.js b/src/routes/safe/store/actions/transactions/fetchTransactions.js similarity index 100% rename from src/routes/safe/store/actions/fetchTransactions.js rename to src/routes/safe/store/actions/transactions/fetchTransactions.js diff --git a/src/routes/safe/store/actions/processTransaction.js b/src/routes/safe/store/actions/transactions/processTransaction.js similarity index 98% rename from src/routes/safe/store/actions/processTransaction.js rename to src/routes/safe/store/actions/transactions/processTransaction.js index f1f19dca..284d9812 100644 --- a/src/routes/safe/store/actions/processTransaction.js +++ b/src/routes/safe/store/actions/transactions/processTransaction.js @@ -15,7 +15,7 @@ import { SAFE_VERSION_FOR_OFFCHAIN_SIGNATURES, tryOffchainSigning } from '~/logi import { getCurrentSafeVersion } from '~/logic/safe/utils/safeVersion' import { providerSelector } from '~/logic/wallets/store/selectors' import fetchSafe from '~/routes/safe/store/actions/fetchSafe' -import fetchTransactions from '~/routes/safe/store/actions/fetchTransactions' +import fetchTransactions from '~/routes/safe/store/actions/transactions/fetchTransactions' import { getLastTx, getNewTxNonce, shouldExecuteTransaction } from '~/routes/safe/store/actions/utils' import { type Transaction } from '~/routes/safe/store/models/transaction' import { type GlobalState } from '~/store' diff --git a/src/routes/safe/store/actions/updateTransaction.js b/src/routes/safe/store/actions/transactions/updateTransaction.js similarity index 100% rename from src/routes/safe/store/actions/updateTransaction.js rename to src/routes/safe/store/actions/transactions/updateTransaction.js diff --git a/src/routes/safe/store/reducer/transactions.js b/src/routes/safe/store/reducer/transactions.js index f52bdac6..60529e6c 100644 --- a/src/routes/safe/store/reducer/transactions.js +++ b/src/routes/safe/store/reducer/transactions.js @@ -2,8 +2,8 @@ import { List, Map } from 'immutable' import { type ActionType, handleActions } from 'redux-actions' -import { ADD_TRANSACTIONS } from '~/routes/safe/store/actions/addTransactions' -import { UPDATE_TRANSACTION } from '~/routes/safe/store/actions/updateTransaction' +import { ADD_TRANSACTIONS } from '~/routes/safe/store/actions/transactions/addTransactions' +import { UPDATE_TRANSACTION } from '~/routes/safe/store/actions/transactions/updateTransaction' import { type Transaction } from '~/routes/safe/store/models/transaction' export const TRANSACTIONS_REDUCER_ID = 'transactions' diff --git a/src/test/builder/safe.dom.utils.js b/src/test/builder/safe.dom.utils.js index bb2a8aab..4dc4f045 100644 --- a/src/test/builder/safe.dom.utils.js +++ b/src/test/builder/safe.dom.utils.js @@ -7,7 +7,7 @@ import { render } from '@testing-library/react' import { ConnectedRouter } from 'connected-react-router' import PageFrame from '~/components/layout/PageFrame' import ListItemText from '~/components/List/ListItemText/index' -import fetchTransactions from '~/routes/safe/store/actions/fetchTransactions' +import fetchTransactions from '~/routes/safe/store/actions/transactions/fetchTransactions' import { sleep } from '~/utils/timer' import { history, type GlobalState } from '~/store' import AppRoutes from '~/routes' From fe2e21d2d457f2bafc10cbb2c9c4bdd404c881ee Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 23 Apr 2020 15:49:14 +0400 Subject: [PATCH 07/65] fix project compilation --- .../safe/store/actions/transactions/createTransaction.js | 4 ++-- .../safe/store/actions/transactions/fetchTransactions.js | 2 +- .../safe/store/actions/transactions/utils/mockTransaction.js | 2 ++ src/routes/safe/store/middleware/notificationsMiddleware.js | 4 ++-- src/routes/safe/store/reducer/cancellationTransactions.js | 2 +- src/routes/safe/store/reducer/incomingTransactions.js | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 src/routes/safe/store/actions/transactions/utils/mockTransaction.js diff --git a/src/routes/safe/store/actions/transactions/createTransaction.js b/src/routes/safe/store/actions/transactions/createTransaction.js index b9ba09d9..f2c1c7a6 100644 --- a/src/routes/safe/store/actions/transactions/createTransaction.js +++ b/src/routes/safe/store/actions/transactions/createTransaction.js @@ -4,8 +4,9 @@ import { List } from 'immutable' import type { GetState, Dispatch as ReduxDispatch } from 'redux' import semverSatisfies from 'semver/functions/satisfies' -import { makeConfirmation } from '../models/confirmation' +import { makeConfirmation } from '../../models/confirmation' +import fetchTransactions from './fetchTransactions' import updateTransaction from './updateTransaction' import { onboardUser } from '~/components/ConnectButton' @@ -26,7 +27,6 @@ import { ZERO_ADDRESS } from '~/logic/wallets/ethAddresses' import { EMPTY_DATA } from '~/logic/wallets/ethTransactions' import { providerSelector } from '~/logic/wallets/store/selectors' import { SAFELIST_ADDRESS } from '~/routes/routes' -import fetchTransactions from '~/routes/safe/store/actions/transactionsfetchTransactions' import { getLastTx, getNewTxNonce, shouldExecuteTransaction } from '~/routes/safe/store/actions/utils' import { type GlobalState } from '~/store' import { getErrorMessage } from '~/test/utils/ethereumErrors' diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions.js b/src/routes/safe/store/actions/transactions/fetchTransactions.js index dd6413df..1e89850f 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions.js +++ b/src/routes/safe/store/actions/transactions/fetchTransactions.js @@ -24,7 +24,7 @@ import { import { ZERO_ADDRESS, sameAddress } from '~/logic/wallets/ethAddresses' import { EMPTY_DATA } from '~/logic/wallets/ethTransactions' import { getWeb3 } from '~/logic/wallets/getWeb3' -import { addCancellationTransactions } from '~/routes/safe/store/actions/addCancellationTransactions' +import { addCancellationTransactions } from '~/routes/safe/store/actions/transactions/addCancellationTransactions' import { makeConfirmation } from '~/routes/safe/store/models/confirmation' import { type IncomingTransaction, makeIncomingTransaction } from '~/routes/safe/store/models/incomingTransaction' import { makeOwner } from '~/routes/safe/store/models/owner' diff --git a/src/routes/safe/store/actions/transactions/utils/mockTransaction.js b/src/routes/safe/store/actions/transactions/utils/mockTransaction.js new file mode 100644 index 00000000..f46d7c23 --- /dev/null +++ b/src/routes/safe/store/actions/transactions/utils/mockTransaction.js @@ -0,0 +1,2 @@ +// @flow +const getMockedTransaction = (safeTxHash, isExecution) => {} diff --git a/src/routes/safe/store/middleware/notificationsMiddleware.js b/src/routes/safe/store/middleware/notificationsMiddleware.js index 80962bea..cd038b1f 100644 --- a/src/routes/safe/store/middleware/notificationsMiddleware.js +++ b/src/routes/safe/store/middleware/notificationsMiddleware.js @@ -12,9 +12,9 @@ import { isUserOwner } from '~/logic/wallets/ethAddresses' import { userAccountSelector } from '~/logic/wallets/store/selectors' import { getIncomingTxAmount } from '~/routes/safe/components/Transactions/TxsTable/columns' import { grantedSelector } from '~/routes/safe/container/selector' -import { ADD_INCOMING_TRANSACTIONS } from '~/routes/safe/store/actions/addIncomingTransactions' import { ADD_SAFE } from '~/routes/safe/store/actions/addSafe' -import { ADD_TRANSACTIONS } from '~/routes/safe/store/actions/addTransactions' +import { ADD_INCOMING_TRANSACTIONS } from '~/routes/safe/store/actions/transactions/addIncomingTransactions' +import { ADD_TRANSACTIONS } from '~/routes/safe/store/actions/transactions/addTransactions' import updateSafe from '~/routes/safe/store/actions/updateSafe' import { safeParamAddressFromStateSelector, safesMapSelector } from '~/routes/safe/store/selectors' import { type GlobalState } from '~/store/' diff --git a/src/routes/safe/store/reducer/cancellationTransactions.js b/src/routes/safe/store/reducer/cancellationTransactions.js index 9b3fc9a3..f7be7aae 100644 --- a/src/routes/safe/store/reducer/cancellationTransactions.js +++ b/src/routes/safe/store/reducer/cancellationTransactions.js @@ -2,7 +2,7 @@ import { List, Map } from 'immutable' import { type ActionType, handleActions } from 'redux-actions' -import { ADD_CANCELLATION_TRANSACTIONS } from '~/routes/safe/store/actions/addCancellationTransactions' +import { ADD_CANCELLATION_TRANSACTIONS } from '~/routes/safe/store/actions/transactions/addCancellationTransactions' import { type Transaction } from '~/routes/safe/store/models/transaction' export const CANCELLATION_TRANSACTIONS_REDUCER_ID = 'cancellationTransactions' diff --git a/src/routes/safe/store/reducer/incomingTransactions.js b/src/routes/safe/store/reducer/incomingTransactions.js index 72cb4d05..0104695c 100644 --- a/src/routes/safe/store/reducer/incomingTransactions.js +++ b/src/routes/safe/store/reducer/incomingTransactions.js @@ -2,7 +2,7 @@ import { List, Map } from 'immutable' import { type ActionType, handleActions } from 'redux-actions' -import { ADD_INCOMING_TRANSACTIONS } from '~/routes/safe/store/actions/addIncomingTransactions' +import { ADD_INCOMING_TRANSACTIONS } from '~/routes/safe/store/actions/transactions/addIncomingTransactions' import type { IncomingTransaction } from '~/routes/safe/store/models/incomingTransaction' export const INCOMING_TRANSACTIONS_REDUCER_ID = 'incomingTransactions' From 1024362325f779131e39a81db602df071a027aa4 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Fri, 24 Apr 2020 18:13:29 +0400 Subject: [PATCH 08/65] fix project compilation --- src/routes/safe/components/Apps/sendTransactions.js | 2 +- .../components/Settings/ManageOwners/AddOwnerModal/index.jsx | 2 +- .../Settings/ManageOwners/RemoveOwnerModal/index.jsx | 2 +- .../Settings/ManageOwners/ReplaceOwnerModal/index.jsx | 2 +- .../safe/components/Settings/ThresholdSettings/index.jsx | 2 +- .../Transactions/TxsTable/ExpandedTx/ApproveTxModal/index.jsx | 2 +- .../Transactions/TxsTable/ExpandedTx/RejectTxModal/index.jsx | 2 +- src/routes/safe/container/Hooks/useCheckForUpdates.jsx | 2 +- src/routes/safe/container/Hooks/useLoadSafe.jsx | 2 +- .../safe/store/actions/transactions/createTransaction.js | 4 +--- 10 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/routes/safe/components/Apps/sendTransactions.js b/src/routes/safe/components/Apps/sendTransactions.js index 278686d4..b7807755 100644 --- a/src/routes/safe/components/Apps/sendTransactions.js +++ b/src/routes/safe/components/Apps/sendTransactions.js @@ -1,7 +1,7 @@ // @flow import { DELEGATE_CALL } from '~/logic/safe/transactions/send' import { getWeb3 } from '~/logic/wallets/getWeb3' -import createTransaction from '~/routes/safe/store/actions/createTransaction' +import createTransaction from '~/routes/safe/store/actions/transactions/createTransaction' const multiSendAddress = '0xB522a9f781924eD250A11C54105E51840B138AdD' const multiSendAbi = [ diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx index e76e1a4d..c63cc933 100644 --- a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.jsx @@ -14,7 +14,7 @@ import { addOrUpdateAddressBookEntry } from '~/logic/addressBook/store/actions/a import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import { TX_NOTIFICATION_TYPES } from '~/logic/safe/transactions' import addSafeOwner from '~/routes/safe/store/actions/addSafeOwner' -import createTransaction from '~/routes/safe/store/actions/createTransaction' +import createTransaction from '~/routes/safe/store/actions/transactions/createTransaction' import { type Owner } from '~/routes/safe/store/models/owner' import { safeOwnersSelector, safeParamAddressFromStateSelector } from '~/routes/safe/store/selectors' diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx index 4b5e9ceb..423012c7 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx @@ -12,8 +12,8 @@ import ThresholdForm from './screens/ThresholdForm' import Modal from '~/components/Modal' import { SENTINEL_ADDRESS, getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import { TX_NOTIFICATION_TYPES } from '~/logic/safe/transactions' -import createTransaction from '~/routes/safe/store/actions/createTransaction' import removeSafeOwner from '~/routes/safe/store/actions/removeSafeOwner' +import createTransaction from '~/routes/safe/store/actions/transactions/createTransaction' import { type Owner } from '~/routes/safe/store/models/owner' import { safeOwnersSelector, diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx index fdcdb5f1..2390f572 100644 --- a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.jsx @@ -11,8 +11,8 @@ import Modal from '~/components/Modal' import { addOrUpdateAddressBookEntry } from '~/logic/addressBook/store/actions/addOrUpdateAddressBookEntry' import { SENTINEL_ADDRESS, getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import { TX_NOTIFICATION_TYPES } from '~/logic/safe/transactions' -import createTransaction from '~/routes/safe/store/actions/createTransaction' import replaceSafeOwner from '~/routes/safe/store/actions/replaceSafeOwner' +import createTransaction from '~/routes/safe/store/actions/transactions/createTransaction' import { safeParamAddressFromStateSelector, safeThresholdSelector } from '~/routes/safe/store/selectors' const styles = () => ({ diff --git a/src/routes/safe/components/Settings/ThresholdSettings/index.jsx b/src/routes/safe/components/Settings/ThresholdSettings/index.jsx index aa5023d5..1788cab0 100644 --- a/src/routes/safe/components/Settings/ThresholdSettings/index.jsx +++ b/src/routes/safe/components/Settings/ThresholdSettings/index.jsx @@ -17,7 +17,7 @@ import Row from '~/components/layout/Row' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import { TX_NOTIFICATION_TYPES } from '~/logic/safe/transactions' import { grantedSelector } from '~/routes/safe/container/selector' -import createTransaction from '~/routes/safe/store/actions/createTransaction' +import createTransaction from '~/routes/safe/store/actions/transactions/createTransaction' import { safeOwnersSelector, safeParamAddressFromStateSelector, diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/ApproveTxModal/index.jsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/ApproveTxModal/index.jsx index 472637fe..8ed2e34d 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/ApproveTxModal/index.jsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/ApproveTxModal/index.jsx @@ -22,7 +22,7 @@ import { estimateTxGasCosts } from '~/logic/safe/transactions/gasNew' import { formatAmount } from '~/logic/tokens/utils/formatAmount' import { getWeb3 } from '~/logic/wallets/getWeb3' import { userAccountSelector } from '~/logic/wallets/store/selectors' -import processTransaction from '~/routes/safe/store/actions/processTransaction' +import processTransaction from '~/routes/safe/store/actions/transactions/processTransaction' import { type Transaction } from '~/routes/safe/store/models/transaction' import { safeParamAddressFromStateSelector, safeThresholdSelector } from '~/routes/safe/store/selectors' diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/RejectTxModal/index.jsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/RejectTxModal/index.jsx index 980e1f95..7ec2d5bd 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/RejectTxModal/index.jsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/RejectTxModal/index.jsx @@ -20,7 +20,7 @@ import { estimateTxGasCosts } from '~/logic/safe/transactions/gasNew' import { formatAmount } from '~/logic/tokens/utils/formatAmount' import { EMPTY_DATA } from '~/logic/wallets/ethTransactions' import { getWeb3 } from '~/logic/wallets/getWeb3' -import createTransaction from '~/routes/safe/store/actions/createTransaction' +import createTransaction from '~/routes/safe/store/actions/transactions/createTransaction' import { type Transaction } from '~/routes/safe/store/models/transaction' import { safeParamAddressFromStateSelector } from '~/routes/safe/store/selectors' diff --git a/src/routes/safe/container/Hooks/useCheckForUpdates.jsx b/src/routes/safe/container/Hooks/useCheckForUpdates.jsx index 6cfdc4bb..098c4c04 100644 --- a/src/routes/safe/container/Hooks/useCheckForUpdates.jsx +++ b/src/routes/safe/container/Hooks/useCheckForUpdates.jsx @@ -6,7 +6,7 @@ import fetchCollectibles from '~/logic/collectibles/store/actions/fetchCollectib import fetchSafeTokens from '~/logic/tokens/store/actions/fetchSafeTokens' import fetchEtherBalance from '~/routes/safe/store/actions/fetchEtherBalance' import { checkAndUpdateSafe } from '~/routes/safe/store/actions/fetchSafe' -import fetchTransactions from '~/routes/safe/store/actions/fetchTransactions' +import fetchTransactions from '~/routes/safe/store/actions/transactions/fetchTransactions' import { safeParamAddressFromStateSelector } from '~/routes/safe/store/selectors' import { TIMEOUT } from '~/utils/constants' diff --git a/src/routes/safe/container/Hooks/useLoadSafe.jsx b/src/routes/safe/container/Hooks/useLoadSafe.jsx index 31c12110..de8591bb 100644 --- a/src/routes/safe/container/Hooks/useLoadSafe.jsx +++ b/src/routes/safe/container/Hooks/useLoadSafe.jsx @@ -7,7 +7,7 @@ import addViewedSafe from '~/logic/currentSession/store/actions/addViewedSafe' import fetchSafeTokens from '~/logic/tokens/store/actions/fetchSafeTokens' import fetchLatestMasterContractVersion from '~/routes/safe/store/actions/fetchLatestMasterContractVersion' import fetchSafe from '~/routes/safe/store/actions/fetchSafe' -import fetchTransactions from '~/routes/safe/store/actions/fetchTransactions' +import fetchTransactions from '~/routes/safe/store/actions/transactions/fetchTransactions' export const useLoadSafe = (safeAddress: ?string) => { const dispatch = useDispatch() diff --git a/src/routes/safe/store/actions/transactions/createTransaction.js b/src/routes/safe/store/actions/transactions/createTransaction.js index f2c1c7a6..05d782dc 100644 --- a/src/routes/safe/store/actions/transactions/createTransaction.js +++ b/src/routes/safe/store/actions/transactions/createTransaction.js @@ -10,7 +10,6 @@ import fetchTransactions from './fetchTransactions' import updateTransaction from './updateTransaction' import { onboardUser } from '~/components/ConnectButton' -import { nameFromAddressBookSelector } from '~/logic/addressBook/store/selectors/index' import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' import { type NotificationsQueue, getNotificationsFromTxType, showSnackbar } from '~/logic/notifications' import { @@ -161,7 +160,6 @@ const createTransaction = ({ console.error('Tx error: ', error) }) .then((receipt) => { - console.log(receipt) closeSnackbar(pendingExecutionKey) const safeTxHash = isExecution ? receipt.events.ExecutionSuccess.returnValues[0] @@ -181,7 +179,7 @@ const createTransaction = ({ type: 'confirmation', hash: receipt.transactionHash, signature: sigs, - owner: { address: from, name: nameFromAddressBookSelector(state, from) }, + owner: from, }), ]), }, From 83877aecd2223cae9911f7fa108c4671cde5d5cb Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Mon, 27 Apr 2020 18:05:01 +0400 Subject: [PATCH 09/65] mockTransactionWip --- package.json | 8 +- src/logic/safe/transactions/txHistory.js | 2 +- .../actions/transactions/createTransaction.js | 3 - .../transactions/processTransaction.js | 3 - .../transactions/utils/mockTransaction.js | 59 ++- yarn.lock | 363 +++++++++++++++--- 6 files changed, 379 insertions(+), 59 deletions(-) diff --git a/package.json b/package.json index a0c24d1b..4b124eab 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@gnosis.pm/safe-contracts": "1.1.1-dev.1", "@gnosis.pm/safe-react-components": "https://github.com/gnosis/safe-react-components.git#71e6fed", "@gnosis.pm/util-contracts": "2.0.6", - "@material-ui/core": "4.9.11", + "@material-ui/core": "4.9.12", "@material-ui/icons": "4.9.1", "@material-ui/lab": "4.0.0-alpha.39", "@openzeppelin/contracts": "3.0.0", @@ -89,7 +89,7 @@ "reselect": "^4.0.0", "semver": "7.3.2", "styled-components": "^5.0.1", - "web3": "1.2.6" + "web3": "1.2.7" }, "devDependencies": { "@babel/cli": "7.8.4", @@ -155,8 +155,8 @@ "postcss-simple-vars": "^5.0.2", "prettier": "2.0.5", "run-with-testrpc": "0.3.1", - "style-loader": "1.1.4", - "terser-webpack-plugin": "2.3.5", + "style-loader": "1.2.0", + "terser-webpack-plugin": "2.3.6", "truffle": "5.1.23", "truffle-contract": "4.0.31", "truffle-solidity-loader": "0.1.32", diff --git a/src/logic/safe/transactions/txHistory.js b/src/logic/safe/transactions/txHistory.js index e597e8d9..cc8f4588 100644 --- a/src/logic/safe/transactions/txHistory.js +++ b/src/logic/safe/transactions/txHistory.js @@ -60,7 +60,7 @@ export const buildTxServiceUrl = (safeAddress: string) => { const host = getTxServiceHost() const address = getWeb3().utils.toChecksumAddress(safeAddress) const base = getTxServiceUriFrom(address) - return `${host}${base}` + return `${host}${base}?has_confirmations=True` } const SUCCESS_STATUS = 201 // CREATED status diff --git a/src/routes/safe/store/actions/transactions/createTransaction.js b/src/routes/safe/store/actions/transactions/createTransaction.js index 05d782dc..cfbb9926 100644 --- a/src/routes/safe/store/actions/transactions/createTransaction.js +++ b/src/routes/safe/store/actions/transactions/createTransaction.js @@ -105,9 +105,6 @@ const createTransaction = ({ try { // Here we're checking that safe contract version is greater or equal 1.1.1, but // theoretically EIP712 should also work for 1.0.0 contracts - // Also, offchain signatures are not working for ledger/trezor wallet because of a bug in their library: - // https://github.com/LedgerHQ/ledgerjs/issues/378 - // Couldn't find an issue for trezor but the error is almost the same const canTryOffchainSigning = !isExecution && !smartContractWallet && semverSatisfies(safeVersion, SAFE_VERSION_FOR_OFFCHAIN_SIGNATURES) if (false) { diff --git a/src/routes/safe/store/actions/transactions/processTransaction.js b/src/routes/safe/store/actions/transactions/processTransaction.js index 6af15094..c19412aa 100644 --- a/src/routes/safe/store/actions/transactions/processTransaction.js +++ b/src/routes/safe/store/actions/transactions/processTransaction.js @@ -83,9 +83,6 @@ const processTransaction = ({ try { // Here we're checking that safe contract version is greater or equal 1.1.1, but // theoretically EIP712 should also work for 1.0.0 contracts - // Also, offchain signatures are not working for ledger/trezor wallet because of a bug in their library: - // https://github.com/LedgerHQ/ledgerjs/issues/378 - // Couldn't find an issue for trezor but the error is almost the same const canTryOffchainSigning = !isExecution && !smartContractWallet && semverSatisfies(safeVersion, SAFE_VERSION_FOR_OFFCHAIN_SIGNATURES) if (canTryOffchainSigning) { diff --git a/src/routes/safe/store/actions/transactions/utils/mockTransaction.js b/src/routes/safe/store/actions/transactions/utils/mockTransaction.js index f46d7c23..0a4959f4 100644 --- a/src/routes/safe/store/actions/transactions/utils/mockTransaction.js +++ b/src/routes/safe/store/actions/transactions/utils/mockTransaction.js @@ -1,2 +1,59 @@ // @flow -const getMockedTransaction = (safeTxHash, isExecution) => {} +// type TxServiceModel = { +// blockNumber: ?number, +// safeTxHash: string, +// executor: string, +// executionDate: ?string, +// confirmations: ConfirmationServiceModel[], +// isExecuted: boolean, +// isSuccessful: boolean, +// transactionHash: ?string, +// creationTx?: boolean, +// } + +// safeInstance, +// to, +// valueInWei, +// data: txData, +// operation, +// nonce, +// safeTxGas, +// baseGas: 0, +// gasPrice: 0, +// gasToken: ZERO_ADDRESS, +// refundReceiver: ZERO_ADDRESS, +// sender: from, +// sigs, + +export const mockTransactionCreation = (txArgs) => { + const { + baseGas, + data, + gasPrice, + gasToken, + nonce, + operation, + refundReceiver, + safeTxGas, + safeTxHash, + submissionDate, + to, + valueInWei: value, + } = txArgs + + return { + data, + to, + value, + nonce, + operation, + safeTxGas, + baseGas, + gasPrice, + gasToken, + refundReceiver, + safeTxHash, + submissionDate, + creationTx: false, + } +} diff --git a/yarn.lock b/yarn.lock index 9a70628c..67b1e069 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1459,17 +1459,17 @@ resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-5.13.0.tgz#42e848f7c6f662387dfc5f3e86e3e5b4e07a5fae" integrity sha512-yMvzQiMjWDMRma3HPxQQibhvEqMaEdXXkNBk1+eaW+N47Y3neYSSyCJlyihzzMBeeoin4ChlP/5uKQaABwBeTg== -"@material-ui/core@4.9.11": - version "4.9.11" - resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.9.11.tgz#02f45f4dbea6db191fdc0d993323d64cfae613fd" - integrity sha512-S2Ha9GpTxzl29XMeMc8dQX2pj97yApNzuhe/23If53fMdg5Fmd3SgbE1bMbyXeKhxwtXZjOFxd0vU+W/sez8Ew== +"@material-ui/core@4.9.12": + version "4.9.12" + resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.9.12.tgz#0156d87c8b5db5a8aad992d6883a081a32684e2e" + integrity sha512-JtRm1iNw3PRg+bzULS1uRKhdIJ2jhKO3/5ptO6kTADARsv5KmhzMbM+PYmVS09qm9Yu3ilwka4dYrtjqea53Lw== dependencies: "@babel/runtime" "^7.4.4" - "@material-ui/react-transition-group" "^4.2.0" + "@material-ui/react-transition-group" "^4.3.0" "@material-ui/styles" "^4.9.10" "@material-ui/system" "^4.9.10" "@material-ui/types" "^5.0.1" - "@material-ui/utils" "^4.9.6" + "@material-ui/utils" "^4.9.12" "@types/react-transition-group" "^4.2.0" clsx "^1.0.4" hoist-non-react-statics "^3.3.2" @@ -1496,7 +1496,7 @@ prop-types "^15.7.2" react-is "^16.8.0" -"@material-ui/react-transition-group@^4.2.0": +"@material-ui/react-transition-group@^4.3.0": version "4.3.0" resolved "https://registry.yarnpkg.com/@material-ui/react-transition-group/-/react-transition-group-4.3.0.tgz#92529142addb5cc179dbf42d246c7e3fe4d6104b" integrity sha512-CwQ0aXrlUynUTY6sh3UvKuvye1o92en20VGAs6TORnSxUYeRmkX8YeTUN3lAkGiBX1z222FxLFO36WWh6q73rQ== @@ -1551,6 +1551,15 @@ prop-types "^15.7.2" react-is "^16.8.0" +"@material-ui/utils@^4.9.12": + version "4.9.12" + resolved "https://registry.yarnpkg.com/@material-ui/utils/-/utils-4.9.12.tgz#0d639f1c1ed83fffb2ae10c21d15a938795d9e65" + integrity sha512-/0rgZPEOcZq5CFA4+4n6Q6zk7fi8skHhH2Bcra8R3epoJEYy5PL55LuMazPtPH1oKeRausDV/Omz4BbgFsn1HQ== + dependencies: + "@babel/runtime" "^7.4.4" + prop-types "^15.7.2" + react-is "^16.8.0" + "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" @@ -7956,7 +7965,7 @@ find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" -find-cache-dir@^3.2.0: +find-cache-dir@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ== @@ -10485,14 +10494,6 @@ jest-watcher@^25.4.0: jest-util "^25.4.0" string-length "^3.1.0" -jest-worker@^25.1.0: - version "25.2.6" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.2.6.tgz#d1292625326794ce187c38f51109faced3846c58" - integrity sha512-FJn9XDUSxcOR4cwDzRfL1z56rUofNTFs539FGASpd50RHdb6EVkhxQqktodW2mI49l+W3H+tFJDotCHUQF6dmA== - dependencies: - merge-stream "^2.0.0" - supports-color "^7.0.0" - jest-worker@^25.4.0: version "25.4.0" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.4.0.tgz#ee0e2ceee5a36ecddf5172d6d7e0ab00df157384" @@ -12896,7 +12897,7 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.2: +p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== @@ -15216,7 +15217,7 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -schema-utils@^2.6.4, schema-utils@^2.6.5: +schema-utils@^2.6.5: version "2.6.5" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.5.tgz#c758f0a7e624263073d396e29cd40aa101152d8a" integrity sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ== @@ -15411,6 +15412,11 @@ serialize-javascript@^2.1.2: resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== +serialize-javascript@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-3.0.0.tgz#492e489a2d77b7b804ad391a5f5d97870952548e" + integrity sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw== + serve-index@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" @@ -16253,13 +16259,13 @@ sturdy-websocket@^0.1.12: dependencies: lodash.defaults "^4.2.0" -style-loader@1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.1.4.tgz#1ad81283cefe51096756fd62697258edad933230" - integrity sha512-SbBHRD8fwK3pX+4UDF4ETxUF0+rCvk29LWTTI7Rt0cgsDjAj3SWM76ByTe6u2+4IlJ/WwluB7wuslWETCoPQdg== +style-loader@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.2.0.tgz#f78e4d49caf5018f7c03ae1886e1270124feeb0a" + integrity sha512-HC8WcGnjwNrKji7HSBqFOhGNUSt7UDU/jHxT6bA83Gk+JWJBmgitWlGihc0V1w6ZvwlzcX5LJOsofZzSP7b1tQ== dependencies: loader-utils "^2.0.0" - schema-utils "^2.6.5" + schema-utils "^2.6.6" styled-components@^5.0.1: version "5.1.0" @@ -16379,6 +16385,23 @@ swarm-js@0.1.39: tar "^4.0.2" xhr-request-promise "^0.1.2" +swarm-js@^0.1.40: + version "0.1.40" + resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.40.tgz#b1bc7b6dcc76061f6c772203e004c11997e06b99" + integrity sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA== + dependencies: + bluebird "^3.5.0" + buffer "^5.0.5" + eth-lib "^0.1.26" + fs-extra "^4.0.2" + got "^7.1.0" + mime-types "^2.1.16" + mkdirp-promise "^5.0.1" + mock-fs "^4.1.0" + setimmediate "^1.0.5" + tar "^4.0.2" + xhr-request "^1.0.1" + symbol-observable@^1.0.2, symbol-observable@^1.0.3, symbol-observable@^1.0.4, symbol-observable@^1.1.0, symbol-observable@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" @@ -16476,19 +16499,19 @@ terminal-link@^2.0.0: ansi-escapes "^4.2.1" supports-hyperlinks "^2.0.0" -terser-webpack-plugin@2.3.5: - version "2.3.5" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.3.5.tgz#5ad971acce5c517440ba873ea4f09687de2f4a81" - integrity sha512-WlWksUoq+E4+JlJ+h+U+QUzXpcsMSSNXkDy9lBVkSqDn1w23Gg29L/ary9GeJVYCGiNJJX7LnVc4bwL1N3/g1w== +terser-webpack-plugin@2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.3.6.tgz#a4014b311a61f87c6a1b217ef4f5a75bd0665a69" + integrity sha512-I8IDsQwZrqjdmOicNeE8L/MhwatAap3mUrtcAKJuilsemUNcX+Hier/eAzwStVqhlCxq0aG3ni9bK/0BESXkTg== dependencies: cacache "^13.0.1" - find-cache-dir "^3.2.0" - jest-worker "^25.1.0" - p-limit "^2.2.2" - schema-utils "^2.6.4" - serialize-javascript "^2.1.2" + find-cache-dir "^3.3.1" + jest-worker "^25.4.0" + p-limit "^2.3.0" + schema-utils "^2.6.6" + serialize-javascript "^3.0.0" source-map "^0.6.1" - terser "^4.4.3" + terser "^4.6.12" webpack-sources "^1.4.3" terser-webpack-plugin@^1.4.3: @@ -16506,7 +16529,7 @@ terser-webpack-plugin@^1.4.3: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@^4.1.2, terser@^4.4.3, terser@^4.6.3: +terser@^4.1.2, terser@^4.6.3: version "4.6.11" resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.11.tgz#12ff99fdd62a26de2a82f508515407eb6ccd8a9f" integrity sha512-76Ynm7OXUG5xhOpblhytE7X58oeNSmC8xnNhjWVo8CksHit0U0kO4hfNbPrrYwowLWFgM2n9L176VNx2QaHmtA== @@ -16515,6 +16538,15 @@ terser@^4.1.2, terser@^4.4.3, terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" +terser@^4.6.12: + version "4.6.12" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.12.tgz#44b98aef8703fdb09a3491bf79b43faffc5b4fee" + integrity sha512-fnIwuaKjFPANG6MAixC/k1TDtnl1YlPLUlLVIxxGZUn1gfUx2+l3/zGNB72wya+lgsb50QBi2tUV75RiODwnww== + dependencies: + commander "^2.20.0" + source-map "~0.6.1" + source-map-support "~0.5.12" + test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -17819,6 +17851,16 @@ web3-bzz@1.2.6: swarm-js "0.1.39" underscore "1.9.1" +web3-bzz@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.7.tgz#aa0f3d162f0777a5f35367dc5b70012dd1e129d0" + integrity sha512-iTIWBR+Z+Bn09WprtKm46LmyNOasg2lUn++AjXkBTB8UNxlUybxtza84yl2ETTZUs0zuFzdSSAEgbjhygG+9oA== + dependencies: + "@types/node" "^10.12.18" + got "9.6.0" + swarm-js "^0.1.40" + underscore "1.9.1" + web3-core-helpers@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.1.tgz#f5f32d71c60a4a3bd14786118e633ce7ca6d5d0d" @@ -17837,6 +17879,15 @@ web3-core-helpers@1.2.6: web3-eth-iban "1.2.6" web3-utils "1.2.6" +web3-core-helpers@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.7.tgz#522f859775ea0d15e7e40359c46d4efc5da92aee" + integrity sha512-bdU++9QATGeCetVrMp8pV97aQtVkN5oLBf/TWu/qumC6jK/YqrvLlBJLdwbz0QveU8zOSap6GCvJbqKvmmbV2A== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.2.7" + web3-utils "1.2.7" + web3-core-method@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.1.tgz#9df1bafa2cd8be9d9937e01c6a47fc768d15d90a" @@ -17859,6 +17910,17 @@ web3-core-method@1.2.6: web3-core-subscriptions "1.2.6" web3-utils "1.2.6" +web3-core-method@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.7.tgz#73fd80d2bf0765ff6efc454db49ac83d1769a45e" + integrity sha512-e1TI0QUnByDMbQ8QHwnjxfjKw0LIgVRY4TYrlPijET9ebqUJU1HCayn/BHIMpV6LKyR1fQj9EldWyT64wZQXkg== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.7" + web3-core-promievent "1.2.7" + web3-core-subscriptions "1.2.7" + web3-utils "1.2.7" + web3-core-promievent@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.1.tgz#003e8a3eb82fb27b6164a6d5b9cad04acf733838" @@ -17875,6 +17937,13 @@ web3-core-promievent@1.2.6: any-promise "1.3.0" eventemitter3 "3.1.2" +web3-core-promievent@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.7.tgz#fc7fa489f4cf76a040800f3dfd4b45c51bd3a39f" + integrity sha512-jNmsM/czCeMGQqKKwM9/HZVTJVIF96hdMVNN/V9TGvp+EEE7vDhB4pUocDnc/QF9Z/5QFBCVmvNWttlRgZmU0A== + dependencies: + eventemitter3 "3.1.2" + web3-core-requestmanager@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.1.tgz#fa2e2206c3d738db38db7c8fe9c107006f5c6e3d" @@ -17897,6 +17966,17 @@ web3-core-requestmanager@1.2.6: web3-providers-ipc "1.2.6" web3-providers-ws "1.2.6" +web3-core-requestmanager@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.7.tgz#9da0efce898ead7004d4ac50f748f5131cfe4d79" + integrity sha512-HJb/txjHixu1dxIebiZQKBoJCaNu4gsh7mq/uj6Z/w6tIHbybL90s/7ADyMED353yyJ2tDWtYJqeMVAR+KtdaA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.7" + web3-providers-http "1.2.7" + web3-providers-ipc "1.2.7" + web3-providers-ws "1.2.7" + web3-core-subscriptions@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.1.tgz#8c2368a839d4eec1c01a4b5650bbeb82d0e4a099" @@ -17915,6 +17995,15 @@ web3-core-subscriptions@1.2.6: underscore "1.9.1" web3-core-helpers "1.2.6" +web3-core-subscriptions@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.7.tgz#30c64aede03182832883b17c77e21cbb0933c86e" + integrity sha512-W/CzQYOUawdMDvkgA/fmLsnG5aMpbjrs78LZMbc0MFXLpH3ofqAgO2by4QZrrTShUUTeWS0ZuEkFFL/iFrSObw== + dependencies: + eventemitter3 "3.1.2" + underscore "1.9.1" + web3-core-helpers "1.2.7" + web3-core@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.1.tgz#7278b58fb6495065e73a77efbbce781a7fddf1a9" @@ -17937,6 +18026,19 @@ web3-core@1.2.6: web3-core-requestmanager "1.2.6" web3-utils "1.2.6" +web3-core@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.7.tgz#9248b04331e458c76263d758c51b0cc612953900" + integrity sha512-QA0MTae0gXcr3KHe3cQ4x56+Wh43ZKWfMwg1gfCc3NNxPRM1jJ8qudzyptCAUcxUGXWpDG8syLIn1APDz5J8BQ== + dependencies: + "@types/bn.js" "^4.11.4" + "@types/node" "^12.6.1" + bignumber.js "^9.0.0" + web3-core-helpers "1.2.7" + web3-core-method "1.2.7" + web3-core-requestmanager "1.2.7" + web3-utils "1.2.7" + web3-eth-abi@1.0.0-beta.52: version "1.0.0-beta.52" resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.52.tgz#88dc2d36e2f99dfe255f8f64b6f613bad82779d8" @@ -17965,6 +18067,15 @@ web3-eth-abi@1.2.6: underscore "1.9.1" web3-utils "1.2.6" +web3-eth-abi@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.7.tgz#6f3471b578649fddd844a14d397a3dd430fc44a5" + integrity sha512-4FnlT1q+D0XBkxSMXlIb/eG337uQeMaUdtVQ4PZ3XzxqpcoDuMgXm4o+3NRxnWmr4AMm6QKjM+hcC7c0mBKcyg== + dependencies: + ethers "4.0.0-beta.3" + underscore "1.9.1" + web3-utils "1.2.7" + web3-eth-accounts@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.1.tgz#2741a8ef337a7219d57959ac8bd118b9d68d63cf" @@ -18000,6 +18111,23 @@ web3-eth-accounts@1.2.6: web3-core-method "1.2.6" web3-utils "1.2.6" +web3-eth-accounts@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.7.tgz#087f55d04a01b815b93151aac2fc1677436b9c59" + integrity sha512-AE7QWi/iIQIjXwlAPtlMabm/OPFF0a1PhxT1EiTckpYNP8fYs6jW7lYxEtJPPJIKqfMjoi1xkEqTVR1YZQ88lg== + dependencies: + "@web3-js/scrypt-shim" "^0.1.0" + crypto-browserify "3.12.0" + eth-lib "^0.2.8" + ethereumjs-common "^1.3.2" + ethereumjs-tx "^2.1.1" + underscore "1.9.1" + uuid "3.3.2" + web3-core "1.2.7" + web3-core-helpers "1.2.7" + web3-core-method "1.2.7" + web3-utils "1.2.7" + web3-eth-contract@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.1.tgz#3542424f3d341386fd9ff65e78060b85ac0ea8c4" @@ -18029,6 +18157,21 @@ web3-eth-contract@1.2.6, web3-eth-contract@^1.2.6: web3-eth-abi "1.2.6" web3-utils "1.2.6" +web3-eth-contract@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.7.tgz#13d7f6003d6221f9a5fd61c2d3b5d039477c9674" + integrity sha512-uW23Y0iL7XroRNbf9fWZ1N6OYhEYTJX8gTuYASuRnpYrISN5QGiQML6pq/NCzqypR1bl5E0fuINZQSK/xefIVw== + dependencies: + "@types/bn.js" "^4.11.4" + underscore "1.9.1" + web3-core "1.2.7" + web3-core-helpers "1.2.7" + web3-core-method "1.2.7" + web3-core-promievent "1.2.7" + web3-core-subscriptions "1.2.7" + web3-eth-abi "1.2.7" + web3-utils "1.2.7" + web3-eth-ens@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.1.tgz#a0e52eee68c42a8b9865ceb04e5fb022c2d971d5" @@ -18057,6 +18200,20 @@ web3-eth-ens@1.2.6: web3-eth-contract "1.2.6" web3-utils "1.2.6" +web3-eth-ens@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.7.tgz#0bfa7d4b6c7753abbb31a2eb01a364b538f4c860" + integrity sha512-SPRnvUNWQ0CnnTDBteGIJkvFWEizJcAHlVsrFLICwcwFZu+appjX1UOaoGu2h3GXWtc/XZlu7B451Gi+Os2cTg== + dependencies: + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.2.7" + web3-core-helpers "1.2.7" + web3-core-promievent "1.2.7" + web3-eth-abi "1.2.7" + web3-eth-contract "1.2.7" + web3-utils "1.2.7" + web3-eth-iban@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.1.tgz#2c3801718946bea24e9296993a975c80b5acf880" @@ -18073,6 +18230,14 @@ web3-eth-iban@1.2.6: bn.js "4.11.8" web3-utils "1.2.6" +web3-eth-iban@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.7.tgz#832809c28586be3c667a713b77a2bcba11b7970f" + integrity sha512-2NrClz1PoQ3nSJBd+91ylCOVga9qbTxjRofq/oSCoHVAEvz3WZyttx9k5DC+0rWqwJF1h69ufFvdHAAlmN/4lg== + dependencies: + bn.js "4.11.8" + web3-utils "1.2.7" + web3-eth-personal@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.1.tgz#244e9911b7b482dc17c02f23a061a627c6e47faf" @@ -18096,6 +18261,18 @@ web3-eth-personal@1.2.6: web3-net "1.2.6" web3-utils "1.2.6" +web3-eth-personal@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.7.tgz#322cc2b14c37737b21772a53e4185686a04bf9be" + integrity sha512-2OAa1Spz0uB29dwCM8+1y0So7E47A4gKznjBEwXIYEcUIsvwT5X7ofFhC2XxyRpqlIWZSQAxRSSJFyupRRXzyw== + dependencies: + "@types/node" "^12.6.1" + web3-core "1.2.7" + web3-core-helpers "1.2.7" + web3-core-method "1.2.7" + web3-net "1.2.7" + web3-utils "1.2.7" + web3-eth@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.1.tgz#b9989e2557c73a9e8ffdc107c6dafbe72c79c1b0" @@ -18134,6 +18311,25 @@ web3-eth@1.2.6: web3-net "1.2.6" web3-utils "1.2.6" +web3-eth@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.7.tgz#9427daefd3641200679c2946f77fc184dbfb5b4c" + integrity sha512-ljLd0oB4IjWkzFGVan4HkYhJXhSXgn9iaSaxdJixKGntZPgWMJfxeA+uLwTrlxrWzhvy4f+39WnT7wCh5e9TGg== + dependencies: + underscore "1.9.1" + web3-core "1.2.7" + web3-core-helpers "1.2.7" + web3-core-method "1.2.7" + web3-core-subscriptions "1.2.7" + web3-eth-abi "1.2.7" + web3-eth-accounts "1.2.7" + web3-eth-contract "1.2.7" + web3-eth-ens "1.2.7" + web3-eth-iban "1.2.7" + web3-eth-personal "1.2.7" + web3-net "1.2.7" + web3-utils "1.2.7" + web3-net@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.1.tgz#edd249503315dd5ab4fa00220f6509d95bb7ab10" @@ -18152,6 +18348,15 @@ web3-net@1.2.6: web3-core-method "1.2.6" web3-utils "1.2.6" +web3-net@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.7.tgz#c355621a8769c9c1a967c801e7db90c92a0e3808" + integrity sha512-j9qeZrS1FNyCeA0BfdLojkxOZQz3FKa1DJI+Dw9fEVhZS68vLOFANu2RB96gR9BoPHo5+k5D3NsKOoxt1gw3Gg== + dependencies: + web3-core "1.2.7" + web3-core-method "1.2.7" + web3-utils "1.2.7" + web3-provider-engine@14.2.0: version "14.2.0" resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-14.2.0.tgz#2efec157b2c429c5c674c079aea96b0a06de8b3d" @@ -18301,6 +18506,14 @@ web3-providers-http@1.2.6: web3-core-helpers "1.2.6" xhr2-cookies "1.1.0" +web3-providers-http@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.7.tgz#31eb15390c103169b3d7d31bdb1ccae9e3f1629d" + integrity sha512-vazGx5onuH/zogrwkUaLFJwFcJ6CckP65VFSHoiV+GTQdkOqgoDIha7StKkslvDz4XJ2FuY/zOZHbtuOYeltXQ== + dependencies: + web3-core-helpers "1.2.7" + xhr2-cookies "1.1.0" + web3-providers-ipc@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.1.tgz#017bfc687a8fc5398df2241eb98f135e3edd672c" @@ -18319,6 +18532,15 @@ web3-providers-ipc@1.2.6: underscore "1.9.1" web3-core-helpers "1.2.6" +web3-providers-ipc@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.7.tgz#4e6716e8723d431df3d6bfa1acd2f7c04e7071ad" + integrity sha512-/zc0y724H2zbkV4UbGGMhsEiLfafjagIzfrsWZnyTZUlSB0OGRmmFm2EkLJAgtXrLiodaHHyXKM0vB8S24bxdA== + dependencies: + oboe "2.1.4" + underscore "1.9.1" + web3-core-helpers "1.2.7" + web3-providers-ws@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.1.tgz#2d941eaf3d5a8caa3214eff8dc16d96252b842cb" @@ -18337,6 +18559,16 @@ web3-providers-ws@1.2.6: underscore "1.9.1" web3-core-helpers "1.2.6" +web3-providers-ws@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.7.tgz#95b1cc5dc25e9b9d6630d6754f9354313b62f532" + integrity sha512-b5XzqDpRkNVe6MFs5K6iqOEyjQikHtg3KuU2/ClCDV37hm0WN4xCRVMC0LwegulbDXZej3zT9+1CYzGaGFREzA== + dependencies: + "@web3-js/websocket" "^1.0.29" + eventemitter3 "^4.0.0" + underscore "1.9.1" + web3-core-helpers "1.2.7" + web3-shh@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.1.tgz#4460e3c1e07faf73ddec24ccd00da46f89152b0c" @@ -18357,6 +18589,16 @@ web3-shh@1.2.6: web3-core-subscriptions "1.2.6" web3-net "1.2.6" +web3-shh@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.7.tgz#5382c7bc2f39539eb2841c4576d23ade25720461" + integrity sha512-f6PAgcpG0ZAo98KqCmeHoDEx5qzm3d5plet18DkT4U6WIeYowKdec8vZaLPRR7c2XreXFJ2gQf45CB7oqR7U/w== + dependencies: + web3-core "1.2.7" + web3-core-method "1.2.7" + web3-core-subscriptions "1.2.7" + web3-net "1.2.7" + web3-utils@1.0.0-beta.52: version "1.0.0-beta.52" resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.0.0-beta.52.tgz#27f9beeac3e1ea981eba9824d79e2971f156eebc" @@ -18400,6 +18642,20 @@ web3-utils@1.2.6, web3-utils@^1.2.1, web3-utils@^1.2.6: underscore "1.9.1" utf8 "3.0.0" +web3-utils@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.7.tgz#b68e232917e4376f81cf38ef79878e5903d18e93" + integrity sha512-FBh/CPJND+eiPeUF9KVbTyTZtXNWxPWtByBaWS6e2x4ACazPX711EeNaZaChIOGSLGe6se2n7kg6wnawe/MjuQ== + dependencies: + bn.js "4.11.8" + eth-lib "0.2.7" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + underscore "1.9.1" + utf8 "3.0.0" + web3@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.1.tgz#5d8158bcca47838ab8c2b784a2dee4c3ceb4179b" @@ -18413,19 +18669,18 @@ web3@1.2.1: web3-shh "1.2.1" web3-utils "1.2.1" -web3@1.2.6, web3@^1.0.0-beta.34: - version "1.2.6" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.6.tgz#c497dcb14cdd8d6d9fb6b445b3b68ff83f8ccf68" - integrity sha512-tpu9fLIComgxGrFsD8LUtA4s4aCZk7px8UfcdEy6kS2uDi/ZfR07KJqpXZMij7Jvlq+cQrTAhsPSiBVvoMaivA== +web3@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.7.tgz#fcb83571036c1c6f475bc984785982a444e8d78e" + integrity sha512-jAAJHMfUlTps+jH2li1ckDFEpPrEEriU/ubegSTGRl3KRdNhEqT93+3kd7FHJTn3NgjcyURo2+f7Da1YcZL8Mw== dependencies: - "@types/node" "^12.6.1" - web3-bzz "1.2.6" - web3-core "1.2.6" - web3-eth "1.2.6" - web3-eth-personal "1.2.6" - web3-net "1.2.6" - web3-shh "1.2.6" - web3-utils "1.2.6" + web3-bzz "1.2.7" + web3-core "1.2.7" + web3-eth "1.2.7" + web3-eth-personal "1.2.7" + web3-net "1.2.7" + web3-shh "1.2.7" + web3-utils "1.2.7" web3@^0.18.2, web3@^0.18.4: version "0.18.4" @@ -18449,6 +18704,20 @@ web3@^0.20.7: xhr2-cookies "^1.1.0" xmlhttprequest "*" +web3@^1.0.0-beta.34: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.6.tgz#c497dcb14cdd8d6d9fb6b445b3b68ff83f8ccf68" + integrity sha512-tpu9fLIComgxGrFsD8LUtA4s4aCZk7px8UfcdEy6kS2uDi/ZfR07KJqpXZMij7Jvlq+cQrTAhsPSiBVvoMaivA== + dependencies: + "@types/node" "^12.6.1" + web3-bzz "1.2.6" + web3-core "1.2.6" + web3-eth "1.2.6" + web3-eth-personal "1.2.6" + web3-net "1.2.6" + web3-shh "1.2.6" + web3-utils "1.2.6" + webidl-conversions@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-2.0.1.tgz#3bf8258f7d318c7443c36f2e169402a1a6703506" @@ -18844,7 +19113,7 @@ xhr-request-promise@^0.1.2: dependencies: xhr-request "^1.1.0" -xhr-request@^1.1.0: +xhr-request@^1.0.1, xhr-request@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz#f4a7c1868b9f198723444d82dcae317643f2e2ed" integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== From b5da092ea5696013916abecbb93ab5b5058a798f Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 28 Apr 2020 15:31:11 +0400 Subject: [PATCH 10/65] fetch transactions refactoring wip --- .../actions/transactions/fetchTransactions.js | 118 ++---------------- .../loadIncomingTransactions.js | 106 ++++++++++++++++ .../loadOutgoingTransactions.js | 54 ++++++++ .../transactions/utils/mockTransaction.js | 3 + 4 files changed, 173 insertions(+), 108 deletions(-) create mode 100644 src/routes/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.js create mode 100644 src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions.js b/src/routes/safe/store/actions/transactions/fetchTransactions.js index 67bb3358..dd18d1ca 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions.js +++ b/src/routes/safe/store/actions/transactions/fetchTransactions.js @@ -1,7 +1,6 @@ // @flow import ERC20Detailed from '@openzeppelin/contracts/build/contracts/ERC20Detailed.json' import axios from 'axios' -import bn from 'bignumber.js' import { List, Map, type RecordInstance } from 'immutable' import { batch } from 'react-redux' import type { Dispatch as ReduxDispatch } from 'redux' @@ -11,10 +10,8 @@ import { addTransactions } from './addTransactions' import generateBatchRequests from '~/logic/contracts/generateBatchRequests' import { decodeParamsFromSafeMethod } from '~/logic/contracts/methodIds' -import { buildIncomingTxServiceUrl } from '~/logic/safe/transactions/incomingTxHistory' import { type TxServiceType, buildTxServiceUrl } from '~/logic/safe/transactions/txHistory' import { TOKEN_REDUCER_ID } from '~/logic/tokens/store/reducer/tokens' -import { ALTERNATIVE_TOKEN_ABI } from '~/logic/tokens/utils/alternativeAbi' import { SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH, isMultisendTransaction, @@ -63,15 +60,6 @@ type TxServiceModel = { creationTx?: boolean, } -type IncomingTxServiceModel = { - blockNumber: number, - transactionHash: string, - to: string, - value: number, - tokenAddress: string, - from: string, -} - export const buildTransactionFrom = async ( safeAddress: string, tx: TxServiceModel, @@ -213,83 +201,31 @@ const addMockSafeCreationTx = (safeAddress): Array => [ }, ] -const batchRequestTxsData = (txs: any[]) => { - const web3Batch = new web3.BatchRequest() +const batchTxTokenRequest = (txs: any[]) => { + const batch = new web3.BatchRequest() const whenTxsValues = txs.map((tx) => { const methods = ['decimals', { method: 'getCode', type: 'eth', args: [tx.to] }, 'symbol', 'name'] return generateBatchRequests({ abi: ERC20Detailed.abi, address: tx.to, - batch: web3Batch, + batch, context: tx, methods, }) }) - web3Batch.execute() + batch.execute() return Promise.all(whenTxsValues) } -const batchRequestIncomingTxsData = (txs: IncomingTxServiceModel[]) => { - const web3Batch = new web3.BatchRequest() - - const whenTxsValues = txs.map((tx) => { - const methods = ['symbol', 'decimals', { method: 'getTransaction', args: [tx.transactionHash], type: 'eth' }] - - return generateBatchRequests({ - abi: ALTERNATIVE_TOKEN_ABI, - address: tx.tokenAddress, - batch: web3Batch, - context: tx, - methods, - }) - }) - - web3Batch.execute() - - return Promise.all(whenTxsValues).then((txsValues) => - txsValues.map(([tx, symbol, decimals, { gas, gasPrice }]) => [ - tx, - symbol === null ? 'ETH' : symbol, - decimals === null ? '18' : decimals, - bn(gas).div(gasPrice).toFixed(), - ]), - ) -} - -export const buildIncomingTransactionFrom = ([tx, symbol, decimals, fee]: [ - IncomingTxServiceModel, - string, - string, - string, -]) => { - // this is a particular treatment for the DCD token, as it seems to lack of symbol and decimal methods - if (tx.tokenAddress && tx.tokenAddress.toLowerCase() === '0xe0b7927c4af23765cb51314a0e0521a9645f0e2a') { - symbol = 'DCD' - decimals = '9' - } - - const { transactionHash, ...incomingTx } = tx - - return makeIncomingTransaction({ - ...incomingTx, - symbol, - decimals, - fee, - executionTxHash: transactionHash, - safeTxHash: transactionHash, - }) -} - export type SafeTransactionsType = { outgoing: Map>, cancel: Map>, } let etagSafeTransactions = null -let etagCachedSafeIncommingTransactions = null export const loadSafeTransactions = async (safeAddress: string, getState: GetState): Promise => { let transactions: TxServiceModel[] = addMockSafeCreationTx(safeAddress) @@ -306,7 +242,7 @@ export const loadSafeTransactions = async (safeAddress: string, getState: GetSta const response = await axios.get(url, config) if (response.data.count > 0) { if (etagSafeTransactions === response.headers.etag) { - // The txs are the same, we can return the cached ones + // The txs are the same as we currently have, we don't have to proceed return } transactions = transactions.concat(response.data.results) @@ -324,7 +260,7 @@ export const loadSafeTransactions = async (safeAddress: string, getState: GetSta const state = getState() const knownTokens = state[TOKEN_REDUCER_ID] - const txsWithData = await batchRequestTxsData(transactions) + const txsWithData = await batchTxTokenRequest(transactions) // In case that the etags don't match, we parse the new transactions and save them to the cache const txsRecord: Array> = await Promise.all( txsWithData.map(([tx: TxServiceModel, decimals, code, symbol, name]) => @@ -340,44 +276,10 @@ export const loadSafeTransactions = async (safeAddress: string, getState: GetSta } } -export const loadSafeIncomingTransactions = async (safeAddress: string) => { - let incomingTransactions: IncomingTxServiceModel[] = [] - try { - const config = etagCachedSafeIncommingTransactions - ? { - headers: { - 'If-None-Match': etagCachedSafeIncommingTransactions, - }, - } - : undefined - const url = buildIncomingTxServiceUrl(safeAddress) - const response = await axios.get(url, config) - if (response.data.count > 0) { - incomingTransactions = response.data.results - if (etagCachedSafeIncommingTransactions === response.headers.etag) { - // The txs are the same, we can return the cached ones - return - } - etagCachedSafeIncommingTransactions = response.headers.etag - } - } catch (err) { - if (err && err.response && err.response.status === 304) { - // We return cached transactions - return - } else { - console.error(`Requests for incoming transactions for ${safeAddress} failed with 404`, err) - } - } - - const incomingTxsWithData = await batchRequestIncomingTxsData(incomingTransactions) - const incomingTxsRecord = incomingTxsWithData.map(buildIncomingTransactionFrom) - return Map().set(safeAddress, List(incomingTxsRecord)) -} - export default (safeAddress: string) => async (dispatch: ReduxDispatch, getState: GetState) => { web3 = await getWeb3() - const transactions: SafeTransactionsType | undefined = await loadSafeTransactions(safeAddress, getState) + const transactions: SafeTransactionsType | typeof undefined = await loadSafeTransactions(safeAddress, getState) if (transactions) { const { cancel, outgoing } = transactions @@ -387,9 +289,9 @@ export default (safeAddress: string) => async (dispatch: ReduxDispatch> | undefined = await loadSafeIncomingTransactions( - safeAddress, - ) + const incomingTransactions: + | Map> + | typeof undefined = await loadSafeIncomingTransactions(safeAddress) if (incomingTransactions) { dispatch(addIncomingTransactions(incomingTransactions)) diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.js b/src/routes/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.js new file mode 100644 index 00000000..d0da0d45 --- /dev/null +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.js @@ -0,0 +1,106 @@ +// @flow + +import axios from 'axios' +import bn from 'bignumber.js' +import { List, Map, type RecordInstance } from 'immutable' + +import generateBatchRequests from '~/logic/contracts/generateBatchRequests' +import { buildIncomingTxServiceUrl } from '~/logic/safe/transactions/incomingTxHistory' +import { ALTERNATIVE_TOKEN_ABI } from '~/logic/tokens/utils/alternativeAbi' +import { web3ReadOnly } from '~/logic/wallets/getWeb3' +import { makeIncomingTransaction } from '~/routes/safe/store/models/incomingTransaction' + +type IncomingTxServiceModel = { + blockNumber: number, + transactionHash: string, + to: string, + value: number, + tokenAddress: string, + from: string, +} + +const buildIncomingTransactionFrom = ([tx, symbol, decimals, fee]: [ + IncomingTxServiceModel, + string, + string, + string, +]) => { + // this is a particular treatment for the DCD token, as it seems to lack of symbol and decimal methods + if (tx.tokenAddress && tx.tokenAddress.toLowerCase() === '0xe0b7927c4af23765cb51314a0e0521a9645f0e2a') { + symbol = 'DCD' + decimals = '9' + } + + const { transactionHash, ...incomingTx } = tx + + return makeIncomingTransaction({ + ...incomingTx, + symbol, + decimals, + fee, + executionTxHash: transactionHash, + safeTxHash: transactionHash, + }) +} + +const batchIncomingTxsTokenDataRequest = (txs: IncomingTxServiceModel[]) => { + const batch = new web3ReadOnly.BatchRequest() + + const whenTxsValues = txs.map((tx) => { + const methods = ['symbol', 'decimals', { method: 'getTransaction', args: [tx.transactionHash], type: 'eth' }] + + return generateBatchRequests({ + abi: ALTERNATIVE_TOKEN_ABI, + address: tx.tokenAddress, + batch, + context: tx, + methods, + }) + }) + + batch.execute() + + return Promise.all(whenTxsValues).then((txsValues) => + txsValues.map(([tx, symbol, decimals, { gas, gasPrice }]) => [ + tx, + symbol === null ? 'ETH' : symbol, + decimals === null ? '18' : decimals, + bn(gas).div(gasPrice).toFixed(), + ]), + ) +} + +let prevIncomingTxsEtag = null +export const loadSafeIncomingTransactions = async (safeAddress: string) => { + let incomingTransactions: IncomingTxServiceModel[] = [] + try { + const config = prevIncomingTxsEtag + ? { + headers: { + 'If-None-Match': prevIncomingTxsEtag, + }, + } + : undefined + const url = buildIncomingTxServiceUrl(safeAddress) + const response = await axios.get(url, config) + if (response.data.count > 0) { + incomingTransactions = response.data.results + if (prevIncomingTxsEtag === response.headers.etag) { + // The txs are the same as we currently have, we don't have to proceed + return + } + prevIncomingTxsEtag = response.headers.etag + } + } catch (err) { + if (err && err.response && err.response.status === 304) { + // We return cached transactions + return + } else { + console.error(`Requests for incoming transactions for ${safeAddress} failed with 404`, err) + } + } + + const incomingTxsWithData = await batchIncomingTxsTokenDataRequest(incomingTransactions) + const incomingTxsRecord = incomingTxsWithData.map(buildIncomingTransactionFrom) + return Map({ safeAddress: List(incomingTxsRecord) }) +} diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js new file mode 100644 index 00000000..fbc1b8ea --- /dev/null +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js @@ -0,0 +1,54 @@ +// @flow +let prevSaveTransactionsEtag = null +export const loadOutgoingTransactions = async ( + safeAddress: string, + getState: GetState, +): Promise => { + let transactions: TxServiceModel[] = addMockSafeCreationTx(safeAddress) + + try { + const config = prevSaveTransactionsEtag + ? { + headers: { + 'If-None-Match': prevSaveTransactionsEtag, + }, + } + : undefined + + const url = buildTxServiceUrl(safeAddress) + const response = await axios.get(url, config) + if (response.data.count > 0) { + if (prevSaveTransactionsEtag === response.headers.etag) { + // The txs are the same as we currently have, we don't have to proceed + return + } + transactions = transactions.concat(response.data.results) + prevSaveTransactionsEtag = response.headers.etag + } + } catch (err) { + if (err && err.response && err.response.status === 304) { + // NOTE: this is the expected implementation, currently the backend is not returning 304. + // So I check if the returned etag is the same instead (see above) + return + } else { + console.error(`Requests for outgoing transactions for ${safeAddress} failed with 404`, err) + } + } + + const state = getState() + const knownTokens = state[TOKEN_REDUCER_ID] + const txsWithData = await batchTxTokenRequest(transactions) + // In case that the etags don't match, we parse the new transactions and save them to the cache + const txsRecord: Array> = await Promise.all( + txsWithData.map(([tx: TxServiceModel, decimals, code, symbol, name]) => + buildTransactionFrom(safeAddress, tx, knownTokens, decimals, symbol, name, code), + ), + ) + + const groupedTxs = List(txsRecord).groupBy((tx) => (tx.get('cancellationTx') ? 'cancel' : 'outgoing')) + + return { + outgoing: Map().set(safeAddress, groupedTxs.get('outgoing')), + cancel: Map().set(safeAddress, groupedTxs.get('cancel')), + } +} diff --git a/src/routes/safe/store/actions/transactions/utils/mockTransaction.js b/src/routes/safe/store/actions/transactions/utils/mockTransaction.js index 0a4959f4..a00a8a14 100644 --- a/src/routes/safe/store/actions/transactions/utils/mockTransaction.js +++ b/src/routes/safe/store/actions/transactions/utils/mockTransaction.js @@ -1,4 +1,7 @@ // @flow + +import { buildTransactionFrom } from '../fetchTransactions' + // type TxServiceModel = { // blockNumber: ?number, // safeTxHash: string, From df1500dd6e4dd18fb156b22edcdeb370d49ea88d Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 28 Apr 2020 19:07:29 +0400 Subject: [PATCH 11/65] fetch transactions refactoring wip --- .../transactions/addMockSafeCreationTx.js | 26 ++ .../actions/transactions/fetchTransactions.js | 271 +----------------- .../loadOutgoingTransactions.js | 189 ++++++++++++ 3 files changed, 217 insertions(+), 269 deletions(-) create mode 100644 src/routes/safe/store/actions/transactions/addMockSafeCreationTx.js diff --git a/src/routes/safe/store/actions/transactions/addMockSafeCreationTx.js b/src/routes/safe/store/actions/transactions/addMockSafeCreationTx.js new file mode 100644 index 00000000..d8c3224a --- /dev/null +++ b/src/routes/safe/store/actions/transactions/addMockSafeCreationTx.js @@ -0,0 +1,26 @@ +// @flow +const addMockSafeCreationTx = (safeAddress): Array => [ + { + blockNumber: null, + baseGas: 0, + confirmations: [], + data: null, + executionDate: null, + gasPrice: 0, + gasToken: '0x0000000000000000000000000000000000000000', + isExecuted: true, + nonce: null, + operation: 0, + refundReceiver: '0x0000000000000000000000000000000000000000', + safe: safeAddress, + safeTxGas: 0, + safeTxHash: '', + signatures: null, + submissionDate: null, + executor: '', + to: '', + transactionHash: null, + value: 0, + creationTx: true, + }, +] diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions.js b/src/routes/safe/store/actions/transactions/fetchTransactions.js index dd18d1ca..cd001ed1 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions.js +++ b/src/routes/safe/store/actions/transactions/fetchTransactions.js @@ -1,284 +1,17 @@ // @flow -import ERC20Detailed from '@openzeppelin/contracts/build/contracts/ERC20Detailed.json' -import axios from 'axios' import { List, Map, type RecordInstance } from 'immutable' import { batch } from 'react-redux' import type { Dispatch as ReduxDispatch } from 'redux' import { addIncomingTransactions } from './addIncomingTransactions' import { addTransactions } from './addTransactions' +import { TxServiceModel } from './loadOutgoingTransactions' -import generateBatchRequests from '~/logic/contracts/generateBatchRequests' -import { decodeParamsFromSafeMethod } from '~/logic/contracts/methodIds' -import { type TxServiceType, buildTxServiceUrl } from '~/logic/safe/transactions/txHistory' -import { TOKEN_REDUCER_ID } from '~/logic/tokens/store/reducer/tokens' -import { - SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH, - isMultisendTransaction, - isTokenTransfer, - isUpgradeTransaction, -} from '~/logic/tokens/utils/tokenHelpers' -import { ZERO_ADDRESS, sameAddress } from '~/logic/wallets/ethAddresses' -import { EMPTY_DATA } from '~/logic/wallets/ethTransactions' -import { getWeb3 } from '~/logic/wallets/getWeb3' import { addCancellationTransactions } from '~/routes/safe/store/actions/transactions/addCancellationTransactions' -import { makeConfirmation } from '~/routes/safe/store/models/confirmation' -import { type IncomingTransaction, makeIncomingTransaction } from '~/routes/safe/store/models/incomingTransaction' -import type { TransactionProps } from '~/routes/safe/store/models/transaction' -import { type Transaction, makeTransaction } from '~/routes/safe/store/models/transaction' +import { type IncomingTransaction } from '~/routes/safe/store/models/incomingTransaction' import { type GlobalState } from '~/store' -let web3 - -type ConfirmationServiceModel = { - owner: string, - submissionDate: Date, - confirmationType: string, - transactionHash: string, -} - -type TxServiceModel = { - to: string, - value: number, - data: ?string, - operation: number, - nonce: ?number, - blockNumber: ?number, - safeTxGas: number, - baseGas: number, - gasPrice: number, - gasToken: string, - refundReceiver: string, - safeTxHash: string, - submissionDate: ?string, - executor: string, - executionDate: ?string, - confirmations: ConfirmationServiceModel[], - isExecuted: boolean, - isSuccessful: boolean, - transactionHash: ?string, - creationTx?: boolean, -} - -export const buildTransactionFrom = async ( - safeAddress: string, - tx: TxServiceModel, - knownTokens, - txTokenDecimals, - txTokenSymbol, - txTokenName, - code, -): Promise => { - const confirmations = List( - tx.confirmations.map((conf: ConfirmationServiceModel) => - makeConfirmation({ - owner: conf.owner, - type: ((conf.confirmationType.toLowerCase(): any): TxServiceType), - hash: conf.transactionHash, - signature: conf.signature, - }), - ), - ) - const modifySettingsTx = sameAddress(tx.to, safeAddress) && Number(tx.value) === 0 && !!tx.data - const cancellationTx = sameAddress(tx.to, safeAddress) && Number(tx.value) === 0 && !tx.data - const isERC721Token = - (code && code.includes(SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH)) || - (isTokenTransfer(tx.data, Number(tx.value)) && !knownTokens.get(tx.to) && txTokenDecimals !== null) - let isSendTokenTx = !isERC721Token && isTokenTransfer(tx.data, Number(tx.value)) - const isMultiSendTx = isMultisendTransaction(tx.data, Number(tx.value)) - const isUpgradeTx = isMultiSendTx && isUpgradeTransaction(tx.data) - let customTx = !sameAddress(tx.to, safeAddress) && !!tx.data && !isSendTokenTx && !isUpgradeTx && !isERC721Token - - let refundParams = null - if (tx.gasPrice > 0) { - const refundSymbol = txTokenSymbol || 'ETH' - const decimals = txTokenName || 18 - const feeString = (tx.gasPrice * (tx.baseGas + tx.safeTxGas)).toString().padStart(decimals, 0) - const whole = feeString.slice(0, feeString.length - decimals) || '0' - const fraction = feeString.slice(feeString.length - decimals) - - const formattedFee = `${whole}.${fraction}` - refundParams = { - fee: formattedFee, - symbol: refundSymbol, - } - } - - let symbol = txTokenSymbol || 'ETH' - let decimals = txTokenDecimals || 18 - let decodedParams - if (isSendTokenTx) { - if (txTokenSymbol === null || txTokenDecimals === null) { - try { - const [tokenSymbol, tokenDecimals] = await Promise.all( - generateBatchRequests({ - abi: ALTERNATIVE_TOKEN_ABI, - address: tx.to, - methods: ['symbol', 'decimals'], - }), - ) - - symbol = tokenSymbol - decimals = tokenDecimals - } catch (e) { - // some contracts may implement the same methods as in ERC20 standard - // we may falsely treat them as tokens, so in case we get any errors when getting token info - // we fallback to displaying custom transaction - isSendTokenTx = false - customTx = true - } - } - - const params = web3.eth.abi.decodeParameters(['address', 'uint256'], tx.data.slice(10)) - decodedParams = { - recipient: params[0], - value: params[1], - } - } else if (modifySettingsTx && tx.data) { - decodedParams = decodeParamsFromSafeMethod(tx.data) - } else if (customTx && tx.data) { - decodedParams = decodeParamsFromSafeMethod(tx.data) - } - - return makeTransaction({ - symbol, - nonce: tx.nonce, - blockNumber: tx.blockNumber, - value: tx.value.toString(), - confirmations, - decimals, - recipient: tx.to, - data: tx.data ? tx.data : EMPTY_DATA, - operation: tx.operation, - safeTxGas: tx.safeTxGas, - baseGas: tx.baseGas, - gasPrice: tx.gasPrice, - gasToken: tx.gasToken || ZERO_ADDRESS, - refundReceiver: tx.refundReceiver || ZERO_ADDRESS, - refundParams, - isExecuted: tx.isExecuted, - isSuccessful: tx.isSuccessful, - submissionDate: tx.submissionDate, - executor: tx.executor, - executionDate: tx.executionDate, - executionTxHash: tx.transactionHash, - safeTxHash: tx.safeTxHash, - isTokenTransfer: isSendTokenTx, - multiSendTx: isMultiSendTx, - upgradeTx: isUpgradeTx, - decodedParams, - modifySettingsTx, - customTx, - cancellationTx, - creationTx: tx.creationTx, - origin: tx.origin, - }) -} - -const addMockSafeCreationTx = (safeAddress): Array => [ - { - blockNumber: null, - baseGas: 0, - confirmations: [], - data: null, - executionDate: null, - gasPrice: 0, - gasToken: '0x0000000000000000000000000000000000000000', - isExecuted: true, - nonce: null, - operation: 0, - refundReceiver: '0x0000000000000000000000000000000000000000', - safe: safeAddress, - safeTxGas: 0, - safeTxHash: '', - signatures: null, - submissionDate: null, - executor: '', - to: '', - transactionHash: null, - value: 0, - creationTx: true, - }, -] - -const batchTxTokenRequest = (txs: any[]) => { - const batch = new web3.BatchRequest() - - const whenTxsValues = txs.map((tx) => { - const methods = ['decimals', { method: 'getCode', type: 'eth', args: [tx.to] }, 'symbol', 'name'] - return generateBatchRequests({ - abi: ERC20Detailed.abi, - address: tx.to, - batch, - context: tx, - methods, - }) - }) - - batch.execute() - - return Promise.all(whenTxsValues) -} - -export type SafeTransactionsType = { - outgoing: Map>, - cancel: Map>, -} - -let etagSafeTransactions = null -export const loadSafeTransactions = async (safeAddress: string, getState: GetState): Promise => { - let transactions: TxServiceModel[] = addMockSafeCreationTx(safeAddress) - - try { - const config = etagSafeTransactions - ? { - headers: { - 'If-None-Match': etagSafeTransactions, - }, - } - : undefined - - const url = buildTxServiceUrl(safeAddress) - const response = await axios.get(url, config) - if (response.data.count > 0) { - if (etagSafeTransactions === response.headers.etag) { - // The txs are the same as we currently have, we don't have to proceed - return - } - transactions = transactions.concat(response.data.results) - etagSafeTransactions = response.headers.etag - } - } catch (err) { - if (err && err.response && err.response.status === 304) { - // NOTE: this is the expected implementation, currently the backend is not returning 304. - // So I check if the returned etag is the same instead (see above) - return - } else { - console.error(`Requests for outgoing transactions for ${safeAddress} failed with 404`, err) - } - } - - const state = getState() - const knownTokens = state[TOKEN_REDUCER_ID] - const txsWithData = await batchTxTokenRequest(transactions) - // In case that the etags don't match, we parse the new transactions and save them to the cache - const txsRecord: Array> = await Promise.all( - txsWithData.map(([tx: TxServiceModel, decimals, code, symbol, name]) => - buildTransactionFrom(safeAddress, tx, knownTokens, decimals, symbol, name, code), - ), - ) - - const groupedTxs = List(txsRecord).groupBy((tx) => (tx.get('cancellationTx') ? 'cancel' : 'outgoing')) - - return { - outgoing: Map().set(safeAddress, groupedTxs.get('outgoing')), - cancel: Map().set(safeAddress, groupedTxs.get('cancel')), - } -} - export default (safeAddress: string) => async (dispatch: ReduxDispatch, getState: GetState) => { - web3 = await getWeb3() - const transactions: SafeTransactionsType | typeof undefined = await loadSafeTransactions(safeAddress, getState) if (transactions) { const { cancel, outgoing } = transactions diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js index fbc1b8ea..8ed4efe0 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js @@ -1,4 +1,193 @@ // @flow +import ERC20Detailed from '@openzeppelin/contracts/build/contracts/ERC20Detailed.json' +import axios from 'axios' +import { List, Map, type RecordInstance } from 'immutable' + +import generateBatchRequests from '~/logic/contracts/generateBatchRequests' +import { decodeParamsFromSafeMethod } from '~/logic/contracts/methodIds' +import { type TxServiceType, buildTxServiceUrl } from '~/logic/safe/transactions/txHistory' +import { TOKEN_REDUCER_ID } from '~/logic/tokens/store/reducer/tokens' +import { + SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH, + isMultisendTransaction, + isTokenTransfer, + isUpgradeTransaction, +} from '~/logic/tokens/utils/tokenHelpers' +import { ZERO_ADDRESS, sameAddress } from '~/logic/wallets/ethAddresses' +import { EMPTY_DATA } from '~/logic/wallets/ethTransactions' +import { web3ReadOnly } from '~/logic/wallets/getWeb3' +import { makeConfirmation } from '~/routes/safe/store/models/confirmation' +import type { TransactionProps } from '~/routes/safe/store/models/transaction' +import { type Transaction, makeTransaction } from '~/routes/safe/store/models/transaction' +type ConfirmationServiceModel = { + owner: string, + submissionDate: Date, + confirmationType: string, + transactionHash: string, +} + +export type TxServiceModel = { + to: string, + value: number, + data: ?string, + operation: number, + nonce: ?number, + blockNumber: ?number, + safeTxGas: number, + baseGas: number, + gasPrice: number, + gasToken: string, + refundReceiver: string, + safeTxHash: string, + submissionDate: ?string, + executor: string, + executionDate: ?string, + confirmations: ConfirmationServiceModel[], + isExecuted: boolean, + isSuccessful: boolean, + transactionHash: ?string, + creationTx?: boolean, +} + +type SafeTransactionsType = { + outgoing: Map>, + cancel: Map>, +} + +export const buildTransactionFrom = async ( + safeAddress: string, + tx: TxServiceModel, + knownTokens, + txTokenDecimals, + txTokenSymbol, + txTokenName, + code, +): Promise => { + const confirmations = List( + tx.confirmations.map((conf: ConfirmationServiceModel) => + makeConfirmation({ + owner: conf.owner, + type: ((conf.confirmationType.toLowerCase(): any): TxServiceType), + hash: conf.transactionHash, + signature: conf.signature, + }), + ), + ) + const modifySettingsTx = sameAddress(tx.to, safeAddress) && Number(tx.value) === 0 && !!tx.data + const cancellationTx = sameAddress(tx.to, safeAddress) && Number(tx.value) === 0 && !tx.data + const isERC721Token = + (code && code.includes(SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH)) || + (isTokenTransfer(tx.data, Number(tx.value)) && !knownTokens.get(tx.to) && txTokenDecimals !== null) + let isSendTokenTx = !isERC721Token && isTokenTransfer(tx.data, Number(tx.value)) + const isMultiSendTx = isMultisendTransaction(tx.data, Number(tx.value)) + const isUpgradeTx = isMultiSendTx && isUpgradeTransaction(tx.data) + let customTx = !sameAddress(tx.to, safeAddress) && !!tx.data && !isSendTokenTx && !isUpgradeTx && !isERC721Token + + let refundParams = null + if (tx.gasPrice > 0) { + const refundSymbol = txTokenSymbol || 'ETH' + const decimals = txTokenName || 18 + const feeString = (tx.gasPrice * (tx.baseGas + tx.safeTxGas)).toString().padStart(decimals, 0) + const whole = feeString.slice(0, feeString.length - decimals) || '0' + const fraction = feeString.slice(feeString.length - decimals) + + const formattedFee = `${whole}.${fraction}` + refundParams = { + fee: formattedFee, + symbol: refundSymbol, + } + } + + let symbol = txTokenSymbol || 'ETH' + let decimals = txTokenDecimals || 18 + let decodedParams + if (isSendTokenTx) { + if (txTokenSymbol === null || txTokenDecimals === null) { + try { + const [tokenSymbol, tokenDecimals] = await Promise.all( + generateBatchRequests({ + abi: ALTERNATIVE_TOKEN_ABI, + address: tx.to, + methods: ['symbol', 'decimals'], + }), + ) + + symbol = tokenSymbol + decimals = tokenDecimals + } catch (e) { + // some contracts may implement the same methods as in ERC20 standard + // we may falsely treat them as tokens, so in case we get any errors when getting token info + // we fallback to displaying custom transaction + isSendTokenTx = false + customTx = true + } + } + + const params = web3.eth.abi.decodeParameters(['address', 'uint256'], tx.data.slice(10)) + decodedParams = { + recipient: params[0], + value: params[1], + } + } else if (modifySettingsTx && tx.data) { + decodedParams = decodeParamsFromSafeMethod(tx.data) + } else if (customTx && tx.data) { + decodedParams = decodeParamsFromSafeMethod(tx.data) + } + + return makeTransaction({ + symbol, + nonce: tx.nonce, + blockNumber: tx.blockNumber, + value: tx.value.toString(), + confirmations, + decimals, + recipient: tx.to, + data: tx.data ? tx.data : EMPTY_DATA, + operation: tx.operation, + safeTxGas: tx.safeTxGas, + baseGas: tx.baseGas, + gasPrice: tx.gasPrice, + gasToken: tx.gasToken || ZERO_ADDRESS, + refundReceiver: tx.refundReceiver || ZERO_ADDRESS, + refundParams, + isExecuted: tx.isExecuted, + isSuccessful: tx.isSuccessful, + submissionDate: tx.submissionDate, + executor: tx.executor, + executionDate: tx.executionDate, + executionTxHash: tx.transactionHash, + safeTxHash: tx.safeTxHash, + isTokenTransfer: isSendTokenTx, + multiSendTx: isMultiSendTx, + upgradeTx: isUpgradeTx, + decodedParams, + modifySettingsTx, + customTx, + cancellationTx, + creationTx: tx.creationTx, + origin: tx.origin, + }) +} + +const batchTxTokenRequest = (txs: any[]) => { + const batch = new web3ReadOnly.BatchRequest() + + const whenTxsValues = txs.map((tx) => { + const methods = ['decimals', { method: 'getCode', type: 'eth', args: [tx.to] }, 'symbol', 'name'] + return generateBatchRequests({ + abi: ERC20Detailed.abi, + address: tx.to, + batch, + context: tx, + methods, + }) + }) + + batch.execute() + + return Promise.all(whenTxsValues) +} + let prevSaveTransactionsEtag = null export const loadOutgoingTransactions = async ( safeAddress: string, From 27ee734db0471450b10470668d3a9361e7df34d0 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 28 Apr 2020 19:55:51 +0400 Subject: [PATCH 12/65] fetch transactions refactoring wip --- .../index.js} | 11 ++++++----- .../fetchTransactions/loadOutgoingTransactions.js | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) rename src/routes/safe/store/actions/transactions/{fetchTransactions.js => fetchTransactions/index.js} (74%) diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions.js b/src/routes/safe/store/actions/transactions/fetchTransactions/index.js similarity index 74% rename from src/routes/safe/store/actions/transactions/fetchTransactions.js rename to src/routes/safe/store/actions/transactions/fetchTransactions/index.js index cd001ed1..690cbf9a 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions.js +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/index.js @@ -1,18 +1,19 @@ // @flow -import { List, Map, type RecordInstance } from 'immutable' +import { List, Map } from 'immutable' import { batch } from 'react-redux' import type { Dispatch as ReduxDispatch } from 'redux' -import { addIncomingTransactions } from './addIncomingTransactions' -import { addTransactions } from './addTransactions' -import { TxServiceModel } from './loadOutgoingTransactions' +import { addIncomingTransactions } from '../addIncomingTransactions' +import { addTransactions } from '../addTransactions' + +import { type SafeTransactionsType, TxServiceModel, loadOutgoingTransactions } from './loadOutgoingTransactions' import { addCancellationTransactions } from '~/routes/safe/store/actions/transactions/addCancellationTransactions' import { type IncomingTransaction } from '~/routes/safe/store/models/incomingTransaction' import { type GlobalState } from '~/store' export default (safeAddress: string) => async (dispatch: ReduxDispatch, getState: GetState) => { - const transactions: SafeTransactionsType | typeof undefined = await loadSafeTransactions(safeAddress, getState) + const transactions: SafeTransactionsType | typeof undefined = await loadOutgoingTransactions(safeAddress, getState) if (transactions) { const { cancel, outgoing } = transactions diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js index 8ed4efe0..85c302cd 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js @@ -49,7 +49,7 @@ export type TxServiceModel = { creationTx?: boolean, } -type SafeTransactionsType = { +export type SafeTransactionsType = { outgoing: Map>, cancel: Map>, } From 480da937b4593bfbf82ed49dffa81edb15f45d30 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Wed, 29 Apr 2020 15:03:49 +0400 Subject: [PATCH 13/65] addMockSafeCreationTx as an action wip --- .../transactions/addMockSafeCreationTx.js | 58 +++++++++++-------- .../transactions/fetchTransactions/index.js | 2 +- .../safe/store/actions/updateActiveAssets.js | 12 +--- .../safe/store/actions/updateActiveTokens.js | 12 +--- 4 files changed, 36 insertions(+), 48 deletions(-) diff --git a/src/routes/safe/store/actions/transactions/addMockSafeCreationTx.js b/src/routes/safe/store/actions/transactions/addMockSafeCreationTx.js index d8c3224a..422ba881 100644 --- a/src/routes/safe/store/actions/transactions/addMockSafeCreationTx.js +++ b/src/routes/safe/store/actions/transactions/addMockSafeCreationTx.js @@ -1,26 +1,34 @@ // @flow -const addMockSafeCreationTx = (safeAddress): Array => [ - { - blockNumber: null, - baseGas: 0, - confirmations: [], - data: null, - executionDate: null, - gasPrice: 0, - gasToken: '0x0000000000000000000000000000000000000000', - isExecuted: true, - nonce: null, - operation: 0, - refundReceiver: '0x0000000000000000000000000000000000000000', - safe: safeAddress, - safeTxGas: 0, - safeTxHash: '', - signatures: null, - submissionDate: null, - executor: '', - to: '', - transactionHash: null, - value: 0, - creationTx: true, - }, -] +import type { Dispatch as ReduxDispatch } from 'redux' + +import { type GlobalState } from '~/store' + +const getMockCreationTx = (safeAddress: string) => ({ + blockNumber: null, + baseGas: 0, + confirmations: [], + data: null, + executionDate: null, + gasPrice: 0, + gasToken: '0x0000000000000000000000000000000000000000', + isExecuted: true, + nonce: null, + operation: 0, + refundReceiver: '0x0000000000000000000000000000000000000000', + safe: safeAddress, + safeTxGas: 0, + safeTxHash: '', + signatures: null, + submissionDate: null, + executor: '', + to: '', + transactionHash: null, + value: 0, + creationTx: true, +}) + +const addMockSafeCreationTx = (safeAddress: string) => (dispatch: ReduxDispatch) => { + dispatch(addTransaction(getMockCreationTx(safeAddress))) +} + +export default addMockSafeCreationTx diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/index.js b/src/routes/safe/store/actions/transactions/fetchTransactions/index.js index 690cbf9a..c16a191d 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions/index.js +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/index.js @@ -6,7 +6,7 @@ import type { Dispatch as ReduxDispatch } from 'redux' import { addIncomingTransactions } from '../addIncomingTransactions' import { addTransactions } from '../addTransactions' -import { type SafeTransactionsType, TxServiceModel, loadOutgoingTransactions } from './loadOutgoingTransactions' +import { type SafeTransactionsType, loadOutgoingTransactions } from './loadOutgoingTransactions' import { addCancellationTransactions } from '~/routes/safe/store/actions/transactions/addCancellationTransactions' import { type IncomingTransaction } from '~/routes/safe/store/models/incomingTransaction' diff --git a/src/routes/safe/store/actions/updateActiveAssets.js b/src/routes/safe/store/actions/updateActiveAssets.js index 9e238fea..ff5f9b13 100644 --- a/src/routes/safe/store/actions/updateActiveAssets.js +++ b/src/routes/safe/store/actions/updateActiveAssets.js @@ -6,17 +6,7 @@ import updateSafe from './updateSafe' import { type GlobalState } from '~/store' -// the selector uses ownProps argument/router props to get the address of the safe -// so in order to use it I had to recreate the same structure -// const generateMatchProps = (safeAddress: string) => ({ -// match: { -// params: { -// [SAFE_PARAM_ADDRESS]: safeAddress, -// }, -// }, -// }) - -const updateActiveAssets = (safeAddress: string, activeAssets: Set) => async ( +const updateActiveAssets = (safeAddress: string, activeAssets: Set) => ( dispatch: ReduxDispatch, ) => { dispatch(updateSafe({ address: safeAddress, activeAssets })) diff --git a/src/routes/safe/store/actions/updateActiveTokens.js b/src/routes/safe/store/actions/updateActiveTokens.js index 8701ff56..172edc57 100644 --- a/src/routes/safe/store/actions/updateActiveTokens.js +++ b/src/routes/safe/store/actions/updateActiveTokens.js @@ -6,17 +6,7 @@ import updateSafe from './updateSafe' import { type GlobalState } from '~/store' -// the selector uses ownProps argument/router props to get the address of the safe -// so in order to use it I had to recreate the same structure -// const generateMatchProps = (safeAddress: string) => ({ -// match: { -// params: { -// [SAFE_PARAM_ADDRESS]: safeAddress, -// }, -// }, -// }) - -const updateActiveTokens = (safeAddress: string, activeTokens: Set) => async ( +const updateActiveTokens = (safeAddress: string, activeTokens: Set) => ( dispatch: ReduxDispatch, ) => { dispatch(updateSafe({ address: safeAddress, activeTokens })) From 5c00c48d75eabeb9abacdd2e3d5c1e976cba3a4b Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 30 Apr 2020 00:30:28 +0400 Subject: [PATCH 14/65] transaction decoder wip --- src/logic/safe/transactions/txHistory.js | 1 - src/routes/safe/components/Balances/index.jsx | 4 +- src/routes/safe/container/index.jsx | 4 +- .../loadOutgoingTransactions.js | 22 +++--- src/routes/safe/store/models/confirmation.js | 4 - src/routes/safe/store/selectors/index.js | 6 +- .../safe/store/selectors/transactions.js | 77 +++++++++++++++++++ .../selectors/utils/transactionDecoder.js | 5 ++ 8 files changed, 98 insertions(+), 25 deletions(-) create mode 100644 src/routes/safe/store/selectors/transactions.js create mode 100644 src/routes/safe/store/selectors/utils/transactionDecoder.js diff --git a/src/logic/safe/transactions/txHistory.js b/src/logic/safe/transactions/txHistory.js index cc8f4588..0ec7605a 100644 --- a/src/logic/safe/transactions/txHistory.js +++ b/src/logic/safe/transactions/txHistory.js @@ -4,7 +4,6 @@ import axios from 'axios' import { getTxServiceHost, getTxServiceUriFrom } from '~/config' import { getWeb3 } from '~/logic/wallets/getWeb3' -export type TxServiceType = 'confirmation' | 'execution' | 'initialised' export type Operation = 0 | 1 | 2 const calculateBodyFrom = async ( diff --git a/src/routes/safe/components/Balances/index.jsx b/src/routes/safe/components/Balances/index.jsx index e6fb1532..c496f039 100644 --- a/src/routes/safe/components/Balances/index.jsx +++ b/src/routes/safe/components/Balances/index.jsx @@ -17,7 +17,7 @@ import { SAFELIST_ADDRESS } from '~/routes/routes' import SendModal from '~/routes/safe/components/Balances/SendModal' import DropdownCurrency from '~/routes/safe/components/DropdownCurrency' import { useFetchTokens } from '~/routes/safe/container/Hooks/useFetchTokens' -import { safeFeaturesEnabledSelector, safeParamAddressFromStateSelector } from '~/routes/safe/store/selectors' +import { safeEnabledFeaturesSelector, safeParamAddressFromStateSelector } from '~/routes/safe/store/selectors' import { history } from '~/store' import { wrapInSuspense } from '~/utils/wrapInSuspense' const Collectibles = React.lazy(() => import('~/routes/safe/components/Balances/Collectibles')) @@ -64,7 +64,7 @@ const Balances = (props: Props) => { const [state, setState] = useState(INITIAL_STATE) const address = useSelector(safeParamAddressFromStateSelector) - const featuresEnabled = useSelector(safeFeaturesEnabledSelector) + const featuresEnabled = useSelector(safeEnabledFeaturesSelector) useFetchTokens() diff --git a/src/routes/safe/container/index.jsx b/src/routes/safe/container/index.jsx index f4787a13..0486dfb3 100644 --- a/src/routes/safe/container/index.jsx +++ b/src/routes/safe/container/index.jsx @@ -6,8 +6,8 @@ import { useSelector } from 'react-redux' import Page from '~/components/layout/Page' import { type Token } from '~/logic/tokens/store/model/token' import Layout from '~/routes/safe/components/Layout' -import { useCheckForUpdates } from '~/routes/safe/container/Hooks/useCheckForUpdates' -import { useLoadSafe } from '~/routes/safe/container/Hooks/useLoadSafe' +import { useCheckForUpdates } from '~/routes/safe/container/hooks/useCheckForUpdates' +import { useLoadSafe } from '~/routes/safe/container/hooks/useLoadSafe' import { safeParamAddressFromStateSelector } from '~/routes/safe/store/selectors' type Action = 'Send' | 'Receive' diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js index 85c302cd..bdd0bdc3 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js @@ -5,7 +5,7 @@ import { List, Map, type RecordInstance } from 'immutable' import generateBatchRequests from '~/logic/contracts/generateBatchRequests' import { decodeParamsFromSafeMethod } from '~/logic/contracts/methodIds' -import { type TxServiceType, buildTxServiceUrl } from '~/logic/safe/transactions/txHistory' +import { buildTxServiceUrl } from '~/logic/safe/transactions/txHistory' import { TOKEN_REDUCER_ID } from '~/logic/tokens/store/reducer/tokens' import { SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH, @@ -22,7 +22,7 @@ import { type Transaction, makeTransaction } from '~/routes/safe/store/models/tr type ConfirmationServiceModel = { owner: string, submissionDate: Date, - confirmationType: string, + signature: string, transactionHash: string, } @@ -67,14 +67,12 @@ export const buildTransactionFrom = async ( tx.confirmations.map((conf: ConfirmationServiceModel) => makeConfirmation({ owner: conf.owner, - type: ((conf.confirmationType.toLowerCase(): any): TxServiceType), hash: conf.transactionHash, signature: conf.signature, }), ), ) - const modifySettingsTx = sameAddress(tx.to, safeAddress) && Number(tx.value) === 0 && !!tx.data - const cancellationTx = sameAddress(tx.to, safeAddress) && Number(tx.value) === 0 && !tx.data + const isERC721Token = (code && code.includes(SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH)) || (isTokenTransfer(tx.data, Number(tx.value)) && !knownTokens.get(tx.to) && txTokenDecimals !== null) @@ -161,9 +159,7 @@ export const buildTransactionFrom = async ( multiSendTx: isMultiSendTx, upgradeTx: isUpgradeTx, decodedParams, - modifySettingsTx, customTx, - cancellationTx, creationTx: tx.creationTx, origin: tx.origin, }) @@ -188,18 +184,18 @@ const batchTxTokenRequest = (txs: any[]) => { return Promise.all(whenTxsValues) } -let prevSaveTransactionsEtag = null +let prevOutgoingTxsEtag = null export const loadOutgoingTransactions = async ( safeAddress: string, getState: GetState, ): Promise => { - let transactions: TxServiceModel[] = addMockSafeCreationTx(safeAddress) + let transactions: TxServiceModel[] = [] try { - const config = prevSaveTransactionsEtag + const config = prevOutgoingTxsEtag ? { headers: { - 'If-None-Match': prevSaveTransactionsEtag, + 'If-None-Match': prevOutgoingTxsEtag, }, } : undefined @@ -207,12 +203,12 @@ export const loadOutgoingTransactions = async ( const url = buildTxServiceUrl(safeAddress) const response = await axios.get(url, config) if (response.data.count > 0) { - if (prevSaveTransactionsEtag === response.headers.etag) { + if (prevOutgoingTxsEtag === response.headers.etag) { // The txs are the same as we currently have, we don't have to proceed return } transactions = transactions.concat(response.data.results) - prevSaveTransactionsEtag = response.headers.etag + prevOutgoingTxsEtag = response.headers.etag } } catch (err) { if (err && err.response && err.response.status === 304) { diff --git a/src/routes/safe/store/models/confirmation.js b/src/routes/safe/store/models/confirmation.js index 90d47a89..5b26abd2 100644 --- a/src/routes/safe/store/models/confirmation.js +++ b/src/routes/safe/store/models/confirmation.js @@ -2,18 +2,14 @@ import { Record } from 'immutable' import type { RecordFactory, RecordOf } from 'immutable' -import { type TxServiceType } from '~/logic/safe/transactions/txHistory' - export type ConfirmationProps = { owner: string, - type: TxServiceType, hash: string, signature?: string, } export const makeConfirmation: RecordFactory = Record({ owner: '', - type: 'initialised', hash: '', signature: null, }) diff --git a/src/routes/safe/store/selectors/index.js b/src/routes/safe/store/selectors/index.js index e346eae2..dcfea640 100644 --- a/src/routes/safe/store/selectors/index.js +++ b/src/routes/safe/store/selectors/index.js @@ -150,8 +150,8 @@ export const safeSelector: OutputSelector, diff --git a/src/routes/safe/store/selectors/transactions.js b/src/routes/safe/store/selectors/transactions.js new file mode 100644 index 00000000..1e4ec933 --- /dev/null +++ b/src/routes/safe/store/selectors/transactions.js @@ -0,0 +1,77 @@ +// @flow +import { List, Map } from 'immutable' +import { type Selector, createSelector } from 'reselect' + +import { userAccountSelector } from '~/logic/wallets/store/selectors' +import type { IncomingTransaction } from '~/routes/safe/store/models/incomingTransaction' +import { type Safe } from '~/routes/safe/store/models/safe' +import { type Transaction, type TransactionStatus } from '~/routes/safe/store/models/transaction' +import { + type RouterProps, + safeCancellationTransactionsSelector, + safeIncomingTransactionsSelector, + safeSelector, + safeTransactionsSelector, +} from '~/routes/safe/store/selectors' +import { type GlobalState } from '~/store' + +const getTxStatus = (tx: Transaction, userAddress: string, safe: Safe): TransactionStatus => { + let txStatus + if (tx.executionTxHash) { + txStatus = 'success' + } else if (tx.cancelled) { + txStatus = 'cancelled' + } else if (tx.confirmations.size === safe.threshold) { + txStatus = 'awaiting_execution' + } else if (tx.creationTx) { + txStatus = 'success' + } else if (!tx.confirmations.size) { + txStatus = 'pending' + } else { + const userConfirmed = tx.confirmations.filter((conf) => conf.owner === userAddress).size === 1 + const userIsSafeOwner = safe.owners.filter((owner) => owner.address === userAddress).size === 1 + txStatus = !userConfirmed && userIsSafeOwner ? 'awaiting_your_confirmation' : 'awaiting_confirmations' + } + + if (tx.isSuccessful === false) { + txStatus = 'failed' + } + + return txStatus +} + +export const extendedTransactionsSelector: Selector< + GlobalState, + RouterProps, + List, +> = createSelector( + safeSelector, + userAccountSelector, + safeTransactionsSelector, + safeCancellationTransactionsSelector, + safeIncomingTransactionsSelector, + (safe, userAddress, transactions, cancellationTransactions, incomingTransactions) => { + const cancellationTransactionsByNonce = cancellationTransactions.reduce((acc, tx) => acc.set(tx.nonce, tx), Map()) + const extendedTransactions = transactions.map((tx: Transaction) => + tx.withMutations((transaction) => { + transaction.set('modifySettingsTx', sameAddress(transaction.to, safe) && Number(tx.value) === 0 && !!tx.data) + transaction.set('cancellationTx', sameAddress(transaction.to, safe) && Number(tx.value) === 0 && !tx.data) + + if (!transaction.isExecuted) { + if ( + (cancellationTransactionsByNonce.get(tx.nonce) && + cancellationTransactionsByNonce.get(tx.nonce).get('isExecuted')) || + transactions.find((safeTx) => tx.nonce === safeTx.nonce && safeTx.isExecuted) + ) { + transaction.set('cancelled', true) + } + } + transaction.set('status', getTxStatus(transaction, userAddress, safe)) + + return transaction + }), + ) + + return List([...extendedTransactions, ...incomingTransactions]) + }, +) diff --git a/src/routes/safe/store/selectors/utils/transactionDecoder.js b/src/routes/safe/store/selectors/utils/transactionDecoder.js new file mode 100644 index 00000000..eb4ea6ad --- /dev/null +++ b/src/routes/safe/store/selectors/utils/transactionDecoder.js @@ -0,0 +1,5 @@ +// @flow +import { sameAddress } from '~/logic/wallets/ethAddresses' +import { type Transaction } from '~/routes/safe/store/models/transaction' + +const isModifySettingsTx = (tx: Transaction) => sameAddress(transaction.to, safe) && Number(tx.value) === 0 && !!tx.data From ec9e7f9fb8f1a09fbd266646408a090c1a03642a Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 30 Apr 2020 14:29:10 +0400 Subject: [PATCH 15/65] Revert "transaction decoder wip" This reverts commit 5c00c48d75eabeb9abacdd2e3d5c1e976cba3a4b. --- src/logic/safe/transactions/txHistory.js | 1 + src/routes/safe/components/Balances/index.jsx | 4 +- src/routes/safe/container/index.jsx | 4 +- .../loadOutgoingTransactions.js | 22 +++--- src/routes/safe/store/models/confirmation.js | 4 + src/routes/safe/store/selectors/index.js | 6 +- .../safe/store/selectors/transactions.js | 77 ------------------- .../selectors/utils/transactionDecoder.js | 5 -- 8 files changed, 25 insertions(+), 98 deletions(-) delete mode 100644 src/routes/safe/store/selectors/transactions.js delete mode 100644 src/routes/safe/store/selectors/utils/transactionDecoder.js diff --git a/src/logic/safe/transactions/txHistory.js b/src/logic/safe/transactions/txHistory.js index 0ec7605a..cc8f4588 100644 --- a/src/logic/safe/transactions/txHistory.js +++ b/src/logic/safe/transactions/txHistory.js @@ -4,6 +4,7 @@ import axios from 'axios' import { getTxServiceHost, getTxServiceUriFrom } from '~/config' import { getWeb3 } from '~/logic/wallets/getWeb3' +export type TxServiceType = 'confirmation' | 'execution' | 'initialised' export type Operation = 0 | 1 | 2 const calculateBodyFrom = async ( diff --git a/src/routes/safe/components/Balances/index.jsx b/src/routes/safe/components/Balances/index.jsx index c496f039..e6fb1532 100644 --- a/src/routes/safe/components/Balances/index.jsx +++ b/src/routes/safe/components/Balances/index.jsx @@ -17,7 +17,7 @@ import { SAFELIST_ADDRESS } from '~/routes/routes' import SendModal from '~/routes/safe/components/Balances/SendModal' import DropdownCurrency from '~/routes/safe/components/DropdownCurrency' import { useFetchTokens } from '~/routes/safe/container/Hooks/useFetchTokens' -import { safeEnabledFeaturesSelector, safeParamAddressFromStateSelector } from '~/routes/safe/store/selectors' +import { safeFeaturesEnabledSelector, safeParamAddressFromStateSelector } from '~/routes/safe/store/selectors' import { history } from '~/store' import { wrapInSuspense } from '~/utils/wrapInSuspense' const Collectibles = React.lazy(() => import('~/routes/safe/components/Balances/Collectibles')) @@ -64,7 +64,7 @@ const Balances = (props: Props) => { const [state, setState] = useState(INITIAL_STATE) const address = useSelector(safeParamAddressFromStateSelector) - const featuresEnabled = useSelector(safeEnabledFeaturesSelector) + const featuresEnabled = useSelector(safeFeaturesEnabledSelector) useFetchTokens() diff --git a/src/routes/safe/container/index.jsx b/src/routes/safe/container/index.jsx index 0486dfb3..f4787a13 100644 --- a/src/routes/safe/container/index.jsx +++ b/src/routes/safe/container/index.jsx @@ -6,8 +6,8 @@ import { useSelector } from 'react-redux' import Page from '~/components/layout/Page' import { type Token } from '~/logic/tokens/store/model/token' import Layout from '~/routes/safe/components/Layout' -import { useCheckForUpdates } from '~/routes/safe/container/hooks/useCheckForUpdates' -import { useLoadSafe } from '~/routes/safe/container/hooks/useLoadSafe' +import { useCheckForUpdates } from '~/routes/safe/container/Hooks/useCheckForUpdates' +import { useLoadSafe } from '~/routes/safe/container/Hooks/useLoadSafe' import { safeParamAddressFromStateSelector } from '~/routes/safe/store/selectors' type Action = 'Send' | 'Receive' diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js index bdd0bdc3..85c302cd 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js @@ -5,7 +5,7 @@ import { List, Map, type RecordInstance } from 'immutable' import generateBatchRequests from '~/logic/contracts/generateBatchRequests' import { decodeParamsFromSafeMethod } from '~/logic/contracts/methodIds' -import { buildTxServiceUrl } from '~/logic/safe/transactions/txHistory' +import { type TxServiceType, buildTxServiceUrl } from '~/logic/safe/transactions/txHistory' import { TOKEN_REDUCER_ID } from '~/logic/tokens/store/reducer/tokens' import { SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH, @@ -22,7 +22,7 @@ import { type Transaction, makeTransaction } from '~/routes/safe/store/models/tr type ConfirmationServiceModel = { owner: string, submissionDate: Date, - signature: string, + confirmationType: string, transactionHash: string, } @@ -67,12 +67,14 @@ export const buildTransactionFrom = async ( tx.confirmations.map((conf: ConfirmationServiceModel) => makeConfirmation({ owner: conf.owner, + type: ((conf.confirmationType.toLowerCase(): any): TxServiceType), hash: conf.transactionHash, signature: conf.signature, }), ), ) - + const modifySettingsTx = sameAddress(tx.to, safeAddress) && Number(tx.value) === 0 && !!tx.data + const cancellationTx = sameAddress(tx.to, safeAddress) && Number(tx.value) === 0 && !tx.data const isERC721Token = (code && code.includes(SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH)) || (isTokenTransfer(tx.data, Number(tx.value)) && !knownTokens.get(tx.to) && txTokenDecimals !== null) @@ -159,7 +161,9 @@ export const buildTransactionFrom = async ( multiSendTx: isMultiSendTx, upgradeTx: isUpgradeTx, decodedParams, + modifySettingsTx, customTx, + cancellationTx, creationTx: tx.creationTx, origin: tx.origin, }) @@ -184,18 +188,18 @@ const batchTxTokenRequest = (txs: any[]) => { return Promise.all(whenTxsValues) } -let prevOutgoingTxsEtag = null +let prevSaveTransactionsEtag = null export const loadOutgoingTransactions = async ( safeAddress: string, getState: GetState, ): Promise => { - let transactions: TxServiceModel[] = [] + let transactions: TxServiceModel[] = addMockSafeCreationTx(safeAddress) try { - const config = prevOutgoingTxsEtag + const config = prevSaveTransactionsEtag ? { headers: { - 'If-None-Match': prevOutgoingTxsEtag, + 'If-None-Match': prevSaveTransactionsEtag, }, } : undefined @@ -203,12 +207,12 @@ export const loadOutgoingTransactions = async ( const url = buildTxServiceUrl(safeAddress) const response = await axios.get(url, config) if (response.data.count > 0) { - if (prevOutgoingTxsEtag === response.headers.etag) { + if (prevSaveTransactionsEtag === response.headers.etag) { // The txs are the same as we currently have, we don't have to proceed return } transactions = transactions.concat(response.data.results) - prevOutgoingTxsEtag = response.headers.etag + prevSaveTransactionsEtag = response.headers.etag } } catch (err) { if (err && err.response && err.response.status === 304) { diff --git a/src/routes/safe/store/models/confirmation.js b/src/routes/safe/store/models/confirmation.js index 5b26abd2..90d47a89 100644 --- a/src/routes/safe/store/models/confirmation.js +++ b/src/routes/safe/store/models/confirmation.js @@ -2,14 +2,18 @@ import { Record } from 'immutable' import type { RecordFactory, RecordOf } from 'immutable' +import { type TxServiceType } from '~/logic/safe/transactions/txHistory' + export type ConfirmationProps = { owner: string, + type: TxServiceType, hash: string, signature?: string, } export const makeConfirmation: RecordFactory = Record({ owner: '', + type: 'initialised', hash: '', signature: null, }) diff --git a/src/routes/safe/store/selectors/index.js b/src/routes/safe/store/selectors/index.js index dcfea640..e346eae2 100644 --- a/src/routes/safe/store/selectors/index.js +++ b/src/routes/safe/store/selectors/index.js @@ -150,8 +150,8 @@ export const safeSelector: OutputSelector, diff --git a/src/routes/safe/store/selectors/transactions.js b/src/routes/safe/store/selectors/transactions.js deleted file mode 100644 index 1e4ec933..00000000 --- a/src/routes/safe/store/selectors/transactions.js +++ /dev/null @@ -1,77 +0,0 @@ -// @flow -import { List, Map } from 'immutable' -import { type Selector, createSelector } from 'reselect' - -import { userAccountSelector } from '~/logic/wallets/store/selectors' -import type { IncomingTransaction } from '~/routes/safe/store/models/incomingTransaction' -import { type Safe } from '~/routes/safe/store/models/safe' -import { type Transaction, type TransactionStatus } from '~/routes/safe/store/models/transaction' -import { - type RouterProps, - safeCancellationTransactionsSelector, - safeIncomingTransactionsSelector, - safeSelector, - safeTransactionsSelector, -} from '~/routes/safe/store/selectors' -import { type GlobalState } from '~/store' - -const getTxStatus = (tx: Transaction, userAddress: string, safe: Safe): TransactionStatus => { - let txStatus - if (tx.executionTxHash) { - txStatus = 'success' - } else if (tx.cancelled) { - txStatus = 'cancelled' - } else if (tx.confirmations.size === safe.threshold) { - txStatus = 'awaiting_execution' - } else if (tx.creationTx) { - txStatus = 'success' - } else if (!tx.confirmations.size) { - txStatus = 'pending' - } else { - const userConfirmed = tx.confirmations.filter((conf) => conf.owner === userAddress).size === 1 - const userIsSafeOwner = safe.owners.filter((owner) => owner.address === userAddress).size === 1 - txStatus = !userConfirmed && userIsSafeOwner ? 'awaiting_your_confirmation' : 'awaiting_confirmations' - } - - if (tx.isSuccessful === false) { - txStatus = 'failed' - } - - return txStatus -} - -export const extendedTransactionsSelector: Selector< - GlobalState, - RouterProps, - List, -> = createSelector( - safeSelector, - userAccountSelector, - safeTransactionsSelector, - safeCancellationTransactionsSelector, - safeIncomingTransactionsSelector, - (safe, userAddress, transactions, cancellationTransactions, incomingTransactions) => { - const cancellationTransactionsByNonce = cancellationTransactions.reduce((acc, tx) => acc.set(tx.nonce, tx), Map()) - const extendedTransactions = transactions.map((tx: Transaction) => - tx.withMutations((transaction) => { - transaction.set('modifySettingsTx', sameAddress(transaction.to, safe) && Number(tx.value) === 0 && !!tx.data) - transaction.set('cancellationTx', sameAddress(transaction.to, safe) && Number(tx.value) === 0 && !tx.data) - - if (!transaction.isExecuted) { - if ( - (cancellationTransactionsByNonce.get(tx.nonce) && - cancellationTransactionsByNonce.get(tx.nonce).get('isExecuted')) || - transactions.find((safeTx) => tx.nonce === safeTx.nonce && safeTx.isExecuted) - ) { - transaction.set('cancelled', true) - } - } - transaction.set('status', getTxStatus(transaction, userAddress, safe)) - - return transaction - }), - ) - - return List([...extendedTransactions, ...incomingTransactions]) - }, -) diff --git a/src/routes/safe/store/selectors/utils/transactionDecoder.js b/src/routes/safe/store/selectors/utils/transactionDecoder.js deleted file mode 100644 index eb4ea6ad..00000000 --- a/src/routes/safe/store/selectors/utils/transactionDecoder.js +++ /dev/null @@ -1,5 +0,0 @@ -// @flow -import { sameAddress } from '~/logic/wallets/ethAddresses' -import { type Transaction } from '~/routes/safe/store/models/transaction' - -const isModifySettingsTx = (tx: Transaction) => sameAddress(transaction.to, safe) && Number(tx.value) === 0 && !!tx.data From a533f576c3aa537a6f4f77d269e5a387363beb32 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Thu, 30 Apr 2020 18:56:27 +0400 Subject: [PATCH 16/65] fetch transactions refactoring wip --- src/logic/safe/transactions/send.js | 2 - src/logic/safe/transactions/txHistory.js | 1 - .../ExpandedTx/OwnersColumn/index.jsx | 5 +- .../transactions/addMockSafeCreationTx.js | 34 --------- .../transactions/fetchTransactions/index.js | 4 +- .../loadIncomingTransactions.js | 2 +- .../loadOutgoingTransactions.js | 50 +++++++------ .../utils/addMockSafeCreationTx.js | 29 ++++++++ src/routes/safe/store/models/confirmation.js | 4 - .../safe/store/selectors/transactions.js | 74 +++++++++++++++++++ 10 files changed, 136 insertions(+), 69 deletions(-) delete mode 100644 src/routes/safe/store/actions/transactions/addMockSafeCreationTx.js create mode 100644 src/routes/safe/store/actions/transactions/utils/addMockSafeCreationTx.js create mode 100644 src/routes/safe/store/selectors/transactions.js diff --git a/src/logic/safe/transactions/send.js b/src/logic/safe/transactions/send.js index d6ce555b..9e7dd14c 100644 --- a/src/logic/safe/transactions/send.js +++ b/src/logic/safe/transactions/send.js @@ -6,8 +6,6 @@ import { getWeb3 } from '~/logic/wallets/getWeb3' export const CALL = 0 export const DELEGATE_CALL = 1 -export const TX_TYPE_EXECUTION = 'execution' -export const TX_TYPE_CONFIRMATION = 'confirmation' type Transaction = { safeInstance: any, diff --git a/src/logic/safe/transactions/txHistory.js b/src/logic/safe/transactions/txHistory.js index cc8f4588..0ec7605a 100644 --- a/src/logic/safe/transactions/txHistory.js +++ b/src/logic/safe/transactions/txHistory.js @@ -4,7 +4,6 @@ import axios from 'axios' import { getTxServiceHost, getTxServiceUriFrom } from '~/config' import { getWeb3 } from '~/logic/wallets/getWeb3' -export type TxServiceType = 'confirmation' | 'execution' | 'initialised' export type Operation = 0 | 1 | 2 const calculateBodyFrom = async ( diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/index.jsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/index.jsx index f0429d89..77ec0a9b 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/index.jsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/index.jsx @@ -16,7 +16,6 @@ import Block from '~/components/layout/Block' import Col from '~/components/layout/Col' import Img from '~/components/layout/Img' import Paragraph from '~/components/layout/Paragraph/index' -import { TX_TYPE_CONFIRMATION } from '~/logic/safe/transactions/send' import { userAccountSelector } from '~/logic/wallets/store/selectors' import { type Transaction, makeTransaction } from '~/routes/safe/store/models/transaction' import { safeOwnersSelector, safeThresholdSelector } from '~/routes/safe/store/selectors' @@ -43,9 +42,7 @@ function getOwnersConfirmations(tx, userAddress) { currentUserAlreadyConfirmed = true } - if (conf.type === TX_TYPE_CONFIRMATION) { - ownersWhoConfirmed.push(conf.owner) - } + ownersWhoConfirmed.push(conf.owner) }) return [ownersWhoConfirmed, currentUserAlreadyConfirmed] diff --git a/src/routes/safe/store/actions/transactions/addMockSafeCreationTx.js b/src/routes/safe/store/actions/transactions/addMockSafeCreationTx.js deleted file mode 100644 index 422ba881..00000000 --- a/src/routes/safe/store/actions/transactions/addMockSafeCreationTx.js +++ /dev/null @@ -1,34 +0,0 @@ -// @flow -import type { Dispatch as ReduxDispatch } from 'redux' - -import { type GlobalState } from '~/store' - -const getMockCreationTx = (safeAddress: string) => ({ - blockNumber: null, - baseGas: 0, - confirmations: [], - data: null, - executionDate: null, - gasPrice: 0, - gasToken: '0x0000000000000000000000000000000000000000', - isExecuted: true, - nonce: null, - operation: 0, - refundReceiver: '0x0000000000000000000000000000000000000000', - safe: safeAddress, - safeTxGas: 0, - safeTxHash: '', - signatures: null, - submissionDate: null, - executor: '', - to: '', - transactionHash: null, - value: 0, - creationTx: true, -}) - -const addMockSafeCreationTx = (safeAddress: string) => (dispatch: ReduxDispatch) => { - dispatch(addTransaction(getMockCreationTx(safeAddress))) -} - -export default addMockSafeCreationTx diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/index.js b/src/routes/safe/store/actions/transactions/fetchTransactions/index.js index c16a191d..943623d8 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions/index.js +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/index.js @@ -6,12 +6,12 @@ import type { Dispatch as ReduxDispatch } from 'redux' import { addIncomingTransactions } from '../addIncomingTransactions' import { addTransactions } from '../addTransactions' +import { loadIncomingTransactions } from './loadIncomingTransactions' import { type SafeTransactionsType, loadOutgoingTransactions } from './loadOutgoingTransactions' import { addCancellationTransactions } from '~/routes/safe/store/actions/transactions/addCancellationTransactions' import { type IncomingTransaction } from '~/routes/safe/store/models/incomingTransaction' import { type GlobalState } from '~/store' - export default (safeAddress: string) => async (dispatch: ReduxDispatch, getState: GetState) => { const transactions: SafeTransactionsType | typeof undefined = await loadOutgoingTransactions(safeAddress, getState) if (transactions) { @@ -25,7 +25,7 @@ export default (safeAddress: string) => async (dispatch: ReduxDispatch> - | typeof undefined = await loadSafeIncomingTransactions(safeAddress) + | typeof undefined = await loadIncomingTransactions(safeAddress) if (incomingTransactions) { dispatch(addIncomingTransactions(incomingTransactions)) diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.js b/src/routes/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.js index d0da0d45..5739220f 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.js +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.js @@ -71,7 +71,7 @@ const batchIncomingTxsTokenDataRequest = (txs: IncomingTxServiceModel[]) => { } let prevIncomingTxsEtag = null -export const loadSafeIncomingTransactions = async (safeAddress: string) => { +export const loadIncomingTransactions = async (safeAddress: string) => { let incomingTransactions: IncomingTxServiceModel[] = [] try { const config = prevIncomingTxsEtag diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js index 85c302cd..487badf9 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js @@ -3,9 +3,12 @@ import ERC20Detailed from '@openzeppelin/contracts/build/contracts/ERC20Detailed import axios from 'axios' import { List, Map, type RecordInstance } from 'immutable' +import addMockSafeCreationTx from '../utils/addMockSafeCreationTx' + import generateBatchRequests from '~/logic/contracts/generateBatchRequests' import { decodeParamsFromSafeMethod } from '~/logic/contracts/methodIds' -import { type TxServiceType, buildTxServiceUrl } from '~/logic/safe/transactions/txHistory' +import { buildTxServiceUrl } from '~/logic/safe/transactions/txHistory' +import { getTokenInfos } from '~/logic/tokens/store/actions/fetchTokens' import { TOKEN_REDUCER_ID } from '~/logic/tokens/store/reducer/tokens' import { SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH, @@ -19,10 +22,11 @@ import { web3ReadOnly } from '~/logic/wallets/getWeb3' import { makeConfirmation } from '~/routes/safe/store/models/confirmation' import type { TransactionProps } from '~/routes/safe/store/models/transaction' import { type Transaction, makeTransaction } from '~/routes/safe/store/models/transaction' + type ConfirmationServiceModel = { owner: string, submissionDate: Date, - confirmationType: string, + signature: string, transactionHash: string, } @@ -58,16 +62,12 @@ export const buildTransactionFrom = async ( safeAddress: string, tx: TxServiceModel, knownTokens, - txTokenDecimals, - txTokenSymbol, - txTokenName, code, ): Promise => { const confirmations = List( tx.confirmations.map((conf: ConfirmationServiceModel) => makeConfirmation({ owner: conf.owner, - type: ((conf.confirmationType.toLowerCase(): any): TxServiceType), hash: conf.transactionHash, signature: conf.signature, }), @@ -77,7 +77,7 @@ export const buildTransactionFrom = async ( const cancellationTx = sameAddress(tx.to, safeAddress) && Number(tx.value) === 0 && !tx.data const isERC721Token = (code && code.includes(SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH)) || - (isTokenTransfer(tx.data, Number(tx.value)) && !knownTokens.get(tx.to) && txTokenDecimals !== null) + (isTokenTransfer(tx.data, Number(tx.value)) && !knownTokens.get(tx.to)) let isSendTokenTx = !isERC721Token && isTokenTransfer(tx.data, Number(tx.value)) const isMultiSendTx = isMultisendTransaction(tx.data, Number(tx.value)) const isUpgradeTx = isMultiSendTx && isUpgradeTransaction(tx.data) @@ -85,11 +85,16 @@ export const buildTransactionFrom = async ( let refundParams = null if (tx.gasPrice > 0) { - const refundSymbol = txTokenSymbol || 'ETH' - const decimals = txTokenName || 18 - const feeString = (tx.gasPrice * (tx.baseGas + tx.safeTxGas)).toString().padStart(decimals, 0) - const whole = feeString.slice(0, feeString.length - decimals) || '0' - const fraction = feeString.slice(feeString.length - decimals) + let refundSymbol = 'ETH' + let refundDecimals = 18 + if (tx.gasToken !== ZERO_ADDRESS) { + const gasToken = await getTokenInfos(tx.gasToken) + refundSymbol = gasToken.symbol + refundDecimals = gasToken.decimals + } + const feeString = (tx.gasPrice * (tx.baseGas + tx.safeTxGas)).toString().padStart(refundDecimals, 0) + const whole = feeString.slice(0, feeString.length - refundDecimals) || '0' + const fraction = feeString.slice(feeString.length - refundDecimals) const formattedFee = `${whole}.${fraction}` refundParams = { @@ -98,11 +103,16 @@ export const buildTransactionFrom = async ( } } - let symbol = txTokenSymbol || 'ETH' - let decimals = txTokenDecimals || 18 + let symbol = 'ETH' + let decimals = 18 let decodedParams if (isSendTokenTx) { - if (txTokenSymbol === null || txTokenDecimals === null) { + try { + const token = await getTokenInfos(tx.to) + + symbol = token.symbol + decimals = token.decimals + } catch (e) { try { const [tokenSymbol, tokenDecimals] = await Promise.all( generateBatchRequests({ @@ -114,7 +124,7 @@ export const buildTransactionFrom = async ( symbol = tokenSymbol decimals = tokenDecimals - } catch (e) { + } catch (err) { // some contracts may implement the same methods as in ERC20 standard // we may falsely treat them as tokens, so in case we get any errors when getting token info // we fallback to displaying custom transaction @@ -123,7 +133,7 @@ export const buildTransactionFrom = async ( } } - const params = web3.eth.abi.decodeParameters(['address', 'uint256'], tx.data.slice(10)) + const params = web3ReadOnly.eth.abi.decodeParameters(['address', 'uint256'], tx.data.slice(10)) decodedParams = { recipient: params[0], value: params[1], @@ -173,7 +183,7 @@ const batchTxTokenRequest = (txs: any[]) => { const batch = new web3ReadOnly.BatchRequest() const whenTxsValues = txs.map((tx) => { - const methods = ['decimals', { method: 'getCode', type: 'eth', args: [tx.to] }, 'symbol', 'name'] + const methods = [{ method: 'getCode', type: 'eth', args: [tx.to] }] return generateBatchRequests({ abi: ERC20Detailed.abi, address: tx.to, @@ -229,9 +239,7 @@ export const loadOutgoingTransactions = async ( const txsWithData = await batchTxTokenRequest(transactions) // In case that the etags don't match, we parse the new transactions and save them to the cache const txsRecord: Array> = await Promise.all( - txsWithData.map(([tx: TxServiceModel, decimals, code, symbol, name]) => - buildTransactionFrom(safeAddress, tx, knownTokens, decimals, symbol, name, code), - ), + txsWithData.map(([tx: TxServiceModel, code]) => buildTransactionFrom(safeAddress, tx, knownTokens, code)), ) const groupedTxs = List(txsRecord).groupBy((tx) => (tx.get('cancellationTx') ? 'cancel' : 'outgoing')) diff --git a/src/routes/safe/store/actions/transactions/utils/addMockSafeCreationTx.js b/src/routes/safe/store/actions/transactions/utils/addMockSafeCreationTx.js new file mode 100644 index 00000000..32c53099 --- /dev/null +++ b/src/routes/safe/store/actions/transactions/utils/addMockSafeCreationTx.js @@ -0,0 +1,29 @@ +// @flow + +const addMockSafeCreationTx = (safeAddress: string) => [ + { + blockNumber: null, + baseGas: 0, + confirmations: [], + data: null, + executionDate: null, + gasPrice: 0, + gasToken: '0x0000000000000000000000000000000000000000', + isExecuted: true, + nonce: null, + operation: 0, + refundReceiver: '0x0000000000000000000000000000000000000000', + safe: safeAddress, + safeTxGas: 0, + safeTxHash: '', + signatures: null, + submissionDate: null, + executor: '', + to: '', + transactionHash: null, + value: 0, + creationTx: true, + }, +] + +export default addMockSafeCreationTx diff --git a/src/routes/safe/store/models/confirmation.js b/src/routes/safe/store/models/confirmation.js index 90d47a89..5b26abd2 100644 --- a/src/routes/safe/store/models/confirmation.js +++ b/src/routes/safe/store/models/confirmation.js @@ -2,18 +2,14 @@ import { Record } from 'immutable' import type { RecordFactory, RecordOf } from 'immutable' -import { type TxServiceType } from '~/logic/safe/transactions/txHistory' - export type ConfirmationProps = { owner: string, - type: TxServiceType, hash: string, signature?: string, } export const makeConfirmation: RecordFactory = Record({ owner: '', - type: 'initialised', hash: '', signature: null, }) diff --git a/src/routes/safe/store/selectors/transactions.js b/src/routes/safe/store/selectors/transactions.js new file mode 100644 index 00000000..38732879 --- /dev/null +++ b/src/routes/safe/store/selectors/transactions.js @@ -0,0 +1,74 @@ +// @flow +import { List, Map } from 'immutable' +import { type Selector, createSelector } from 'reselect' + +import { userAccountSelector } from '~/logic/wallets/store/selectors' +import type { IncomingTransaction } from '~/routes/safe/store/models/incomingTransaction' +import { type Safe } from '~/routes/safe/store/models/safe' +import { type Transaction, type TransactionStatus } from '~/routes/safe/store/models/transaction' +import { + type RouterProps, + safeCancellationTransactionsSelector, + safeIncomingTransactionsSelector, + safeSelector, + safeTransactionsSelector, +} from '~/routes/safe/store/selectors' +import { type GlobalState } from '~/store' + +const getTxStatus = (tx: Transaction, userAddress: string, safe: Safe): TransactionStatus => { + let txStatus + if (tx.executionTxHash) { + txStatus = 'success' + } else if (tx.cancelled) { + txStatus = 'cancelled' + } else if (tx.confirmations.size === safe.threshold) { + txStatus = 'awaiting_execution' + } else if (tx.creationTx) { + txStatus = 'success' + } else if (!tx.confirmations.size) { + txStatus = 'pending' + } else { + const userConfirmed = tx.confirmations.filter((conf) => conf.owner === userAddress).size === 1 + const userIsSafeOwner = safe.owners.filter((owner) => owner.address === userAddress).size === 1 + txStatus = !userConfirmed && userIsSafeOwner ? 'awaiting_your_confirmation' : 'awaiting_confirmations' + } + + if (tx.isSuccessful === false) { + txStatus = 'failed' + } + + return txStatus +} + +export const extendedTransactionsSelector: Selector< + GlobalState, + RouterProps, + List, +> = createSelector( + safeSelector, + userAccountSelector, + safeTransactionsSelector, + safeCancellationTransactionsSelector, + safeIncomingTransactionsSelector, + (safe, userAddress, transactions, cancellationTransactions, incomingTransactions) => { + const cancellationTransactionsByNonce = cancellationTransactions.reduce((acc, tx) => acc.set(tx.nonce, tx), Map()) + const extendedTransactions = transactions.map((tx: Transaction) => + tx.withMutations((transaction) => { + if (!transaction.isExecuted) { + if ( + (cancellationTransactionsByNonce.get(tx.nonce) && + cancellationTransactionsByNonce.get(tx.nonce).get('isExecuted')) || + transactions.find((safeTx) => tx.nonce === safeTx.nonce && safeTx.isExecuted) + ) { + transaction.set('cancelled', true) + } + } + transaction.set('status', getTxStatus(transaction, userAddress, safe)) + + return transaction + }), + ) + + return List([...extendedTransactions, ...incomingTransactions]) + }, +) From 82b786cc54a97de7b339d013c7ef17f4b2aaed90 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Thu, 7 May 2020 19:19:40 -0300 Subject: [PATCH 17/65] fix: properly set safeAddress key for incomingTransactions --- .../fetchTransactions/loadIncomingTransactions.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.js b/src/routes/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.js index 5739220f..a382e096 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.js +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.js @@ -1,8 +1,7 @@ // @flow - import axios from 'axios' import bn from 'bignumber.js' -import { List, Map, type RecordInstance } from 'immutable' +import { List, Map } from 'immutable' import generateBatchRequests from '~/logic/contracts/generateBatchRequests' import { buildIncomingTxServiceUrl } from '~/logic/safe/transactions/incomingTxHistory' @@ -102,5 +101,5 @@ export const loadIncomingTransactions = async (safeAddress: string) => { const incomingTxsWithData = await batchIncomingTxsTokenDataRequest(incomingTransactions) const incomingTxsRecord = incomingTxsWithData.map(buildIncomingTransactionFrom) - return Map({ safeAddress: List(incomingTxsRecord) }) + return Map({ [safeAddress]: List(incomingTxsRecord) }) } From b99cf3a02a465574b42d822b88f91dcee0c5cc3a Mon Sep 17 00:00:00 2001 From: fernandomg Date: Sun, 10 May 2020 17:26:39 -0300 Subject: [PATCH 18/65] fix: owner address lookup from tx.confirmation list --- src/logic/safe/safeTxSigner.js | 2 +- src/logic/safe/transactions/awaitingTransactions.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/logic/safe/safeTxSigner.js b/src/logic/safe/safeTxSigner.js index fc46af26..4fd85cbe 100644 --- a/src/logic/safe/safeTxSigner.js +++ b/src/logic/safe/safeTxSigner.js @@ -12,7 +12,7 @@ export const generateSignaturesFromTxConfirmations = ( // The constant parts need to be sorted so that the recovered signers are sorted ascending // (natural order) by address (not checksummed). const confirmationsMap = confirmations.reduce((map, obj) => { - map[obj.owner.address.toLowerCase()] = obj // eslint-disable-line no-param-reassign + map[obj.owner.toLowerCase()] = obj // eslint-disable-line no-param-reassign return map }, {}) diff --git a/src/logic/safe/transactions/awaitingTransactions.js b/src/logic/safe/transactions/awaitingTransactions.js index 1320b38d..a3d05421 100644 --- a/src/logic/safe/transactions/awaitingTransactions.js +++ b/src/logic/safe/transactions/awaitingTransactions.js @@ -27,9 +27,7 @@ export const getAwaitingTransactions = ( if (!transaction.executionTxHash && !isTransactionCancelled) { // Then we check if the waiting confirmations are not from the current user, otherwise, filters this // transaction - const transactionWaitingUser = transaction.confirmations.filter( - (confirmation) => confirmation.owner && confirmation.owner.address !== userAccount, - ) + const transactionWaitingUser = transaction.confirmations.filter(({ owner }) => owner !== userAccount) return transactionWaitingUser.size > 0 } From 4820a89d8efd64762538a8724d2fe082a2e1478b Mon Sep 17 00:00:00 2001 From: fernandomg Date: Sun, 10 May 2020 17:29:16 -0300 Subject: [PATCH 19/65] chore: update `yarn.lock` --- yarn.lock | 1581 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 1018 insertions(+), 563 deletions(-) diff --git a/yarn.lock b/yarn.lock index d47b519a..035b76e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1043,7 +1043,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.7.4", "@babel/template@^7.8.3", "@babel/template@^7.8.6": +"@babel/template@^7.3.3", "@babel/template@^7.7.4", "@babel/template@^7.8.3", "@babel/template@^7.8.6": version "7.8.6" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== @@ -1076,6 +1076,15 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" +"@babel/types@^7.3.3": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.6.tgz#2c5502b427251e9de1bd2dff95add646d95cc9f7" + integrity sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA== + dependencies: + "@babel/helper-validator-identifier" "^7.9.5" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -1145,7 +1154,7 @@ resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== -"@ethersproject/address@^5.0.0-beta.125": +"@ethersproject/address@5.0.0-beta.134": version "5.0.0-beta.134" resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.0.0-beta.134.tgz#9c1790c87b763dc547ac12e2dbc9fa78d0799a71" integrity sha512-FHhUVJTUIg2pXvOOhIt8sB1cQbcwrzZKzf9CPV7JM1auli20nGoYhyMFYGK7u++GXzTMJduIkU1OwlIBupewDw== @@ -1167,7 +1176,14 @@ "@ethersproject/properties" ">=5.0.0-beta.131" bn.js "^4.4.0" -"@ethersproject/bytes@>=5.0.0-beta.129", "@ethersproject/bytes@^5.0.0-beta.126": +"@ethersproject/bytes@5.0.0-beta.136": + version "5.0.0-beta.136" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.0.0-beta.136.tgz#3aa651df43b44c9e355eba993d8ab4440cb964bb" + integrity sha512-yoi5Ul16ScMHVNsf+oCDGaAnj+rtXxITcneXPeDl8h0rk1VNIqb1WKKvooD5WtM0oAglyauuDahHIF+4+5G/Sg== + dependencies: + "@ethersproject/logger" ">=5.0.0-beta.129" + +"@ethersproject/bytes@>=5.0.0-beta.129": version "5.0.0-beta.137" resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.0.0-beta.137.tgz#a9a35e2b358886289225d28212f4071ae391c161" integrity sha512-uBwchZzGP912Wcani6vM7RLtsnN69Uc9WTLvewsniKrpHpSx0/k33WUcQVosmkwPgUtqflKyGjcIqaea1Z9WHw== @@ -1209,7 +1225,7 @@ "@ethersproject/bytes" ">=5.0.0-beta.129" "@ethersproject/logger" ">=5.0.0-beta.129" -"@ethersproject/strings@^5.0.0-beta.125": +"@ethersproject/strings@5.0.0-beta.136": version "5.0.0-beta.136" resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.0.0-beta.136.tgz#053cbf4f9f96a7537cbc50300597f2d707907f51" integrity sha512-Hb9RvTrgGcOavHvtQZz+AuijB79BO3g1cfF2MeMfCU9ID4j3mbZv/olzDMS2pK9r4aERJpAS94AmlWzCgoY2LQ== @@ -1317,16 +1333,6 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jest/console@^25.3.0": - version "25.3.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-25.3.0.tgz#33b56b81238427bf3ebe3f7b3378d2f79cdbd409" - integrity sha512-LvSDNqpmZIZyweFaEQ6wKY7CbexPitlsLHGJtcooNECo0An/w49rFhjCJzu6efeb6+a3ee946xss1Jcd9r03UQ== - dependencies: - "@jest/source-map" "^25.2.6" - chalk "^3.0.0" - jest-util "^25.3.0" - slash "^3.0.0" - "@jest/console@^25.4.0": version "25.4.0" resolved "https://registry.yarnpkg.com/@jest/console/-/console-25.4.0.tgz#e2760b532701137801ba824dcff6bc822c961bac" @@ -1338,39 +1344,16 @@ jest-util "^25.4.0" slash "^3.0.0" -"@jest/core@^25.3.0": - version "25.3.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-25.3.0.tgz#80f97a7a8b59dde741a24f30871cc26d0197d426" - integrity sha512-+D5a/tFf6pA/Gqft2DLBp/yeSRgXhlJ+Wpst0X/ZkfTRP54qDR3C61VfHwaex+GzZBiTcE9vQeoZ2v5T10+Mqw== +"@jest/console@^25.5.0": + version "25.5.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-25.5.0.tgz#770800799d510f37329c508a9edd0b7b447d9abb" + integrity sha512-T48kZa6MK1Y6k4b89sexwmSF4YLeZS/Udqg3Jj3jG/cHH+N/sLFCEoXEDMOKugJQ9FxPN1osxIknvKkxt6MKyw== dependencies: - "@jest/console" "^25.3.0" - "@jest/reporters" "^25.3.0" - "@jest/test-result" "^25.3.0" - "@jest/transform" "^25.3.0" - "@jest/types" "^25.3.0" - ansi-escapes "^4.2.1" + "@jest/types" "^25.5.0" chalk "^3.0.0" - exit "^0.1.2" - graceful-fs "^4.2.3" - jest-changed-files "^25.3.0" - jest-config "^25.3.0" - jest-haste-map "^25.3.0" - jest-message-util "^25.3.0" - jest-regex-util "^25.2.6" - jest-resolve "^25.3.0" - jest-resolve-dependencies "^25.3.0" - jest-runner "^25.3.0" - jest-runtime "^25.3.0" - jest-snapshot "^25.3.0" - jest-util "^25.3.0" - jest-validate "^25.3.0" - jest-watcher "^25.3.0" - micromatch "^4.0.2" - p-each-series "^2.1.0" - realpath-native "^2.0.0" - rimraf "^3.0.0" + jest-message-util "^25.5.0" + jest-util "^25.5.0" slash "^3.0.0" - strip-ansi "^6.0.0" "@jest/core@^25.4.0": version "25.4.0" @@ -1406,14 +1389,39 @@ slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^25.3.0": - version "25.3.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-25.3.0.tgz#587f28ddb4b0dfe97404d3d4a4c9dbfa0245fb2e" - integrity sha512-vgooqwJTHLLak4fE+TaCGeYP7Tz1Y3CKOsNxR1sE0V3nx3KRUHn3NUnt+wbcfd5yQWKZQKAfW6wqbuwQLrXo3g== +"@jest/core@^25.5.4": + version "25.5.4" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-25.5.4.tgz#3ef7412f7339210f003cdf36646bbca786efe7b4" + integrity sha512-3uSo7laYxF00Dg/DMgbn4xMJKmDdWvZnf89n8Xj/5/AeQ2dOQmn6b6Hkj/MleyzZWXpwv+WSdYWl4cLsy2JsoA== dependencies: - "@jest/fake-timers" "^25.3.0" - "@jest/types" "^25.3.0" - jest-mock "^25.3.0" + "@jest/console" "^25.5.0" + "@jest/reporters" "^25.5.1" + "@jest/test-result" "^25.5.0" + "@jest/transform" "^25.5.1" + "@jest/types" "^25.5.0" + ansi-escapes "^4.2.1" + chalk "^3.0.0" + exit "^0.1.2" + graceful-fs "^4.2.4" + jest-changed-files "^25.5.0" + jest-config "^25.5.4" + jest-haste-map "^25.5.1" + jest-message-util "^25.5.0" + jest-regex-util "^25.2.6" + jest-resolve "^25.5.1" + jest-resolve-dependencies "^25.5.4" + jest-runner "^25.5.4" + jest-runtime "^25.5.4" + jest-snapshot "^25.5.1" + jest-util "^25.5.0" + jest-validate "^25.5.0" + jest-watcher "^25.5.0" + micromatch "^4.0.2" + p-each-series "^2.1.0" + realpath-native "^2.0.0" + rimraf "^3.0.0" + slash "^3.0.0" + strip-ansi "^6.0.0" "@jest/environment@^25.4.0": version "25.4.0" @@ -1424,16 +1432,14 @@ "@jest/types" "^25.4.0" jest-mock "^25.4.0" -"@jest/fake-timers@^25.3.0": - version "25.3.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-25.3.0.tgz#995aad36d5c8984165ca5db12e740ab8dbf7042a" - integrity sha512-NHAj7WbsyR3qBJPpBwSwqaq2WluIvUQsyzpJTN7XDVk7VnlC/y1BAnaYZL3vbPIP8Nhm0Ae5DJe0KExr/SdMJQ== +"@jest/environment@^25.5.0": + version "25.5.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-25.5.0.tgz#aa33b0c21a716c65686638e7ef816c0e3a0c7b37" + integrity sha512-U2VXPEqL07E/V7pSZMSQCvV5Ea4lqOlT+0ZFijl/i316cRMHvZ4qC+jBdryd+lmRetjQo0YIQr6cVPNxxK87mA== dependencies: - "@jest/types" "^25.3.0" - jest-message-util "^25.3.0" - jest-mock "^25.3.0" - jest-util "^25.3.0" - lolex "^5.0.0" + "@jest/fake-timers" "^25.5.0" + "@jest/types" "^25.5.0" + jest-mock "^25.5.0" "@jest/fake-timers@^25.4.0": version "25.4.0" @@ -1446,36 +1452,25 @@ jest-util "^25.4.0" lolex "^5.0.0" -"@jest/reporters@^25.3.0": - version "25.3.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-25.3.0.tgz#7f39f0e6911561cc5112a1b54656de18faee269b" - integrity sha512-1u0ZBygs0C9DhdYgLCrRfZfNKQa+9+J7Uo+Z9z0RWLHzgsxhoG32lrmMOtUw48yR6bLNELdvzormwUqSk4H4Vg== +"@jest/fake-timers@^25.5.0": + version "25.5.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-25.5.0.tgz#46352e00533c024c90c2bc2ad9f2959f7f114185" + integrity sha512-9y2+uGnESw/oyOI3eww9yaxdZyHq7XvprfP/eeoCsjqKYts2yRlsHS/SgjPDV8FyMfn2nbMy8YzUk6nyvdLOpQ== dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^25.3.0" - "@jest/test-result" "^25.3.0" - "@jest/transform" "^25.3.0" - "@jest/types" "^25.3.0" - chalk "^3.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.2" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^4.0.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.0.2" - jest-haste-map "^25.3.0" - jest-resolve "^25.3.0" - jest-util "^25.3.0" - jest-worker "^25.2.6" - slash "^3.0.0" - source-map "^0.6.0" - string-length "^3.1.0" - terminal-link "^2.0.0" - v8-to-istanbul "^4.0.1" - optionalDependencies: - node-notifier "^6.0.0" + "@jest/types" "^25.5.0" + jest-message-util "^25.5.0" + jest-mock "^25.5.0" + jest-util "^25.5.0" + lolex "^5.0.0" + +"@jest/globals@^25.5.2": + version "25.5.2" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-25.5.2.tgz#5e45e9de8d228716af3257eeb3991cc2e162ca88" + integrity sha512-AgAS/Ny7Q2RCIj5kZ+0MuKM1wbF0WMLxbCVl/GOMoCNbODRdJ541IxJ98xnZdVSZXivKpJlNPIWa3QmY0l4CXA== + dependencies: + "@jest/environment" "^25.5.0" + "@jest/types" "^25.5.0" + expect "^25.5.0" "@jest/reporters@^25.4.0": version "25.4.0" @@ -1508,6 +1503,38 @@ optionalDependencies: node-notifier "^6.0.0" +"@jest/reporters@^25.5.1": + version "25.5.1" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-25.5.1.tgz#cb686bcc680f664c2dbaf7ed873e93aa6811538b" + integrity sha512-3jbd8pPDTuhYJ7vqiHXbSwTJQNavczPs+f1kRprRDxETeE3u6srJ+f0NPuwvOmk+lmunZzPkYWIFZDLHQPkviw== + dependencies: + "@bcoe/v8-coverage" "^0.2.3" + "@jest/console" "^25.5.0" + "@jest/test-result" "^25.5.0" + "@jest/transform" "^25.5.1" + "@jest/types" "^25.5.0" + chalk "^3.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.2" + graceful-fs "^4.2.4" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-instrument "^4.0.0" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.0.2" + jest-haste-map "^25.5.1" + jest-resolve "^25.5.1" + jest-util "^25.5.0" + jest-worker "^25.5.0" + slash "^3.0.0" + source-map "^0.6.0" + string-length "^3.1.0" + terminal-link "^2.0.0" + v8-to-istanbul "^4.1.3" + optionalDependencies: + node-notifier "^6.0.0" + "@jest/source-map@^25.2.6": version "25.2.6" resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-25.2.6.tgz#0ef2209514c6d445ebccea1438c55647f22abb4c" @@ -1517,15 +1544,14 @@ graceful-fs "^4.2.3" source-map "^0.6.0" -"@jest/test-result@^25.3.0": - version "25.3.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-25.3.0.tgz#137fab5e5c6fed36e5d40735d1eb029325e3bf06" - integrity sha512-mqrGuiiPXl1ap09Mydg4O782F3ouDQfsKqtQzIjitpwv3t1cHDwCto21jThw6WRRE+dKcWQvLG70GpyLJICfGw== +"@jest/source-map@^25.5.0": + version "25.5.0" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-25.5.0.tgz#df5c20d6050aa292c2c6d3f0d2c7606af315bd1b" + integrity sha512-eIGx0xN12yVpMcPaVpjXPnn3N30QGJCJQSkEDUt9x1fI1Gdvb07Ml6K5iN2hG7NmMP6FDmtPEssE3z6doOYUwQ== dependencies: - "@jest/console" "^25.3.0" - "@jest/types" "^25.3.0" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" + callsites "^3.0.0" + graceful-fs "^4.2.4" + source-map "^0.6.0" "@jest/test-result@^25.4.0": version "25.4.0" @@ -1537,15 +1563,15 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^25.3.0": - version "25.3.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-25.3.0.tgz#271ad5f2b8f8137d092ccedc87e16a50f8676209" - integrity sha512-Xvns3xbji7JCvVcDGvqJ/pf4IpmohPODumoPEZJ0/VgC5gI4XaNVIBET2Dq5Czu6Gk3xFcmhtthh/MBOTljdNg== +"@jest/test-result@^25.5.0": + version "25.5.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-25.5.0.tgz#139a043230cdeffe9ba2d8341b27f2efc77ce87c" + integrity sha512-oV+hPJgXN7IQf/fHWkcS99y0smKLU2czLBJ9WA0jHITLst58HpQMtzSYxzaBvYc6U5U6jfoMthqsUlUlbRXs0A== dependencies: - "@jest/test-result" "^25.3.0" - jest-haste-map "^25.3.0" - jest-runner "^25.3.0" - jest-runtime "^25.3.0" + "@jest/console" "^25.5.0" + "@jest/types" "^25.5.0" + "@types/istanbul-lib-coverage" "^2.0.0" + collect-v8-coverage "^1.0.0" "@jest/test-sequencer@^25.4.0": version "25.4.0" @@ -1557,27 +1583,16 @@ jest-runner "^25.4.0" jest-runtime "^25.4.0" -"@jest/transform@^25.3.0": - version "25.3.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-25.3.0.tgz#083c5447d5307d9b9494d6968115b647460e71f1" - integrity sha512-W01p8kTDvvEX6kd0tJc7Y5VdYyFaKwNWy1HQz6Jqlhu48z/8Gxp+yFCDVj+H8Rc7ezl3Mg0hDaGuFVkmHOqirg== +"@jest/test-sequencer@^25.5.4": + version "25.5.4" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-25.5.4.tgz#9b4e685b36954c38d0f052e596d28161bdc8b737" + integrity sha512-pTJGEkSeg1EkCO2YWq6hbFvKNXk8ejqlxiOg1jBNLnWrgXOkdY6UmqZpwGFXNnRt9B8nO1uWMzLLZ4eCmhkPNA== dependencies: - "@babel/core" "^7.1.0" - "@jest/types" "^25.3.0" - babel-plugin-istanbul "^6.0.0" - chalk "^3.0.0" - convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.2.3" - jest-haste-map "^25.3.0" - jest-regex-util "^25.2.6" - jest-util "^25.3.0" - micromatch "^4.0.2" - pirates "^4.0.1" - realpath-native "^2.0.0" - slash "^3.0.0" - source-map "^0.6.1" - write-file-atomic "^3.0.0" + "@jest/test-result" "^25.5.0" + graceful-fs "^4.2.4" + jest-haste-map "^25.5.1" + jest-runner "^25.5.4" + jest-runtime "^25.5.4" "@jest/transform@^25.4.0": version "25.4.0" @@ -1601,6 +1616,28 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" +"@jest/transform@^25.5.1": + version "25.5.1" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-25.5.1.tgz#0469ddc17699dd2bf985db55fa0fb9309f5c2db3" + integrity sha512-Y8CEoVwXb4QwA6Y/9uDkn0Xfz0finGkieuV0xkdF9UtZGJeLukD5nLkaVrVsODB1ojRWlaoD0AJZpVHCSnJEvg== + dependencies: + "@babel/core" "^7.1.0" + "@jest/types" "^25.5.0" + babel-plugin-istanbul "^6.0.0" + chalk "^3.0.0" + convert-source-map "^1.4.0" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.2.4" + jest-haste-map "^25.5.1" + jest-regex-util "^25.2.6" + jest-util "^25.5.0" + micromatch "^4.0.2" + pirates "^4.0.1" + realpath-native "^2.0.0" + slash "^3.0.0" + source-map "^0.6.1" + write-file-atomic "^3.0.0" + "@jest/types@^25.3.0": version "25.3.0" resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.3.0.tgz#88f94b277a1d028fd7117bc1f74451e0fc2131e7" @@ -1621,6 +1658,16 @@ "@types/yargs" "^15.0.0" chalk "^3.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" + "@ledgerhq/devices@^5.12.0", "@ledgerhq/devices@^5.13.1": version "5.13.1" resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-5.13.1.tgz#1d65fcbcc470874968e2e74f7e87e3f350c4b332" @@ -1721,16 +1768,17 @@ resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-5.13.0.tgz#42e848f7c6f662387dfc5f3e86e3e5b4e07a5fae" integrity sha512-yMvzQiMjWDMRma3HPxQQibhvEqMaEdXXkNBk1+eaW+N47Y3neYSSyCJlyihzzMBeeoin4ChlP/5uKQaABwBeTg== -"@material-ui/core@4.9.10": - version "4.9.10" - resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.9.10.tgz#53f1d18bd274c258698b6cfdab3c4bee0edf7892" - integrity sha512-CQuZU9Y10RkwSdxjn785kw2EPcXhv5GKauuVQufR9LlD37kjfn21Im1yvr6wsUzn81oLhEvVPz727UWC0gbqxg== +"@material-ui/core@4.9.12": + version "4.9.12" + resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.9.12.tgz#0156d87c8b5db5a8aad992d6883a081a32684e2e" + integrity sha512-JtRm1iNw3PRg+bzULS1uRKhdIJ2jhKO3/5ptO6kTADARsv5KmhzMbM+PYmVS09qm9Yu3ilwka4dYrtjqea53Lw== dependencies: "@babel/runtime" "^7.4.4" + "@material-ui/react-transition-group" "^4.3.0" "@material-ui/styles" "^4.9.10" "@material-ui/system" "^4.9.10" "@material-ui/types" "^5.0.1" - "@material-ui/utils" "^4.9.6" + "@material-ui/utils" "^4.9.12" "@types/react-transition-group" "^4.2.0" clsx "^1.0.4" hoist-non-react-statics "^3.3.2" @@ -1757,6 +1805,16 @@ prop-types "^15.7.2" react-is "^16.8.0" +"@material-ui/react-transition-group@^4.3.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@material-ui/react-transition-group/-/react-transition-group-4.3.0.tgz#92529142addb5cc179dbf42d246c7e3fe4d6104b" + integrity sha512-CwQ0aXrlUynUTY6sh3UvKuvye1o92en20VGAs6TORnSxUYeRmkX8YeTUN3lAkGiBX1z222FxLFO36WWh6q73rQ== + dependencies: + "@babel/runtime" "^7.5.5" + dom-helpers "^5.0.1" + loose-envify "^1.4.0" + prop-types "^15.6.2" + "@material-ui/styles@^4.9.10": version "4.9.10" resolved "https://registry.yarnpkg.com/@material-ui/styles/-/styles-4.9.10.tgz#182ccdd0bc8525a459486499bbaebcd92b0db3ab" @@ -1802,6 +1860,15 @@ prop-types "^15.7.2" react-is "^16.8.0" +"@material-ui/utils@^4.9.12": + version "4.9.12" + resolved "https://registry.yarnpkg.com/@material-ui/utils/-/utils-4.9.12.tgz#0d639f1c1ed83fffb2ae10c21d15a938795d9e65" + integrity sha512-/0rgZPEOcZq5CFA4+4n6Q6zk7fi8skHhH2Bcra8R3epoJEYy5PL55LuMazPtPH1oKeRausDV/Omz4BbgFsn1HQ== + dependencies: + "@babel/runtime" "^7.4.4" + prop-types "^15.7.2" + react-is "^16.8.0" + "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" @@ -1815,10 +1882,10 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== -"@openzeppelin/contracts@^2.5.0": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-2.5.0.tgz#e327a98ba1d26b7756ff62885a0aa0967a375449" - integrity sha512-t3jm8FrhL9tkkJTofkznTqo/XXdHi21w5yXwalEnaMOp22ZwZ0f/mmKdlgMMLPFa6bSVHbY88mKESwJT/7m5Lg== +"@openzeppelin/contracts@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.0.0.tgz#89bc0d32fc9eb257cf6499f2497a1b4a6715f186" + integrity sha512-u7oATjUK6jffDOoIjVQ7vJ2fnFKlfDS1CJzrMpp+YtGQ2fhdSk0kXjZTxk8Pj1SPVZRNES3yo0r144v8BsuRhQ== "@portis/eth-json-rpc-middleware@^4.1.2": version "4.1.2" @@ -1979,10 +2046,10 @@ lodash "^4.17.15" redent "^3.0.0" -"@testing-library/react@10.0.2": - version "10.0.2" - resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-10.0.2.tgz#8eca7aa52d810cf7150048a2829fdc487162006d" - integrity sha512-YT6Mw0oJz7R6vlEkmo1FlUD+K15FeXApOB5Ffm9zooFVnrwkt00w18dUJFMOh1yRp9wTdVRonbor7o4PIpFCmA== +"@testing-library/react@10.0.3": + version "10.0.3" + resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-10.0.3.tgz#7781adc75cce172f8cda28faa77be29c6270ab43" + integrity sha512-EVmd3ghDFBEjOSLnISUdi7OcLdP6tsqjmTprpMaBz5TreoM8jnxGKIPkLD579CE0LYGqK01iffQiy6wwW/RUig== dependencies: "@babel/runtime" "^7.9.2" "@testing-library/dom" "^7.1.0" @@ -2387,6 +2454,13 @@ "@types/minimatch" "*" "@types/node" "*" +"@types/graceful-fs@^4.1.2": + version "4.1.3" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.3.tgz#039af35fe26bec35003e8d86d2ee9c586354348f" + integrity sha512-AiHRaEB50LQg0pZmm659vNBb9f4SJ0qrAnteuzhSeAUcJKxoYgEnprg/83kppCnc2zvtCKbdZry1a5pVY3lOTQ== + dependencies: + "@types/node" "*" + "@types/html-minifier-terser@^5.0.0": version "5.0.0" resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-5.0.0.tgz#7532440c138605ced1b555935c3115ddd20e8bef" @@ -2583,57 +2657,57 @@ "@restless/sanitizers" "^0.2.4" reactive-properties "^0.1.11" -"@walletconnect/browser@^1.0.0-next.0": - version "1.0.0-next.0" - resolved "https://registry.yarnpkg.com/@walletconnect/browser/-/browser-1.0.0-next.0.tgz#dcdce4e750f65ed875fea1f14dd8085e94325402" - integrity sha512-CAVbFTvgbQoY1Cwv/ie+2j8WlRHUip2I7j7dzlnkgRjq3oLtuHXa8T/Em66/GBoFwsc9F8WbvIDD/LcYOD3p4Q== +"@walletconnect/browser@^1.0.0-beta.47": + version "1.0.0-beta.47" + resolved "https://registry.yarnpkg.com/@walletconnect/browser/-/browser-1.0.0-beta.47.tgz#7e79015ed3b568e416b7532c3864cf7c160f3a3b" + integrity sha512-FFT6zqdMIGjjWIFjRY1p/RPeUs5F21YzhrbsSemLyxlRumyQQ3Wotnq8mAKRWPHSzgXkg/GxbTAzIkxciMeuUg== dependencies: - "@walletconnect/core" "^1.0.0-next.0" - "@walletconnect/types" "^1.0.0-next.0" - "@walletconnect/utils" "^1.0.0-next.0" + "@walletconnect/core" "^1.0.0-beta.47" + "@walletconnect/types" "^1.0.0-beta.47" + "@walletconnect/utils" "^1.0.0-beta.47" -"@walletconnect/core@^1.0.0-next.0": - version "1.0.0-next.0" - resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-1.0.0-next.0.tgz#f744705442ee26ee0b73c4fe400c04a35f6e0798" - integrity sha512-7e5BF3MyO8nxuQIHSHWwOZ1S7NffXL+VKrKCSZjxkQT9TXPMXvxuqfMFcdm262QEfuFWe4+lu4nckhsj2OiWcA== +"@walletconnect/core@^1.0.0-beta.47": + version "1.0.0-beta.47" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-1.0.0-beta.47.tgz#56d6efb9d276b9247c251d24653ae25550f2d501" + integrity sha512-PdwW9E6kjFnNt11GO2W9gHQY2EIPLYT7qTxN9ZPl1F38v5cWzZBpDQAPQ1QlcJ2kHpZ6V6QDDc/0heEaR//z0Q== dependencies: - "@walletconnect/types" "^1.0.0-next.0" - "@walletconnect/utils" "^1.0.0-next.0" + "@walletconnect/types" "^1.0.0-beta.47" + "@walletconnect/utils" "^1.0.0-beta.47" -"@walletconnect/qrcode-modal@^1.0.0-next.0": - version "1.0.0-next.0" - resolved "https://registry.yarnpkg.com/@walletconnect/qrcode-modal/-/qrcode-modal-1.0.0-next.0.tgz#26c2ee079660f2a7e0ebcc9967cbd3dd47ff8d4c" - integrity sha512-YOizqde6vSyiF9+mzPwgPkzC/x0geZKdhhyq7/JCxW3QdPIlacGbQ71BEH4Vp7/yJT4DFDapaoZTJZHok96tkA== +"@walletconnect/qrcode-modal@^1.0.0-beta.47": + version "1.0.0-beta.47" + resolved "https://registry.yarnpkg.com/@walletconnect/qrcode-modal/-/qrcode-modal-1.0.0-beta.47.tgz#42dc580c0542db2f468a479b6a0bdc93ced6cc05" + integrity sha512-FV3FDbbYeRsTarwWUq4pxjPNsmfZT5f+t8TIH1Uva23fiEG3PcjfWwXuGmoh4vADbtGx8ctO7hSs1Doegtd8KA== dependencies: - qr-image "^3.2.0" - qrcode-terminal "^0.12.0" + qr-image "3.2.0" + qrcode-terminal "0.12.0" -"@walletconnect/types@^1.0.0-next.0": - version "1.0.0-next.0" - resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-1.0.0-next.0.tgz#21d5e493dba4f23ef8cc398a92f326aedb4291bd" - integrity sha512-Q5q6bL+6vk7oSfYcambVZmy9HeJ+x5Kefb7cU7Zrj4hMIYW9No5AO2/S9Y//wSgNzzORcgEmrxmHTWhYU5jwDg== +"@walletconnect/types@^1.0.0-beta.47": + version "1.0.0-beta.47" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-1.0.0-beta.47.tgz#d790b33902629e05d7e18f6cbb6774c4a2f0619f" + integrity sha512-lxjBiNLLDOsyEaoB1nlBDrgznV0477udMfN4zvEuv+bNL+dxH27yQI1mM1VqIKIhrEaibjswLJGaweEMzgynoQ== -"@walletconnect/utils@^1.0.0-next.0": - version "1.0.0-next.0" - resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-1.0.0-next.0.tgz#6b7dec876db688abbd03d2c9a32277b831bf6342" - integrity sha512-nVKPkzpS3pvZoAieaaRGOvN7FmZF9f86foLlZT8x9Jfs5niOTypglVOmYFS9R20kjm591dPi8JsbeKGzpzAdDg== +"@walletconnect/utils@^1.0.0-beta.47": + version "1.0.0-beta.47" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-1.0.0-beta.47.tgz#b1ffa5e0d05d5f13aa76c72d9b9eca98085a4420" + integrity sha512-il8QKvf8AaYpW8xC9mjXBiOH8CkCeV5W7CZAIfVxuJ46WV4XyIAxhEKvF8zGWGKRjz4LjFj3r3l1nyrxeIkrMA== dependencies: - "@ethersproject/address" "^5.0.0-beta.125" - "@ethersproject/bytes" "^5.0.0-beta.126" - "@ethersproject/strings" "^5.0.0-beta.125" - "@walletconnect/types" "^1.0.0-next.0" - bignumber.js "^8.1.1" + "@ethersproject/address" "5.0.0-beta.134" + "@ethersproject/bytes" "5.0.0-beta.136" + "@ethersproject/strings" "5.0.0-beta.136" + "@walletconnect/types" "^1.0.0-beta.47" + bignumber.js "9.0.0" -"@walletconnect/web3-provider@^1.0.0-beta.75": - version "1.0.0-next.0" - resolved "https://registry.yarnpkg.com/@walletconnect/web3-provider/-/web3-provider-1.0.0-next.0.tgz#258def8c3a1878dc603f95f504fbd00dca534ea5" - integrity sha512-pCLBBxm3Sa4KHDTGaCKpT7mvU/ErKvs6t/odGt+riNFHFLcDs/k1krm4Z9r3haoi0qweTWHebMLc6yp32fv3hw== +"@walletconnect/web3-provider@^1.0.0-beta.47": + version "1.0.0-beta.47" + resolved "https://registry.yarnpkg.com/@walletconnect/web3-provider/-/web3-provider-1.0.0-beta.47.tgz#797c9903fe5b26b43c23247b9b32d7d743018d56" + integrity sha512-mbtmDdp/RmsJzB7kkIFGDvfhQ7vIDSsKBTvpD7GUzXDi15yvQTNt9Ak7OUOe/9N7AO9X9gBf0J/lE+yqoBUiXA== dependencies: - "@walletconnect/browser" "^1.0.0-next.0" - "@walletconnect/qrcode-modal" "^1.0.0-next.0" - "@walletconnect/types" "^1.0.0-next.0" - web3-provider-engine "^15.0.4" - xhr2-cookies "^1.1.0" + "@walletconnect/browser" "^1.0.0-beta.47" + "@walletconnect/qrcode-modal" "^1.0.0-beta.47" + "@walletconnect/types" "^1.0.0-beta.47" + web3-provider-engine "15.0.4" + xhr2-cookies "1.1.0" "@web3-js/scrypt-shim@^0.1.0": version "0.1.0" @@ -2799,10 +2873,10 @@ "@webassemblyjs/wast-parser" "1.9.0" "@xtuc/long" "4.2.2" -"@welldone-software/why-did-you-render@4.0.8": - version "4.0.8" - resolved "https://registry.yarnpkg.com/@welldone-software/why-did-you-render/-/why-did-you-render-4.0.8.tgz#a685e7496421b44723f9342046f1b0dbbb39ad39" - integrity sha512-32B1YFqgEOO5fIBKT0uBIjuBAGxov/pwlxEqRZhmtvlyWTl927ouOP4PaxE6RAKuGAkkl6qoTF3yke3CokbZEQ== +"@welldone-software/why-did-you-render@4.1.2": + version "4.1.2" + resolved "https://registry.yarnpkg.com/@welldone-software/why-did-you-render/-/why-did-you-render-4.1.2.tgz#d88f55b6d7eed11271a24ec949fd156b5789db8a" + integrity sha512-bYFOe9zPTNpr10XpP48xID93eiw3TrVyWEFKt4dnG35RghhtxetKfTSmt/bx+ZLV9NuSJQUxiig6VUGxWpUP4Q== dependencies: lodash "^4" @@ -2927,7 +3001,7 @@ acorn@^2.1.0, acorn@^2.4.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-2.7.0.tgz#ab6e7d9d886aaca8b085bc3312b79a198433f0e7" integrity sha1-q259nYhqrKiwhbwzEreaGYQz8Oc= -acorn@^6.0.1, acorn@^6.0.7, acorn@^6.2.1: +acorn@^6.0.1, acorn@^6.0.7, acorn@^6.4.1: version "6.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== @@ -3700,20 +3774,7 @@ babel-helpers@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-jest@25.3.0, babel-jest@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-25.3.0.tgz#999d0c19e8427f66b796bf9ea233eedf087b957c" - integrity sha512-qiXeX1Cmw4JZ5yQ4H57WpkO0MZ61Qj+YnsVUwAMnDV5ls+yHon11XjarDdgP7H8lTmiEi6biiZA8y3Tmvx6pCg== - dependencies: - "@jest/transform" "^25.3.0" - "@jest/types" "^25.3.0" - "@types/babel__core" "^7.1.7" - babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^25.3.0" - chalk "^3.0.0" - slash "^3.0.0" - -babel-jest@^25.4.0: +babel-jest@25.4.0, babel-jest@^25.4.0: version "25.4.0" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-25.4.0.tgz#409eb3e2ddc2ad9a92afdbb00991f1633f8018d0" integrity sha512-p+epx4K0ypmHuCnd8BapfyOwWwosNCYhedetQey1awddtfmEX0MmdxctGl956uwUmjwXR5VSS5xJcGX9DvdIog== @@ -3726,6 +3787,20 @@ babel-jest@^25.4.0: chalk "^3.0.0" slash "^3.0.0" +babel-jest@^25.5.1: + version "25.5.1" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-25.5.1.tgz#bc2e6101f849d6f6aec09720ffc7bc5332e62853" + integrity sha512-9dA9+GmMjIzgPnYtkhBg73gOo/RHqPmLruP3BaGL4KEX3Dwz6pI8auSN8G8+iuEG90+GSswyKvslN+JYSaacaQ== + dependencies: + "@jest/transform" "^25.5.1" + "@jest/types" "^25.5.0" + "@types/babel__core" "^7.1.7" + babel-plugin-istanbul "^6.0.0" + babel-preset-jest "^25.5.0" + chalk "^3.0.0" + graceful-fs "^4.2.4" + slash "^3.0.0" + babel-loader@8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.1.0.tgz#c611d5112bd5209abe8b9fa84c3e4da25275f1c3" @@ -3751,7 +3826,7 @@ babel-plugin-check-es2015-constants@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-dynamic-import-node@^2.3.0: +babel-plugin-dynamic-import-node@2.3.3, babel-plugin-dynamic-import-node@^2.3.0: version "2.3.3" resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== @@ -3769,13 +3844,22 @@ babel-plugin-istanbul@^6.0.0: istanbul-lib-instrument "^4.0.0" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^25.2.6, babel-plugin-jest-hoist@^25.4.0: +babel-plugin-jest-hoist@^25.4.0: version "25.4.0" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-25.4.0.tgz#0c122c1b93fb76f52d2465be2e8069e798e9d442" integrity sha512-M3a10JCtTyKevb0MjuH6tU+cP/NVQZ82QPADqI1RQYY1OphztsCeIeQmTsHmF/NS6m0E51Zl4QNsI3odXSQF5w== dependencies: "@types/babel__traverse" "^7.0.6" +babel-plugin-jest-hoist@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-25.5.0.tgz#129c80ba5c7fc75baf3a45b93e2e372d57ca2677" + integrity sha512-u+/W+WAjMlvoocYGTwthAiQSxDcJAyHpQ6oWlHdFZaaN+Rlk8Q7iiwDPg2lN/FyJtAYnKjFxbn7xus4HCFkg5g== + dependencies: + "@babel/template" "^7.3.3" + "@babel/types" "^7.3.3" + "@types/babel__traverse" "^7.0.6" + "babel-plugin-styled-components@>= 1": version "1.10.7" resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.7.tgz#3494e77914e9989b33cc2d7b3b29527a949d635c" @@ -4104,14 +4188,6 @@ babel-preset-env@^1.7.0: invariant "^2.2.2" semver "^5.3.0" -babel-preset-jest@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-25.3.0.tgz#9ab40aee52a19bdc52b8b1ec2403d5914ac3d86b" - integrity sha512-tjdvLKNMwDI9r+QWz9sZUQGTq1dpoxjUqFUpEasAc7MOtHg9XuLT2fx0udFG+k1nvMV0WvHHVAN7VmCZ+1Zxbw== - dependencies: - babel-plugin-jest-hoist "^25.2.6" - babel-preset-current-node-syntax "^0.1.2" - babel-preset-jest@^25.4.0: version "25.4.0" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-25.4.0.tgz#10037cc32b751b994b260964629e49dc479abf4c" @@ -4120,6 +4196,14 @@ babel-preset-jest@^25.4.0: babel-plugin-jest-hoist "^25.4.0" babel-preset-current-node-syntax "^0.1.2" +babel-preset-jest@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-25.5.0.tgz#c1d7f191829487a907764c65307faa0e66590b49" + integrity sha512-8ZczygctQkBU+63DtSOKGh7tFL0CeCuz+1ieud9lJ1WPQ9O6A1a/r+LGn6Y705PA6whHQ3T1XuB/PmpfNYf8Fw== + dependencies: + babel-plugin-jest-hoist "^25.5.0" + babel-preset-current-node-syntax "^0.1.2" + babel-register@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" @@ -4264,11 +4348,6 @@ bignumber.js@^7.2.1: resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== -bignumber.js@^8.1.1: - version "8.1.1" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-8.1.1.tgz#4b072ae5aea9c20f6730e4e5d529df1271c4d885" - integrity sha512-QD46ppGintwPGuL1KqmwhR0O+N2cZUg8JG/VzwI2e28sM9TqHjQB10lI4QAaMHVbLzwVLLAwEglpKPViWX+5NQ== - "bignumber.js@git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2": version "2.0.7" resolved "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2" @@ -4379,17 +4458,17 @@ bn.js@^5.1.1: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.1.tgz#48efc4031a9c4041b9c99c6941d903463ab62eb5" integrity sha512-IUTD/REb78Z2eodka1QZyyEk66pciRcP6Sroka0aI3tG/iwIdYLrBD62RsubR7vqdt3WyX8p4jxeatzmRSphtA== -bnc-onboard@1.7.6: - version "1.7.6" - resolved "https://registry.yarnpkg.com/bnc-onboard/-/bnc-onboard-1.7.6.tgz#2eb87a824342fe1a3da08798e30f5ce08b7a1b6d" - integrity sha512-8YMaMBzCYWrkNwZEt1zIZ1Yco9kYCXvn2tQlRRoz+m0LSXvXYmf6FlTB9KF30VtbXWTa+agebcoJzjYkwTrREA== +bnc-onboard@1.7.7: + version "1.7.7" + resolved "https://registry.yarnpkg.com/bnc-onboard/-/bnc-onboard-1.7.7.tgz#62f35717e2edce188598886d3bb6574a53465d81" + integrity sha512-tMK6qIUvgSGVz+88k4Za3d9cZqQ3L+GjZ1CAO0Gmxs2nmD6BRszjUs58uTrizgyNKRjcHjkUSdRZXw8acCq2hA== dependencies: "@ledgerhq/hw-app-eth" "^5.7.0" "@ledgerhq/hw-transport-u2f" "^5.7.0" "@portis/web3" "^2.0.0-beta.42" "@toruslabs/torus-embed" "^1.3.0" "@unilogin/provider" "^0.5.21" - "@walletconnect/web3-provider" "^1.0.0-beta.75" + "@walletconnect/web3-provider" "^1.0.0-beta.47" authereum "^0.0.4-beta.131" bignumber.js "^9.0.0" bnc-sdk "2.0.0" @@ -5514,6 +5593,11 @@ commander@^4.0.1, commander@^4.1.1: resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== +commander@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" + integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== + commander@~2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" @@ -5928,10 +6012,10 @@ css-declaration-sorter@^4.0.1: postcss "^7.0.1" timsort "^0.3.0" -css-loader@3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.5.2.tgz#6483ae56f48a7f901fbe07dde2fc96b01eafab3c" - integrity sha512-hDL0DPopg6zQQSRlZm0hyeaqIRnL0wbWjay9BZxoiJBpbfOW4WHfbaYQhwnDmEa0kZUc1CJ3IFo15ot1yULMIQ== +css-loader@3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.5.3.tgz#95ac16468e1adcd95c844729e0bb167639eb0bcf" + integrity sha512-UEr9NH5Lmi7+dguAm+/JSPovNjYbm2k3TK58EiwQHzOHH5Jfq1Y+XoP2bQO6TMn7PptMd0opxxedAWcaSTRKHw== dependencies: camelcase "^5.3.1" cssesc "^3.0.0" @@ -5944,7 +6028,7 @@ css-loader@3.5.2: postcss-modules-scope "^2.2.0" postcss-modules-values "^3.0.0" postcss-value-parser "^4.0.3" - schema-utils "^2.6.5" + schema-utils "^2.6.6" semver "^6.3.0" css-select-base-adapter@^0.1.1: @@ -7228,10 +7312,10 @@ esdoc@^1.0.4: minimist "1.2.0" taffydb "2.7.3" -eslint-config-prettier@6.10.1: - version "6.10.1" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz#129ef9ec575d5ddc0e269667bf09defcd898642a" - integrity sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ== +eslint-config-prettier@6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz#f6d2238c1290d01c859a8b5c1f7d352a0b0da8b1" + integrity sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA== dependencies: get-stdin "^6.0.0" @@ -7316,7 +7400,7 @@ eslint-plugin-react@^7.18.3: string.prototype.matchall "^4.0.2" xregexp "^4.3.0" -eslint-plugin-sort-destructure-keys@^1.3.3: +eslint-plugin-sort-destructure-keys@1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/eslint-plugin-sort-destructure-keys/-/eslint-plugin-sort-destructure-keys-1.3.4.tgz#0e564bec2bcada21a64f1be9eb243b80a880149b" integrity sha512-isdXh0LxE6WEUkkmNtpXX0W95wqCyYI6PY3w9aEcrWQ2IqUzgHQpCfMcb8BD5Wlp2Y9i91kk2leDiII43C1kww== @@ -8172,7 +8256,7 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^3.2.0, execa@^3.4.0: +execa@^3.2.0: version "3.4.0" resolved "https://registry.yarnpkg.com/execa/-/execa-3.4.0.tgz#c08ed4550ef65d858fac269ffc8572446f37eb89" integrity sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g== @@ -8188,6 +8272,21 @@ execa@^3.2.0, execa@^3.4.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" +execa@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-4.0.0.tgz#7f37d6ec17f09e6b8fc53288611695b6d12b9daf" + integrity sha512-JbDUxwV3BoT5ZVXQrSVbAiaXhXUkIwvbhPIwZ0N13kX+5yCzOhUNdocxB/UQRuYOHRYYwAxKYwJYc0T4D12pDA== + dependencies: + cross-spawn "^7.0.0" + get-stream "^5.0.0" + human-signals "^1.1.1" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.0" + onetime "^5.1.0" + signal-exit "^3.0.2" + strip-final-newline "^2.0.0" + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -8242,18 +8341,6 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" -expect@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-25.3.0.tgz#5fd36e51befd05afb7184bc954f8a4792d184c71" - integrity sha512-buboTXML2h/L0Kh44Ys2Cx49mX20ISc5KDirkxIs3Q9AJv0kazweUAbukegr+nHDOvFRKmxdojjIHCjqAceYfg== - dependencies: - "@jest/types" "^25.3.0" - ansi-styles "^4.0.0" - jest-get-type "^25.2.6" - jest-matcher-utils "^25.3.0" - jest-message-util "^25.3.0" - jest-regex-util "^25.2.6" - expect@^25.4.0: version "25.4.0" resolved "https://registry.yarnpkg.com/expect/-/expect-25.4.0.tgz#0b16c17401906d1679d173e59f0d4580b22f8dc8" @@ -8266,6 +8353,18 @@ expect@^25.4.0: jest-message-util "^25.4.0" jest-regex-util "^25.2.6" +expect@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-25.5.0.tgz#f07f848712a2813bb59167da3fb828ca21f58bba" + integrity sha512-w7KAXo0+6qqZZhovCaBVPSIqQp7/UTcx4M9uKt2m6pd2VB1voyC8JizLRqeEqud3AAVP02g+hbErDu5gu64tlA== + dependencies: + "@jest/types" "^25.5.0" + ansi-styles "^4.0.0" + jest-get-type "^25.2.6" + jest-matcher-utils "^25.5.0" + jest-message-util "^25.5.0" + jest-regex-util "^25.2.6" + express@^4.14.0, express@^4.16.3, express@^4.17.1: version "4.17.1" resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" @@ -8615,7 +8714,7 @@ find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" -find-cache-dir@^3.2.0: +find-cache-dir@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ== @@ -8695,10 +8794,10 @@ flatted@^2.0.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== -flow-bin@0.122.0: - version "0.122.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.122.0.tgz#c723a2b33b1a70bd10204704ae1dc776d5d89d79" - integrity sha512-my8N5jgl/A+UVby9E7NDppHdhLgRbWgKbmFZSx2MSYMRh3d9YGnM2MM+wexpUpl0ftY1IM6ZcUwaAhrypLyvlA== +flow-bin@0.123.0: + version "0.123.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.123.0.tgz#7ba61a0b8775928cf4943ccf78eed2b1b05f7b3a" + integrity sha512-Ylcf8YDIM/KrqtxkPuq+f8O+6sdYA2Nuz5f+sWHlp539DatZz3YMcsO1EiXaf1C11HJgpT/3YGYe7xZ9/UZmvQ== flow-stoplight@^1.0.0: version "1.0.0" @@ -9440,6 +9539,11 @@ graceful-fs@4.X, graceful-fs@^4.0.0, graceful-fs@^4.1.10, graceful-fs@^4.1.11, g resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== +graceful-fs@^4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== + "graceful-readlink@>= 1.0.0": version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" @@ -10882,15 +10986,6 @@ isurl@^1.0.0-alpha5: has-to-string-tag-x "^1.2.0" is-object "^1.0.1" -jest-changed-files@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-25.3.0.tgz#85d8de6f4bd13dafda9d7f1e3f2565fc0e183c78" - integrity sha512-eqd5hyLbUjIVvLlJ3vQ/MoPxsxfESVXG9gvU19XXjKzxr+dXmZIqCXiY0OiYaibwlHZBJl2Vebkc0ADEMzCXew== - dependencies: - "@jest/types" "^25.3.0" - execa "^3.2.0" - throat "^5.0.0" - jest-changed-files@^25.4.0: version "25.4.0" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-25.4.0.tgz#e573db32c2fd47d2b90357ea2eda0622c5c5cbd6" @@ -10900,49 +10995,35 @@ jest-changed-files@^25.4.0: execa "^3.2.0" throat "^5.0.0" -jest-cli@^25.3.0: - version "25.4.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-25.4.0.tgz#5dac8be0fece6ce39f0d671395a61d1357322bab" - integrity sha512-usyrj1lzCJZMRN1r3QEdnn8e6E6yCx/QN7+B1sLoA68V7f3WlsxSSQfy0+BAwRiF4Hz2eHauf11GZG3PIfWTXQ== +jest-changed-files@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-25.5.0.tgz#141cc23567ceb3f534526f8614ba39421383634c" + integrity sha512-EOw9QEqapsDT7mKF162m8HFzRPbmP8qJQny6ldVOdOVBz3ACgPm/1nAn5fPQ/NDaYhX/AHkrGwwkCncpAVSXcw== dependencies: - "@jest/core" "^25.4.0" - "@jest/test-result" "^25.4.0" - "@jest/types" "^25.4.0" + "@jest/types" "^25.5.0" + execa "^3.2.0" + throat "^5.0.0" + +jest-cli@^25.4.0: + version "25.5.4" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-25.5.4.tgz#b9f1a84d1301a92c5c217684cb79840831db9f0d" + integrity sha512-rG8uJkIiOUpnREh1768/N3n27Cm+xPFkSNFO91tgg+8o2rXeVLStz+vkXkGr4UtzH6t1SNbjwoiswd7p4AhHTw== + dependencies: + "@jest/core" "^25.5.4" + "@jest/test-result" "^25.5.0" + "@jest/types" "^25.5.0" chalk "^3.0.0" exit "^0.1.2" + graceful-fs "^4.2.4" import-local "^3.0.2" is-ci "^2.0.0" - jest-config "^25.4.0" - jest-util "^25.4.0" - jest-validate "^25.4.0" + jest-config "^25.5.4" + jest-util "^25.5.0" + jest-validate "^25.5.0" prompts "^2.0.1" realpath-native "^2.0.0" yargs "^15.3.1" -jest-config@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-25.3.0.tgz#112b5e2f2e57dec4501dd2fe979044c06fb1317e" - integrity sha512-CmF1JnNWFmoCSPC4tnU52wnVBpuxHjilA40qH/03IHxIevkjUInSMwaDeE6ACfxMPTLidBGBCO3EbxvzPbo8wA== - dependencies: - "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^25.3.0" - "@jest/types" "^25.3.0" - babel-jest "^25.3.0" - chalk "^3.0.0" - deepmerge "^4.2.2" - glob "^7.1.1" - jest-environment-jsdom "^25.3.0" - jest-environment-node "^25.3.0" - jest-get-type "^25.2.6" - jest-jasmine2 "^25.3.0" - jest-regex-util "^25.2.6" - jest-resolve "^25.3.0" - jest-util "^25.3.0" - jest-validate "^25.3.0" - micromatch "^4.0.2" - pretty-format "^25.3.0" - realpath-native "^2.0.0" - jest-config@^25.4.0: version "25.4.0" resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-25.4.0.tgz#56e5df3679a96ff132114b44fb147389c8c0a774" @@ -10967,6 +11048,31 @@ jest-config@^25.4.0: pretty-format "^25.4.0" realpath-native "^2.0.0" +jest-config@^25.5.4: + version "25.5.4" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-25.5.4.tgz#38e2057b3f976ef7309b2b2c8dcd2a708a67f02c" + integrity sha512-SZwR91SwcdK6bz7Gco8qL7YY2sx8tFJYzvg216DLihTWf+LKY/DoJXpM9nTzYakSyfblbqeU48p/p7Jzy05Atg== + dependencies: + "@babel/core" "^7.1.0" + "@jest/test-sequencer" "^25.5.4" + "@jest/types" "^25.5.0" + babel-jest "^25.5.1" + chalk "^3.0.0" + deepmerge "^4.2.2" + glob "^7.1.1" + graceful-fs "^4.2.4" + jest-environment-jsdom "^25.5.0" + jest-environment-node "^25.5.0" + jest-get-type "^25.2.6" + jest-jasmine2 "^25.5.4" + jest-regex-util "^25.2.6" + jest-resolve "^25.5.1" + jest-util "^25.5.0" + jest-validate "^25.5.0" + micromatch "^4.0.2" + pretty-format "^25.5.0" + realpath-native "^2.0.0" + jest-diff@^25.1.0, jest-diff@^25.2.1, jest-diff@^25.3.0: version "25.3.0" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.3.0.tgz#0d7d6f5d6171e5dacde9e05be47b3615e147c26f" @@ -10987,6 +11093,16 @@ jest-diff@^25.4.0: jest-get-type "^25.2.6" pretty-format "^25.4.0" +jest-diff@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.5.0.tgz#1dd26ed64f96667c068cef026b677dfa01afcfa9" + integrity sha512-z1kygetuPiREYdNIumRpAHY6RXiGmp70YHptjdaxTWGmA085W3iCnXNx0DhflK3vwrKmrRWyY1wUpkPMVxMK7A== + dependencies: + chalk "^3.0.0" + diff-sequences "^25.2.6" + jest-get-type "^25.2.6" + pretty-format "^25.5.0" + jest-docblock@^25.3.0: version "25.3.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-25.3.0.tgz#8b777a27e3477cd77a168c05290c471a575623ef" @@ -10999,17 +11115,6 @@ jest-dom@4.0.0: resolved "https://registry.yarnpkg.com/jest-dom/-/jest-dom-4.0.0.tgz#94eba3cbc6576e7bd6821867c92d176de28920eb" integrity sha512-gBxYZlZB1Jgvf2gP2pRfjjUWF8woGBHj/g5rAQgFPB/0K2atGuhVcPO+BItyjWeKg9zM+dokgcMOH01vrWVMFA== -jest-each@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-25.3.0.tgz#a319eecf1f6076164ab86f99ca166a55b96c0bd4" - integrity sha512-aBfS4VOf/Qs95yUlX6d6WBv0szvOcTkTTyCIaLuQGj4bSHsT+Wd9dDngVHrCe5uytxpN8VM+NAloI6nbPjXfXw== - dependencies: - "@jest/types" "^25.3.0" - chalk "^3.0.0" - jest-get-type "^25.2.6" - jest-util "^25.3.0" - pretty-format "^25.3.0" - jest-each@^25.4.0: version "25.4.0" resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-25.4.0.tgz#ad4e46164764e8e77058f169a0076a7f86f6b7d4" @@ -11021,17 +11126,16 @@ jest-each@^25.4.0: jest-util "^25.4.0" pretty-format "^25.4.0" -jest-environment-jsdom@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-25.3.0.tgz#c493ab8c41f28001520c70ef67dd88b88be6af05" - integrity sha512-jdE4bQN+k2QEZ9sWOxsqDJvMzbdFSCN/4tw8X0TQaCqyzKz58PyEf41oIr4WO7ERdp7WaJGBSUKF7imR3UW1lg== +jest-each@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-25.5.0.tgz#0c3c2797e8225cb7bec7e4d249dcd96b934be516" + integrity sha512-QBogUxna3D8vtiItvn54xXde7+vuzqRrEeaw8r1s+1TG9eZLVJE5ZkKoSUlqFwRjnlaA4hyKGiu9OlkFIuKnjA== dependencies: - "@jest/environment" "^25.3.0" - "@jest/fake-timers" "^25.3.0" - "@jest/types" "^25.3.0" - jest-mock "^25.3.0" - jest-util "^25.3.0" - jsdom "^15.2.1" + "@jest/types" "^25.5.0" + chalk "^3.0.0" + jest-get-type "^25.2.6" + jest-util "^25.5.0" + pretty-format "^25.5.0" jest-environment-jsdom@^25.4.0: version "25.4.0" @@ -11045,17 +11149,17 @@ jest-environment-jsdom@^25.4.0: jest-util "^25.4.0" jsdom "^15.2.1" -jest-environment-node@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-25.3.0.tgz#9845f0e63991e8498448cb0ae804935689533db9" - integrity sha512-XO09S29Nx1NU7TiMPHMoDIkxoGBuKSTbE+sHp0gXbeLDXhIdhysUI25kOqFFSD9AuDgvPvxWCXrvNqiFsOH33g== +jest-environment-jsdom@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-25.5.0.tgz#dcbe4da2ea997707997040ecf6e2560aec4e9834" + integrity sha512-7Jr02ydaq4jaWMZLY+Skn8wL5nVIYpWvmeatOHL3tOcV3Zw8sjnPpx+ZdeBfc457p8jCR9J6YCc+Lga0oIy62A== dependencies: - "@jest/environment" "^25.3.0" - "@jest/fake-timers" "^25.3.0" - "@jest/types" "^25.3.0" - jest-mock "^25.3.0" - jest-util "^25.3.0" - semver "^6.3.0" + "@jest/environment" "^25.5.0" + "@jest/fake-timers" "^25.5.0" + "@jest/types" "^25.5.0" + jest-mock "^25.5.0" + jest-util "^25.5.0" + jsdom "^15.2.1" jest-environment-node@^25.4.0: version "25.4.0" @@ -11069,30 +11173,23 @@ jest-environment-node@^25.4.0: jest-util "^25.4.0" semver "^6.3.0" +jest-environment-node@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-25.5.0.tgz#0f55270d94804902988e64adca37c6ce0f7d07a1" + integrity sha512-iuxK6rQR2En9EID+2k+IBs5fCFd919gVVK5BeND82fYeLWPqvRcFNPKu9+gxTwfB5XwBGBvZ0HFQa+cHtIoslA== + dependencies: + "@jest/environment" "^25.5.0" + "@jest/fake-timers" "^25.5.0" + "@jest/types" "^25.5.0" + jest-mock "^25.5.0" + jest-util "^25.5.0" + semver "^6.3.0" + jest-get-type@^25.2.6: version "25.2.6" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-25.2.6.tgz#0b0a32fab8908b44d508be81681487dbabb8d877" integrity sha512-DxjtyzOHjObRM+sM1knti6or+eOgcGU4xVSb2HNP1TqO4ahsT+rqZg+nyqHWJSvWgKC5cG3QjGFBqxLghiF/Ig== -jest-haste-map@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-25.3.0.tgz#b7683031c9c9ddc0521d311564108b244b11e4c6" - integrity sha512-LjXaRa+F8wwtSxo9G+hHD/Cp63PPQzvaBL9XCVoJD2rrcJO0Zr2+YYzAFWWYJ5GlPUkoaJFJtOuk0sL6MJY80A== - dependencies: - "@jest/types" "^25.3.0" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.3" - jest-serializer "^25.2.6" - jest-util "^25.3.0" - jest-worker "^25.2.6" - micromatch "^4.0.2" - sane "^4.0.3" - walker "^1.0.7" - which "^2.0.2" - optionalDependencies: - fsevents "^2.1.2" - jest-haste-map@^25.4.0: version "25.4.0" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-25.4.0.tgz#da7c309dd7071e0a80c953ba10a0ec397efb1ae2" @@ -11112,28 +11209,25 @@ jest-haste-map@^25.4.0: optionalDependencies: fsevents "^2.1.2" -jest-jasmine2@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-25.3.0.tgz#16ae4f68adef65fb45001b26c864bcbcbf972830" - integrity sha512-NCYOGE6+HNzYFSui52SefgpsnIzvxjn6KAgqw66BdRp37xpMD/4kujDHLNW5bS5i53os5TcMn6jYrzQRO8VPrQ== +jest-haste-map@^25.5.1: + version "25.5.1" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-25.5.1.tgz#1df10f716c1d94e60a1ebf7798c9fb3da2620943" + integrity sha512-dddgh9UZjV7SCDQUrQ+5t9yy8iEgKc1AKqZR9YDww8xsVOtzPQSMVLDChc21+g29oTRexb9/B0bIlZL+sWmvAQ== dependencies: - "@babel/traverse" "^7.1.0" - "@jest/environment" "^25.3.0" - "@jest/source-map" "^25.2.6" - "@jest/test-result" "^25.3.0" - "@jest/types" "^25.3.0" - chalk "^3.0.0" - co "^4.6.0" - expect "^25.3.0" - is-generator-fn "^2.0.0" - jest-each "^25.3.0" - jest-matcher-utils "^25.3.0" - jest-message-util "^25.3.0" - jest-runtime "^25.3.0" - jest-snapshot "^25.3.0" - jest-util "^25.3.0" - pretty-format "^25.3.0" - throat "^5.0.0" + "@jest/types" "^25.5.0" + "@types/graceful-fs" "^4.1.2" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.4" + jest-serializer "^25.5.0" + jest-util "^25.5.0" + jest-worker "^25.5.0" + micromatch "^4.0.2" + sane "^4.0.3" + walker "^1.0.7" + which "^2.0.2" + optionalDependencies: + fsevents "^2.1.2" jest-jasmine2@^25.4.0: version "25.4.0" @@ -11158,13 +11252,28 @@ jest-jasmine2@^25.4.0: pretty-format "^25.4.0" throat "^5.0.0" -jest-leak-detector@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-25.3.0.tgz#5b6bf04903b35be56038915a55f47291771f769f" - integrity sha512-jk7k24dMIfk8LUSQQGN8PyOy9+J0NAfHZWiDmUDYVMctY8FLJQ1eQ8+PjMoN8PgwhLIggUqgYJnyRFvUz3jLRw== +jest-jasmine2@^25.5.4: + version "25.5.4" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-25.5.4.tgz#66ca8b328fb1a3c5364816f8958f6970a8526968" + integrity sha512-9acbWEfbmS8UpdcfqnDO+uBUgKa/9hcRh983IHdM+pKmJPL77G0sWAAK0V0kr5LK3a8cSBfkFSoncXwQlRZfkQ== dependencies: - jest-get-type "^25.2.6" - pretty-format "^25.3.0" + "@babel/traverse" "^7.1.0" + "@jest/environment" "^25.5.0" + "@jest/source-map" "^25.5.0" + "@jest/test-result" "^25.5.0" + "@jest/types" "^25.5.0" + chalk "^3.0.0" + co "^4.6.0" + expect "^25.5.0" + is-generator-fn "^2.0.0" + jest-each "^25.5.0" + jest-matcher-utils "^25.5.0" + jest-message-util "^25.5.0" + jest-runtime "^25.5.4" + jest-snapshot "^25.5.1" + jest-util "^25.5.0" + pretty-format "^25.5.0" + throat "^5.0.0" jest-leak-detector@^25.4.0: version "25.4.0" @@ -11174,7 +11283,15 @@ jest-leak-detector@^25.4.0: jest-get-type "^25.2.6" pretty-format "^25.4.0" -jest-matcher-utils@^25.1.0, jest-matcher-utils@^25.3.0: +jest-leak-detector@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-25.5.0.tgz#2291c6294b0ce404241bb56fe60e2d0c3e34f0bb" + integrity sha512-rV7JdLsanS8OkdDpZtgBf61L5xZ4NnYLBq72r6ldxahJWWczZjXawRsoHyXzibM5ed7C2QRjpp6ypgwGdKyoVA== + dependencies: + jest-get-type "^25.2.6" + pretty-format "^25.5.0" + +jest-matcher-utils@^25.1.0: version "25.3.0" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-25.3.0.tgz#76765788a26edaa8bc5f0100aea52ae383559648" integrity sha512-ZBUJ2fchNIZt+fyzkuCFBb8SKaU//Rln45augfUtbHaGyVxCO++ANARdBK9oPGXU3hEDgyy7UHnOP/qNOJXFUg== @@ -11194,18 +11311,15 @@ jest-matcher-utils@^25.4.0: jest-get-type "^25.2.6" pretty-format "^25.4.0" -jest-message-util@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-25.3.0.tgz#e3836826fe5ca538a337b87d9bd2648190867f85" - integrity sha512-5QNy9Id4WxJbRITEbA1T1kem9bk7y2fD0updZMSTNHtbEDnYOGLDPAuFBhFgVmOZpv0n6OMdVkK+WhyXEPCcOw== +jest-matcher-utils@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-25.5.0.tgz#fbc98a12d730e5d2453d7f1ed4a4d948e34b7867" + integrity sha512-VWI269+9JS5cpndnpCwm7dy7JtGQT30UHfrnM3mXl22gHGt/b7NkjBqXfbhZ8V4B7ANUsjK18PlSBmG0YH7gjw== dependencies: - "@babel/code-frame" "^7.0.0" - "@jest/types" "^25.3.0" - "@types/stack-utils" "^1.0.1" chalk "^3.0.0" - micromatch "^4.0.2" - slash "^3.0.0" - stack-utils "^1.0.1" + jest-diff "^25.5.0" + jest-get-type "^25.2.6" + pretty-format "^25.5.0" jest-message-util@^25.4.0: version "25.4.0" @@ -11220,12 +11334,19 @@ jest-message-util@^25.4.0: slash "^3.0.0" stack-utils "^1.0.1" -jest-mock@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-25.3.0.tgz#d72644509e40987a732a9a2534a1054f4649402c" - integrity sha512-yRn6GbuqB4j3aYu+Z1ezwRiZfp0o9om5uOcBovVtkcRLeBCNP5mT0ysdenUsxAHnQUgGwPOE1wwhtQYe6NKirQ== +jest-message-util@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-25.5.0.tgz#ea11d93204cc7ae97456e1d8716251185b8880ea" + integrity sha512-ezddz3YCT/LT0SKAmylVyWWIGYoKHOFOFXx3/nA4m794lfVUskMcwhip6vTgdVrOtYdjeQeis2ypzes9mZb4EA== dependencies: - "@jest/types" "^25.3.0" + "@babel/code-frame" "^7.0.0" + "@jest/types" "^25.5.0" + "@types/stack-utils" "^1.0.1" + chalk "^3.0.0" + graceful-fs "^4.2.4" + micromatch "^4.0.2" + slash "^3.0.0" + stack-utils "^1.0.1" jest-mock@^25.4.0: version "25.4.0" @@ -11234,6 +11355,13 @@ jest-mock@^25.4.0: dependencies: "@jest/types" "^25.4.0" +jest-mock@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-25.5.0.tgz#a91a54dabd14e37ecd61665d6b6e06360a55387a" + integrity sha512-eXWuTV8mKzp/ovHc5+3USJMYsTBhyQ+5A1Mak35dey/RG8GlM4YWVylZuGgVXinaW6tpvk/RSecmF37FKUlpXA== + dependencies: + "@jest/types" "^25.5.0" + jest-pnp-resolver@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz#ecdae604c077a7fbc70defb6d517c3c1c898923a" @@ -11244,15 +11372,6 @@ jest-regex-util@^25.2.6: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-25.2.6.tgz#d847d38ba15d2118d3b06390056028d0f2fd3964" integrity sha512-KQqf7a0NrtCkYmZZzodPftn7fL1cq3GQAFVMn5Hg8uKx/fIenLEobNanUxb7abQ1sjADHBseG/2FGpsv/wr+Qw== -jest-resolve-dependencies@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-25.3.0.tgz#b0e4ae053dd44ddacc18c6ee12b5b7c28e445a90" - integrity sha512-bDUlLYmHW+f7J7KgcY2lkq8EMRqKonRl0XoD4Wp5SJkgAxKJnsaIOlrrVNTfXYf+YOu3VCjm/Ac2hPF2nfsCIA== - dependencies: - "@jest/types" "^25.3.0" - jest-regex-util "^25.2.6" - jest-snapshot "^25.3.0" - jest-resolve-dependencies@^25.4.0: version "25.4.0" resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-25.4.0.tgz#783937544cfc40afcc7c569aa54748c4b3f83f5a" @@ -11262,17 +11381,14 @@ jest-resolve-dependencies@^25.4.0: jest-regex-util "^25.2.6" jest-snapshot "^25.4.0" -jest-resolve@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-25.3.0.tgz#cb90a5bbea54a02eccdbbf4126a819595dcf91d6" - integrity sha512-IHoQAAybulsJ+ZgWis+ekYKDAoFkVH5Nx/znpb41zRtpxj4fr2WNV9iDqavdSm8GIpMlsfZxbC/fV9DhW0q9VQ== +jest-resolve-dependencies@^25.5.4: + version "25.5.4" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-25.5.4.tgz#85501f53957c8e3be446e863a74777b5a17397a7" + integrity sha512-yFmbPd+DAQjJQg88HveObcGBA32nqNZ02fjYmtL16t1xw9bAttSn5UGRRhzMHIQbsep7znWvAvnD4kDqOFM0Uw== dependencies: - "@jest/types" "^25.3.0" - browser-resolve "^1.11.3" - chalk "^3.0.0" - jest-pnp-resolver "^1.2.1" - realpath-native "^2.0.0" - resolve "^1.15.1" + "@jest/types" "^25.5.0" + jest-regex-util "^25.2.6" + jest-snapshot "^25.5.1" jest-resolve@^25.4.0: version "25.4.0" @@ -11288,30 +11404,20 @@ jest-resolve@^25.4.0: resolve "^1.15.1" slash "^3.0.0" -jest-runner@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-25.3.0.tgz#673ef2ac79d2810eb6b2c1a3f82398375a3d1174" - integrity sha512-csDqSC9qGHYWDrzrElzEgFbteztFeZJmKhSgY5jlCIcN0+PhActzRNku0DA1Xa1HxGOb0/AfbP1EGJlP4fGPtA== +jest-resolve@^25.5.1: + version "25.5.1" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-25.5.1.tgz#0e6fbcfa7c26d2a5fe8f456088dc332a79266829" + integrity sha512-Hc09hYch5aWdtejsUZhA+vSzcotf7fajSlPA6EZPE1RmPBAD39XtJhvHWFStid58iit4IPDLI/Da4cwdDmAHiQ== dependencies: - "@jest/console" "^25.3.0" - "@jest/environment" "^25.3.0" - "@jest/test-result" "^25.3.0" - "@jest/types" "^25.3.0" + "@jest/types" "^25.5.0" + browser-resolve "^1.11.3" chalk "^3.0.0" - exit "^0.1.2" - graceful-fs "^4.2.3" - jest-config "^25.3.0" - jest-docblock "^25.3.0" - jest-haste-map "^25.3.0" - jest-jasmine2 "^25.3.0" - jest-leak-detector "^25.3.0" - jest-message-util "^25.3.0" - jest-resolve "^25.3.0" - jest-runtime "^25.3.0" - jest-util "^25.3.0" - jest-worker "^25.2.6" - source-map-support "^0.5.6" - throat "^5.0.0" + graceful-fs "^4.2.4" + jest-pnp-resolver "^1.2.1" + read-pkg-up "^7.0.1" + realpath-native "^2.0.0" + resolve "^1.17.0" + slash "^3.0.0" jest-runner@^25.4.0: version "25.4.0" @@ -11338,36 +11444,30 @@ jest-runner@^25.4.0: source-map-support "^0.5.6" throat "^5.0.0" -jest-runtime@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-25.3.0.tgz#af4d40dbcc590fa5de9910cb6a120a13d131050b" - integrity sha512-gn5KYB1wxXRM3nfw8fVpthFu60vxQUCr+ShGq41+ZBFF3DRHZRKj3HDWVAVB4iTNBj2y04QeAo5cZ/boYaPg0w== +jest-runner@^25.5.4: + version "25.5.4" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-25.5.4.tgz#ffec5df3875da5f5c878ae6d0a17b8e4ecd7c71d" + integrity sha512-V/2R7fKZo6blP8E9BL9vJ8aTU4TH2beuqGNxHbxi6t14XzTb+x90B3FRgdvuHm41GY8ch4xxvf0ATH4hdpjTqg== dependencies: - "@jest/console" "^25.3.0" - "@jest/environment" "^25.3.0" - "@jest/source-map" "^25.2.6" - "@jest/test-result" "^25.3.0" - "@jest/transform" "^25.3.0" - "@jest/types" "^25.3.0" - "@types/yargs" "^15.0.0" + "@jest/console" "^25.5.0" + "@jest/environment" "^25.5.0" + "@jest/test-result" "^25.5.0" + "@jest/types" "^25.5.0" chalk "^3.0.0" - collect-v8-coverage "^1.0.0" exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.3" - jest-config "^25.3.0" - jest-haste-map "^25.3.0" - jest-message-util "^25.3.0" - jest-mock "^25.3.0" - jest-regex-util "^25.2.6" - jest-resolve "^25.3.0" - jest-snapshot "^25.3.0" - jest-util "^25.3.0" - jest-validate "^25.3.0" - realpath-native "^2.0.0" - slash "^3.0.0" - strip-bom "^4.0.0" - yargs "^15.3.1" + graceful-fs "^4.2.4" + jest-config "^25.5.4" + jest-docblock "^25.3.0" + jest-haste-map "^25.5.1" + jest-jasmine2 "^25.5.4" + jest-leak-detector "^25.5.0" + jest-message-util "^25.5.0" + jest-resolve "^25.5.1" + jest-runtime "^25.5.4" + jest-util "^25.5.0" + jest-worker "^25.5.0" + source-map-support "^0.5.6" + throat "^5.0.0" jest-runtime@^25.4.0: version "25.4.0" @@ -11400,30 +11500,49 @@ jest-runtime@^25.4.0: strip-bom "^4.0.0" yargs "^15.3.1" +jest-runtime@^25.5.4: + version "25.5.4" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-25.5.4.tgz#dc981fe2cb2137abcd319e74ccae7f7eeffbfaab" + integrity sha512-RWTt8LeWh3GvjYtASH2eezkc8AehVoWKK20udV6n3/gC87wlTbE1kIA+opCvNWyyPeBs6ptYsc6nyHUb1GlUVQ== + dependencies: + "@jest/console" "^25.5.0" + "@jest/environment" "^25.5.0" + "@jest/globals" "^25.5.2" + "@jest/source-map" "^25.5.0" + "@jest/test-result" "^25.5.0" + "@jest/transform" "^25.5.1" + "@jest/types" "^25.5.0" + "@types/yargs" "^15.0.0" + chalk "^3.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.3" + graceful-fs "^4.2.4" + jest-config "^25.5.4" + jest-haste-map "^25.5.1" + jest-message-util "^25.5.0" + jest-mock "^25.5.0" + jest-regex-util "^25.2.6" + jest-resolve "^25.5.1" + jest-snapshot "^25.5.1" + jest-util "^25.5.0" + jest-validate "^25.5.0" + realpath-native "^2.0.0" + slash "^3.0.0" + strip-bom "^4.0.0" + yargs "^15.3.1" + jest-serializer@^25.2.6: version "25.2.6" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-25.2.6.tgz#3bb4cc14fe0d8358489dbbefbb8a4e708ce039b7" integrity sha512-RMVCfZsezQS2Ww4kB5HJTMaMJ0asmC0BHlnobQC6yEtxiFKIxohFA4QSXSabKwSggaNkqxn6Z2VwdFCjhUWuiQ== -jest-snapshot@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-25.3.0.tgz#d4feb457494f4aaedcc83fbbf1ca21808fc3df71" - integrity sha512-GGpR6Oro2htJPKh5RX4PR1xwo5jCEjtvSPLW1IS7N85y+2bWKbiknHpJJRKSdGXghElb5hWaeQASJI4IiRayGg== +jest-serializer@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-25.5.0.tgz#a993f484e769b4ed54e70e0efdb74007f503072b" + integrity sha512-LxD8fY1lByomEPflwur9o4e2a5twSQ7TaVNLlFUuToIdoJuBt8tzHfCsZ42Ok6LkKXWzFWf3AGmheuLAA7LcCA== dependencies: - "@babel/types" "^7.0.0" - "@jest/types" "^25.3.0" - "@types/prettier" "^1.19.0" - chalk "^3.0.0" - expect "^25.3.0" - jest-diff "^25.3.0" - jest-get-type "^25.2.6" - jest-matcher-utils "^25.3.0" - jest-message-util "^25.3.0" - jest-resolve "^25.3.0" - make-dir "^3.0.0" - natural-compare "^1.4.0" - pretty-format "^25.3.0" - semver "^6.3.0" + graceful-fs "^4.2.4" jest-snapshot@^25.4.0: version "25.4.0" @@ -11445,15 +11564,26 @@ jest-snapshot@^25.4.0: pretty-format "^25.4.0" semver "^6.3.0" -jest-util@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-25.3.0.tgz#e3b0064165818f10d78514696fd25efba82cf049" - integrity sha512-dc625P/KS/CpWTJJJxKc4bA3A6c+PJGBAqS8JTJqx4HqPoKNqXg/Ec8biL2Z1TabwK7E7Ilf0/ukSEXM1VwzNA== +jest-snapshot@^25.5.1: + version "25.5.1" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-25.5.1.tgz#1a2a576491f9961eb8d00c2e5fd479bc28e5ff7f" + integrity sha512-C02JE1TUe64p2v1auUJ2ze5vcuv32tkv9PyhEb318e8XOKF7MOyXdJ7kdjbvrp3ChPLU2usI7Rjxs97Dj5P0uQ== dependencies: - "@jest/types" "^25.3.0" + "@babel/types" "^7.0.0" + "@jest/types" "^25.5.0" + "@types/prettier" "^1.19.0" chalk "^3.0.0" - is-ci "^2.0.0" + expect "^25.5.0" + graceful-fs "^4.2.4" + jest-diff "^25.5.0" + jest-get-type "^25.2.6" + jest-matcher-utils "^25.5.0" + jest-message-util "^25.5.0" + jest-resolve "^25.5.1" make-dir "^3.0.0" + natural-compare "^1.4.0" + pretty-format "^25.5.0" + semver "^6.3.0" jest-util@^25.4.0: version "25.4.0" @@ -11465,17 +11595,16 @@ jest-util@^25.4.0: is-ci "^2.0.0" make-dir "^3.0.0" -jest-validate@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-25.3.0.tgz#eb95fdee0039647bcd5d4be641b21e4a142a880c" - integrity sha512-3WuXgIZ4HXUvW6gk9twFFkT9j6zUorKnF2oEY8VEsHb7x5LGvVlN3WUsbqazVKuyXwvikO2zFJ/YTySMsMje2w== +jest-util@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-25.5.0.tgz#31c63b5d6e901274d264a4fec849230aa3fa35b0" + integrity sha512-KVlX+WWg1zUTB9ktvhsg2PXZVdkI1NBevOJSkTKYAyXyH4QSvh+Lay/e/v+bmaFfrkfx43xD8QTfgobzlEXdIA== dependencies: - "@jest/types" "^25.3.0" - camelcase "^5.3.1" + "@jest/types" "^25.5.0" chalk "^3.0.0" - jest-get-type "^25.2.6" - leven "^3.1.0" - pretty-format "^25.3.0" + graceful-fs "^4.2.4" + is-ci "^2.0.0" + make-dir "^3.0.0" jest-validate@^25.4.0: version "25.4.0" @@ -11489,17 +11618,17 @@ jest-validate@^25.4.0: leven "^3.1.0" pretty-format "^25.4.0" -jest-watcher@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-25.3.0.tgz#fd03fd5ca52f02bd3161ab177466bf1bfdd34e5c" - integrity sha512-dtFkfidFCS9Ucv8azOg2hkiY3sgJEHeTLtGFHS+jfBEE7eRtrO6+2r1BokyDkaG2FOD7485r/SgpC1MFAENfeA== +jest-validate@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-25.5.0.tgz#fb4c93f332c2e4cf70151a628e58a35e459a413a" + integrity sha512-okUFKqhZIpo3jDdtUXUZ2LxGUZJIlfdYBvZb1aczzxrlyMlqdnnws9MOxezoLGhSaFc2XYaHNReNQfj5zPIWyQ== dependencies: - "@jest/test-result" "^25.3.0" - "@jest/types" "^25.3.0" - ansi-escapes "^4.2.1" + "@jest/types" "^25.5.0" + camelcase "^5.3.1" chalk "^3.0.0" - jest-util "^25.3.0" - string-length "^3.1.0" + jest-get-type "^25.2.6" + leven "^3.1.0" + pretty-format "^25.5.0" jest-watcher@^25.4.0: version "25.4.0" @@ -11513,7 +11642,19 @@ jest-watcher@^25.4.0: jest-util "^25.4.0" string-length "^3.1.0" -jest-worker@^25.1.0, jest-worker@^25.2.6, jest-worker@^25.4.0: +jest-watcher@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-25.5.0.tgz#d6110d101df98badebe435003956fd4a465e8456" + integrity sha512-XrSfJnVASEl+5+bb51V0Q7WQx65dTSk7NL4yDdVjPnRNpM0hG+ncFmDYJo9O8jaSRcAitVbuVawyXCRoxGrT5Q== + dependencies: + "@jest/test-result" "^25.5.0" + "@jest/types" "^25.5.0" + ansi-escapes "^4.2.1" + chalk "^3.0.0" + jest-util "^25.5.0" + string-length "^3.1.0" + +jest-worker@^25.4.0: version "25.4.0" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.4.0.tgz#ee0e2ceee5a36ecddf5172d6d7e0ab00df157384" integrity sha512-ghAs/1FtfYpMmYQ0AHqxV62XPvKdUDIBBApMZfly+E9JEmYh2K45G0R5dWxx986RN12pRCxsViwQVtGl+N4whw== @@ -11521,14 +11662,22 @@ jest-worker@^25.1.0, jest-worker@^25.2.6, jest-worker@^25.4.0: merge-stream "^2.0.0" supports-color "^7.0.0" -jest@25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-25.3.0.tgz#7a5e59741d94b8662664c77a9f346246d6bf228b" - integrity sha512-iKd5ShQSHzFT5IL/6h5RZJhApgqXSoPxhp5HEi94v6OAw9QkF8T7X+liEU2eEHJ1eMFYTHmeWLrpBWulsDpaUg== +jest-worker@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.5.0.tgz#2611d071b79cea0f43ee57a3d118593ac1547db1" + integrity sha512-/dsSmUkIy5EBGfv/IjjqmFxrNAUpBERfGs1oHROyD7yxjG/w+t0GOJDX8O1k32ySmd7+a5IhnJU2qQFcJ4n1vw== dependencies: - "@jest/core" "^25.3.0" + merge-stream "^2.0.0" + supports-color "^7.0.0" + +jest@25.4.0: + version "25.4.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-25.4.0.tgz#fb96892c5c4e4a6b9bcb12068849cddf4c5f8cc7" + integrity sha512-XWipOheGB4wai5JfCYXd6vwsWNwM/dirjRoZgAa7H2wd8ODWbli2AiKjqG8AYhyx+8+5FBEdpO92VhGlBydzbw== + dependencies: + "@jest/core" "^25.4.0" import-local "^3.0.2" - jest-cli "^25.3.0" + jest-cli "^25.4.0" js-cookie@^2.2.1: version "2.2.1" @@ -12353,17 +12502,17 @@ linked-list@0.1.0: resolved "https://registry.yarnpkg.com/linked-list/-/linked-list-0.1.0.tgz#798b0ff97d1b92a4fd08480f55aea4e9d49d37bf" integrity sha1-eYsP+X0bkqT9CEgPVa6k6dSdN78= -lint-staged@10.1.3: - version "10.1.3" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.1.3.tgz#da27713d3ac519da305381b4de87d5f866b1d2f1" - integrity sha512-o2OkLxgVns5RwSC5QF7waeAjJA5nz5gnUfqL311LkZcFipKV7TztrSlhNUK5nQX9H0E5NELAdduMQ+M/JPT7RQ== +lint-staged@10.1.7: + version "10.1.7" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.1.7.tgz#b628f8b010083fe4e116d0af7949a32f1ea6b3a7" + integrity sha512-ZkK8t9Ep/AHuJQKV95izSa+DqotftGnSsNeEmCSqbQ6j4C4H0jDYhEZqVOGD1Q2Oe227igbqjMWycWyYbQtpoA== dependencies: - chalk "^3.0.0" - commander "^4.0.1" + chalk "^4.0.0" + commander "^5.0.0" cosmiconfig "^6.0.0" debug "^4.1.1" dedent "^0.7.0" - execa "^3.4.0" + execa "^4.0.0" listr "^0.14.3" log-symbols "^3.0.0" micromatch "^4.0.2" @@ -14387,7 +14536,7 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.2: +p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== @@ -14864,14 +15013,7 @@ pocket-js-core@0.0.3: dependencies: axios "^0.18.0" -polished@3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/polished/-/polished-3.5.1.tgz#657b6faf4c2308f3e0b1951196803a5e5d67b122" - integrity sha512-GVbvskpBiDV5TknurGL6OyFfLHsCknxbU8w5iMppT8rW0tLEoQHrIRfrPNPqGXNj3HGhkjRvhmg59Fy7HSnCAw== - dependencies: - "@babel/runtime" "^7.8.7" - -polished@^3.5.1: +polished@3.5.2, polished@^3.5.1: version "3.5.2" resolved "https://registry.yarnpkg.com/polished/-/polished-3.5.2.tgz#ca132b8cd68f7ffa95ae9d423f03e7a14fda1062" integrity sha512-vWoRDg3gY5RQBtUfcj9MRN10VCIf4EkdUikGxyXItg2Hnwk+eIVtdBiLajN0ldFeT3Vq4r/QNbjrQdhqBKrTug== @@ -15318,10 +15460,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.4.tgz#2d1bae173e355996ee355ec9830a7a1ee05457ef" - integrity sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w== +prettier@2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" + integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== pretty-error@^2.1.1: version "2.1.1" @@ -15351,6 +15493,16 @@ pretty-format@^25.4.0: ansi-styles "^4.0.0" react-is "^16.12.0" +pretty-format@^25.5.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" + private@^0.1.6, private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -15578,7 +15730,7 @@ q@^1.1.2: resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= -qr-image@^3.2.0: +qr-image@3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/qr-image/-/qr-image-3.2.0.tgz#9fa8295beae50c4a149cf9f909a1db464a8672e8" integrity sha1-n6gpW+rlDEoUnPn5CaHbRkqGcug= @@ -15588,7 +15740,7 @@ qr.js@0.0.0: resolved "https://registry.yarnpkg.com/qr.js/-/qr.js-0.0.0.tgz#cace86386f59a0db8050fa90d9b6b0e88a1e364f" integrity sha1-ys6GOG9ZoNuAUPqQ2baw6IoeNk8= -qrcode-terminal@^0.12.0: +qrcode-terminal@0.12.0, qrcode-terminal@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz#bb5b699ef7f9f0505092a3748be4464fe71b5819" integrity sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ== @@ -16613,6 +16765,13 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.12.0, resolve@^1.13 dependencies: path-parse "^1.0.6" +resolve@^1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + resolve@~1.15.1: version "1.15.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" @@ -16902,7 +17061,7 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -schema-utils@^2.6.4, schema-utils@^2.6.5: +schema-utils@^2.6.5, schema-utils@^2.6.6: version "2.6.6" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.6.tgz#299fe6bd4a3365dc23d99fd446caff8f1d6c330c" integrity sha512-wHutF/WPSbIi9x6ctjGGk2Hvl0VOz5l3EKEuKbjPlB30mKZUzb9A5k9yEXRX3pwyqVLPvpfZZEllaFq/M718hA== @@ -17088,6 +17247,11 @@ serialize-javascript@^2.1.2: resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== +serialize-javascript@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-3.0.0.tgz#492e489a2d77b7b804ad391a5f5d97870952548e" + integrity sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw== + serve-index@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" @@ -18017,13 +18181,13 @@ sturdy-websocket@^0.1.12: dependencies: lodash.defaults "^4.2.0" -style-loader@1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.1.4.tgz#1ad81283cefe51096756fd62697258edad933230" - integrity sha512-SbBHRD8fwK3pX+4UDF4ETxUF0+rCvk29LWTTI7Rt0cgsDjAj3SWM76ByTe6u2+4IlJ/WwluB7wuslWETCoPQdg== +style-loader@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.2.0.tgz#f78e4d49caf5018f7c03ae1886e1270124feeb0a" + integrity sha512-HC8WcGnjwNrKji7HSBqFOhGNUSt7UDU/jHxT6bA83Gk+JWJBmgitWlGihc0V1w6ZvwlzcX5LJOsofZzSP7b1tQ== dependencies: loader-utils "^2.0.0" - schema-utils "^2.6.5" + schema-utils "^2.6.6" styled-components@^5.0.1: version "5.1.0" @@ -18149,6 +18313,23 @@ swarm-js@0.1.39: tar "^4.0.2" xhr-request-promise "^0.1.2" +swarm-js@^0.1.40: + version "0.1.40" + resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.40.tgz#b1bc7b6dcc76061f6c772203e004c11997e06b99" + integrity sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA== + dependencies: + bluebird "^3.5.0" + buffer "^5.0.5" + eth-lib "^0.1.26" + fs-extra "^4.0.2" + got "^7.1.0" + mime-types "^2.1.16" + mkdirp-promise "^5.0.1" + mock-fs "^4.1.0" + setimmediate "^1.0.5" + tar "^4.0.2" + xhr-request "^1.0.1" + symbol-observable@^1.0.2, symbol-observable@^1.0.3, symbol-observable@^1.0.4, symbol-observable@^1.1.0, symbol-observable@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" @@ -18282,19 +18463,19 @@ terminal-link@^2.0.0: ansi-escapes "^4.2.1" supports-hyperlinks "^2.0.0" -terser-webpack-plugin@2.3.5: - version "2.3.5" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.3.5.tgz#5ad971acce5c517440ba873ea4f09687de2f4a81" - integrity sha512-WlWksUoq+E4+JlJ+h+U+QUzXpcsMSSNXkDy9lBVkSqDn1w23Gg29L/ary9GeJVYCGiNJJX7LnVc4bwL1N3/g1w== +terser-webpack-plugin@2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.3.6.tgz#a4014b311a61f87c6a1b217ef4f5a75bd0665a69" + integrity sha512-I8IDsQwZrqjdmOicNeE8L/MhwatAap3mUrtcAKJuilsemUNcX+Hier/eAzwStVqhlCxq0aG3ni9bK/0BESXkTg== dependencies: cacache "^13.0.1" - find-cache-dir "^3.2.0" - jest-worker "^25.1.0" - p-limit "^2.2.2" - schema-utils "^2.6.4" - serialize-javascript "^2.1.2" + find-cache-dir "^3.3.1" + jest-worker "^25.4.0" + p-limit "^2.3.0" + schema-utils "^2.6.6" + serialize-javascript "^3.0.0" source-map "^0.6.1" - terser "^4.4.3" + terser "^4.6.12" webpack-sources "^1.4.3" terser-webpack-plugin@^1.4.3: @@ -18312,7 +18493,7 @@ terser-webpack-plugin@^1.4.3: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@^4.1.2, terser@^4.4.3, terser@^4.6.3: +terser@^4.1.2, terser@^4.6.3: version "4.6.11" resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.11.tgz#12ff99fdd62a26de2a82f508515407eb6ccd8a9f" integrity sha512-76Ynm7OXUG5xhOpblhytE7X58oeNSmC8xnNhjWVo8CksHit0U0kO4hfNbPrrYwowLWFgM2n9L176VNx2QaHmtA== @@ -18321,6 +18502,15 @@ terser@^4.1.2, terser@^4.4.3, terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" +terser@^4.6.12: + version "4.6.13" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.13.tgz#e879a7364a5e0db52ba4891ecde007422c56a916" + integrity sha512-wMvqukYgVpQlymbnNbabVZbtM6PN63AzqexpwJL8tbh/mRT9LE5o+ruVduAGL7D6Fpjl+Q+06U5I9Ul82odAhw== + dependencies: + commander "^2.20.0" + source-map "~0.6.1" + source-map-support "~0.5.12" + test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -18891,10 +19081,10 @@ truffle-solidity-loader@0.1.32: truffle-config "^1.1.19" truffle-core "^5.0.33" -truffle@5.1.21: - version "5.1.21" - resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.1.21.tgz#f3a518f3e5bcb32d73734d21311d2b6bcab9f455" - integrity sha512-DRsG8bQZlZNydTr7LpoY87X77nQTU5ZMjkJmF66o3efyfC3dyXbMjws3ofn92iz+WsrpAw3u7/urnxF7fwtrkQ== +truffle@5.1.23: + version "5.1.23" + resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.1.23.tgz#6c48b5921ae937cfbf2a6f5d5e593bf177b8b86c" + integrity sha512-ovdkrAgF/6cGiVtoiGzSTUheEBowoFcBuPY3wOjdlICW8VsASuT+kYuWLG/bPAJSg9QFrFLwqgUcnA9MOwi6yg== dependencies: app-module-path "^2.2.0" mocha "5.2.0" @@ -19463,7 +19653,7 @@ v8-compile-cache@^2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== -v8-to-istanbul@^4.0.1, v8-to-istanbul@^4.1.3: +v8-to-istanbul@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-4.1.3.tgz#22fe35709a64955f49a08a7c7c959f6520ad6f20" integrity sha512-sAjOC+Kki6aJVbUOXJbcR0MnbfjvBzwKZazEJymA2IX49uoOdEdk+4fBq5cXgYgiyKtAyrrJNtBZdOeDIF+Fng== @@ -19593,7 +19783,7 @@ walker@^1.0.7, walker@~1.0.5: dependencies: makeerror "1.0.x" -watchpack@^1.6.0: +watchpack@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.1.tgz#280da0a8718592174010c078c7585a74cd8cd0e2" integrity sha512-+IF9hfUFOrYOOaKyfaI7h7dquUIOgyEMoQMLA7OP5FxegKA2+XdXThAZ9TU2kucfhDH7rfMHs1oPYziVGWRnZA== @@ -19635,6 +19825,16 @@ web3-bzz@1.2.6: swarm-js "0.1.39" underscore "1.9.1" +web3-bzz@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.7.tgz#aa0f3d162f0777a5f35367dc5b70012dd1e129d0" + integrity sha512-iTIWBR+Z+Bn09WprtKm46LmyNOasg2lUn++AjXkBTB8UNxlUybxtza84yl2ETTZUs0zuFzdSSAEgbjhygG+9oA== + dependencies: + "@types/node" "^10.12.18" + got "9.6.0" + swarm-js "^0.1.40" + underscore "1.9.1" + web3-core-helpers@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.1.tgz#f5f32d71c60a4a3bd14786118e633ce7ca6d5d0d" @@ -19653,6 +19853,15 @@ web3-core-helpers@1.2.6: web3-eth-iban "1.2.6" web3-utils "1.2.6" +web3-core-helpers@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.7.tgz#522f859775ea0d15e7e40359c46d4efc5da92aee" + integrity sha512-bdU++9QATGeCetVrMp8pV97aQtVkN5oLBf/TWu/qumC6jK/YqrvLlBJLdwbz0QveU8zOSap6GCvJbqKvmmbV2A== + dependencies: + underscore "1.9.1" + web3-eth-iban "1.2.7" + web3-utils "1.2.7" + web3-core-method@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.1.tgz#9df1bafa2cd8be9d9937e01c6a47fc768d15d90a" @@ -19675,6 +19884,17 @@ web3-core-method@1.2.6: web3-core-subscriptions "1.2.6" web3-utils "1.2.6" +web3-core-method@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.7.tgz#73fd80d2bf0765ff6efc454db49ac83d1769a45e" + integrity sha512-e1TI0QUnByDMbQ8QHwnjxfjKw0LIgVRY4TYrlPijET9ebqUJU1HCayn/BHIMpV6LKyR1fQj9EldWyT64wZQXkg== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.7" + web3-core-promievent "1.2.7" + web3-core-subscriptions "1.2.7" + web3-utils "1.2.7" + web3-core-promievent@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.1.tgz#003e8a3eb82fb27b6164a6d5b9cad04acf733838" @@ -19691,6 +19911,13 @@ web3-core-promievent@1.2.6: any-promise "1.3.0" eventemitter3 "3.1.2" +web3-core-promievent@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.7.tgz#fc7fa489f4cf76a040800f3dfd4b45c51bd3a39f" + integrity sha512-jNmsM/czCeMGQqKKwM9/HZVTJVIF96hdMVNN/V9TGvp+EEE7vDhB4pUocDnc/QF9Z/5QFBCVmvNWttlRgZmU0A== + dependencies: + eventemitter3 "3.1.2" + web3-core-requestmanager@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.1.tgz#fa2e2206c3d738db38db7c8fe9c107006f5c6e3d" @@ -19713,6 +19940,17 @@ web3-core-requestmanager@1.2.6: web3-providers-ipc "1.2.6" web3-providers-ws "1.2.6" +web3-core-requestmanager@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.7.tgz#9da0efce898ead7004d4ac50f748f5131cfe4d79" + integrity sha512-HJb/txjHixu1dxIebiZQKBoJCaNu4gsh7mq/uj6Z/w6tIHbybL90s/7ADyMED353yyJ2tDWtYJqeMVAR+KtdaA== + dependencies: + underscore "1.9.1" + web3-core-helpers "1.2.7" + web3-providers-http "1.2.7" + web3-providers-ipc "1.2.7" + web3-providers-ws "1.2.7" + web3-core-subscriptions@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.1.tgz#8c2368a839d4eec1c01a4b5650bbeb82d0e4a099" @@ -19731,6 +19969,15 @@ web3-core-subscriptions@1.2.6: underscore "1.9.1" web3-core-helpers "1.2.6" +web3-core-subscriptions@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.7.tgz#30c64aede03182832883b17c77e21cbb0933c86e" + integrity sha512-W/CzQYOUawdMDvkgA/fmLsnG5aMpbjrs78LZMbc0MFXLpH3ofqAgO2by4QZrrTShUUTeWS0ZuEkFFL/iFrSObw== + dependencies: + eventemitter3 "3.1.2" + underscore "1.9.1" + web3-core-helpers "1.2.7" + web3-core@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.1.tgz#7278b58fb6495065e73a77efbbce781a7fddf1a9" @@ -19753,6 +20000,19 @@ web3-core@1.2.6: web3-core-requestmanager "1.2.6" web3-utils "1.2.6" +web3-core@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.7.tgz#9248b04331e458c76263d758c51b0cc612953900" + integrity sha512-QA0MTae0gXcr3KHe3cQ4x56+Wh43ZKWfMwg1gfCc3NNxPRM1jJ8qudzyptCAUcxUGXWpDG8syLIn1APDz5J8BQ== + dependencies: + "@types/bn.js" "^4.11.4" + "@types/node" "^12.6.1" + bignumber.js "^9.0.0" + web3-core-helpers "1.2.7" + web3-core-method "1.2.7" + web3-core-requestmanager "1.2.7" + web3-utils "1.2.7" + web3-eth-abi@1.0.0-beta.52: version "1.0.0-beta.52" resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.52.tgz#88dc2d36e2f99dfe255f8f64b6f613bad82779d8" @@ -19781,6 +20041,15 @@ web3-eth-abi@1.2.6: underscore "1.9.1" web3-utils "1.2.6" +web3-eth-abi@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.7.tgz#6f3471b578649fddd844a14d397a3dd430fc44a5" + integrity sha512-4FnlT1q+D0XBkxSMXlIb/eG337uQeMaUdtVQ4PZ3XzxqpcoDuMgXm4o+3NRxnWmr4AMm6QKjM+hcC7c0mBKcyg== + dependencies: + ethers "4.0.0-beta.3" + underscore "1.9.1" + web3-utils "1.2.7" + web3-eth-accounts@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.1.tgz#2741a8ef337a7219d57959ac8bd118b9d68d63cf" @@ -19816,6 +20085,23 @@ web3-eth-accounts@1.2.6: web3-core-method "1.2.6" web3-utils "1.2.6" +web3-eth-accounts@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.7.tgz#087f55d04a01b815b93151aac2fc1677436b9c59" + integrity sha512-AE7QWi/iIQIjXwlAPtlMabm/OPFF0a1PhxT1EiTckpYNP8fYs6jW7lYxEtJPPJIKqfMjoi1xkEqTVR1YZQ88lg== + dependencies: + "@web3-js/scrypt-shim" "^0.1.0" + crypto-browserify "3.12.0" + eth-lib "^0.2.8" + ethereumjs-common "^1.3.2" + ethereumjs-tx "^2.1.1" + underscore "1.9.1" + uuid "3.3.2" + web3-core "1.2.7" + web3-core-helpers "1.2.7" + web3-core-method "1.2.7" + web3-utils "1.2.7" + web3-eth-contract@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.1.tgz#3542424f3d341386fd9ff65e78060b85ac0ea8c4" @@ -19845,6 +20131,21 @@ web3-eth-contract@1.2.6, web3-eth-contract@^1.2.6: web3-eth-abi "1.2.6" web3-utils "1.2.6" +web3-eth-contract@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.7.tgz#13d7f6003d6221f9a5fd61c2d3b5d039477c9674" + integrity sha512-uW23Y0iL7XroRNbf9fWZ1N6OYhEYTJX8gTuYASuRnpYrISN5QGiQML6pq/NCzqypR1bl5E0fuINZQSK/xefIVw== + dependencies: + "@types/bn.js" "^4.11.4" + underscore "1.9.1" + web3-core "1.2.7" + web3-core-helpers "1.2.7" + web3-core-method "1.2.7" + web3-core-promievent "1.2.7" + web3-core-subscriptions "1.2.7" + web3-eth-abi "1.2.7" + web3-utils "1.2.7" + web3-eth-ens@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.1.tgz#a0e52eee68c42a8b9865ceb04e5fb022c2d971d5" @@ -19873,6 +20174,20 @@ web3-eth-ens@1.2.6: web3-eth-contract "1.2.6" web3-utils "1.2.6" +web3-eth-ens@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.7.tgz#0bfa7d4b6c7753abbb31a2eb01a364b538f4c860" + integrity sha512-SPRnvUNWQ0CnnTDBteGIJkvFWEizJcAHlVsrFLICwcwFZu+appjX1UOaoGu2h3GXWtc/XZlu7B451Gi+Os2cTg== + dependencies: + eth-ens-namehash "2.0.8" + underscore "1.9.1" + web3-core "1.2.7" + web3-core-helpers "1.2.7" + web3-core-promievent "1.2.7" + web3-eth-abi "1.2.7" + web3-eth-contract "1.2.7" + web3-utils "1.2.7" + web3-eth-iban@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.1.tgz#2c3801718946bea24e9296993a975c80b5acf880" @@ -19889,6 +20204,14 @@ web3-eth-iban@1.2.6: bn.js "4.11.8" web3-utils "1.2.6" +web3-eth-iban@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.7.tgz#832809c28586be3c667a713b77a2bcba11b7970f" + integrity sha512-2NrClz1PoQ3nSJBd+91ylCOVga9qbTxjRofq/oSCoHVAEvz3WZyttx9k5DC+0rWqwJF1h69ufFvdHAAlmN/4lg== + dependencies: + bn.js "4.11.8" + web3-utils "1.2.7" + web3-eth-personal@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.1.tgz#244e9911b7b482dc17c02f23a061a627c6e47faf" @@ -19912,6 +20235,18 @@ web3-eth-personal@1.2.6: web3-net "1.2.6" web3-utils "1.2.6" +web3-eth-personal@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.7.tgz#322cc2b14c37737b21772a53e4185686a04bf9be" + integrity sha512-2OAa1Spz0uB29dwCM8+1y0So7E47A4gKznjBEwXIYEcUIsvwT5X7ofFhC2XxyRpqlIWZSQAxRSSJFyupRRXzyw== + dependencies: + "@types/node" "^12.6.1" + web3-core "1.2.7" + web3-core-helpers "1.2.7" + web3-core-method "1.2.7" + web3-net "1.2.7" + web3-utils "1.2.7" + web3-eth@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.1.tgz#b9989e2557c73a9e8ffdc107c6dafbe72c79c1b0" @@ -19950,6 +20285,25 @@ web3-eth@1.2.6: web3-net "1.2.6" web3-utils "1.2.6" +web3-eth@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.7.tgz#9427daefd3641200679c2946f77fc184dbfb5b4c" + integrity sha512-ljLd0oB4IjWkzFGVan4HkYhJXhSXgn9iaSaxdJixKGntZPgWMJfxeA+uLwTrlxrWzhvy4f+39WnT7wCh5e9TGg== + dependencies: + underscore "1.9.1" + web3-core "1.2.7" + web3-core-helpers "1.2.7" + web3-core-method "1.2.7" + web3-core-subscriptions "1.2.7" + web3-eth-abi "1.2.7" + web3-eth-accounts "1.2.7" + web3-eth-contract "1.2.7" + web3-eth-ens "1.2.7" + web3-eth-iban "1.2.7" + web3-eth-personal "1.2.7" + web3-net "1.2.7" + web3-utils "1.2.7" + web3-net@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.1.tgz#edd249503315dd5ab4fa00220f6509d95bb7ab10" @@ -19968,6 +20322,15 @@ web3-net@1.2.6: web3-core-method "1.2.6" web3-utils "1.2.6" +web3-net@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.7.tgz#c355621a8769c9c1a967c801e7db90c92a0e3808" + integrity sha512-j9qeZrS1FNyCeA0BfdLojkxOZQz3FKa1DJI+Dw9fEVhZS68vLOFANu2RB96gR9BoPHo5+k5D3NsKOoxt1gw3Gg== + dependencies: + web3-core "1.2.7" + web3-core-method "1.2.7" + web3-utils "1.2.7" + web3-provider-engine@14.2.0: version "14.2.0" resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-14.2.0.tgz#2efec157b2c429c5c674c079aea96b0a06de8b3d" @@ -19994,6 +20357,34 @@ web3-provider-engine@14.2.0: xhr "^2.2.0" xtend "^4.0.1" +web3-provider-engine@15.0.4: + version "15.0.4" + resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-15.0.4.tgz#5c336bcad2274dff5218bc8db003fa4e9e464c24" + integrity sha512-Ob9oK0TUZfVC7NXkB7CQSWAiCdCD/Xnlh2zTnV8NdJR8LCrMAy2i6JedU70JHaxw59y7mM4GnsYOTTGkquFnNQ== + dependencies: + async "^2.5.0" + backoff "^2.5.0" + clone "^2.0.0" + cross-fetch "^2.1.0" + eth-block-tracker "^4.4.2" + eth-json-rpc-errors "^1.0.1" + eth-json-rpc-filters "^4.1.1" + eth-json-rpc-infura "^4.0.1" + eth-json-rpc-middleware "^4.1.5" + eth-sig-util "^1.4.2" + ethereumjs-block "^1.2.2" + ethereumjs-tx "^1.2.0" + ethereumjs-util "^5.1.5" + ethereumjs-vm "^2.3.4" + json-stable-stringify "^1.0.1" + promise-to-callback "^1.0.0" + readable-stream "^2.2.9" + request "^2.85.0" + semaphore "^1.0.3" + ws "^5.1.1" + xhr "^2.2.0" + xtend "^4.0.1" + web3-provider-engine@^15.0.4: version "15.0.7" resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-15.0.7.tgz#2439cdb145140660eb1007e7c6acd2d2d867b432" @@ -20063,6 +20454,14 @@ web3-providers-http@1.2.6: web3-core-helpers "1.2.6" xhr2-cookies "1.1.0" +web3-providers-http@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.7.tgz#31eb15390c103169b3d7d31bdb1ccae9e3f1629d" + integrity sha512-vazGx5onuH/zogrwkUaLFJwFcJ6CckP65VFSHoiV+GTQdkOqgoDIha7StKkslvDz4XJ2FuY/zOZHbtuOYeltXQ== + dependencies: + web3-core-helpers "1.2.7" + xhr2-cookies "1.1.0" + web3-providers-ipc@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.1.tgz#017bfc687a8fc5398df2241eb98f135e3edd672c" @@ -20081,6 +20480,15 @@ web3-providers-ipc@1.2.6: underscore "1.9.1" web3-core-helpers "1.2.6" +web3-providers-ipc@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.7.tgz#4e6716e8723d431df3d6bfa1acd2f7c04e7071ad" + integrity sha512-/zc0y724H2zbkV4UbGGMhsEiLfafjagIzfrsWZnyTZUlSB0OGRmmFm2EkLJAgtXrLiodaHHyXKM0vB8S24bxdA== + dependencies: + oboe "2.1.4" + underscore "1.9.1" + web3-core-helpers "1.2.7" + web3-providers-ws@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.1.tgz#2d941eaf3d5a8caa3214eff8dc16d96252b842cb" @@ -20099,6 +20507,16 @@ web3-providers-ws@1.2.6: underscore "1.9.1" web3-core-helpers "1.2.6" +web3-providers-ws@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.7.tgz#95b1cc5dc25e9b9d6630d6754f9354313b62f532" + integrity sha512-b5XzqDpRkNVe6MFs5K6iqOEyjQikHtg3KuU2/ClCDV37hm0WN4xCRVMC0LwegulbDXZej3zT9+1CYzGaGFREzA== + dependencies: + "@web3-js/websocket" "^1.0.29" + eventemitter3 "^4.0.0" + underscore "1.9.1" + web3-core-helpers "1.2.7" + web3-shh@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.1.tgz#4460e3c1e07faf73ddec24ccd00da46f89152b0c" @@ -20119,6 +20537,16 @@ web3-shh@1.2.6: web3-core-subscriptions "1.2.6" web3-net "1.2.6" +web3-shh@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.7.tgz#5382c7bc2f39539eb2841c4576d23ade25720461" + integrity sha512-f6PAgcpG0ZAo98KqCmeHoDEx5qzm3d5plet18DkT4U6WIeYowKdec8vZaLPRR7c2XreXFJ2gQf45CB7oqR7U/w== + dependencies: + web3-core "1.2.7" + web3-core-method "1.2.7" + web3-core-subscriptions "1.2.7" + web3-net "1.2.7" + web3-utils@1.0.0-beta.52: version "1.0.0-beta.52" resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.0.0-beta.52.tgz#27f9beeac3e1ea981eba9824d79e2971f156eebc" @@ -20162,6 +20590,20 @@ web3-utils@1.2.6, web3-utils@^1.2.1, web3-utils@^1.2.6: underscore "1.9.1" utf8 "3.0.0" +web3-utils@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.7.tgz#b68e232917e4376f81cf38ef79878e5903d18e93" + integrity sha512-FBh/CPJND+eiPeUF9KVbTyTZtXNWxPWtByBaWS6e2x4ACazPX711EeNaZaChIOGSLGe6se2n7kg6wnawe/MjuQ== + dependencies: + bn.js "4.11.8" + eth-lib "0.2.7" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + underscore "1.9.1" + utf8 "3.0.0" + web3@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.1.tgz#5d8158bcca47838ab8c2b784a2dee4c3ceb4179b" @@ -20175,19 +20617,18 @@ web3@1.2.1: web3-shh "1.2.1" web3-utils "1.2.1" -web3@1.2.6, web3@^1.0.0-beta.34: - version "1.2.6" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.6.tgz#c497dcb14cdd8d6d9fb6b445b3b68ff83f8ccf68" - integrity sha512-tpu9fLIComgxGrFsD8LUtA4s4aCZk7px8UfcdEy6kS2uDi/ZfR07KJqpXZMij7Jvlq+cQrTAhsPSiBVvoMaivA== +web3@1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.7.tgz#fcb83571036c1c6f475bc984785982a444e8d78e" + integrity sha512-jAAJHMfUlTps+jH2li1ckDFEpPrEEriU/ubegSTGRl3KRdNhEqT93+3kd7FHJTn3NgjcyURo2+f7Da1YcZL8Mw== dependencies: - "@types/node" "^12.6.1" - web3-bzz "1.2.6" - web3-core "1.2.6" - web3-eth "1.2.6" - web3-eth-personal "1.2.6" - web3-net "1.2.6" - web3-shh "1.2.6" - web3-utils "1.2.6" + web3-bzz "1.2.7" + web3-core "1.2.7" + web3-eth "1.2.7" + web3-eth-personal "1.2.7" + web3-net "1.2.7" + web3-shh "1.2.7" + web3-utils "1.2.7" web3@^0.18.4: version "0.18.4" @@ -20211,6 +20652,20 @@ web3@^0.20.7: xhr2-cookies "^1.1.0" xmlhttprequest "*" +web3@^1.0.0-beta.34: + version "1.2.6" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.6.tgz#c497dcb14cdd8d6d9fb6b445b3b68ff83f8ccf68" + integrity sha512-tpu9fLIComgxGrFsD8LUtA4s4aCZk7px8UfcdEy6kS2uDi/ZfR07KJqpXZMij7Jvlq+cQrTAhsPSiBVvoMaivA== + dependencies: + "@types/node" "^12.6.1" + web3-bzz "1.2.6" + web3-core "1.2.6" + web3-eth "1.2.6" + web3-eth-personal "1.2.6" + web3-net "1.2.6" + web3-shh "1.2.6" + web3-utils "1.2.6" + webidl-conversions@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-2.0.1.tgz#3bf8258f7d318c7443c36f2e169402a1a6703506" @@ -20333,16 +20788,16 @@ webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1, webpack- source-list-map "^2.0.0" source-map "~0.6.1" -webpack@4.42.1: - version "4.42.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.42.1.tgz#ae707baf091f5ca3ef9c38b884287cfe8f1983ef" - integrity sha512-SGfYMigqEfdGchGhFFJ9KyRpQKnipvEvjc1TwrXEPCM6H5Wywu10ka8o3KGrMzSMxMQKt8aCHUFh5DaQ9UmyRg== +webpack@4.43.0: + version "4.43.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.43.0.tgz#c48547b11d563224c561dad1172c8aa0b8a678e6" + integrity sha512-GW1LjnPipFW2Y78OOab8NJlCflB7EFskMih2AHdvjbpKMeDJqEgSx24cXXXiPS65+WSwVyxtDsJH6jGX2czy+g== dependencies: "@webassemblyjs/ast" "1.9.0" "@webassemblyjs/helper-module-context" "1.9.0" "@webassemblyjs/wasm-edit" "1.9.0" "@webassemblyjs/wasm-parser" "1.9.0" - acorn "^6.2.1" + acorn "^6.4.1" ajv "^6.10.2" ajv-keywords "^3.4.1" chrome-trace-event "^1.0.2" @@ -20359,7 +20814,7 @@ webpack@4.42.1: schema-utils "^1.0.0" tapable "^1.1.3" terser-webpack-plugin "^1.4.3" - watchpack "^1.6.0" + watchpack "^1.6.1" webpack-sources "^1.4.1" webrtc-adapter@^7.2.1: @@ -20614,7 +21069,7 @@ xhr-request-promise@^0.1.2: dependencies: xhr-request "^1.1.0" -xhr-request@^1.1.0: +xhr-request@^1.0.1, xhr-request@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz#f4a7c1868b9f198723444d82dcae317643f2e2ed" integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== From 363e9f38887a3d96f17d783fe15631cdb4361415 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Mon, 11 May 2020 23:02:07 -0300 Subject: [PATCH 20/65] fix: evaluate storedTransactionIndex as number --- src/routes/safe/store/reducer/transactions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/safe/store/reducer/transactions.js b/src/routes/safe/store/reducer/transactions.js index 60529e6c..901385db 100644 --- a/src/routes/safe/store/reducer/transactions.js +++ b/src/routes/safe/store/reducer/transactions.js @@ -24,7 +24,7 @@ export default handleActions( const storedTransactionIndex = transactionList.findIndex((tx) => tx.safeTxHash === transaction.safeTxHash) - if (!storedTransactionIndex < 0) { + if (storedTransactionIndex === -1) { return state } From be4caa1bafabac77652148990d5873b81b7a98b1 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Mon, 11 May 2020 23:04:04 -0300 Subject: [PATCH 21/65] refactor: remove duplicated and unused functions --- .../Transactions/TxsTable/index.jsx | 2 +- src/routes/safe/container/selector.js | 62 ------------------- .../transactions/fetchTransactions/index.js | 1 + 3 files changed, 2 insertions(+), 63 deletions(-) diff --git a/src/routes/safe/components/Transactions/TxsTable/index.jsx b/src/routes/safe/components/Transactions/TxsTable/index.jsx index f1358261..c8f3345f 100644 --- a/src/routes/safe/components/Transactions/TxsTable/index.jsx +++ b/src/routes/safe/components/Transactions/TxsTable/index.jsx @@ -27,8 +27,8 @@ import Table from '~/components/Table' import { type Column, cellWidth } from '~/components/Table/TableHead' import Block from '~/components/layout/Block' import Row from '~/components/layout/Row' -import { extendedTransactionsSelector } from '~/routes/safe/container/selector' import { safeCancellationTransactionsSelector } from '~/routes/safe/store/selectors' +import { extendedTransactionsSelector } from '~/routes/safe/store/selectors/transactions' export const TRANSACTION_ROW_TEST_ID = 'transaction-row' diff --git a/src/routes/safe/container/selector.js b/src/routes/safe/container/selector.js index 801070c0..4c221993 100644 --- a/src/routes/safe/container/selector.js +++ b/src/routes/safe/container/selector.js @@ -7,45 +7,15 @@ import { tokensSelector } from '~/logic/tokens/store/selectors' import { getEthAsToken } from '~/logic/tokens/utils/tokenHelpers' import { isUserOwner } from '~/logic/wallets/ethAddresses' import { userAccountSelector } from '~/logic/wallets/store/selectors' -import type { IncomingTransaction } from '~/routes/safe/store/models/incomingTransaction' import { type Safe } from '~/routes/safe/store/models/safe' -import { type Transaction, type TransactionStatus } from '~/routes/safe/store/models/transaction' import { type RouterProps, safeActiveTokensSelector, safeBalancesSelector, - safeCancellationTransactionsSelector, - safeIncomingTransactionsSelector, safeSelector, - safeTransactionsSelector, } from '~/routes/safe/store/selectors' import { type GlobalState } from '~/store' -const getTxStatus = (tx: Transaction, userAddress: string, safe: Safe): TransactionStatus => { - let txStatus - if (tx.executionTxHash) { - txStatus = 'success' - } else if (tx.cancelled) { - txStatus = 'cancelled' - } else if (tx.confirmations.size === safe.threshold) { - txStatus = 'awaiting_execution' - } else if (tx.creationTx) { - txStatus = 'success' - } else if (!tx.confirmations.size) { - txStatus = 'pending' - } else { - const userConfirmed = tx.confirmations.filter((conf) => conf.owner === userAddress).size === 1 - const userIsSafeOwner = safe.owners.filter((owner) => owner.address === userAddress).size === 1 - txStatus = !userConfirmed && userIsSafeOwner ? 'awaiting_your_confirmation' : 'awaiting_confirmations' - } - - if (tx.isSuccessful === false) { - txStatus = 'failed' - } - - return txStatus -} - export const grantedSelector: Selector = createSelector( userAccountSelector, safeSelector, @@ -87,35 +57,3 @@ export const extendedSafeTokensSelector: Selector, -> = createSelector( - safeSelector, - userAccountSelector, - safeTransactionsSelector, - safeCancellationTransactionsSelector, - safeIncomingTransactionsSelector, - (safe, userAddress, transactions, cancellationTransactions, incomingTransactions) => { - const cancellationTransactionsByNonce = cancellationTransactions.reduce((acc, tx) => acc.set(tx.nonce, tx), Map()) - const extendedTransactions = transactions.map((tx: Transaction) => { - let extendedTx = tx - - if (!tx.isExecuted) { - if ( - (cancellationTransactionsByNonce.get(tx.nonce) && - cancellationTransactionsByNonce.get(tx.nonce).get('isExecuted')) || - transactions.find((safeTx) => tx.nonce === safeTx.nonce && safeTx.isExecuted) - ) { - extendedTx = tx.set('cancelled', true) - } - } - - return extendedTx.set('status', getTxStatus(extendedTx, userAddress, safe)) - }) - - return List([...extendedTransactions, ...incomingTransactions]) - }, -) diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/index.js b/src/routes/safe/store/actions/transactions/fetchTransactions/index.js index 943623d8..d0e82b6b 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions/index.js +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/index.js @@ -12,6 +12,7 @@ import { type SafeTransactionsType, loadOutgoingTransactions } from './loadOutgo import { addCancellationTransactions } from '~/routes/safe/store/actions/transactions/addCancellationTransactions' import { type IncomingTransaction } from '~/routes/safe/store/models/incomingTransaction' import { type GlobalState } from '~/store' + export default (safeAddress: string) => async (dispatch: ReduxDispatch, getState: GetState) => { const transactions: SafeTransactionsType | typeof undefined = await loadOutgoingTransactions(safeAddress, getState) if (transactions) { From 141e05c2e8eb46a748b5230ca80014e82b9b84db Mon Sep 17 00:00:00 2001 From: fernandomg Date: Tue, 12 May 2020 00:40:49 -0300 Subject: [PATCH 22/65] feature: WIP - add mocked tx to the list --- .../addCancellationTransaction.js | 6 + .../actions/transactions/addTransaction.js | 6 + .../actions/transactions/createTransaction.js | 123 ++++++++++++++---- .../loadOutgoingTransactions.js | 3 +- .../updateCancellationTransaction.js | 6 + .../store/reducer/cancellationTransactions.js | 27 ++++ src/routes/safe/store/reducer/transactions.js | 6 + 7 files changed, 149 insertions(+), 28 deletions(-) create mode 100644 src/routes/safe/store/actions/transactions/addCancellationTransaction.js create mode 100644 src/routes/safe/store/actions/transactions/addTransaction.js create mode 100644 src/routes/safe/store/actions/transactions/updateCancellationTransaction.js diff --git a/src/routes/safe/store/actions/transactions/addCancellationTransaction.js b/src/routes/safe/store/actions/transactions/addCancellationTransaction.js new file mode 100644 index 00000000..715a4059 --- /dev/null +++ b/src/routes/safe/store/actions/transactions/addCancellationTransaction.js @@ -0,0 +1,6 @@ +// @flow +import { createAction } from 'redux-actions' + +export const ADD_CANCELLATION_TRANSACTION = 'ADD_CANCELLATION_TRANSACTION' + +export const addCancellationTransaction = createAction(ADD_CANCELLATION_TRANSACTION) diff --git a/src/routes/safe/store/actions/transactions/addTransaction.js b/src/routes/safe/store/actions/transactions/addTransaction.js new file mode 100644 index 00000000..290c25cf --- /dev/null +++ b/src/routes/safe/store/actions/transactions/addTransaction.js @@ -0,0 +1,6 @@ +// @flow +import { createAction } from 'redux-actions' + +export const ADD_TRANSACTION = 'ADD_TRANSACTION' + +export const addTransaction = createAction(ADD_TRANSACTION) diff --git a/src/routes/safe/store/actions/transactions/createTransaction.js b/src/routes/safe/store/actions/transactions/createTransaction.js index cfbb9926..da017b5c 100644 --- a/src/routes/safe/store/actions/transactions/createTransaction.js +++ b/src/routes/safe/store/actions/transactions/createTransaction.js @@ -1,8 +1,9 @@ // @flow import { push } from 'connected-react-router' +import type { RecordInstance } from 'immutable' import { List } from 'immutable' import type { GetState, Dispatch as ReduxDispatch } from 'redux' -import semverSatisfies from 'semver/functions/satisfies' +// import semverSatisfies from 'semver/functions/satisfies' import { makeConfirmation } from '../../models/confirmation' @@ -20,13 +21,22 @@ import { saveTxToHistory, } from '~/logic/safe/transactions' import { estimateSafeTxGas } from '~/logic/safe/transactions/gasNew' -import { SAFE_VERSION_FOR_OFFCHAIN_SIGNATURES, tryOffchainSigning } from '~/logic/safe/transactions/offchainSigner' -import { getCurrentSafeVersion } from '~/logic/safe/utils/safeVersion' -import { ZERO_ADDRESS } from '~/logic/wallets/ethAddresses' +// import { SAFE_VERSION_FOR_OFFCHAIN_SIGNATURES, tryOffchainSigning } from '~/logic/safe/transactions/offchainSigner' +// import { getCurrentSafeVersion } from '~/logic/safe/utils/safeVersion' +import { TOKEN_REDUCER_ID } from '~/logic/tokens/store/reducer/tokens' +import { ZERO_ADDRESS, sameAddress } from '~/logic/wallets/ethAddresses' import { EMPTY_DATA } from '~/logic/wallets/ethTransactions' import { providerSelector } from '~/logic/wallets/store/selectors' import { SAFELIST_ADDRESS } from '~/routes/routes' +import { addCancellationTransaction } from '~/routes/safe/store/actions/transactions/addCancellationTransaction' +import { addTransaction } from '~/routes/safe/store/actions/transactions/addTransaction' +import type { TxServiceModel } from '~/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions' +import { buildTransactionFrom } from '~/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions' +import { updateCancellationTransaction } from '~/routes/safe/store/actions/transactions/updateCancellationTransaction' import { getLastTx, getNewTxNonce, shouldExecuteTransaction } from '~/routes/safe/store/actions/utils' +import type { TransactionProps } from '~/routes/safe/store/models/transaction' +import { CANCELLATION_TRANSACTIONS_REDUCER_ID } from '~/routes/safe/store/reducer/cancellationTransactions' +import { TRANSACTIONS_REDUCER_ID } from '~/routes/safe/store/reducer/transactions' import { type GlobalState } from '~/store' import { getErrorMessage } from '~/test/utils/ethereumErrors' @@ -44,6 +54,49 @@ export type CreateTransactionArgs = { origin?: string | null, } +async function mockMyTransaction(safeAddress: string, state, tx: {}) { + const submissionDate = new Date().toISOString() + const knownTokens = state[TOKEN_REDUCER_ID] + const cancellationTx = sameAddress(tx.to, safeAddress) && Number(tx.value) === 0 && !tx.data + const existentTx: TransactionProps = + state[cancellationTx ? CANCELLATION_TRANSACTIONS_REDUCER_ID : TRANSACTIONS_REDUCER_ID] + .get(safeAddress) + .find(({ nonce }) => nonce === tx.nonce) || null + + const transactionStructure: TxServiceModel = { + ...tx, + value: tx.valueInWei, + blockNumber: null, + confirmations: [], // this is used to determine if a tx is pending or not. See `getTxStatus` selector + confirmationsRequired: null, + dataDecoded: {}, + ethGasPrice: null, + executionDate: null, + executor: null, + fee: null, + gasUsed: null, + isExecuted: false, + isSuccessful: null, + origin: null, + safeTxHash: null, + signatures: null, + transactionHash: null, + ...existentTx, + modified: submissionDate, + submissionDate, + safe: safeAddress, + } + + const mockedTransaction: RecordInstance = await buildTransactionFrom( + safeAddress, + transactionStructure, + knownTokens, + null, + ) + + return { cancellationTx, existentTx, mockedTransaction } +} + const createTransaction = ({ safeAddress, to, @@ -66,12 +119,12 @@ const createTransaction = ({ const ready = await onboardUser() if (!ready) return - const { account: from, hardwareWallet, smartContractWallet } = providerSelector(state) + const { account: from /*, hardwareWallet, smartContractWallet*/ } = providerSelector(state) const safeInstance = await getGnosisSafeInstanceAt(safeAddress) const lastTx = await getLastTx(safeAddress) const nonce = await getNewTxNonce(txNonce, lastTx, safeInstance) const isExecution = await shouldExecuteTransaction(safeInstance, nonce, lastTx) - const safeVersion = await getCurrentSafeVersion(safeInstance) + // const safeVersion = await getCurrentSafeVersion(safeInstance) const safeTxGas = await estimateSafeTxGas(safeInstance, safeAddress, txData, to, valueInWei, operation) // https://docs.gnosis.io/safe/docs/docs5/#pre-validated-signatures @@ -105,25 +158,26 @@ const createTransaction = ({ try { // Here we're checking that safe contract version is greater or equal 1.1.1, but // theoretically EIP712 should also work for 1.0.0 contracts - const canTryOffchainSigning = - !isExecution && !smartContractWallet && semverSatisfies(safeVersion, SAFE_VERSION_FOR_OFFCHAIN_SIGNATURES) - if (false) { - const signature = await tryOffchainSigning({ ...txArgs, safeAddress }, hardwareWallet) - - if (signature) { - closeSnackbar(beforeExecutionKey) - - await saveTxToHistory({ - ...txArgs, - signature, - origin, - }) - showSnackbar(notificationsQueue.afterExecution.moreConfirmationsNeeded, enqueueSnackbar, closeSnackbar) - - dispatch(fetchTransactions(safeAddress)) - return - } - } + // TODO: revert this + // const canTryOffchainSigning = + // !isExecution && !smartContractWallet && semverSatisfies(safeVersion, SAFE_VERSION_FOR_OFFCHAIN_SIGNATURES) + // if (canTryOffchainSigning) { + // const signature = await tryOffchainSigning({ ...txArgs, safeAddress }, hardwareWallet) + // + // if (signature) { + // closeSnackbar(beforeExecutionKey) + // + // await saveTxToHistory({ + // ...txArgs, + // signature, + // origin, + // }) + // showSnackbar(notificationsQueue.afterExecution.moreConfirmationsNeeded, enqueueSnackbar, closeSnackbar) + // + // dispatch(fetchTransactions(safeAddress)) + // return + // } + // } tx = isExecution ? await getExecutionTransaction(txArgs) : await getApprovalTransaction(txArgs) @@ -143,11 +197,26 @@ const createTransaction = ({ pendingExecutionKey = showSnackbar(notificationsQueue.pendingExecution, enqueueSnackbar, closeSnackbar) try { - await saveTxToHistory({ + // TODO: let's mock the tx + const { cancellationTx, existentTx, mockedTransaction } = await mockMyTransaction(safeAddress, state, { ...txArgs, txHash, - origin, }) + if (cancellationTx) { + if (existentTx) { + dispatch(updateCancellationTransaction({ safeAddress, transaction: mockedTransaction })) + } else { + dispatch(addCancellationTransaction({ safeAddress, transaction: mockedTransaction })) + } + } else { + if (existentTx) { + dispatch(updateTransaction({ safeAddress, transaction: mockedTransaction })) + } else { + dispatch(addTransaction({ safeAddress, transaction: mockedTransaction })) + } + } + + await saveTxToHistory({ ...txArgs, txHash, origin }) await dispatch(fetchTransactions(safeAddress)) } catch (err) { console.error(err) diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js index 487badf9..1b9a097a 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.js @@ -10,6 +10,7 @@ import { decodeParamsFromSafeMethod } from '~/logic/contracts/methodIds' import { buildTxServiceUrl } from '~/logic/safe/transactions/txHistory' import { getTokenInfos } from '~/logic/tokens/store/actions/fetchTokens' import { TOKEN_REDUCER_ID } from '~/logic/tokens/store/reducer/tokens' +import { ALTERNATIVE_TOKEN_ABI } from '~/logic/tokens/utils/alternativeAbi' import { SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH, isMultisendTransaction, @@ -179,7 +180,7 @@ export const buildTransactionFrom = async ( }) } -const batchTxTokenRequest = (txs: any[]) => { +export const batchTxTokenRequest = (txs: any[]) => { const batch = new web3ReadOnly.BatchRequest() const whenTxsValues = txs.map((tx) => { diff --git a/src/routes/safe/store/actions/transactions/updateCancellationTransaction.js b/src/routes/safe/store/actions/transactions/updateCancellationTransaction.js new file mode 100644 index 00000000..9a96c77b --- /dev/null +++ b/src/routes/safe/store/actions/transactions/updateCancellationTransaction.js @@ -0,0 +1,6 @@ +// @flow +import { createAction } from 'redux-actions' + +export const UPDATE_CANCELLATION_TRANSACTION = 'UPDATE_CANCELLATION_TRANSACTION' + +export const updateCancellationTransaction = createAction(UPDATE_CANCELLATION_TRANSACTION) diff --git a/src/routes/safe/store/reducer/cancellationTransactions.js b/src/routes/safe/store/reducer/cancellationTransactions.js index f7be7aae..8140751b 100644 --- a/src/routes/safe/store/reducer/cancellationTransactions.js +++ b/src/routes/safe/store/reducer/cancellationTransactions.js @@ -2,7 +2,9 @@ import { List, Map } from 'immutable' import { type ActionType, handleActions } from 'redux-actions' +import { ADD_CANCELLATION_TRANSACTION } from '~/routes/safe/store/actions/transactions/addCancellationTransaction' import { ADD_CANCELLATION_TRANSACTIONS } from '~/routes/safe/store/actions/transactions/addCancellationTransactions' +import { UPDATE_CANCELLATION_TRANSACTION } from '~/routes/safe/store/actions/transactions/updateCancellationTransaction' import { type Transaction } from '~/routes/safe/store/models/transaction' export const CANCELLATION_TRANSACTIONS_REDUCER_ID = 'cancellationTransactions' @@ -11,7 +13,32 @@ export type CancelState = Map> export default handleActions( { + [ADD_CANCELLATION_TRANSACTION]: (state: CancelState, action: ActionType): CancelState => { + const { safeAddress, transaction } = action.payload + const transactionList = state.get(safeAddress) + return state.set(safeAddress, transactionList.push(transaction)) + }, [ADD_CANCELLATION_TRANSACTIONS]: (state: CancelState, action: ActionType): CancelState => action.payload, + [UPDATE_CANCELLATION_TRANSACTION]: (state: CancelState, action: ActionType): CancelState => { + const { safeAddress, transaction } = action.payload + + const transactionList = state.get(safeAddress) + + if (!transaction) { + return state + } + + const storedTransactionIndex = transactionList.findIndex((tx) => tx.safeTxHash === transaction.safeTxHash) + + if (storedTransactionIndex === -1) { + return state + } + + return state.set( + safeAddress, + transactionList.update(storedTransactionIndex, (tx) => tx.merge(transaction)), + ) + }, }, Map(), ) diff --git a/src/routes/safe/store/reducer/transactions.js b/src/routes/safe/store/reducer/transactions.js index 901385db..9aa82f1b 100644 --- a/src/routes/safe/store/reducer/transactions.js +++ b/src/routes/safe/store/reducer/transactions.js @@ -2,6 +2,7 @@ import { List, Map } from 'immutable' import { type ActionType, handleActions } from 'redux-actions' +import { ADD_TRANSACTION } from '~/routes/safe/store/actions/transactions/addTransaction' import { ADD_TRANSACTIONS } from '~/routes/safe/store/actions/transactions/addTransactions' import { UPDATE_TRANSACTION } from '~/routes/safe/store/actions/transactions/updateTransaction' import { type Transaction } from '~/routes/safe/store/models/transaction' @@ -12,6 +13,11 @@ export type State = Map> export default handleActions( { + [ADD_TRANSACTION]: (state: State, action: ActionType): State => { + const { safeAddress, transaction } = action.payload + const transactionList = state.get(safeAddress) + return state.set(safeAddress, transactionList.push(transaction)) + }, [ADD_TRANSACTIONS]: (state: State, action: ActionType): State => action.payload, [UPDATE_TRANSACTION]: (state: State, action: ActionType): State => { const { safeAddress, transaction } = action.payload From 7c141ca1ad1a0f967d439d64f23613be1fc6d3a8 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 12 May 2020 16:50:26 +0400 Subject: [PATCH 23/65] Fix currency fetch 400 error --- src/logic/currencyValues/api/fetchCurrenciesRates.js | 4 ++-- .../currencyValues/store/actions/fetchCurrencyRate.js | 2 +- .../currencyValues/store/actions/fetchCurrencyValues.js | 9 +++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/logic/currencyValues/api/fetchCurrenciesRates.js b/src/logic/currencyValues/api/fetchCurrenciesRates.js index e81f1d66..ffd7624d 100644 --- a/src/logic/currencyValues/api/fetchCurrenciesRates.js +++ b/src/logic/currencyValues/api/fetchCurrenciesRates.js @@ -5,8 +5,8 @@ import { getExchangeRatesUrl } from '~/config' import { AVAILABLE_CURRENCIES } from '~/logic/currencyValues/store/model/currencyValues' const fetchCurrenciesRates = async ( - baseCurrency: AVAILABLE_CURRENCIES, - targetCurrencyValue: AVAILABLE_CURRENCIES, + baseCurrency: $Keys, + targetCurrencyValue: $Keys, ): Promise => { let rate = 0 const url = `${getExchangeRatesUrl()}?base=${baseCurrency}&symbols=${targetCurrencyValue}` diff --git a/src/logic/currencyValues/store/actions/fetchCurrencyRate.js b/src/logic/currencyValues/store/actions/fetchCurrencyRate.js index 13785f16..f26090ef 100644 --- a/src/logic/currencyValues/store/actions/fetchCurrencyRate.js +++ b/src/logic/currencyValues/store/actions/fetchCurrencyRate.js @@ -1,5 +1,5 @@ // @flow -import { Dispatch as ReduxDispatch } from 'redux' +import { type Dispatch as ReduxDispatch } from 'redux' import fetchCurrenciesRates from '~/logic/currencyValues/api/fetchCurrenciesRates' import { setCurrencyRate } from '~/logic/currencyValues/store/actions/setCurrencyRate' diff --git a/src/logic/currencyValues/store/actions/fetchCurrencyValues.js b/src/logic/currencyValues/store/actions/fetchCurrencyValues.js index 8eaa60c6..b278ba13 100644 --- a/src/logic/currencyValues/store/actions/fetchCurrencyValues.js +++ b/src/logic/currencyValues/store/actions/fetchCurrencyValues.js @@ -3,13 +3,11 @@ import { List } from 'immutable' import { batch } from 'react-redux' import type { Dispatch as ReduxDispatch } from 'redux' -import fetchCurrencyRate from '~/logic/currencyValues/store/actions/fetchCurrencyRate' import { setCurrencyBalances } from '~/logic/currencyValues/store/actions/setCurrencyBalances' import { setCurrencyRate } from '~/logic/currencyValues/store/actions/setCurrencyRate' import { setSelectedCurrency } from '~/logic/currencyValues/store/actions/setSelectedCurrency' import { AVAILABLE_CURRENCIES } from '~/logic/currencyValues/store/model/currencyValues' import { loadCurrencyValues } from '~/logic/currencyValues/store/utils/currencyValuesStorage' -import fetchSafeTokens from '~/logic/tokens/store/actions/fetchSafeTokens' import type { GlobalState } from '~/store' export const fetchCurrencyValues = (safeAddress: string) => async (dispatch: ReduxDispatch) => { @@ -27,12 +25,15 @@ export const fetchCurrencyValues = (safeAddress: string) => async (dispatch: Red Object.entries(storedCurrencies).forEach((kv) => { const safeAddr = kv[0] const value = kv[1] + + if (!Object.keys(value).length) { + return + } + const { currencyRate, selectedCurrency } = value batch(() => { dispatch(setSelectedCurrency(safeAddr, selectedCurrency)) dispatch(setCurrencyRate(safeAddr, currencyRate)) - dispatch(fetchCurrencyRate(safeAddr, selectedCurrency)) - dispatch(fetchSafeTokens(safeAddress)) }) }) } catch (err) { From b4a470a77078b622ca76f8169fcd6ad9c9d30462 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Fri, 22 May 2020 16:48:57 -0300 Subject: [PATCH 24/65] chore: fix build after development merge --- .../container/hooks/useCheckForUpdates.tsx | 2 +- .../actions/addCancellationTransactions.ts | 5 - .../safe/store/actions/addTransactions.ts | 5 - .../safe/store/actions/fetchTransactions.ts | 348 ------------------ src/test/builder/safe.dom.utils.tsx | 24 +- 5 files changed, 13 insertions(+), 371 deletions(-) delete mode 100644 src/routes/safe/store/actions/addCancellationTransactions.ts delete mode 100644 src/routes/safe/store/actions/addTransactions.ts delete mode 100644 src/routes/safe/store/actions/fetchTransactions.ts diff --git a/src/routes/safe/container/hooks/useCheckForUpdates.tsx b/src/routes/safe/container/hooks/useCheckForUpdates.tsx index 407ff510..62a0da70 100644 --- a/src/routes/safe/container/hooks/useCheckForUpdates.tsx +++ b/src/routes/safe/container/hooks/useCheckForUpdates.tsx @@ -5,7 +5,7 @@ import fetchCollectibles from 'src/logic/collectibles/store/actions/fetchCollect import fetchSafeTokens from 'src/logic/tokens/store/actions/fetchSafeTokens' import fetchEtherBalance from 'src/routes/safe/store/actions/fetchEtherBalance' import { checkAndUpdateSafe } from 'src/routes/safe/store/actions/fetchSafe' -import fetchTransactions from 'src/routes/safe/store/actions/fetchTransactions' +import fetchTransactions from 'src/routes/safe/store/actions/transactions/fetchTransactions' import { safeParamAddressFromStateSelector } from 'src/routes/safe/store/selectors' import { TIMEOUT } from 'src/utils/constants' diff --git a/src/routes/safe/store/actions/addCancellationTransactions.ts b/src/routes/safe/store/actions/addCancellationTransactions.ts deleted file mode 100644 index 6d91ef5d..00000000 --- a/src/routes/safe/store/actions/addCancellationTransactions.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { createAction } from 'redux-actions' - -export const ADD_CANCELLATION_TRANSACTIONS = 'ADD_CANCELLATION_TRANSACTIONS' - -export const addCancellationTransactions = createAction(ADD_CANCELLATION_TRANSACTIONS) diff --git a/src/routes/safe/store/actions/addTransactions.ts b/src/routes/safe/store/actions/addTransactions.ts deleted file mode 100644 index 5dc28279..00000000 --- a/src/routes/safe/store/actions/addTransactions.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { createAction } from 'redux-actions' - -export const ADD_TRANSACTIONS = 'ADD_TRANSACTIONS' - -export const addTransactions = createAction(ADD_TRANSACTIONS) diff --git a/src/routes/safe/store/actions/fetchTransactions.ts b/src/routes/safe/store/actions/fetchTransactions.ts deleted file mode 100644 index f7fb37de..00000000 --- a/src/routes/safe/store/actions/fetchTransactions.ts +++ /dev/null @@ -1,348 +0,0 @@ -import ERC20Detailed from '@openzeppelin/contracts/build/contracts/ERC20Detailed.json' -import axios from 'axios' -import bn from 'bignumber.js' -import { List, Map } from 'immutable' -import { batch } from 'react-redux' - -import { addIncomingTransactions } from './addIncomingTransactions' -import { addTransactions } from './addTransactions' - -import generateBatchRequests from 'src/logic/contracts/generateBatchRequests' -import { decodeParamsFromSafeMethod } from 'src/logic/contracts/methodIds' -import { buildIncomingTxServiceUrl } from 'src/logic/safe/transactions/incomingTxHistory' -import { buildTxServiceUrl } from 'src/logic/safe/transactions/txHistory' -import { TOKEN_REDUCER_ID } from 'src/logic/tokens/store/reducer/tokens' -import { ALTERNATIVE_TOKEN_ABI } from 'src/logic/tokens/utils/alternativeAbi' -import { - SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH, - isMultisendTransaction, - isTokenTransfer, - isUpgradeTransaction, -} from 'src/logic/tokens/utils/tokenHelpers' -import { ZERO_ADDRESS, sameAddress } from 'src/logic/wallets/ethAddresses' -import { EMPTY_DATA } from 'src/logic/wallets/ethTransactions' -import { getWeb3 } from 'src/logic/wallets/getWeb3' -import { addCancellationTransactions } from 'src/routes/safe/store/actions/addCancellationTransactions' -import { makeConfirmation } from 'src/routes/safe/store/models/confirmation' -import { makeIncomingTransaction } from 'src/routes/safe/store/models/incomingTransaction' -import { makeTransaction } from 'src/routes/safe/store/models/transaction' - -let web3 - -export const buildTransactionFrom = async ( - safeAddress, - knownTokens, - tx, - txTokenCode, - txTokenDecimals, - txTokenName, - txTokenSymbol, -) => { - const confirmations = List( - tx.confirmations.map((conf) => - makeConfirmation({ - owner: conf.owner, - type: conf.confirmationType.toLowerCase(), - hash: conf.transactionHash, - signature: conf.signature, - }), - ), - ) - const modifySettingsTx = sameAddress(tx.to, safeAddress) && Number(tx.value) === 0 && !!tx.data - const cancellationTx = sameAddress(tx.to, safeAddress) && Number(tx.value) === 0 && !tx.data - const isERC721Token = - (txTokenCode && txTokenCode.includes(SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH)) || - (isTokenTransfer(tx.data, Number(tx.value)) && !knownTokens.get(tx.to) && txTokenDecimals !== null) - let isSendTokenTx = !isERC721Token && isTokenTransfer(tx.data, Number(tx.value)) - const isMultiSendTx = isMultisendTransaction(tx.data, Number(tx.value)) - const isUpgradeTx = isMultiSendTx && isUpgradeTransaction(tx.data) - let customTx = !sameAddress(tx.to, safeAddress) && !!tx.data && !isSendTokenTx && !isUpgradeTx && !isERC721Token - - let refundParams = null - if (tx.gasPrice > 0) { - const refundSymbol = txTokenSymbol || 'ETH' - const decimals = txTokenDecimals || 18 - const feeString = (tx.gasPrice * (tx.baseGas + tx.safeTxGas)).toString().padStart(decimals, '0') - const whole = feeString.slice(0, feeString.length - decimals) || '0' - const fraction = feeString.slice(feeString.length - decimals) - - const formattedFee = `${whole}.${fraction}` - refundParams = { - fee: formattedFee, - symbol: refundSymbol, - } - } - - let symbol = txTokenSymbol || 'ETH' - let decimals = txTokenDecimals || 18 - let decodedParams - if (isSendTokenTx) { - if (txTokenSymbol === null || txTokenDecimals === null) { - try { - const [tokenSymbol, tokenDecimals] = await Promise.all( - generateBatchRequests({ - abi: ALTERNATIVE_TOKEN_ABI, - address: tx.to, - methods: ['symbol', 'decimals'], - }), - ) - - symbol = tokenSymbol - decimals = tokenDecimals - } catch (e) { - // some contracts may implement the same methods as in ERC20 standard - // we may falsely treat them as tokens, so in case we get any errors when getting token info - // we fallback to displaying custom transaction - isSendTokenTx = false - customTx = true - } - } - - const params = web3.eth.abi.decodeParameters(['address', 'uint256'], tx.data.slice(10)) - decodedParams = { - recipient: params[0], - value: params[1], - } - } else if (modifySettingsTx && tx.data) { - decodedParams = decodeParamsFromSafeMethod(tx.data) - } else if (customTx && tx.data) { - decodedParams = decodeParamsFromSafeMethod(tx.data) - } - - return makeTransaction({ - symbol, - nonce: tx.nonce, - blockNumber: tx.blockNumber, - value: tx.value.toString(), - confirmations, - decimals, - recipient: tx.to, - data: tx.data ? tx.data : EMPTY_DATA, - operation: tx.operation, - safeTxGas: tx.safeTxGas, - baseGas: tx.baseGas, - gasPrice: tx.gasPrice, - gasToken: tx.gasToken || ZERO_ADDRESS, - refundReceiver: tx.refundReceiver || ZERO_ADDRESS, - refundParams, - isExecuted: tx.isExecuted, - isSuccessful: tx.isSuccessful, - submissionDate: tx.submissionDate, - executor: tx.executor, - executionDate: tx.executionDate, - executionTxHash: tx.transactionHash, - safeTxHash: tx.safeTxHash, - isTokenTransfer: isSendTokenTx, - multiSendTx: isMultiSendTx, - upgradeTx: isUpgradeTx, - decodedParams, - modifySettingsTx, - customTx, - cancellationTx, - creationTx: tx.creationTx, - origin: tx.origin, - }) -} - -const addMockSafeCreationTx = (safeAddress) => [ - { - blockNumber: null, - baseGas: 0, - confirmations: [], - data: null, - executionDate: null, - gasPrice: 0, - gasToken: '0x0000000000000000000000000000000000000000', - isExecuted: true, - nonce: null, - operation: 0, - refundReceiver: '0x0000000000000000000000000000000000000000', - safe: safeAddress, - safeTxGas: 0, - safeTxHash: '', - signatures: null, - submissionDate: null, - executor: '', - to: '', - transactionHash: null, - value: 0, - creationTx: true, - }, -] - -const batchRequestTxsData = (txs) => { - const web3Batch = new web3.BatchRequest() - - const txsTokenInfo = txs.map((tx) => { - const methods = [{ method: 'getCode', type: 'eth', args: [tx.to] }, 'decimals', 'name', 'symbol'] - return generateBatchRequests({ - abi: ERC20Detailed.abi, - address: tx.to, - batch: web3Batch, - context: tx, - methods, - }) - }) - - web3Batch.execute() - - return Promise.all(txsTokenInfo) -} - -const batchRequestIncomingTxsData = (txs) => { - const web3Batch = new web3.BatchRequest() - - const whenTxsValues = txs.map((tx) => { - const methods = ['symbol', 'decimals', { method: 'getTransaction', args: [tx.transactionHash], type: 'eth' }] - - return generateBatchRequests({ - abi: ALTERNATIVE_TOKEN_ABI, - address: tx.tokenAddress, - batch: web3Batch, - context: tx, - methods, - }) - }) - - web3Batch.execute() - - return Promise.all(whenTxsValues).then((txsValues) => - txsValues.map(([tx, symbol, decimals, { gas, gasPrice }]) => [ - tx, - symbol === null ? 'ETH' : symbol, - decimals === null ? '18' : decimals, - new bn(gas).div(gasPrice).toFixed(), - ]), - ) -} - -export const buildIncomingTransactionFrom = ([tx, symbol, decimals, fee]) => { - // this is a particular treatment for the DCD token, as it seems to lack of symbol and decimal methods - if (tx.tokenAddress && tx.tokenAddress.toLowerCase() === '0xe0b7927c4af23765cb51314a0e0521a9645f0e2a') { - symbol = 'DCD' - decimals = '9' - } - - const { transactionHash, ...incomingTx } = tx - - return makeIncomingTransaction({ - ...incomingTx, - symbol, - decimals, - fee, - executionTxHash: transactionHash, - safeTxHash: transactionHash, - }) -} - -let etagSafeTransactions = null -let etagCachedSafeIncommingTransactions = null -export const loadSafeTransactions = async (safeAddress, getState) => { - let transactions = addMockSafeCreationTx(safeAddress) - - try { - const config = etagSafeTransactions - ? { - headers: { - 'If-None-Match': etagSafeTransactions, - }, - } - : undefined - - const url = buildTxServiceUrl(safeAddress) - const response = await axios.get(url, config) - if (response.data.count > 0) { - if (etagSafeTransactions === response.headers.etag) { - // The txs are the same, we can return the cached ones - return - } - transactions = transactions.concat(response.data.results) - etagSafeTransactions = response.headers.etag - } - } catch (err) { - if (err && err.response && err.response.status === 304) { - // NOTE: this is the expected implementation, currently the backend is not returning 304. - // So I check if the returned etag is the same instead (see above) - return - } else { - console.error(`Requests for outgoing transactions for ${safeAddress} failed with 404`, err) - } - } - - const state = getState() - const knownTokens = state[TOKEN_REDUCER_ID] - const txsWithData = await batchRequestTxsData(transactions) - // In case that the etags don't match, we parse the new transactions and save them to the cache - const txsRecord = await Promise.all( - txsWithData.map(([tx, code, decimals, name, symbol]) => { - const knownToken = knownTokens.get(tx.to) - - if (knownToken) { - ;({ decimals, name, symbol } = knownToken) - } - - return buildTransactionFrom(safeAddress, knownTokens, tx, code, decimals, name, symbol) - }), - ) - - const groupedTxs = List(txsRecord).groupBy((tx) => (tx.get('cancellationTx') ? 'cancel' : 'outgoing')) - - return { - outgoing: Map().set(safeAddress, groupedTxs.get('outgoing')), - cancel: Map().set(safeAddress, groupedTxs.get('cancel')), - } -} - -export const loadSafeIncomingTransactions = async (safeAddress) => { - let incomingTransactions = [] - try { - const config = etagCachedSafeIncommingTransactions - ? { - headers: { - 'If-None-Match': etagCachedSafeIncommingTransactions, - }, - } - : undefined - const url = buildIncomingTxServiceUrl(safeAddress) - const response = await axios.get(url, config) - if (response.data.count > 0) { - incomingTransactions = response.data.results - if (etagCachedSafeIncommingTransactions === response.headers.etag) { - // The txs are the same, we can return the cached ones - return - } - etagCachedSafeIncommingTransactions = response.headers.etag - } - } catch (err) { - if (err && err.response && err.response.status === 304) { - // We return cached transactions - return - } else { - console.error(`Requests for incoming transactions for ${safeAddress} failed with 404`, err) - } - } - - const incomingTxsWithData = await batchRequestIncomingTxsData(incomingTransactions) - const incomingTxsRecord = incomingTxsWithData.map(buildIncomingTransactionFrom) - return Map().set(safeAddress, List(incomingTxsRecord)) -} - -export default (safeAddress) => async (dispatch, getState) => { - web3 = await getWeb3() - - const transactions = await loadSafeTransactions(safeAddress, getState) - if (transactions) { - const { cancel, outgoing } = transactions - - batch(() => { - dispatch(addCancellationTransactions(cancel)) - dispatch(addTransactions(outgoing)) - }) - } - - const incomingTransactions = await loadSafeIncomingTransactions(safeAddress) - - if (incomingTransactions) { - dispatch(addIncomingTransactions(incomingTransactions)) - } -} diff --git a/src/test/builder/safe.dom.utils.tsx b/src/test/builder/safe.dom.utils.tsx index 276f69db..f90b72f5 100644 --- a/src/test/builder/safe.dom.utils.tsx +++ b/src/test/builder/safe.dom.utils.tsx @@ -5,7 +5,7 @@ import { render } from '@testing-library/react' import { ConnectedRouter } from 'connected-react-router' import PageFrame from 'src/components/layout/PageFrame' import ListItemText from 'src/components/List/ListItemText/index' -import fetchTransactions from 'src/routes/safe/store/actions/fetchTransactions' +// import fetchTransactions from 'src/routes/safe/store/actions/transactions/fetchTransactions' import { sleep } from 'src/utils/timer' import { history, } from 'src/store' import AppRoutes from 'src/routes' @@ -13,13 +13,13 @@ import { SAFELIST_ADDRESS } from 'src/routes/routes' import { EMPTY_DATA } from 'src/logic/wallets/ethTransactions' import { wrapInSuspense } from 'src/utils/wrapInSuspense' -export const EXPAND_BALANCE_INDEX = 0 -export const EXPAND_OWNERS_INDEX = 1 -export const ADD_OWNERS_INDEX = 2 -export const EDIT_THRESHOLD_INDEX = 3 -export const EDIT_INDEX = 4 -export const WITHDRAW_INDEX = 5 -export const LIST_TXS_INDEX = 6 +// export const EXPAND_BALANCE_INDEX = 0 +// export const EXPAND_OWNERS_INDEX = 1 +// export const ADD_OWNERS_INDEX = 2 +// export const EDIT_THRESHOLD_INDEX = 3 +// export const EDIT_INDEX = 4 +// export const WITHDRAW_INDEX = 5 +// export const LIST_TXS_INDEX = 6 export const checkMinedTx = (Transaction, name) => { const paragraphs = TestUtils.scryRenderedDOMComponentsWithTag(Transaction, 'p') @@ -78,10 +78,10 @@ export const checkPendingTx = async ( } } -export const refreshTransactions = async (store, safeAddress) => { - await store.dispatch(fetchTransactions(safeAddress)) - await sleep(1500) -} +// export const refreshTransactions = async (store, safeAddress) => { +// await store.dispatch(fetchTransactions(safeAddress)) +// await sleep(1500) +// } const renderApp = (store) => ({ ...render( From d0dbd8a28c174be2ceca003ef27ac133b7cd0dbe Mon Sep 17 00:00:00 2001 From: fernandomg Date: Fri, 22 May 2020 16:49:08 -0300 Subject: [PATCH 25/65] fix: prevent identicon error when no address is provided --- src/components/Identicon/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Identicon/index.tsx b/src/components/Identicon/index.tsx index 8fb283df..c0c499b7 100644 --- a/src/components/Identicon/index.tsx +++ b/src/components/Identicon/index.tsx @@ -1,4 +1,6 @@ import * as React from 'react' +import { ZERO_ADDRESS } from 'src/logic/wallets/ethAddresses' + import { toDataUrl } from './blockies' export default class Identicon extends React.PureComponent { @@ -45,7 +47,7 @@ export default class Identicon extends React.PureComponent { generateBlockieIdenticon = (address, diameter) => { const image = new window.Image() - image.src = toDataUrl(address) + image.src = toDataUrl(address || ZERO_ADDRESS) image.height = diameter image.width = diameter image.style.borderRadius = `${diameter / 2}px` From 89261d0ed3be70825b23a40518365cdb7f3785ad Mon Sep 17 00:00:00 2001 From: fernandomg Date: Fri, 22 May 2020 16:49:48 -0300 Subject: [PATCH 26/65] refactor: (cancellation)transactions reducers and actions --- .../addCancellationTransaction.ts | 5 - .../addOrUpdateCancellationTransactions.ts | 5 + .../transactions/addOrUpdateTransactions.ts | 5 + .../actions/transactions/addTransaction.ts | 5 - .../actions/transactions/createTransaction.ts | 252 ------------------ .../removeCancellationTransaction.ts | 5 + .../actions/transactions/removeTransaction.ts | 5 + .../updateCancellationTransaction.ts | 5 - .../actions/transactions/updateTransaction.ts | 7 - .../store/reducer/cancellationTransactions.ts | 48 +++- src/routes/safe/store/reducer/transactions.ts | 61 ++++- 11 files changed, 125 insertions(+), 278 deletions(-) delete mode 100644 src/routes/safe/store/actions/transactions/addCancellationTransaction.ts create mode 100644 src/routes/safe/store/actions/transactions/addOrUpdateCancellationTransactions.ts create mode 100644 src/routes/safe/store/actions/transactions/addOrUpdateTransactions.ts delete mode 100644 src/routes/safe/store/actions/transactions/addTransaction.ts delete mode 100644 src/routes/safe/store/actions/transactions/createTransaction.ts create mode 100644 src/routes/safe/store/actions/transactions/removeCancellationTransaction.ts create mode 100644 src/routes/safe/store/actions/transactions/removeTransaction.ts delete mode 100644 src/routes/safe/store/actions/transactions/updateCancellationTransaction.ts delete mode 100644 src/routes/safe/store/actions/transactions/updateTransaction.ts diff --git a/src/routes/safe/store/actions/transactions/addCancellationTransaction.ts b/src/routes/safe/store/actions/transactions/addCancellationTransaction.ts deleted file mode 100644 index 51cb321c..00000000 --- a/src/routes/safe/store/actions/transactions/addCancellationTransaction.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { createAction } from 'redux-actions' - -export const ADD_CANCELLATION_TRANSACTION = 'ADD_CANCELLATION_TRANSACTION' - -export const addCancellationTransaction = createAction(ADD_CANCELLATION_TRANSACTION) diff --git a/src/routes/safe/store/actions/transactions/addOrUpdateCancellationTransactions.ts b/src/routes/safe/store/actions/transactions/addOrUpdateCancellationTransactions.ts new file mode 100644 index 00000000..cf156eed --- /dev/null +++ b/src/routes/safe/store/actions/transactions/addOrUpdateCancellationTransactions.ts @@ -0,0 +1,5 @@ +import { createAction } from 'redux-actions' + +export const ADD_OR_UPDATE_CANCELLATION_TRANSACTIONS = 'ADD_OR_UPDATE_CANCELLATION_TRANSACTIONS' + +export const addOrUpdateCancellationTransactions = createAction(ADD_OR_UPDATE_CANCELLATION_TRANSACTIONS) diff --git a/src/routes/safe/store/actions/transactions/addOrUpdateTransactions.ts b/src/routes/safe/store/actions/transactions/addOrUpdateTransactions.ts new file mode 100644 index 00000000..8d6cb275 --- /dev/null +++ b/src/routes/safe/store/actions/transactions/addOrUpdateTransactions.ts @@ -0,0 +1,5 @@ +import { createAction } from 'redux-actions' + +export const ADD_OR_UPDATE_TRANSACTIONS = 'ADD_OR_UPDATE_TRANSACTIONS' + +export const addOrUpdateTransactions = createAction(ADD_OR_UPDATE_TRANSACTIONS) diff --git a/src/routes/safe/store/actions/transactions/addTransaction.ts b/src/routes/safe/store/actions/transactions/addTransaction.ts deleted file mode 100644 index 2d42ed23..00000000 --- a/src/routes/safe/store/actions/transactions/addTransaction.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { createAction } from 'redux-actions' - -export const ADD_TRANSACTION = 'ADD_TRANSACTION' - -export const addTransaction = createAction(ADD_TRANSACTION) diff --git a/src/routes/safe/store/actions/transactions/createTransaction.ts b/src/routes/safe/store/actions/transactions/createTransaction.ts deleted file mode 100644 index d040c0d0..00000000 --- a/src/routes/safe/store/actions/transactions/createTransaction.ts +++ /dev/null @@ -1,252 +0,0 @@ -import { push } from 'connected-react-router' -import { List } from 'immutable' -// import semverSatisfies from 'semver/functions/satisfies' - -import { makeConfirmation } from '../../models/confirmation' - -import fetchTransactions from './fetchTransactions' -import updateTransaction from './updateTransaction' - -import { onboardUser } from 'src/components/ConnectButton' -import { getGnosisSafeInstanceAt } from 'src/logic/contracts/safeContracts' -import { getNotificationsFromTxType, showSnackbar } from 'src/logic/notifications' -import { CALL, getApprovalTransaction, getExecutionTransaction, saveTxToHistory } from 'src/logic/safe/transactions' -import { estimateSafeTxGas } from 'src/logic/safe/transactions/gasNew' -// import { SAFE_VERSION_FOR_OFFCHAIN_SIGNATURES, tryOffchainSigning } from 'src/logic/safe/transactions/offchainSigner' -// import { getCurrentSafeVersion } from 'src/logic/safe/utils/safeVersion' -import { TOKEN_REDUCER_ID } from 'src/logic/tokens/store/reducer/tokens' -import { ZERO_ADDRESS, sameAddress } from 'src/logic/wallets/ethAddresses' -import { EMPTY_DATA } from 'src/logic/wallets/ethTransactions' -import { providerSelector } from 'src/logic/wallets/store/selectors' -import { SAFELIST_ADDRESS } from 'src/routes/routes' -import { addCancellationTransaction } from 'src/routes/safe/store/actions/transactions/addCancellationTransaction' -import { addTransaction } from 'src/routes/safe/store/actions/transactions/addTransaction' -import { buildTransactionFrom } from 'src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions' -import { updateCancellationTransaction } from 'src/routes/safe/store/actions/transactions/updateCancellationTransaction' -import { getLastTx, getNewTxNonce, shouldExecuteTransaction } from 'src/routes/safe/store/actions/utils' -import { CANCELLATION_TRANSACTIONS_REDUCER_ID } from 'src/routes/safe/store/reducer/cancellationTransactions' -import { TRANSACTIONS_REDUCER_ID } from 'src/routes/safe/store/reducer/transactions' -import { getErrorMessage } from 'src/test/utils/ethereumErrors' - -async function mockMyTransaction(safeAddress: string, state, tx: any) { - const submissionDate = new Date().toISOString() - const knownTokens = state[TOKEN_REDUCER_ID] - const cancellationTx = sameAddress(tx.to, safeAddress) && Number(tx.value) === 0 && !tx.data - const existentTx = - state[cancellationTx ? CANCELLATION_TRANSACTIONS_REDUCER_ID : TRANSACTIONS_REDUCER_ID] - .get(safeAddress) - .find(({ nonce }) => nonce === tx.nonce) || null - - const transactionStructure = { - ...tx, - value: tx.valueInWei, - blockNumber: null, - confirmations: [], // this is used to determine if a tx is pending or not. See `getTxStatus` selector - confirmationsRequired: null, - dataDecoded: {}, - ethGasPrice: null, - executionDate: null, - executor: null, - fee: null, - gasUsed: null, - isExecuted: false, - isSuccessful: null, - origin: null, - safeTxHash: null, - signatures: null, - transactionHash: null, - ...existentTx, - modified: submissionDate, - submissionDate, - safe: safeAddress, - } - - const mockedTransaction = await buildTransactionFrom(safeAddress, transactionStructure, knownTokens, null) - - return { cancellationTx, existentTx, mockedTransaction } -} - -const createTransaction = ({ - safeAddress, - to, - valueInWei, - txData = EMPTY_DATA, - notifiedTransaction, - enqueueSnackbar, - closeSnackbar, - txNonce, - operation = CALL, - navigateToTransactionsTab = true, - origin = null, -}) => async (dispatch, getState) => { - const state = getState() - - if (navigateToTransactionsTab) { - dispatch(push(`${SAFELIST_ADDRESS}/${safeAddress}/transactions`)) - } - - const ready = await onboardUser() - if (!ready) return - - const { account: from /*, hardwareWallet, smartContractWallet*/ } = providerSelector(state) - const safeInstance = await getGnosisSafeInstanceAt(safeAddress) - const lastTx = await getLastTx(safeAddress) - const nonce = await getNewTxNonce(txNonce, lastTx, safeInstance) - const isExecution = await shouldExecuteTransaction(safeInstance, nonce, lastTx) - // const safeVersion = await getCurrentSafeVersion(safeInstance) - const safeTxGas = await estimateSafeTxGas(safeInstance, safeAddress, txData, to, valueInWei, operation) - - // https://docs.gnosis.io/safe/docs/docs5/#pre-validated-signatures - const sigs = `0x000000000000000000000000${from.replace( - '0x', - '', - )}000000000000000000000000000000000000000000000000000000000000000001` - - const notificationsQueue = getNotificationsFromTxType(notifiedTransaction, origin) - const beforeExecutionKey = showSnackbar(notificationsQueue.beforeExecution, enqueueSnackbar, closeSnackbar) - let pendingExecutionKey - - let txHash - let tx - const txArgs = { - safeInstance, - to, - valueInWei, - data: txData, - operation, - nonce, - safeTxGas, - baseGas: 0, - gasPrice: 0, - gasToken: ZERO_ADDRESS, - refundReceiver: ZERO_ADDRESS, - sender: from, - sigs, - } - - try { - // Here we're checking that safe contract version is greater or equal 1.1.1, but - // theoretically EIP712 should also work for 1.0.0 contracts - // TODO: revert this - // const canTryOffchainSigning = - // !isExecution && !smartContractWallet && semverSatisfies(safeVersion, SAFE_VERSION_FOR_OFFCHAIN_SIGNATURES) - // if (canTryOffchainSigning) { - // const signature = await tryOffchainSigning({ ...txArgs, safeAddress }, hardwareWallet) - // - // if (signature) { - // closeSnackbar(beforeExecutionKey) - // - // await saveTxToHistory({ - // ...txArgs, - // signature, - // origin, - // }) - // showSnackbar(notificationsQueue.afterExecution.moreConfirmationsNeeded, enqueueSnackbar, closeSnackbar) - // - // dispatch(fetchTransactions(safeAddress)) - // return - // } - // } - - tx = isExecution ? await getExecutionTransaction(txArgs) : await getApprovalTransaction(txArgs) - - const sendParams: any = { from, value: 0 } - - // if not set owner management tests will fail on ganache - if (process.env.NODE_ENV === 'test') { - sendParams.gas = '7000000' - } - - await tx - .send(sendParams) - .once('transactionHash', async (hash) => { - txHash = hash - closeSnackbar(beforeExecutionKey) - - pendingExecutionKey = showSnackbar(notificationsQueue.pendingExecution, enqueueSnackbar, closeSnackbar) - - try { - // TODO: let's mock the tx - const { cancellationTx, existentTx, mockedTransaction } = await mockMyTransaction(safeAddress, state, { - ...txArgs, - txHash, - }) - if (cancellationTx) { - if (existentTx) { - dispatch(updateCancellationTransaction({ safeAddress, transaction: mockedTransaction })) - } else { - dispatch(addCancellationTransaction({ safeAddress, transaction: mockedTransaction })) - } - } else { - if (existentTx) { - dispatch(updateTransaction({ safeAddress, transaction: mockedTransaction })) - } else { - dispatch(addTransaction({ safeAddress, transaction: mockedTransaction })) - } - } - - await saveTxToHistory({ ...txArgs, txHash, origin }) - await dispatch(fetchTransactions(safeAddress)) - } catch (err) { - console.error(err) - } - }) - .on('error', (error) => { - console.error('Tx error: ', error) - }) - .then((receipt) => { - closeSnackbar(pendingExecutionKey) - const safeTxHash = isExecution - ? receipt.events.ExecutionSuccess.returnValues[0] - : receipt.events.ApproveHash.returnValues[0] - - dispatch( - updateTransaction({ - safeAddress, - transaction: { - safeTxHash, - isExecuted: isExecution, - isSuccessful: isExecution ? true : null, - executionTxHash: isExecution ? receipt.transactionHash : null, - executor: isExecution ? from : null, - confirmations: List([ - makeConfirmation({ - type: 'confirmation', - hash: receipt.transactionHash, - signature: sigs, - owner: from, - }), - ]), - }, - }), - ) - - showSnackbar( - isExecution - ? notificationsQueue.afterExecution.noMoreConfirmationsNeeded - : notificationsQueue.afterExecution.moreConfirmationsNeeded, - enqueueSnackbar, - closeSnackbar, - ) - - dispatch(fetchTransactions(safeAddress)) - - return receipt.transactionHash - }) - } catch (err) { - console.error(err) - closeSnackbar(beforeExecutionKey) - closeSnackbar(pendingExecutionKey) - showSnackbar(notificationsQueue.afterExecutionError, enqueueSnackbar, closeSnackbar) - - const executeDataUsedSignatures = safeInstance.contract.methods - .execTransaction(to, valueInWei, txData, operation, 0, 0, 0, ZERO_ADDRESS, ZERO_ADDRESS, sigs) - .encodeABI() - const errMsg = await getErrorMessage(safeInstance.address, 0, executeDataUsedSignatures, from) - console.error(`Error creating the TX: ${errMsg}`) - } - - return txHash -} - -export default createTransaction diff --git a/src/routes/safe/store/actions/transactions/removeCancellationTransaction.ts b/src/routes/safe/store/actions/transactions/removeCancellationTransaction.ts new file mode 100644 index 00000000..985f313a --- /dev/null +++ b/src/routes/safe/store/actions/transactions/removeCancellationTransaction.ts @@ -0,0 +1,5 @@ +import { createAction } from 'redux-actions' + +export const REMOVE_CANCELLATION_TRANSACTION = 'REMOVE_CANCELLATION_TRANSACTION' + +export const removeCancellationTransaction = createAction(REMOVE_CANCELLATION_TRANSACTION) diff --git a/src/routes/safe/store/actions/transactions/removeTransaction.ts b/src/routes/safe/store/actions/transactions/removeTransaction.ts new file mode 100644 index 00000000..3a84f3d4 --- /dev/null +++ b/src/routes/safe/store/actions/transactions/removeTransaction.ts @@ -0,0 +1,5 @@ +import { createAction } from 'redux-actions' + +export const REMOVE_TRANSACTION = 'REMOVE_TRANSACTION' + +export const removeTransaction = createAction(REMOVE_TRANSACTION) diff --git a/src/routes/safe/store/actions/transactions/updateCancellationTransaction.ts b/src/routes/safe/store/actions/transactions/updateCancellationTransaction.ts deleted file mode 100644 index 633372f8..00000000 --- a/src/routes/safe/store/actions/transactions/updateCancellationTransaction.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { createAction } from 'redux-actions' - -export const UPDATE_CANCELLATION_TRANSACTION = 'UPDATE_CANCELLATION_TRANSACTION' - -export const updateCancellationTransaction = createAction(UPDATE_CANCELLATION_TRANSACTION) diff --git a/src/routes/safe/store/actions/transactions/updateTransaction.ts b/src/routes/safe/store/actions/transactions/updateTransaction.ts deleted file mode 100644 index 41af0547..00000000 --- a/src/routes/safe/store/actions/transactions/updateTransaction.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { createAction } from 'redux-actions' - -export const UPDATE_TRANSACTION = 'UPDATE_TRANSACTION' - -const updateTransaction = createAction(UPDATE_TRANSACTION) - -export default updateTransaction diff --git a/src/routes/safe/store/reducer/cancellationTransactions.ts b/src/routes/safe/store/reducer/cancellationTransactions.ts index 13be3cac..45d2c541 100644 --- a/src/routes/safe/store/reducer/cancellationTransactions.ts +++ b/src/routes/safe/store/reducer/cancellationTransactions.ts @@ -1,13 +1,57 @@ import { Map } from 'immutable' import { handleActions } from 'redux-actions' -import { ADD_CANCELLATION_TRANSACTIONS } from 'src/routes/safe/store/actions/addCancellationTransactions' +import { ADD_OR_UPDATE_CANCELLATION_TRANSACTIONS } from 'src/routes/safe/store/actions/transactions/addOrUpdateCancellationTransactions' +import { REMOVE_CANCELLATION_TRANSACTION } from 'src/routes/safe/store/actions/transactions/removeCancellationTransaction' export const CANCELLATION_TRANSACTIONS_REDUCER_ID = 'cancellationTransactions' export default handleActions( { - [ADD_CANCELLATION_TRANSACTIONS]: (state, action) => action.payload, + [ADD_OR_UPDATE_CANCELLATION_TRANSACTIONS]: (state, action) => { + const { safeAddress, transactions } = action.payload + + if (!safeAddress || !transactions || !transactions.size) { + return state + } + + return state.withMutations((map) => { + const stateTransactionsMap = map.get(safeAddress) + + if (stateTransactionsMap) { + transactions.forEach((updateTx) => { + const keyPath = [safeAddress, `${updateTx.nonce}`] + + if (updateTx.confirmations.size) { + // if there are confirmations then we replace what's stored with the new tx + // as we assume that this is the newest tx returned by the server + map.setIn(keyPath, updateTx) + } else { + // if there's no confirmations, we assume this is a mocked tx + // as txs without confirmation are not being returned by the server (?has_confirmations=true) + map.mergeDeepIn(keyPath, updateTx) + } + }) + } else { + map.set(safeAddress, transactions) + } + }) + }, + [REMOVE_CANCELLATION_TRANSACTION]: (state, action) => { + const { safeAddress, transaction } = action.payload + + if (!safeAddress || !transaction) { + return state + } + + return state.withMutations((map) => { + const stateTransactionsMap = map.get(safeAddress) + + if (stateTransactionsMap) { + map.deleteIn([safeAddress, `${transaction.nonce}`]) + } + }) + }, }, Map(), ) diff --git a/src/routes/safe/store/reducer/transactions.ts b/src/routes/safe/store/reducer/transactions.ts index a8b4f8fa..dbe26943 100644 --- a/src/routes/safe/store/reducer/transactions.ts +++ b/src/routes/safe/store/reducer/transactions.ts @@ -1,13 +1,70 @@ import { Map } from 'immutable' import { handleActions } from 'redux-actions' -import { ADD_TRANSACTIONS } from 'src/routes/safe/store/actions/addTransactions' +import { ADD_OR_UPDATE_TRANSACTIONS } from 'src/routes/safe/store/actions/transactions/addOrUpdateTransactions' +import { REMOVE_TRANSACTION } from 'src/routes/safe/store/actions/transactions/removeTransaction' export const TRANSACTIONS_REDUCER_ID = 'transactions' export default handleActions( { - [ADD_TRANSACTIONS]: (state, action) => action.payload, + [ADD_OR_UPDATE_TRANSACTIONS]: (state, action) => { + const { safeAddress, transactions } = action.payload + + if (!safeAddress || !transactions || !transactions.size) { + return state + } + + return state.withMutations((map) => { + const stateTransactionsList = map.get(safeAddress) + + if (stateTransactionsList) { + const txsToStore = stateTransactionsList.withMutations((txsList) => { + transactions.forEach((updateTx) => { + const storedTxIndex = txsList.findIndex((txIterator) => txIterator.nonce === updateTx.nonce) + + if (storedTxIndex !== -1) { + // Update + if (updateTx.confirmations.size) { + // if there are confirmations then we replace what's stored with the new tx + // as we assume that this is the newest tx returned by the server + txsList.update(storedTxIndex, () => updateTx) + } else { + // if there's no confirmations, we assume this is a mocked tx + // as txs without confirmation are not being returned by the server (?has_confirmations=true) + txsList.update(storedTxIndex, (storedTx) => storedTx.mergeDeep(updateTx)) + } + } else { + // Add new + txsList.unshift(updateTx) + } + }) + }) + map.set(safeAddress, txsToStore) + } else { + map.set(safeAddress, transactions) + } + }) + }, + [REMOVE_TRANSACTION]: (state, action) => { + const { safeAddress, transaction } = action.payload + + if (!safeAddress || !transaction) { + return state + } + + return state.withMutations((map) => { + const stateTransactionsList = map.get(safeAddress) + + if (stateTransactionsList) { + const storedTxIndex = stateTransactionsList.findIndex((storedTx) => storedTx.equals(transaction)) + + if (storedTxIndex !== -1) { + map.deleteIn([safeAddress, storedTxIndex]) + } + } + }) + }, }, Map(), ) From c9a01f68926bcb6acd1f4580e400da74fff6247d Mon Sep 17 00:00:00 2001 From: fernandomg Date: Fri, 22 May 2020 16:49:59 -0300 Subject: [PATCH 27/65] refactor: modify how transactions returned by server are processed --- src/logic/contracts/methodIds.ts | 99 ++++- src/logic/tokens/store/actions/fetchTokens.ts | 82 ++-- src/logic/tokens/utils/tokenHelpers.ts | 94 ++--- .../safe/container/hooks/useLoadSafe.tsx | 8 +- .../fetchTransactions/FetchTransactions.ts | 69 ++++ .../transactions/fetchTransactions/index.ts | 21 +- .../loadOutgoingTransactions.ts | 361 ++++++++---------- .../transactions/utils/mockTransaction.ts | 58 --- .../transactions/utils/transactionHelpers.ts | 288 ++++++++++++++ src/routes/safe/store/models/transaction.ts | 116 ++++-- 10 files changed, 780 insertions(+), 416 deletions(-) create mode 100644 src/routes/safe/store/actions/transactions/fetchTransactions/FetchTransactions.ts delete mode 100644 src/routes/safe/store/actions/transactions/utils/mockTransaction.ts create mode 100644 src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts diff --git a/src/logic/contracts/methodIds.ts b/src/logic/contracts/methodIds.ts index 7ced61db..3808b539 100644 --- a/src/logic/contracts/methodIds.ts +++ b/src/logic/contracts/methodIds.ts @@ -1,5 +1,4 @@ -// -import { getWeb3 } from 'src/logic/wallets/getWeb3' +import { web3ReadOnly } from 'src/logic/wallets/getWeb3' // SAFE METHODS TO ITS ID // https://github.com/gnosis/safe-contracts/blob/development/test/safeMethodNaming.js @@ -54,39 +53,107 @@ const METHOD_TO_ID = { } export const decodeParamsFromSafeMethod = (data) => { - const web3 = getWeb3() + const web3 = web3ReadOnly const [methodId, params] = [data.slice(0, 10), data.slice(10)] switch (methodId) { // swapOwner - case '0xe318b52b': + case '0xe318b52b': { + const decodedParameters = web3.eth.abi.decodeParameters(['uint', 'address', 'address'], params) return { - methodName: METHOD_TO_ID[methodId], - args: web3.eth.abi.decodeParameters(['uint', 'address', 'address'], params), + [METHOD_TO_ID[methodId]]: [ + { name: 'oldOwner', value: decodedParameters[1] }, + { name: 'newOwner', value: decodedParameters[2] }, + ] } + } // addOwnerWithThreshold - case '0x0d582f13': + case '0x0d582f13': { + const decodedParameters = web3.eth.abi.decodeParameters(['address', 'uint'], params) return { - methodName: METHOD_TO_ID[methodId], - args: web3.eth.abi.decodeParameters(['address', 'uint'], params), + [METHOD_TO_ID[methodId]]: [ + { name: 'owner', value: decodedParameters[0] }, + { name: '_threshold', value: decodedParameters[1] }, + ] } + } // removeOwner - case '0xf8dc5dd9': + case '0xf8dc5dd9': { + const decodedParameters = web3.eth.abi.decodeParameters(['address', 'address', 'uint'], params) return { - methodName: METHOD_TO_ID[methodId], - args: web3.eth.abi.decodeParameters(['address', 'address', 'uint'], params), + [METHOD_TO_ID[methodId]]: [ + { name: 'oldOwner', value: decodedParameters[1] }, + { name: '_threshold', value: decodedParameters[2] }, + ] } + } // changeThreshold - case '0x694e80c3': + case '0x694e80c3': { + const decodedParameters = web3.eth.abi.decodeParameters(['uint'], params) return { - methodName: METHOD_TO_ID[methodId], - args: web3.eth.abi.decodeParameters(['uint'], params), + [METHOD_TO_ID[methodId]]: [ + { name: '_threshold', value: decodedParameters[0] }, + ] } + } default: - return {} + return null + } +} + +const isSafeMethod = (methodId: string) => { + return !!METHOD_TO_ID[methodId] +} + +export const decodeMethods = (data: string) => { + const web3 = web3ReadOnly + const [methodId, params] = [data.slice(0, 10), data.slice(10)] + + if (isSafeMethod(methodId)) { + return decodeParamsFromSafeMethod(data) + } + + switch (methodId) { + // a9059cbb - transfer(address,uint256) + case '0xa9059cbb': { + const decodeParameters = web3.eth.abi.decodeParameters(['address', 'uint'], params) + return { + transfer: [ + { name: 'to', value: decodeParameters[0] }, + { name: 'value', value: decodeParameters[1] }, + ] + } + } + + // 23b872dd - transferFrom(address,address,uint256) + case '0x23b872dd': { + const decodeParameters = web3.eth.abi.decodeParameters(['address', 'address', 'uint'], params) + return { + transferFrom: [ + { name: 'from', value: decodeParameters[0] }, + { name: 'to', value: decodeParameters[1] }, + { name: 'value', value: decodeParameters[2] }, + ] + } + } + + // 42842e0e - safeTransferFrom(address,address,uint256) + case '0x42842e0e':{ + const decodedParameters = web3.eth.abi.decodeParameters(['address', 'address', 'uint'], params) + return { + safeTransferFrom: [ + { name: 'from', value: decodedParameters[0] }, + { name: 'to', value: decodedParameters[1] }, + { name: 'value', value: decodedParameters[2] }, + ] + } + } + + default: + return null } } diff --git a/src/logic/tokens/store/actions/fetchTokens.ts b/src/logic/tokens/store/actions/fetchTokens.ts index d7794b57..f96d6660 100644 --- a/src/logic/tokens/store/actions/fetchTokens.ts +++ b/src/logic/tokens/store/actions/fetchTokens.ts @@ -1,11 +1,13 @@ import StandardToken from '@gnosis.pm/util-contracts/build/contracts/GnosisStandardToken.json' import HumanFriendlyToken from '@gnosis.pm/util-contracts/build/contracts/HumanFriendlyToken.json' -import ERC721 from '@openzeppelin/contracts/build/contracts/ERC721' +import ERC20Detailed from '@openzeppelin/contracts/build/contracts/ERC20Detailed.json' +import ERC721 from '@openzeppelin/contracts/build/contracts/ERC721.json' import { List } from 'immutable' import contract from 'truffle-contract' import saveTokens from './saveTokens' +import generateBatchRequests from 'src/logic/contracts/generateBatchRequests' import { fetchTokenList } from 'src/logic/tokens/api' import { makeToken } from 'src/logic/tokens/store/model/token' import { tokensSelector } from 'src/logic/tokens/store/selectors' @@ -36,53 +38,6 @@ const createERC721TokenContract = async () => { return erc721Token } -// For the `batchRequest` of balances, we're just using the `balanceOf` method call. -// So having a simple ABI only with `balanceOf` prevents errors -// when instantiating non-standard ERC-20 Tokens. -export const OnlyBalanceToken = { - contractName: 'OnlyBalanceToken', - abi: [ - { - constant: true, - inputs: [ - { - name: 'owner', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: 'owner', - type: 'address', - }, - ], - name: 'balances', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - ], -} - export const getHumanFriendlyToken = ensureOnce(createHumanFriendlyTokenContract) export const getStandardTokenContract = ensureOnce(createStandardTokenContract) @@ -100,31 +55,38 @@ export const getTokenInfos = async (tokenAddress) => { if (!tokenAddress) { return null } + const { tokens } = store.getState() const localToken = tokens.get(tokenAddress) + // If the token is inside the store we return the store token if (localToken) { return localToken } + // Otherwise we fetch it, save it to the store and return it - const tokenContract = await getHumanFriendlyToken() - const tokenInstance = await tokenContract.at(tokenAddress) - const [tokenSymbol, tokenDecimals, name] = await Promise.all([ - tokenInstance.symbol(), - tokenInstance.decimals(), - tokenInstance.name(), - ]) - const savedToken = makeToken({ + const [tokenDecimals, tokenName, tokenSymbol] = await generateBatchRequests({ + abi: ERC20Detailed.abi, address: tokenAddress, - name: name ? name : tokenSymbol, + methods: ['decimals', 'name', 'symbol'], + }) + + if (tokenDecimals === null) { + return null + } + + const token = makeToken({ + address: tokenAddress, + name: tokenName ? tokenName : tokenSymbol, symbol: tokenSymbol, - decimals: tokenDecimals.toNumber(), + decimals: Number(tokenDecimals), logoUri: '', }) - const newTokens = tokens.set(tokenAddress, savedToken) + + const newTokens = tokens.set(tokenAddress, token) store.dispatch(saveTokens(newTokens)) - return savedToken + return token } export const fetchTokens = () => async (dispatch, getState) => { diff --git a/src/logic/tokens/utils/tokenHelpers.ts b/src/logic/tokens/utils/tokenHelpers.ts index e3a4d220..b2417e88 100644 --- a/src/logic/tokens/utils/tokenHelpers.ts +++ b/src/logic/tokens/utils/tokenHelpers.ts @@ -1,19 +1,16 @@ -import ERC20Detailed from '@openzeppelin/contracts/build/contracts/ERC20Detailed.json' -import { List } from 'immutable' - import logo from 'src/assets/icons/icon_etherTokens.svg' -import { getStandardTokenContract } from 'src/logic/tokens/store/actions/fetchTokens' +import generateBatchRequests from 'src/logic/contracts/generateBatchRequests' +import { getStandardTokenContract, getTokenInfos } from 'src/logic/tokens/store/actions/fetchTokens' import { makeToken } from 'src/logic/tokens/store/model/token' -import { getWeb3 } from 'src/logic/wallets/getWeb3' +import { ALTERNATIVE_TOKEN_ABI } from 'src/logic/tokens/utils/alternativeAbi' +import { web3ReadOnly } from 'src/logic/wallets/getWeb3' +import { isEmptyData } from 'src/routes/safe/store/actions/transactions/utils/transactionHelpers' export const ETH_ADDRESS = '0x000' -export const SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH = '0x42842e0e' -export const DECIMALS_METHOD_HASH = '313ce567' +export const SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH = '42842e0e' -export const isEther = (symbol) => symbol === 'ETH' - -export const getEthAsToken = (balance) => { - const eth = makeToken({ +export const getEthAsToken = (balance: string) => { + return makeToken({ address: ETH_ADDRESS, name: 'Ether', symbol: 'ETH', @@ -21,23 +18,6 @@ export const getEthAsToken = (balance) => { logoUri: logo, balance, }) - - return eth -} - -export const calculateActiveErc20TokensFrom = (tokens) => { - const activeTokens = List().withMutations((list) => - tokens.forEach((token) => { - const isDeactivated = isEther(token.symbol) || !token.status - if (isDeactivated) { - return - } - - list.push(token) - }), - ) - - return activeTokens } export const isAddressAToken = async (tokenAddress) => { @@ -50,40 +30,64 @@ export const isAddressAToken = async (tokenAddress) => { // return 'Not a token address' // } - const web3 = getWeb3() + const web3 = web3ReadOnly const call = await web3.eth.call({ to: tokenAddress, data: web3.utils.sha3('totalSupply()') }) return call !== '0x' } -export const hasDecimalsMethod = async (address) => { - try { - const web3 = getWeb3() - const token = new web3.eth.Contract(ERC20Detailed.abi as any, address) - await token.methods.decimals().call() - return true - } catch (e) { - return false - } +export const isTokenTransfer = (tx: any): boolean => { + return !isEmptyData(tx.data) && tx.data.substring(0, 10) === '0xa9059cbb' && Number(tx.value) === 0 } -export const isTokenTransfer = (data, value) => !!data && data.substring(0, 10) === '0xa9059cbb' && value === 0 +export const isSendERC721Transaction = (tx: any, txCode: string, knownTokens: any) => { + return ( + (txCode && txCode.includes(SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH)) || + (isTokenTransfer(tx) && !knownTokens.get(tx.to)) + ) +} -export const isMultisendTransaction = (data, value) => !!data && data.substring(0, 10) === '0x8d80ff0a' && value === 0 +export const getERC20DecimalsAndSymbol = async (tokenAddress: string): Promise => { + const tokenInfos = await getTokenInfos(tokenAddress) -// 7de7edef - changeMasterCopy (308, 8) -// f08a0323 - setFallbackHandler (550, 8) -export const isUpgradeTransaction = (data) => - !!data && data.substr(308, 8) === '7de7edef' && data.substr(550, 8) === 'f08a0323' + if (tokenInfos === null) { + const [tokenDecimals, tokenSymbol] = await generateBatchRequests({ + abi: ALTERNATIVE_TOKEN_ABI, + address: tokenAddress, + methods: ['decimals', 'symbol'], + }) -export const isERC721Contract = async (contractAddress) => { + return { decimals: Number(tokenDecimals), symbol: tokenSymbol } + } + + return { decimals: Number(tokenInfos.decimals), symbol: tokenInfos.symbol } +} + +export const isSendERC20Transaction = async (tx: any, txCode: string, knownTokens: any) => { + let isSendTokenTx = !isSendERC721Transaction(tx, txCode, knownTokens) && isTokenTransfer(tx) + + if (isSendTokenTx) { + const { decimals, symbol } = await getERC20DecimalsAndSymbol(tx.to) + + // some contracts may implement the same methods as in ERC20 standard + // we may falsely treat them as tokens, so in case we get any errors when getting token info + // we fallback to displaying custom transaction + isSendTokenTx = decimals !== null && symbol !== null + } + + return isSendTokenTx +} + +export const isERC721Contract = async (contractAddress: string): Promise => { const ERC721Token = await getStandardTokenContract() let isERC721 = false + try { isERC721 = true await ERC721Token.at(contractAddress) } catch (error) { console.warn('Asset not found') } + return isERC721 } diff --git a/src/routes/safe/container/hooks/useLoadSafe.tsx b/src/routes/safe/container/hooks/useLoadSafe.tsx index a6601f10..f0c2a0e5 100644 --- a/src/routes/safe/container/hooks/useLoadSafe.tsx +++ b/src/routes/safe/container/hooks/useLoadSafe.tsx @@ -6,7 +6,7 @@ import addViewedSafe from 'src/logic/currentSession/store/actions/addViewedSafe' import fetchSafeTokens from 'src/logic/tokens/store/actions/fetchSafeTokens' import fetchLatestMasterContractVersion from 'src/routes/safe/store/actions/fetchLatestMasterContractVersion' import fetchSafe from 'src/routes/safe/store/actions/fetchSafe' -import fetchTransactions from 'src/routes/safe/store/actions/fetchTransactions' +import fetchTransactions from 'src/routes/safe/store/actions/transactions/fetchTransactions' export const useLoadSafe = (safeAddress) => { const dispatch = useDispatch() @@ -16,12 +16,12 @@ export const useLoadSafe = (safeAddress) => { if (safeAddress) { dispatch(fetchLatestMasterContractVersion()) .then(() => dispatch(fetchSafe(safeAddress))) + .then(() => dispatch(fetchSafeTokens(safeAddress))) .then(() => { - dispatch(fetchSafeTokens(safeAddress)) dispatch(loadAddressBookFromStorage()) - return dispatch(fetchTransactions(safeAddress)) + dispatch(fetchTransactions(safeAddress)) + return dispatch(addViewedSafe(safeAddress)) }) - .then(() => dispatch(addViewedSafe(safeAddress))) } } fetchData() diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/FetchTransactions.ts b/src/routes/safe/store/actions/transactions/fetchTransactions/FetchTransactions.ts new file mode 100644 index 00000000..cc8fadb9 --- /dev/null +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/FetchTransactions.ts @@ -0,0 +1,69 @@ +import axios from 'axios' + +import { buildTxServiceUrl } from 'src/logic/safe/transactions' +import { buildIncomingTxServiceUrl } from 'src/logic/safe/transactions/incomingTxHistory' +import { TxServiceModel } from 'src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions' + +export interface FetchTransactionsInterface { + getServiceUrl(): string + getSafeAddress(): string + setPreviousEtag(eTag: string): void + fetch(): Promise +} + +class FetchTransactions implements FetchTransactionsInterface { + _fetchConfig: {} + _previousETag?: string | null + _safeAddress?: string | null + _txType = 'outgoing' + _url: string + + constructor(safeAddress: string, txType: string) { + this._safeAddress = safeAddress + this._txType = txType + this._url = this.getServiceUrl() + } + + getSafeAddress(): string { + return this._safeAddress + } + + getServiceUrl(): string { + return { + incoming: buildIncomingTxServiceUrl, + outgoing: buildTxServiceUrl, + }[this._txType](this._safeAddress) + } + + setPreviousEtag(eTag: string) { + this._previousETag = eTag ? eTag : this._previousETag + this._fetchConfig = eTag ? { headers: { 'If-None-Match': eTag } } : this._fetchConfig + } + + async fetch(): Promise { + try { + const response = await axios.get(this._url, this._fetchConfig) + + if (response.data.count > 0) { + const { etag } = response.headers + + if (this._previousETag !== etag) { + this.setPreviousEtag(etag) + return response.data.results + } + } + } catch (err) { + if (!(err && err.response && err.response.status === 304)) { + console.error(`Requests for outgoing transactions for ${this._safeAddress || 'unknown'} failed with 404`, err) + } else { + // NOTE: this is the expected implementation, currently the backend is not returning 304. + // So I check if the returned etag is the same instead (see above) + } + } + + // defaults to an empty array to avoid type errors + return [] + } +} + +export default FetchTransactions diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/index.ts b/src/routes/safe/store/actions/transactions/fetchTransactions/index.ts index 5eccf33f..f7927581 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions/index.ts +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/index.ts @@ -1,25 +1,32 @@ import { batch } from 'react-redux' import { addIncomingTransactions } from '../../addIncomingTransactions' -import { addTransactions } from '../../addTransactions' import { loadIncomingTransactions } from './loadIncomingTransactions' import { loadOutgoingTransactions } from './loadOutgoingTransactions' -import { addCancellationTransaction } from '../addCancellationTransaction' +import { addOrUpdateCancellationTransactions } from 'src/routes/safe/store/actions/transactions/addOrUpdateCancellationTransactions' +import { addOrUpdateTransactions } from 'src/routes/safe/store/actions/transactions/addOrUpdateTransactions' + +const noFunc = () => {} + +export default (safeAddress: string) => async (dispatch) => { + const transactions = await loadOutgoingTransactions(safeAddress) -export default (safeAddress: string) => async (dispatch, getState) => { - const transactions: any | typeof undefined = await loadOutgoingTransactions(safeAddress, getState) if (transactions) { const { cancel, outgoing } = transactions + const updateCancellationTxs = cancel.size + ? addOrUpdateCancellationTransactions({ safeAddress, transactions: cancel }) + : noFunc + const updateOutgoingTxs = outgoing.size ? addOrUpdateTransactions({ safeAddress, transactions: outgoing }) : noFunc batch(() => { - dispatch(addCancellationTransaction(cancel)) - dispatch(addTransactions(outgoing)) + dispatch(updateCancellationTxs) + dispatch(updateOutgoingTxs) }) } - const incomingTransactions: any | typeof undefined = await loadIncomingTransactions(safeAddress) + const incomingTransactions = await loadIncomingTransactions(safeAddress) if (incomingTransactions) { dispatch(addIncomingTransactions(incomingTransactions)) diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.ts b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.ts index f7dbeed4..34d0214d 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.ts +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.ts @@ -1,195 +1,110 @@ -import ERC20Detailed from '@openzeppelin/contracts/build/contracts/ERC20Detailed.json' -import axios from 'axios' -import { List, Map, Record } from 'immutable' - -import addMockSafeCreationTx from '../utils/addMockSafeCreationTx' +import { List, Map, fromJS } from 'immutable' import generateBatchRequests from 'src/logic/contracts/generateBatchRequests' -import { decodeParamsFromSafeMethod } from 'src/logic/contracts/methodIds' -import { buildTxServiceUrl } from 'src/logic/safe/transactions/txHistory' -import { getTokenInfos } from 'src/logic/tokens/store/actions/fetchTokens' import { TOKEN_REDUCER_ID } from 'src/logic/tokens/store/reducer/tokens' -import { ALTERNATIVE_TOKEN_ABI } from 'src/logic/tokens/utils/alternativeAbi' -import { - SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH, - isMultisendTransaction, - isTokenTransfer, - isUpgradeTransaction, -} from 'src/logic/tokens/utils/tokenHelpers' -import { ZERO_ADDRESS, sameAddress } from 'src/logic/wallets/ethAddresses' -import { EMPTY_DATA } from 'src/logic/wallets/ethTransactions' import { web3ReadOnly } from 'src/logic/wallets/getWeb3' -import { makeConfirmation } from 'src/routes/safe/store/models/confirmation' -import { makeTransaction } from 'src/routes/safe/store/models/transaction' +import { PROVIDER_REDUCER_ID } from 'src/logic/wallets/store/reducer/provider' +import FetchTransactions from 'src/routes/safe/store/actions/transactions/fetchTransactions/FetchTransactions' +import { buildTx, isCancelTransaction } from 'src/routes/safe/store/actions/transactions/utils/transactionHelpers' +import { SAFE_REDUCER_ID } from 'src/routes/safe/store/reducer/safe' +import { store } from 'src/store' -type ConfirmationServiceModel = { +export type ConfirmationServiceModel = { owner: string submissionDate: Date signature: string transactionHash: string } +export type DecodedData = { + [key: string]: Array<{ [key: string]: string | number }> +} + export type TxServiceModel = { - origin: null - to: string - value: number - data?: string | null - operation: number - nonce?: number | null - blockNumber?: number | null - safeTxGas: number baseGas: number + blockNumber?: number | null + confirmations: ConfirmationServiceModel[] + creationTx?: boolean | null + data?: string | null + dataDecoded?: DecodedData | null + executionDate?: string | null + executor: string gasPrice: number gasToken: string - refundReceiver: string - safeTxHash: string - submissionDate?: string | null - executor: string - executionDate?: string | null - confirmations: ConfirmationServiceModel[] isExecuted: boolean isSuccessful: boolean + nonce?: number | null + operation: number + origin?: string | null + refundReceiver: string + safeTxGas: number + safeTxHash: string + submissionDate?: string | null + to: string transactionHash?: string | null - creationTx?: boolean + value: number } export type SafeTransactionsType = { - outgoing: Map> - cancel: Map> + cancel: any + outgoing: any } -export const buildTransactionFrom = async ( - safeAddress: string, - tx: TxServiceModel, - knownTokens, - code, -): Promise => { - const confirmations = List( - tx.confirmations.map((conf: ConfirmationServiceModel) => - makeConfirmation({ - owner: conf.owner, - hash: conf.transactionHash, - signature: conf.signature, - }), - ), - ) - const modifySettingsTx = sameAddress(tx.to, safeAddress) && Number(tx.value) === 0 && !!tx.data - const cancellationTx = sameAddress(tx.to, safeAddress) && Number(tx.value) === 0 && !tx.data - const isERC721Token = - (code && code.includes(SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH)) || - (isTokenTransfer(tx.data, Number(tx.value)) && !knownTokens.get(tx.to)) - let isSendTokenTx = !isERC721Token && isTokenTransfer(tx.data, Number(tx.value)) - const isMultiSendTx = isMultisendTransaction(tx.data, Number(tx.value)) - const isUpgradeTx = isMultiSendTx && isUpgradeTransaction(tx.data) - let customTx = !sameAddress(tx.to, safeAddress) && !!tx.data && !isSendTokenTx && !isUpgradeTx && !isERC721Token +export type OutgoingTxs = { + cancellationTxs: any + outgoingTxs: any +} - let refundParams = null - if (tx.gasPrice > 0) { - let refundSymbol = 'ETH' - let refundDecimals = 18 - if (tx.gasToken !== ZERO_ADDRESS) { - const gasToken = await getTokenInfos(tx.gasToken) - refundSymbol = gasToken.symbol - refundDecimals = gasToken.decimals - } - const feeString = (tx.gasPrice * (tx.baseGas + tx.safeTxGas)).toString().padStart(refundDecimals, '0') - const whole = feeString.slice(0, feeString.length - refundDecimals) || '0' - const fraction = feeString.slice(feeString.length - refundDecimals) +export type BatchProcessTxsProps = OutgoingTxs & { + currentUser?: string + knownTokens: any + safe: any +} - const formattedFee = `${whole}.${fraction}` - refundParams = { - fee: formattedFee, - symbol: refundSymbol, - } - } - - let symbol = 'ETH' - let decimals = 18 - let decodedParams - if (isSendTokenTx) { - try { - const token = await getTokenInfos(tx.to) - - symbol = token.symbol - decimals = token.decimals - } catch (e) { - try { - const [tokenSymbol, tokenDecimals] = await Promise.all( - generateBatchRequests({ - abi: ALTERNATIVE_TOKEN_ABI, - address: tx.to, - methods: ['symbol', 'decimals'], - }), - ) - - symbol = tokenSymbol as string - decimals = tokenDecimals as number - } catch (err) { - // some contracts may implement the same methods as in ERC20 standard - // we may falsely treat them as tokens, so in case we get any errors when getting token info - // we fallback to displaying custom transaction - isSendTokenTx = false - customTx = true +/** + * Differentiates outgoing transactions from its cancel ones and returns a split map + * @param {string} safeAddress - safe's Ethereum Address + * @param {TxServiceModel[]} outgoingTxs - collection of transactions (usually, returned by the /transactions service) + * @returns {any|{cancellationTxs: {}, outgoingTxs: []}} + */ +const extractCancelAndOutgoingTxs = (safeAddress: string, outgoingTxs: TxServiceModel[]): OutgoingTxs => { + return outgoingTxs.reduce( + (acc, transaction) => { + if (isCancelTransaction(transaction, safeAddress)) { + if (!isNaN(Number(transaction.nonce))) { + acc.cancellationTxs[transaction.nonce] = transaction + } + } else { + acc.outgoingTxs = [...acc.outgoingTxs, transaction] } - } - - const params = web3ReadOnly.eth.abi.decodeParameters(['address', 'uint256'], tx.data.slice(10)) - decodedParams = { - recipient: params[0], - value: params[1], - } - } else if (modifySettingsTx && tx.data) { - decodedParams = decodeParamsFromSafeMethod(tx.data) - } else if (customTx && tx.data) { - decodedParams = decodeParamsFromSafeMethod(tx.data) - } - - return makeTransaction({ - symbol, - nonce: tx.nonce, - blockNumber: tx.blockNumber, - value: tx.value.toString(), - confirmations, - decimals, - recipient: tx.to, - data: tx.data ? tx.data : EMPTY_DATA, - operation: tx.operation, - safeTxGas: tx.safeTxGas, - baseGas: tx.baseGas, - gasPrice: tx.gasPrice, - gasToken: tx.gasToken || ZERO_ADDRESS, - refundReceiver: tx.refundReceiver || ZERO_ADDRESS, - refundParams, - isExecuted: tx.isExecuted, - isSuccessful: tx.isSuccessful, - submissionDate: tx.submissionDate, - executor: tx.executor, - executionDate: tx.executionDate, - executionTxHash: tx.transactionHash, - safeTxHash: tx.safeTxHash, - isTokenTransfer: isSendTokenTx, - multiSendTx: isMultiSendTx, - upgradeTx: isUpgradeTx, - decodedParams, - modifySettingsTx, - customTx, - cancellationTx, - creationTx: tx.creationTx, - origin: tx.origin, - }) + return acc + }, + { + cancellationTxs: {}, + outgoingTxs: [], + }, + ) } -export const batchTxTokenRequest = (txs: any[]) => { +/** + * Requests Contract's code for all the Contracts the Safe has interacted with + * @param transactions + * @returns {Promise<[Promise<*[]>, Promise<*[]>, Promise<*[]>, Promise<*[]>, Promise<*[]>, Promise<*[]>, Promise<*[]>, Promise<*[]>, Promise<*[]>, Promise<*[]>]>} + */ +const batchRequestContractCode = (transactions: any[]): Promise => { + if (!transactions || !Array.isArray(transactions)) { + throw new Error('`transactions` must be provided in order to lookup information') + } + const batch = new web3ReadOnly.BatchRequest() - const whenTxsValues = txs.map((tx) => { - const methods = [{ method: 'getCode', type: 'eth', args: [tx.to] }] + const whenTxsValues = transactions.map((tx) => { return generateBatchRequests({ - abi: ERC20Detailed.abi, + abi: [], address: tx.to, batch, context: tx, - methods, + methods: [{ method: 'getCode', type: 'eth', args: [tx.to] }], }) }) @@ -198,51 +113,101 @@ export const batchTxTokenRequest = (txs: any[]) => { return Promise.all(whenTxsValues) } -let prevSaveTransactionsEtag = null -export const loadOutgoingTransactions = async (safeAddress: string, getState: any): Promise => { - let transactions: any = addMockSafeCreationTx(safeAddress) +/** + * Receives a list of outgoing and its cancellation transactions and builds the tx object that will be store + * @param cancellationTxs + * @param currentUser + * @param knownTokens + * @param outgoingTxs + * @param safe + * @returns {Promise<{cancel: {}, outgoing: []}>} + */ +const batchProcessOutgoingTransactions = async ({ + cancellationTxs, + currentUser, + knownTokens, + outgoingTxs, + safe, +}: BatchProcessTxsProps): Promise<{ + cancel: any + outgoing: any +}> => { + // cancellation transactions + const cancelTxsValues = Object.values(cancellationTxs) + const cancellationTxsWithData = cancelTxsValues.length ? await batchRequestContractCode(cancelTxsValues) : [] - try { - const config = prevSaveTransactionsEtag - ? { - headers: { - 'If-None-Match': prevSaveTransactionsEtag, - }, - } - : undefined - - const url = buildTxServiceUrl(safeAddress) - const response = await axios.get(url, config) - if (response.data.count > 0) { - if (prevSaveTransactionsEtag === response.headers.etag) { - // The txs are the same as we currently have, we don't have to proceed - return - } - transactions = transactions.concat(response.data.results) - prevSaveTransactionsEtag = response.headers.etag - } - } catch (err) { - if (err && err.response && err.response.status === 304) { - // NOTE: this is the expected implementation, currently the backend is not returning 304. - // So I check if the returned etag is the same instead (see above) - return - } else { - console.error(`Requests for outgoing transactions for ${safeAddress} failed with 404`, err) - } + const cancel = {} + for (const [tx, txCode] of cancellationTxsWithData) { + cancel[`${tx.nonce}`] = await buildTx({ + cancellationTxs, + currentUser, + knownTokens, + outgoingTxs, + safe, + tx, + txCode, + }) } - const state = getState() - const knownTokens = state[TOKEN_REDUCER_ID] - const txsWithData = await batchTxTokenRequest(transactions) - // In case that the etags don't match, we parse the new transactions and save them to the cache - const txsRecord: Array> = await Promise.all( - txsWithData.map(([tx, code]) => buildTransactionFrom(safeAddress, tx, knownTokens, code)), - ) + // outgoing transactions + const outgoingTxsWithData = outgoingTxs.length ? await batchRequestContractCode(outgoingTxs) : [] - const groupedTxs = List(txsRecord).groupBy((tx) => (tx.get('cancellationTx') ? 'cancel' : 'outgoing')) + const outgoing = [] + for (const [tx, txCode] of outgoingTxsWithData) { + outgoing.push( + await buildTx({ + cancellationTxs, + currentUser, + knownTokens, + outgoingTxs, + safe, + tx, + txCode, + }), + ) + } + + return { cancel, outgoing } +} + +let fetchOutgoingTxs: FetchTransactions | null = null +export const loadOutgoingTransactions = async (safeAddress: string): Promise => { + const defaultResponse = { + cancel: Map(), + outgoing: List(), + } + const state = store.getState() + + if (!safeAddress) { + return defaultResponse + } + + const knownTokens = state[TOKEN_REDUCER_ID] + const currentUser = state[PROVIDER_REDUCER_ID].get('account') + const safe = state[SAFE_REDUCER_ID].getIn([SAFE_REDUCER_ID, safeAddress]) + + if (!safe) { + return defaultResponse + } + + fetchOutgoingTxs = + !fetchOutgoingTxs || fetchOutgoingTxs.getSafeAddress() !== safeAddress + ? new FetchTransactions(safeAddress, 'outgoing') + : fetchOutgoingTxs + const outgoingTransactions: TxServiceModel[] = await fetchOutgoingTxs.fetch() + const { cancellationTxs, outgoingTxs } = extractCancelAndOutgoingTxs(safeAddress, outgoingTransactions) + + // this should be only used for the initial load or when paginating + const { cancel, outgoing } = await batchProcessOutgoingTransactions({ + cancellationTxs, + currentUser, + knownTokens, + outgoingTxs, + safe, + }) return { - outgoing: Map().set(safeAddress, groupedTxs.get('outgoing')), - cancel: Map().set(safeAddress, groupedTxs.get('cancel')), + cancel: fromJS(cancel), + outgoing: fromJS(outgoing), } } diff --git a/src/routes/safe/store/actions/transactions/utils/mockTransaction.ts b/src/routes/safe/store/actions/transactions/utils/mockTransaction.ts deleted file mode 100644 index 7dbc0288..00000000 --- a/src/routes/safe/store/actions/transactions/utils/mockTransaction.ts +++ /dev/null @@ -1,58 +0,0 @@ -// type TxServiceModel = { -// blockNumber: ?number, -// safeTxHash: string, -// executor: string, -// executionDate: ?string, -// confirmations: ConfirmationServiceModel[], -// isExecuted: boolean, -// isSuccessful: boolean, -// transactionHash: ?string, -// creationTx?: boolean, -// } - -// safeInstance, -// to, -// valueInWei, -// data: txData, -// operation, -// nonce, -// safeTxGas, -// baseGas: 0, -// gasPrice: 0, -// gasToken: ZERO_ADDRESS, -// refundReceiver: ZERO_ADDRESS, -// sender: from, -// sigs, - -export const mockTransactionCreation = (txArgs) => { - const { - baseGas, - data, - gasPrice, - gasToken, - nonce, - operation, - refundReceiver, - safeTxGas, - safeTxHash, - submissionDate, - to, - valueInWei: value, - } = txArgs - - return { - data, - to, - value, - nonce, - operation, - safeTxGas, - baseGas, - gasPrice, - gasToken, - refundReceiver, - safeTxHash, - submissionDate, - creationTx: false, - } -} diff --git a/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts b/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts new file mode 100644 index 00000000..3dd46b72 --- /dev/null +++ b/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts @@ -0,0 +1,288 @@ +import { List, Map } from 'immutable' + +import { decodeMethods } from 'src/logic/contracts/methodIds' +import { TOKEN_REDUCER_ID } from 'src/logic/tokens/store/reducer/tokens' +import { + getERC20DecimalsAndSymbol, + isSendERC20Transaction, + isSendERC721Transaction, +} from 'src/logic/tokens/utils/tokenHelpers' +import { ZERO_ADDRESS, sameAddress } from 'src/logic/wallets/ethAddresses' +import { EMPTY_DATA } from 'src/logic/wallets/ethTransactions' +import { makeConfirmation } from 'src/routes/safe/store/models/confirmation' +import { makeTransaction } from 'src/routes/safe/store/models/transaction' +import { CANCELLATION_TRANSACTIONS_REDUCER_ID } from 'src/routes/safe/store/reducer/cancellationTransactions' +import { SAFE_REDUCER_ID } from 'src/routes/safe/store/reducer/safe' +import { TRANSACTIONS_REDUCER_ID } from 'src/routes/safe/store/reducer/transactions' + +export const isEmptyData = (data?: string | null) => { + return !data || data === EMPTY_DATA +} + +export const isInnerTransaction = (tx: any, safeAddress: string): boolean => { + return sameAddress(tx.to, safeAddress) && Number(tx.value) === 0 +} + +export const isCancelTransaction = (tx: any, safeAddress: string): boolean => { + return isInnerTransaction(tx, safeAddress) && isEmptyData(tx.data) +} + +export const isPendingTransaction = (tx: any, cancelTx: any): boolean => { + return (!!cancelTx && cancelTx.status === 'pending') || tx.status === 'pending' +} + +export const isModifySettingsTransaction = (tx: any, safeAddress: string): boolean => { + return isInnerTransaction(tx, safeAddress) && !isEmptyData(tx.data) +} + +export const isMultiSendTransaction = (tx: any): boolean => { + return !isEmptyData(tx.data) && tx.data.substring(0, 10) === '0x8d80ff0a' && Number(tx.value) === 0 +} + +export const isUpgradeTransaction = (tx: any): boolean => { + return ( + !isEmptyData(tx.data) && + isMultiSendTransaction(tx) && + tx.data.substr(308, 8) === '7de7edef' && // 7de7edef - changeMasterCopy (308, 8) + tx.data.substr(550, 8) === 'f08a0323' // f08a0323 - setFallbackHandler (550, 8) + ) +} + +export const isOutgoingTransaction = (tx: any, safeAddress: string): boolean => { + return !sameAddress(tx.to, safeAddress) && !isEmptyData(tx.data) +} + +export const isCustomTransaction = async (tx: any, txCode: string, safeAddress: string, knownTokens: any) => { + return ( + isOutgoingTransaction(tx, safeAddress) && + !(await isSendERC20Transaction(tx, txCode, knownTokens)) && + !isUpgradeTransaction(tx) && + !isSendERC721Transaction(tx, txCode, knownTokens) + ) +} + +export const getRefundParams = async ( + tx: any, + tokenInfo: (string) => Promise<{ decimals: number; symbol: string } | null>, +): Promise => { + let refundParams = null + + if (tx.gasPrice > 0) { + let refundSymbol = 'ETH' + let refundDecimals = 18 + + if (tx.gasToken !== ZERO_ADDRESS) { + const gasToken = await tokenInfo(tx.gasToken) + + if (gasToken !== null) { + refundSymbol = gasToken.symbol + refundDecimals = gasToken.decimals + } + } + + const feeString = (tx.gasPrice * (tx.baseGas + tx.safeTxGas)).toString().padStart(refundDecimals, '0') + const whole = feeString.slice(0, feeString.length - refundDecimals) || '0' + const fraction = feeString.slice(feeString.length - refundDecimals) + + refundParams = { + fee: `${whole}.${fraction}`, + symbol: refundSymbol, + } + } + + return refundParams +} + +export const getDecodedParams = (tx: any): any => { + if (tx.dataDecoded) { + return Object.keys(tx.dataDecoded).reduce((acc, key) => { + acc[key] = { + ...tx.dataDecoded[key].reduce( + (acc, param) => ({ + ...acc, + [param.name]: param.value, + }), + {}, + ), + } + return acc + }, {}) + } + return null +} + +export const getConfirmations = (tx: any): List => { + return List( + tx.confirmations.map((conf: any) => + makeConfirmation({ + owner: conf.owner, + hash: conf.transactionHash, + signature: conf.signature, + }), + ), + ) +} + +export const isTransactionCancelled = (tx: any, outgoingTxs: Array, cancellationTxs: { number: any }): boolean => { + return ( + // not executed + !tx.isExecuted && + // there's an executed cancel tx, with same nonce + ((tx.nonce && !!cancellationTxs[tx.nonce] && cancellationTxs[tx.nonce].isExecuted) || + // there's an executed tx, with same nonce + outgoingTxs.some((outgoingTx) => tx.nonce === outgoingTx.nonce && outgoingTx.isExecuted)) + ) +} + +export const calculateTransactionStatus = (tx: any, { owners, threshold }: any, currentUser?: string | null): any => { + let txStatus + + if (tx.isExecuted && tx.isSuccessful) { + txStatus = 'success' + } else if (tx.cancelled) { + txStatus = 'cancelled' + } else if (tx.confirmations.size === threshold) { + txStatus = 'awaiting_execution' + } else if (tx.creationTx) { + txStatus = 'success' + } else if (!tx.confirmations.size || !!tx.isPending) { + txStatus = 'pending' + } else { + const userConfirmed = tx.confirmations.filter((conf) => conf.owner === currentUser).size === 1 + const userIsSafeOwner = owners.filter((owner) => owner.address === currentUser).size === 1 + txStatus = !userConfirmed && userIsSafeOwner ? 'awaiting_your_confirmation' : 'awaiting_confirmations' + } + + if (tx.isSuccessful === false) { + txStatus = 'failed' + } + + return txStatus +} + +export const calculateTransactionType = (tx: any): string => { + let txType = 'outgoing' + + if (tx.isTokenTransfer) { + txType = 'token' + } else if (tx.isCollectibleTransfer) { + txType = 'collectible' + } else if (tx.modifySettingsTx) { + txType = 'settings' + } else if (tx.isCancellationTx) { + txType = 'cancellation' + } else if (tx.customTx) { + txType = 'custom' + } else if (tx.creationTx) { + txType = 'creation' + } else if (tx.upgradeTx) { + txType = 'upgrade' + } + + return txType +} + +export const buildTx = async ({ + cancellationTxs, + currentUser, + knownTokens, + outgoingTxs, + safe, + tx, + txCode, +}): Promise => { + const safeAddress = safe.address + const isModifySettingsTx = isModifySettingsTransaction(tx, safeAddress) + const isTxCancelled = isTransactionCancelled(tx, outgoingTxs, cancellationTxs) + const isSendERC721Tx = isSendERC721Transaction(tx, txCode, knownTokens) + const isSendERC20Tx = await isSendERC20Transaction(tx, txCode, knownTokens) + const isMultiSendTx = isMultiSendTransaction(tx) + const isUpgradeTx = isUpgradeTransaction(tx) + const isCustomTx = await isCustomTransaction(tx, txCode, safeAddress, knownTokens) + const isCancellationTx = isCancelTransaction(tx, safeAddress) + const refundParams = await getRefundParams(tx, getERC20DecimalsAndSymbol) + const decodedParams = getDecodedParams(tx) + const confirmations = getConfirmations(tx) + const { decimals = null, symbol = null } = isSendERC20Tx ? await getERC20DecimalsAndSymbol(tx.to) : {} + + const txToStore = makeTransaction({ + baseGas: tx.baseGas, + blockNumber: tx.blockNumber, + cancelled: isTxCancelled, + confirmations, + creationTx: tx.creationTx, + customTx: isCustomTx, + data: tx.data ? tx.data : EMPTY_DATA, + decimals, + decodedParams, + executionDate: tx.executionDate, + executionTxHash: tx.transactionHash, + executor: tx.executor, + gasPrice: tx.gasPrice, + gasToken: tx.gasToken || ZERO_ADDRESS, + isCancellationTx, + isCollectibleTransfer: isSendERC721Tx, + isExecuted: tx.isExecuted, + isSuccessful: tx.isSuccessful, + isTokenTransfer: isSendERC20Tx, + modifySettingsTx: isModifySettingsTx, + multiSendTx: isMultiSendTx, + nonce: tx.nonce, + operation: tx.operation, + origin: tx.origin, + recipient: tx.to, + refundParams, + refundReceiver: tx.refundReceiver || ZERO_ADDRESS, + safeTxGas: tx.safeTxGas, + safeTxHash: tx.safeTxHash, + submissionDate: tx.submissionDate, + symbol, + upgradeTx: isUpgradeTx, + value: tx.value.toString(), + }) + + return txToStore + .set('status', calculateTransactionStatus(txToStore, safe, currentUser)) + .set('type', calculateTransactionType(txToStore)) +} + +export const mockTransaction = (tx, safeAddress: string, state): Promise => { + const submissionDate = new Date().toISOString() + + const transactionStructure: any = { + blockNumber: null, + confirmationsRequired: null, + dataDecoded: decodeMethods(tx.data), + ethGasPrice: null, + executionDate: null, + executor: null, + fee: null, + gasUsed: null, + isExecuted: false, + isSuccessful: null, + modified: submissionDate, + origin: null, + safe: safeAddress, + safeTxHash: null, + signatures: null, + submissionDate, + transactionHash: null, + confirmations: [], + ...tx, + } + + const knownTokens = state[TOKEN_REDUCER_ID] + const safe = state[SAFE_REDUCER_ID].getIn([SAFE_REDUCER_ID, safeAddress]) + const cancellationTxs = state[CANCELLATION_TRANSACTIONS_REDUCER_ID].get(safeAddress) || Map() + const outgoingTxs = state[TRANSACTIONS_REDUCER_ID].get(safeAddress) || List() + + return buildTx({ + cancellationTxs, + currentUser: null, + knownTokens, + outgoingTxs, + safe, + tx: transactionStructure, + txCode: EMPTY_DATA, + }) +} diff --git a/src/routes/safe/store/models/transaction.ts b/src/routes/safe/store/models/transaction.ts index 1ed5fcb8..da1fb3ad 100644 --- a/src/routes/safe/store/models/transaction.ts +++ b/src/routes/safe/store/models/transaction.ts @@ -2,41 +2,101 @@ import { List, Record } from 'immutable' import { ZERO_ADDRESS } from 'src/logic/wallets/ethAddresses' -export const OUTGOING_TX_TYPE = 'outgoing' +export type TransactionType = + | 'incoming' + | 'outgoing' + | 'settings' + | 'custom' + | 'creation' + | 'cancellation' + | 'upgrade' + | 'token' + | 'collectible' + +export type TransactionStatus = + | 'awaiting_your_confirmation' + | 'awaiting_confirmations' + | 'success' + | 'failed' + | 'cancelled' + | 'awaiting_execution' + | 'pending' + +export type TransactionProps = { + baseGas: number + blockNumber?: number | null + cancelled?: boolean + confirmations: List + creationTx: boolean + customTx: boolean + data?: string | null + decimals?: (number | string) | null + decodedParams: any + executionDate?: string | null + executionTxHash?: string | null + executor: string + gasPrice: number + gasToken: string + isCancellationTx: boolean + isCollectibleTransfer: boolean + isExecuted: boolean + isPending?: boolean + isSuccessful: boolean + isTokenTransfer: boolean + modifySettingsTx: boolean + multiSendTx: boolean + nonce?: number | null + operation: number + origin: string | null + recipient: string + refundParams: any + refundReceiver: string + safeTxGas: number + safeTxHash: string + status?: TransactionStatus + submissionDate?: string | null + symbol?: string | null + type: TransactionType + upgradeTx: boolean + value: string +} export const makeTransaction = Record({ - nonce: 0, - blockNumber: 0, - value: '0', - confirmations: List([]), - recipient: '', - data: null, - operation: 0, - safeTxGas: 0, baseGas: 0, + blockNumber: 0, + cancelled: false, + confirmations: List([]), + creationTx: false, + customTx: false, + data: null, + decimals: 18, + decodedParams: {}, + executionDate: '', + executionTxHash: undefined, + executor: '', gasPrice: 0, gasToken: ZERO_ADDRESS, - refundReceiver: ZERO_ADDRESS, + isCancellationTx: false, + isCollectibleTransfer: false, isExecuted: false, isSuccessful: true, - submissionDate: '', - executor: '', - executionDate: '', - symbol: '', - executionTxHash: undefined, - safeTxHash: '', - cancelled: false, - modifySettingsTx: false, - cancellationTx: false, - customTx: false, - creationTx: false, - multiSendTx: false, - upgradeTx: false, - status: 'awaiting', - decimals: 18, isTokenTransfer: false, - decodedParams: {}, - refundParams: null, - type: 'outgoing', + modifySettingsTx: false, + multiSendTx: false, + nonce: 0, + operation: 0, origin: null, + recipient: '', + refundParams: null, + refundReceiver: ZERO_ADDRESS, + safeTxGas: 0, + safeTxHash: '', + status: 'awaiting', + submissionDate: '', + symbol: '', + type: 'outgoing', + upgradeTx: false, + value: 0, }) + +export type Transaction = Record From 376af39f3cabd09a5d40c33d868ba9a4743d0d23 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Fri, 22 May 2020 16:50:10 -0300 Subject: [PATCH 28/65] refactor: notifications middleware --- .../safe/transactions/awaitingTransactions.ts | 41 ++++++------------ .../middleware/notificationsMiddleware.ts | 43 ++++++++----------- src/store/index.ts | 2 +- 3 files changed, 32 insertions(+), 54 deletions(-) diff --git a/src/logic/safe/transactions/awaitingTransactions.ts b/src/logic/safe/transactions/awaitingTransactions.ts index 25d3f3ae..c15bfc91 100644 --- a/src/logic/safe/transactions/awaitingTransactions.ts +++ b/src/logic/safe/transactions/awaitingTransactions.ts @@ -1,33 +1,18 @@ -import { Map } from 'immutable' +import { List } from 'immutable' -export const getAwaitingTransactions = (allTransactions, cancellationTransactionsByNonce, userAccount) => { - if (!allTransactions) { - return Map({}) - } +import { isPendingTransaction } from 'src/routes/safe/store/actions/transactions/utils/transactionHelpers' - const allAwaitingTransactions = allTransactions.map((safeTransactions) => { - const nonCancelledTransactions = safeTransactions.filter((transaction) => { - // If transactions are not executed, but there's a transaction with the same nonce EXECUTED later - // it means that the transaction was cancelled (Replaced) and shouldn't get executed - let isTransactionCancelled = false - if (!transaction.isExecuted) { - if (cancellationTransactionsByNonce.get(transaction.nonce)) { - // eslint-disable-next-line no-param-reassign - isTransactionCancelled = true - } - } - // The transaction is not executed and is not cancelled, so it's still waiting confirmations - if (!transaction.executionTxHash && !isTransactionCancelled) { - // Then we check if the waiting confirmations are not from the current user, otherwise, filters this - // transaction - const transactionWaitingUser = transaction.confirmations.filter(({ owner }) => owner !== userAccount) +export const getAwaitingTransactions = (allTransactions = List([]), cancellationTxs, userAccount: string) => { + return allTransactions.filter((tx) => { + const cancelTx = !!tx.nonce && !isNaN(Number(tx.nonce)) ? cancellationTxs.get(`${tx.nonce}`) : null - return transactionWaitingUser.size > 0 - } - return false - }) - return nonCancelledTransactions + // The transaction is not executed and is not cancelled, nor pending, so it's still waiting confirmations + if (!tx.executionTxHash && !tx.cancelled && !isPendingTransaction(tx, cancelTx)) { + // Then we check if the waiting confirmations are not from the current user, otherwise, filters this transaction + const transactionWaitingUser = tx.confirmations.filter(({ owner }) => owner !== userAccount) + return transactionWaitingUser.size > 0 + } + + return false }) - - return allAwaitingTransactions } diff --git a/src/routes/safe/store/middleware/notificationsMiddleware.ts b/src/routes/safe/store/middleware/notificationsMiddleware.ts index bea90187..ce6956e6 100644 --- a/src/routes/safe/store/middleware/notificationsMiddleware.ts +++ b/src/routes/safe/store/middleware/notificationsMiddleware.ts @@ -1,5 +1,4 @@ import { push } from 'connected-react-router' -import { List, Map } from 'immutable' import { NOTIFICATIONS, enhanceSnackbarForAction } from 'src/logic/notifications' import closeSnackbarAction from 'src/logic/notifications/store/actions/closeSnackbar' @@ -12,13 +11,14 @@ import { getIncomingTxAmount } from 'src/routes/safe/components/Transactions/Txs import { grantedSelector } from 'src/routes/safe/container/selector' import { ADD_INCOMING_TRANSACTIONS } from 'src/routes/safe/store/actions/addIncomingTransactions' import { ADD_SAFE } from 'src/routes/safe/store/actions/addSafe' -import { ADD_TRANSACTIONS } from 'src/routes/safe/store/actions/addTransactions' +import { ADD_OR_UPDATE_TRANSACTIONS } from 'src/routes/safe/store/actions/transactions/addOrUpdateTransactions' import updateSafe from 'src/routes/safe/store/actions/updateSafe' +import { CANCELLATION_TRANSACTIONS_REDUCER_ID } from 'src/routes/safe/store/reducer/cancellationTransactions' import { safeParamAddressFromStateSelector, safesMapSelector } from 'src/routes/safe/store/selectors' import { loadFromStorage, saveToStorage } from 'src/utils/storage' -const watchedActions = [ADD_TRANSACTIONS, ADD_INCOMING_TRANSACTIONS, ADD_SAFE] +const watchedActions = [ADD_OR_UPDATE_TRANSACTIONS, ADD_INCOMING_TRANSACTIONS, ADD_SAFE] const sendAwaitingTransactionNotification = async ( dispatch, @@ -59,48 +59,41 @@ const sendAwaitingTransactionNotification = async ( await saveToStorage(LAST_TIME_USED_LOGGED_IN_ID, lastTimeUserLoggedInForSafes) } +const onNotificationClicked = (dispatch, notificationKey, safeAddress) => () => { + dispatch(closeSnackbarAction({ key: notificationKey })) + dispatch(push(`/safes/${safeAddress}/transactions`)) +} + const notificationsMiddleware = (store) => (next) => async (action) => { const handledAction = next(action) const { dispatch } = store if (watchedActions.includes(action.type)) { const state = store.getState() + switch (action.type) { - case ADD_TRANSACTIONS: { - const transactionsList = action.payload - const userAddress = userAccountSelector(state) - const safeAddress = action.payload.keySeq().get(0) - const cancellationTransactions = state.cancellationTransactions.get(safeAddress) - const cancellationTransactionsByNonce = cancellationTransactions - ? cancellationTransactions.reduce((acc, tx) => acc.set(tx.nonce, tx), Map()) - : Map() - const awaitingTransactions = getAwaitingTransactions( - transactionsList, - cancellationTransactionsByNonce, - userAddress, - ) - const awaitingTxsSubmissionDateList = awaitingTransactions - .get(safeAddress, List([])) - .map((tx) => tx.submissionDate) + case ADD_OR_UPDATE_TRANSACTIONS: { + const { safeAddress, transactions } = action.payload + const userAddress: string = userAccountSelector(state) + const cancellationTransactions = state[CANCELLATION_TRANSACTIONS_REDUCER_ID].get(safeAddress) + const awaitingTransactions = getAwaitingTransactions(transactions, cancellationTransactions, userAddress) + const awaitingTxsSubmissionDateList = awaitingTransactions.map((tx) => tx.submissionDate) const safes = safesMapSelector(state) const currentSafe = safes.get(safeAddress) - if (!isUserOwner(currentSafe, userAddress) || awaitingTxsSubmissionDateList.size === 0) { + if (!isUserOwner(currentSafe, userAddress) || awaitingTransactions.size === 0) { break } + const notificationKey = `${safeAddress}-awaiting` - const onNotificationClicked = () => { - dispatch(closeSnackbarAction({ key: notificationKey })) - dispatch(push(`/safes/${safeAddress}/transactions`)) - } await sendAwaitingTransactionNotification( dispatch, safeAddress, awaitingTxsSubmissionDateList, notificationKey, - onNotificationClicked, + onNotificationClicked(dispatch, notificationKey, safeAddress), ) break diff --git a/src/store/index.ts b/src/store/index.ts index 9f92024c..8574ecc4 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -38,9 +38,9 @@ const finalCreateStore = composeEnhancers( applyMiddleware( thunk, routerMiddleware(history), + notificationsMiddleware, safeStorage, providerWatcher, - notificationsMiddleware, addressBookMiddleware, currencyValuesStorageMiddleware, ), From 6c1bc100b6847d54026b4b53b96a3dba92ba3451 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Fri, 22 May 2020 16:50:17 -0300 Subject: [PATCH 29/65] refactor: allow adding mocked transactions --- .../safe/store/actions/createTransaction.ts | 108 +++++++++++++----- .../safe/store/actions/processTransaction.ts | 64 ++++++++--- 2 files changed, 132 insertions(+), 40 deletions(-) diff --git a/src/routes/safe/store/actions/createTransaction.ts b/src/routes/safe/store/actions/createTransaction.ts index bbdc3f68..0ba98a46 100644 --- a/src/routes/safe/store/actions/createTransaction.ts +++ b/src/routes/safe/store/actions/createTransaction.ts @@ -1,4 +1,5 @@ import { push } from 'connected-react-router' +import { List, Map, fromJS } from 'immutable' import semverSatisfies from 'semver/functions/satisfies' import { onboardUser } from 'src/components/ConnectButton' @@ -12,10 +13,41 @@ import { ZERO_ADDRESS } from 'src/logic/wallets/ethAddresses' import { EMPTY_DATA } from 'src/logic/wallets/ethTransactions' import { providerSelector } from 'src/logic/wallets/store/selectors' import { SAFELIST_ADDRESS } from 'src/routes/routes' -import fetchTransactions from 'src/routes/safe/store/actions/fetchTransactions' +import { addOrUpdateCancellationTransactions } from 'src/routes/safe/store/actions/transactions/addOrUpdateCancellationTransactions' +import { addOrUpdateTransactions } from 'src/routes/safe/store/actions/transactions/addOrUpdateTransactions' +import { removeCancellationTransaction } from 'src/routes/safe/store/actions/transactions/removeCancellationTransaction' +import { removeTransaction } from 'src/routes/safe/store/actions/transactions/removeTransaction' +import { mockTransaction } from 'src/routes/safe/store/actions/transactions/utils/transactionHelpers' import { getLastTx, getNewTxNonce, shouldExecuteTransaction } from 'src/routes/safe/store/actions/utils' - import { getErrorMessage } from 'src/test/utils/ethereumErrors' +import { makeConfirmation } from '../models/confirmation' +import fetchTransactions from './transactions/fetchTransactions' + +export const removeTxFromStore = (tx, safeAddress, dispatch) => { + if (tx.isCancellationTx) { + dispatch(removeCancellationTransaction({ safeAddress, transaction: tx })) + } else { + dispatch(removeTransaction({ safeAddress, transaction: tx })) + } +} + +export const storeTx = async (tx, safeAddress, dispatch) => { + if (tx.isCancellationTx) { + dispatch( + addOrUpdateCancellationTransactions({ + safeAddress, + transactions: Map({ [`${tx.nonce}`]: tx }), + }), + ) + } else { + dispatch( + addOrUpdateTransactions({ + safeAddress, + transactions: List([tx]), + }), + ) + } +} const createTransaction = ({ safeAddress, @@ -42,7 +74,7 @@ const createTransaction = ({ const { account: from, hardwareWallet, smartContractWallet } = providerSelector(state) const safeInstance = await getGnosisSafeInstanceAt(safeAddress) const lastTx = await getLastTx(safeAddress) - const nonce = await getNewTxNonce(txNonce, lastTx, safeInstance) + const nonce = Number(await getNewTxNonce(txNonce, lastTx, safeInstance)) const isExecution = await shouldExecuteTransaction(safeInstance, nonce, lastTx) const safeVersion = await getCurrentSafeVersion(safeInstance) const safeTxGas = await estimateSafeTxGas(safeInstance, safeAddress, txData, to, valueInWei, operation) @@ -78,9 +110,6 @@ const createTransaction = ({ try { // Here we're checking that safe contract version is greater or equal 1.1.1, but // theoretically EIP712 should also work for 1.0.0 contracts - // Also, offchain signatures are not working for ledger/trezor wallet because of a bug in their library: - // https://github.com/LedgerHQ/ledgerjs/issues/378 - // Couldn't find an issue for trezor but the error is almost the same const canTryOffchainSigning = !isExecution && !smartContractWallet && semverSatisfies(safeVersion, SAFE_VERSION_FOR_OFFCHAIN_SIGNATURES) if (canTryOffchainSigning) { @@ -89,11 +118,7 @@ const createTransaction = ({ if (signature) { closeSnackbar(beforeExecutionKey) - await saveTxToHistory({ - ...txArgs, - signature, - origin, - } as any) + await saveTxToHistory({ ...txArgs, signature, origin }) showSnackbar(notificationsQueue.afterExecution.moreConfirmationsNeeded, enqueueSnackbar, closeSnackbar) dispatch(fetchTransactions(safeAddress)) @@ -110,30 +135,39 @@ const createTransaction = ({ sendParams.gas = '7000000' } + const txToMock = { + ...txArgs, + confirmations: [], // this is used to determine if a tx is pending or not. See `calculateTransactionStatus` helper + value: txArgs.valueInWei, + } + const mockedTx = await mockTransaction(txToMock, safeAddress, state) + await tx .send(sendParams) .once('transactionHash', async (hash) => { - txHash = hash - closeSnackbar(beforeExecutionKey) - - pendingExecutionKey = showSnackbar(notificationsQueue.pendingExecution, enqueueSnackbar, closeSnackbar) - try { - await saveTxToHistory({ - ...txArgs, - txHash, - origin, - } as any) + txHash = hash + closeSnackbar(beforeExecutionKey) + + pendingExecutionKey = showSnackbar(notificationsQueue.pendingExecution, enqueueSnackbar, closeSnackbar) + + await saveTxToHistory({ ...txArgs, txHash, origin }) + await storeTx(mockedTx, safeAddress, dispatch) dispatch(fetchTransactions(safeAddress)) - } catch (err) { - console.error(err) + } catch (e) { + removeTxFromStore(mockedTx, safeAddress, dispatch) } }) .on('error', (error) => { + closeSnackbar(pendingExecutionKey) + removeTxFromStore(mockedTx, safeAddress, dispatch) console.error('Tx error: ', error) }) - .then((receipt) => { - closeSnackbar(pendingExecutionKey) + .then(async (receipt) => { + if (pendingExecutionKey) { + closeSnackbar(pendingExecutionKey) + } + showSnackbar( isExecution ? notificationsQueue.afterExecution.noMoreConfirmationsNeeded @@ -142,6 +176,24 @@ const createTransaction = ({ closeSnackbar, ) + const toStoreTx = isExecution + ? mockedTx.withMutations((record) => { + record + .set('executionTxHash', receipt.events.ExecutionSuccess.transactionHash) + .set('safeTxHash', receipt.events.ExecutionSuccess.returnValues.txHash) + .set('executor', from) + .set('isExecuted', true) + .set('isSuccessful', true) + .set('status', 'success') + }) + : mockedTx.set('status', 'awaiting_confirmations') + + await storeTx( + toStoreTx.set('confirmations', fromJS([makeConfirmation({ owner: from })])), + safeAddress, + dispatch, + ) + dispatch(fetchTransactions(safeAddress)) return receipt.transactionHash @@ -149,7 +201,11 @@ const createTransaction = ({ } catch (err) { console.error(err) closeSnackbar(beforeExecutionKey) - closeSnackbar(pendingExecutionKey) + + if (pendingExecutionKey) { + closeSnackbar(pendingExecutionKey) + } + showSnackbar(notificationsQueue.afterExecutionError, enqueueSnackbar, closeSnackbar) const executeDataUsedSignatures = safeInstance.contract.methods diff --git a/src/routes/safe/store/actions/processTransaction.ts b/src/routes/safe/store/actions/processTransaction.ts index c5af9c34..fb7b7ab8 100644 --- a/src/routes/safe/store/actions/processTransaction.ts +++ b/src/routes/safe/store/actions/processTransaction.ts @@ -1,3 +1,4 @@ +import { fromJS } from 'immutable' import semverSatisfies from 'semver/functions/satisfies' import { getGnosisSafeInstanceAt } from 'src/logic/contracts/safeContracts' @@ -8,10 +9,16 @@ import { SAFE_VERSION_FOR_OFFCHAIN_SIGNATURES, tryOffchainSigning } from 'src/lo import { getCurrentSafeVersion } from 'src/logic/safe/utils/safeVersion' import { providerSelector } from 'src/logic/wallets/store/selectors' import fetchSafe from 'src/routes/safe/store/actions/fetchSafe' -import fetchTransactions from 'src/routes/safe/store/actions/fetchTransactions' +import fetchTransactions from 'src/routes/safe/store/actions/transactions/fetchTransactions' +import { + isCancelTransaction, + mockTransaction, +} from 'src/routes/safe/store/actions/transactions/utils/transactionHelpers' import { getLastTx, getNewTxNonce, shouldExecuteTransaction } from 'src/routes/safe/store/actions/utils' import { getErrorMessage } from 'src/test/utils/ethereumErrors' +import { makeConfirmation } from '../models/confirmation' +import { storeTx } from './createTransaction' const processTransaction = ({ approveAndExecute, @@ -47,6 +54,7 @@ const processTransaction = ({ let txHash let transaction const txArgs = { + ...tx.toJS(), // merge the previous tx with new data safeInstance, to: tx.recipient, valueInWei: tx.value, @@ -76,11 +84,7 @@ const processTransaction = ({ if (signature) { closeSnackbar(beforeExecutionKey) - await saveTxToHistory({ - ...txArgs, - signature, - origin, - } as any) + await saveTxToHistory({ ...txArgs, signature }) showSnackbar(notificationsQueue.afterExecution.moreConfirmationsNeeded, enqueueSnackbar, closeSnackbar) dispatch(fetchTransactions(safeAddress)) @@ -97,6 +101,13 @@ const processTransaction = ({ sendParams.gas = '7000000' } + const txToMock = { + ...txArgs, + confirmations: [], // this is used to determine if a tx is pending or not. See `calculateTransactionStatus` helper + value: txArgs.valueInWei, + } + const mockedTx = await mockTransaction(txToMock, safeAddress, state) + await transaction .send(sendParams) .once('transactionHash', async (hash) => { @@ -106,20 +117,24 @@ const processTransaction = ({ pendingExecutionKey = showSnackbar(notificationsQueue.pendingExecution, enqueueSnackbar, closeSnackbar) try { - await saveTxToHistory({ - ...txArgs, - txHash, - }) + await saveTxToHistory({ ...txArgs, txHash }) + await storeTx(mockedTx, safeAddress, dispatch) dispatch(fetchTransactions(safeAddress)) - } catch (err) { - console.error(err) + } catch (e) { + closeSnackbar(pendingExecutionKey) + await storeTx(tx, safeAddress, dispatch) + console.error(e) } }) .on('error', (error) => { + closeSnackbar(pendingExecutionKey) + storeTx(mockedTx.set('isSuccessful', false), safeAddress, dispatch) console.error('Processing transaction error: ', error) }) - .then((receipt) => { - closeSnackbar(pendingExecutionKey) + .then(async (receipt) => { + if (pendingExecutionKey) { + closeSnackbar(pendingExecutionKey) + } showSnackbar( isExecution @@ -128,6 +143,27 @@ const processTransaction = ({ enqueueSnackbar, closeSnackbar, ) + + const toStoreTx = isExecution + ? mockedTx.withMutations((record) => { + record + .set('executionTxHash', receipt.events.ExecutionSuccess.transactionHash) + .set('safeTxHash', receipt.events.ExecutionSuccess.returnValues.txHash) + .set('blockNumber', receipt.blockNumber) + .set('executionDate', record.submissionDate) + .set('executor', from) + .set('isExecuted', true) + .set('isSuccessful', true) + .set('status', isCancelTransaction(record, safeAddress) ? 'cancelled' : 'success') + }) + : mockedTx.set('status', 'awaiting_confirmations') + + await storeTx( + toStoreTx.set('confirmations', fromJS([...tx.confirmations, makeConfirmation({ owner: from })])), + safeAddress, + dispatch, + ) + dispatch(fetchTransactions(safeAddress)) if (isExecution) { From 926795eef1da24e3cf875f4624cac11740bfae9f Mon Sep 17 00:00:00 2001 From: fernandomg Date: Fri, 22 May 2020 16:50:24 -0300 Subject: [PATCH 30/65] refactor: transactions table info and details --- .../ExpandedTx/OwnersColumn/index.tsx | 6 +- .../ExpandedTx/TxDescription/utils.ts | 53 +++++---- .../Transactions/TxsTable/TxType/index.tsx | 4 + .../Transactions/TxsTable/columns.tsx | 28 +---- .../Transactions/TxsTable/index.tsx | 111 ++++++++++-------- src/routes/safe/container/selector.ts | 64 +--------- .../safe/store/selectors/transactions.ts | 61 +--------- 7 files changed, 103 insertions(+), 224 deletions(-) diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/index.tsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/index.tsx index 51c351d2..7f7f7309 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/index.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/index.tsx @@ -15,7 +15,6 @@ import Block from 'src/components/layout/Block' import Col from 'src/components/layout/Col' import Img from 'src/components/layout/Img' import Paragraph from 'src/components/layout/Paragraph/index' -import { TX_TYPE_CONFIRMATION } from 'src/logic/safe/transactions/send' import { userAccountSelector } from 'src/logic/wallets/store/selectors' import { makeTransaction } from 'src/routes/safe/store/models/transaction' import { safeOwnersSelector, safeThresholdSelector } from 'src/routes/safe/store/selectors' @@ -29,11 +28,8 @@ function getOwnersConfirmations(tx, userAddress) { currentUserAlreadyConfirmed = true } - if (conf.type === TX_TYPE_CONFIRMATION) { - ownersWhoConfirmed.push(conf.owner) - } + ownersWhoConfirmed.push(conf.owner) }) - return [ownersWhoConfirmed, currentUserAlreadyConfirmed] } diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/utils.ts b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/utils.ts index 05356aca..bcf7a81c 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/utils.ts +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/utils.ts @@ -1,5 +1,4 @@ import { SAFE_METHODS_NAMES } from 'src/logic/contracts/methodIds' -import { getWeb3 } from 'src/logic/wallets/getWeb3' const getSafeVersion = (data) => { const contractAddress = data.substr(340, 40).toLowerCase() @@ -12,43 +11,50 @@ const getSafeVersion = (data) => { } export const getTxData = (tx) => { - const web3 = getWeb3() - const { fromWei, toBN } = web3.utils - const txData: any = {} - if (tx.isTokenTransfer && tx.decodedParams) { - txData.recipient = tx.decodedParams.recipient - txData.value = fromWei(toBN(tx.decodedParams.value), 'ether') + if (tx.decodedParams) { + if (tx.isTokenTransfer) { + const { to } = tx.decodedParams.transfer + txData.recipient = to + txData.isTokenTransfer = true + } + if (tx.isCollectibleTransfer) { + const { safeTransferFrom, transfer, transferFrom } = tx.decodedParams + const { to, value } = safeTransferFrom || transferFrom || transfer + txData.recipient = to + txData.tokenId = value + txData.isCollectibleTransfer = true + } } else if (tx.customTx) { txData.recipient = tx.recipient - txData.value = fromWei(toBN(tx.value), 'ether') txData.data = tx.data txData.customTx = true } else if (Number(tx.value) > 0) { txData.recipient = tx.recipient - txData.value = fromWei(toBN(tx.value), 'ether') } else if (tx.modifySettingsTx) { txData.recipient = tx.recipient txData.modifySettingsTx = true if (tx.decodedParams) { - txData.action = tx.decodedParams.methodName - - if (txData.action === SAFE_METHODS_NAMES.REMOVE_OWNER) { - txData.removedOwner = tx.decodedParams.args[1] - txData.newThreshold = tx.decodedParams.args[2] - } else if (txData.action === SAFE_METHODS_NAMES.CHANGE_THRESHOLD) { - txData.newThreshold = tx.decodedParams.args[0] - } else if (txData.action === SAFE_METHODS_NAMES.ADD_OWNER_WITH_THRESHOLD) { - txData.addedOwner = tx.decodedParams.args[0] - txData.newThreshold = tx.decodedParams.args[1] - } else if (txData.action === SAFE_METHODS_NAMES.SWAP_OWNER) { - txData.removedOwner = tx.decodedParams.args[1] - txData.addedOwner = tx.decodedParams.args[2] + if (tx.decodedParams[SAFE_METHODS_NAMES.REMOVE_OWNER]) { + const { _threshold, owner } = tx.decodedParams[SAFE_METHODS_NAMES.REMOVE_OWNER] + txData.removedOwner = owner + txData.newThreshold = _threshold + } else if (tx.decodedParams[SAFE_METHODS_NAMES.CHANGE_THRESHOLD]) { + const { _threshold } = tx.decodedParams[SAFE_METHODS_NAMES.CHANGE_THRESHOLD] + txData.newThreshold = _threshold + } else if (tx.decodedParams[SAFE_METHODS_NAMES.ADD_OWNER_WITH_THRESHOLD]) { + const { _threshold, owner } = tx.decodedParams[SAFE_METHODS_NAMES.ADD_OWNER_WITH_THRESHOLD] + txData.addedOwner = owner + txData.newThreshold = _threshold + } else if (tx.decodedParams[SAFE_METHODS_NAMES.SWAP_OWNER]) { + const { newOwner, oldOwner } = tx.decodedParams[SAFE_METHODS_NAMES.SWAP_OWNER] + txData.removedOwner = oldOwner + txData.addedOwner = newOwner } } - } else if (tx.cancellationTx) { + } else if (tx.isCancellationTx) { txData.cancellationTx = true } else if (tx.creationTx) { txData.creationTx = true @@ -57,7 +63,6 @@ export const getTxData = (tx) => { txData.data = `The contract of this Safe is upgraded to Version ${getSafeVersion(tx.data)}` } else { txData.recipient = tx.recipient - txData.value = 0 } return txData diff --git a/src/routes/safe/components/Transactions/TxsTable/TxType/index.tsx b/src/routes/safe/components/Transactions/TxsTable/TxType/index.tsx index bec45804..487f628a 100644 --- a/src/routes/safe/components/Transactions/TxsTable/TxType/index.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/TxType/index.tsx @@ -11,6 +11,8 @@ import { getAppInfoFromOrigin, getAppInfoFromUrl } from 'src/routes/safe/compone const typeToIcon = { outgoing: OutgoingTxIcon, + token: OutgoingTxIcon, + collectible: OutgoingTxIcon, incoming: IncomingTxIcon, custom: CustomTxIcon, settings: SettingsTxIcon, @@ -21,6 +23,8 @@ const typeToIcon = { const typeToLabel = { outgoing: 'Outgoing transfer', + token: 'Outgoing transfer', + collectible: 'Outgoing transfer', incoming: 'Incoming transfer', custom: 'Contract Interaction', settings: 'Modify settings', diff --git a/src/routes/safe/components/Transactions/TxsTable/columns.tsx b/src/routes/safe/components/Transactions/TxsTable/columns.tsx index a856fdb7..b5cda0cb 100644 --- a/src/routes/safe/components/Transactions/TxsTable/columns.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/columns.tsx @@ -2,7 +2,7 @@ import { BigNumber } from 'bignumber.js' import format from 'date-fns/format' import getTime from 'date-fns/getTime' import parseISO from 'date-fns/parseISO' -import { List, Map } from 'immutable' +import { List } from 'immutable' import React from 'react' import TxType from './TxType' @@ -43,7 +43,7 @@ export const getIncomingTxAmount = (tx, formatted = true) => { export const getTxAmount = (tx, formatted = true) => { const { decimals = 18, decodedParams, isTokenTransfer, symbol } = tx - const { value } = isTokenTransfer && decodedParams && decodedParams.value ? decodedParams : tx + const { value } = isTokenTransfer && !!decodedParams && !!decodedParams.transfer ? decodedParams.transfer : tx if (!isTokenTransfer && !(Number(value) > 0)) { return NOT_AVAILABLE @@ -65,22 +65,9 @@ const getIncomingTxTableData = (tx) => ({ const getTransactionTableData = (tx, cancelTx) => { const txDate = tx.submissionDate - let txType = 'outgoing' - if (tx.modifySettingsTx) { - txType = 'settings' - } else if (tx.cancellationTx) { - txType = 'cancellation' - } else if (tx.customTx) { - txType = 'custom' - } else if (tx.creationTx) { - txType = 'creation' - } else if (tx.upgradeTx) { - txType = 'upgrade' - } - return { [TX_TABLE_ID]: tx.blockNumber, - [TX_TABLE_TYPE_ID]: , + [TX_TABLE_TYPE_ID]: , [TX_TABLE_DATE_ID]: txDate ? formatDate(txDate) : '', [buildOrderFieldFrom(TX_TABLE_DATE_ID)]: txDate ? getTime(parseISO(txDate)) : null, [TX_TABLE_AMOUNT_ID]: getTxAmount(tx), @@ -91,17 +78,12 @@ const getTransactionTableData = (tx, cancelTx) => { } export const getTxTableData = (transactions, cancelTxs) => { - const cancelTxsByNonce = cancelTxs.reduce((acc, tx) => acc.set(tx.nonce, tx), Map()) - return transactions.map((tx) => { - if (INCOMING_TX_TYPES[tx.type]) { + if (INCOMING_TX_TYPES[tx.type] !== undefined) { return getIncomingTxTableData(tx) } - return getTransactionTableData( - tx, - Number.isInteger(Number.parseInt(tx.nonce, 10)) ? cancelTxsByNonce.get(tx.nonce) : undefined, - ) + return getTransactionTableData(tx, cancelTxs.get(`${tx.nonce}`)) }) } diff --git a/src/routes/safe/components/Transactions/TxsTable/index.tsx b/src/routes/safe/components/Transactions/TxsTable/index.tsx index e5dbd6bc..56ec6177 100644 --- a/src/routes/safe/components/Transactions/TxsTable/index.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/index.tsx @@ -19,8 +19,8 @@ import Table from 'src/components/Table' import { cellWidth } from 'src/components/Table/TableHead' import Block from 'src/components/layout/Block' import Row from 'src/components/layout/Row' -import { extendedTransactionsSelector } from 'src/routes/safe/container/selector' import { safeCancellationTransactionsSelector } from 'src/routes/safe/store/selectors' +import { extendedTransactionsSelector } from '../../../store/selectors/transactions' export const TRANSACTION_ROW_TEST_ID = 'transaction-row' @@ -36,8 +36,8 @@ const TxsTable = ({ classes }) => { const cancellationTransactions = useSelector(safeCancellationTransactionsSelector) const transactions = useSelector(extendedTransactionsSelector) - const handleTxExpand = (safeTxHash) => { - setExpandedTx((prevTx) => (prevTx === safeTxHash ? null : safeTxHash)) + const handleTxExpand = (rowCombinedId) => { + setExpandedTx((prevId) => (prevId === rowCombinedId ? null : rowCombinedId)) } const columns = generateColumns() @@ -83,58 +83,65 @@ const TxsTable = ({ classes }) => { size={filteredData.size} > {(sortedData) => - sortedData.map((row, index) => ( - - handleTxExpand(row.tx.safeTxHash)} - tabIndex={-1} - > - {autoColumns.map((column: any) => ( - - {row[column.id]} + sortedData.map((row, index) => { + const rowCombinedId = `${row.tx.nonce + row.tx.data}` + + return ( + + handleTxExpand(rowCombinedId)} + tabIndex={-1} + > + {autoColumns.map((column: any) => ( + + {row[column.id]} + + ))} + + + + - ))} - - - - - - - {!row.tx.creationTx && ( - - {expandedTx === row.safeTxHash ? : } - - )} - - - {!row.tx.creationTx && ( - - - + + {!row.tx.creationTx && ( + + {expandedTx === rowCombinedId ? : } + + )} - )} - - )) + {!row.tx.creationTx && ( + + + + + + )} + + ) + }) } diff --git a/src/routes/safe/container/selector.ts b/src/routes/safe/container/selector.ts index 9c63b816..9c9fb0b4 100644 --- a/src/routes/safe/container/selector.ts +++ b/src/routes/safe/container/selector.ts @@ -1,4 +1,4 @@ -import { List, Map } from 'immutable' +import { Map } from 'immutable' import { createSelector } from 'reselect' import { tokensSelector } from 'src/logic/tokens/store/selectors' @@ -6,39 +6,7 @@ import { getEthAsToken } from 'src/logic/tokens/utils/tokenHelpers' import { isUserOwner } from 'src/logic/wallets/ethAddresses' import { userAccountSelector } from 'src/logic/wallets/store/selectors' -import { - safeActiveTokensSelector, - safeBalancesSelector, - safeCancellationTransactionsSelector, - safeIncomingTransactionsSelector, - safeSelector, - safeTransactionsSelector, -} from 'src/routes/safe/store/selectors' - -const getTxStatus = (tx, userAddress, safe) => { - let txStatus - if (tx.executionTxHash) { - txStatus = 'success' - } else if (tx.cancelled) { - txStatus = 'cancelled' - } else if (tx.confirmations.size === safe.threshold) { - txStatus = 'awaiting_execution' - } else if (tx.creationTx) { - txStatus = 'success' - } else if (!tx.confirmations.size) { - txStatus = 'pending' - } else { - const userConfirmed = tx.confirmations.filter((conf) => conf.owner === userAddress).size === 1 - const userIsSafeOwner = safe.owners.filter((owner) => owner.address === userAddress).size === 1 - txStatus = !userConfirmed && userIsSafeOwner ? 'awaiting_your_confirmation' : 'awaiting_confirmations' - } - - if (tx.isSuccessful === false) { - txStatus = 'failed' - } - - return txStatus -} +import { safeActiveTokensSelector, safeBalancesSelector, safeSelector } from 'src/routes/safe/store/selectors' export const grantedSelector = createSelector(userAccountSelector, safeSelector, (userAccount, safe) => isUserOwner(safe, userAccount), @@ -76,31 +44,3 @@ export const extendedSafeTokensSelector = createSelector( return extendedTokens.toList() }, ) - -export const extendedTransactionsSelector = createSelector( - safeSelector, - userAccountSelector, - safeTransactionsSelector, - safeCancellationTransactionsSelector, - safeIncomingTransactionsSelector, - (safe, userAddress, transactions, cancellationTransactions, incomingTransactions) => { - const cancellationTransactionsByNonce = cancellationTransactions.reduce((acc, tx) => acc.set(tx.nonce, tx), Map()) - const extendedTransactions = transactions.map((tx) => { - let extendedTx = tx - - if (!tx.isExecuted) { - if ( - (cancellationTransactionsByNonce.get(tx.nonce) && - cancellationTransactionsByNonce.get(tx.nonce).get('isExecuted')) || - transactions.find((safeTx) => tx.nonce === safeTx.nonce && safeTx.isExecuted) - ) { - extendedTx = tx.set('cancelled', true) - } - } - - return extendedTx.set('status', getTxStatus(extendedTx, userAddress, safe)) - }) - - return List([...extendedTransactions, ...incomingTransactions]) - }, -) diff --git a/src/routes/safe/store/selectors/transactions.ts b/src/routes/safe/store/selectors/transactions.ts index b5dbb408..da4b7782 100644 --- a/src/routes/safe/store/selectors/transactions.ts +++ b/src/routes/safe/store/selectors/transactions.ts @@ -1,65 +1,10 @@ -import { List, Map } from 'immutable' +import { List } from 'immutable' import { createSelector } from 'reselect' -import { userAccountSelector } from 'src/logic/wallets/store/selectors' -import { - safeCancellationTransactionsSelector, - safeIncomingTransactionsSelector, - safeSelector, - safeTransactionsSelector, -} from 'src/routes/safe/store/selectors' - -const getTxStatus = (tx: any, userAddress: string, safe): string => { - let txStatus - - if (tx.executionTxHash) { - txStatus = 'success' - } else if (tx.cancelled) { - txStatus = 'cancelled' - } else if (tx.confirmations.size === safe.threshold) { - txStatus = 'awaiting_execution' - } else if (tx.creationTx) { - txStatus = 'success' - } else if (!tx.confirmations.size) { - txStatus = 'pending' - } else { - const userConfirmed = tx.confirmations.filter((conf) => conf.owner === userAddress).size === 1 - const userIsSafeOwner = safe.owners.filter((owner) => owner.address === userAddress).size === 1 - txStatus = !userConfirmed && userIsSafeOwner ? 'awaiting_your_confirmation' : 'awaiting_confirmations' - } - - if (tx.isSuccessful === false) { - txStatus = 'failed' - } - - return txStatus -} +import { safeIncomingTransactionsSelector, safeTransactionsSelector } from 'src/routes/safe/store/selectors' export const extendedTransactionsSelector = createSelector( - safeSelector, - userAccountSelector, safeTransactionsSelector, - safeCancellationTransactionsSelector, safeIncomingTransactionsSelector, - (safe, userAddress, transactions, cancellationTransactions, incomingTransactions) => { - const cancellationTransactionsByNonce = cancellationTransactions.reduce((acc, tx) => acc.set(tx.nonce, tx), Map()) - const extendedTransactions = transactions.map((tx: any) => - tx.withMutations((transaction) => { - if (!transaction.isExecuted) { - if ( - (cancellationTransactionsByNonce.get(tx.nonce) && - cancellationTransactionsByNonce.get(tx.nonce).get('isExecuted')) || - transactions.find((safeTx) => tx.nonce === safeTx.nonce && safeTx.isExecuted) - ) { - transaction.set('cancelled', true) - } - } - transaction.set('status', getTxStatus(transaction, userAddress, safe)) - - return transaction - }), - ) - - return List([...extendedTransactions, ...incomingTransactions]) - }, + (transactions, incomingTransactions) => List([...transactions, ...incomingTransactions]), ) From 209d37351697ce52dcf5097818ce31d40b39a211 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Fri, 22 May 2020 17:04:25 -0300 Subject: [PATCH 31/65] fix: leave blank the default token for Send Funds modal --- src/routes/safe/components/Layout/Header/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/safe/components/Layout/Header/index.tsx b/src/routes/safe/components/Layout/Header/index.tsx index e2f3d31e..ea84fd1c 100644 --- a/src/routes/safe/components/Layout/Header/index.tsx +++ b/src/routes/safe/components/Layout/Header/index.tsx @@ -51,7 +51,7 @@ const LayoutHeader = (props) => { className={classes.send} color="primary" disabled={!granted} - onClick={() => showSendFunds('Ether')} + onClick={() => showSendFunds('')} size="small" variant="contained" > From 5a02cbfc9a6ec0405038d03ce01273ea64704bc7 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Fri, 22 May 2020 17:19:35 -0300 Subject: [PATCH 32/65] fix: remove old `index.jsx` file --- src/routes/safe/container/index.jsx | 76 ----------------------------- 1 file changed, 76 deletions(-) delete mode 100644 src/routes/safe/container/index.jsx diff --git a/src/routes/safe/container/index.jsx b/src/routes/safe/container/index.jsx deleted file mode 100644 index 927aff1c..00000000 --- a/src/routes/safe/container/index.jsx +++ /dev/null @@ -1,76 +0,0 @@ -import * as React from 'react' -import { useState } from 'react' -import { useSelector } from 'react-redux' - -import Page from 'src/components/layout/Page' - -import Layout from 'src/routes/safe/components/Layout' -import { useCheckForUpdates } from 'src/routes/safe/container/Hooks/useCheckForUpdates' -import { useLoadSafe } from 'src/routes/safe/container/Hooks/useLoadSafe' -import { safeParamAddressFromStateSelector } from 'src/routes/safe/store/selectors' - -const INITIAL_STATE = { - sendFunds: { - isOpen: false, - selectedToken: undefined, - }, - showReceive: false, -} - -const SafeView = () => { - const [state, setState] = useState(INITIAL_STATE) - const safeAddress = useSelector(safeParamAddressFromStateSelector) - - useLoadSafe(safeAddress) - useCheckForUpdates() - - const onShow = (action) => () => { - setState((prevState) => ({ - ...prevState, - [`show${action}`]: true, - })) - } - - const onHide = (action) => () => { - setState((prevState) => ({ - ...prevState, - [`show${action}`]: false, - })) - } - - const showSendFunds = (token) => { - setState((prevState) => ({ - ...prevState, - sendFunds: { - isOpen: true, - selectedToken: token, - }, - })) - } - - const hideSendFunds = () => { - setState((prevState) => ({ - ...prevState, - sendFunds: { - isOpen: false, - selectedToken: undefined, - }, - })) - } - const { sendFunds, showReceive } = state - - return ( - - - - ) -} - -export default SafeView From 92ad62800e6338222be462d21535edb0af2c4f5a Mon Sep 17 00:00:00 2001 From: fernandomg Date: Fri, 22 May 2020 23:48:24 -0300 Subject: [PATCH 33/65] fix: typos and types --- src/routes/safe/store/actions/createTransaction.ts | 3 +-- src/routes/safe/store/reducer/cancellationTransactions.ts | 2 +- src/routes/safe/store/reducer/transactions.ts | 2 +- src/routes/safe/store/selectors/index.ts | 8 ++++---- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/routes/safe/store/actions/createTransaction.ts b/src/routes/safe/store/actions/createTransaction.ts index 0ba98a46..42de4219 100644 --- a/src/routes/safe/store/actions/createTransaction.ts +++ b/src/routes/safe/store/actions/createTransaction.ts @@ -151,8 +151,7 @@ const createTransaction = ({ pendingExecutionKey = showSnackbar(notificationsQueue.pendingExecution, enqueueSnackbar, closeSnackbar) - await saveTxToHistory({ ...txArgs, txHash, origin }) - await storeTx(mockedTx, safeAddress, dispatch) + await Promise.all([saveTxToHistory({ ...txArgs, txHash, origin }), storeTx(mockedTx, safeAddress, dispatch)]) dispatch(fetchTransactions(safeAddress)) } catch (e) { removeTxFromStore(mockedTx, safeAddress, dispatch) diff --git a/src/routes/safe/store/reducer/cancellationTransactions.ts b/src/routes/safe/store/reducer/cancellationTransactions.ts index 45d2c541..29059573 100644 --- a/src/routes/safe/store/reducer/cancellationTransactions.ts +++ b/src/routes/safe/store/reducer/cancellationTransactions.ts @@ -27,7 +27,7 @@ export default handleActions( // as we assume that this is the newest tx returned by the server map.setIn(keyPath, updateTx) } else { - // if there's no confirmations, we assume this is a mocked tx + // if there are no confirmations, we assume this is a mocked tx // as txs without confirmation are not being returned by the server (?has_confirmations=true) map.mergeDeepIn(keyPath, updateTx) } diff --git a/src/routes/safe/store/reducer/transactions.ts b/src/routes/safe/store/reducer/transactions.ts index dbe26943..7dde6ae4 100644 --- a/src/routes/safe/store/reducer/transactions.ts +++ b/src/routes/safe/store/reducer/transactions.ts @@ -30,7 +30,7 @@ export default handleActions( // as we assume that this is the newest tx returned by the server txsList.update(storedTxIndex, () => updateTx) } else { - // if there's no confirmations, we assume this is a mocked tx + // if there are no confirmations, we assume this is a mocked tx // as txs without confirmation are not being returned by the server (?has_confirmations=true) txsList.update(storedTxIndex, (storedTx) => storedTx.mergeDeep(updateTx)) } diff --git a/src/routes/safe/store/selectors/index.ts b/src/routes/safe/store/selectors/index.ts index 404c30ba..fc7d9276 100644 --- a/src/routes/safe/store/selectors/index.ts +++ b/src/routes/safe/store/selectors/index.ts @@ -1,4 +1,4 @@ -import { List, Set } from 'immutable' +import { List, Map, Set } from 'immutable' import { matchPath } from 'react-router-dom' import { createSelector } from 'reselect' @@ -79,14 +79,14 @@ export const safeCancellationTransactionsSelector = createSelector( safeParamAddressFromStateSelector, (cancellationTransactions, address) => { if (!cancellationTransactions) { - return List([]) + return Map() } if (!address) { - return List([]) + return Map() } - return cancellationTransactions.get(address) || List([]) + return cancellationTransactions.get(address) || Map({}) }, ) From 165d0ff0d690cd1a01f26ef918924973a1602d57 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Fri, 22 May 2020 23:49:22 -0300 Subject: [PATCH 34/65] feature: add owner's _pending_ bullet icon --- .../ExpandedTx/OwnersColumn/assets/confirm-small-yellow.svg | 3 +++ .../Transactions/TxsTable/ExpandedTx/OwnersColumn/style.ts | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/assets/confirm-small-yellow.svg diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/assets/confirm-small-yellow.svg b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/assets/confirm-small-yellow.svg new file mode 100644 index 00000000..fbd9928b --- /dev/null +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/assets/confirm-small-yellow.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/style.ts b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/style.ts index 41400c39..cfee3724 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/style.ts +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/style.ts @@ -1,4 +1,4 @@ -import { boldFont, border, error, primary, secondary, secondaryText, sm } from 'src/theme/variables' +import { boldFont, border, error, primary, secondary, secondaryText, sm, warning } from 'src/theme/variables' export const styles = () => ({ ownersList: { @@ -29,6 +29,9 @@ export const styles = () => ({ verticalLineCancel: { backgroundColor: error, }, + verticalPendingAction: { + backgroundColor: warning, + }, icon: { marginRight: sm, }, From 2c41105474a918102750666b8bd38330de71999b Mon Sep 17 00:00:00 2001 From: fernandomg Date: Sat, 23 May 2020 01:54:37 -0300 Subject: [PATCH 35/65] feature: set tx's owners pending status --- .../OwnersColumn/OwnerComponent.tsx | 161 +++++++++++------- .../ExpandedTx/OwnersColumn/OwnersList.tsx | 4 +- .../ExpandedTx/OwnersColumn/index.tsx | 29 +++- .../safe/store/actions/createTransaction.ts | 70 +++++--- .../safe/store/actions/processTransaction.ts | 27 ++- src/routes/safe/store/models/transaction.ts | 6 +- 6 files changed, 207 insertions(+), 90 deletions(-) diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/OwnerComponent.tsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/OwnerComponent.tsx index c4ca0a60..bd381a32 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/OwnerComponent.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/OwnerComponent.tsx @@ -8,6 +8,7 @@ import ConfirmSmallFilledCircle from './assets/confirm-small-filled.svg' import ConfirmSmallGreenCircle from './assets/confirm-small-green.svg' import ConfirmSmallGreyCircle from './assets/confirm-small-grey.svg' import ConfirmSmallRedCircle from './assets/confirm-small-red.svg' +import PendingSmallYellowCircle from './assets/confirm-small-yellow.svg' import { styles } from './style' import EtherscanLink from 'src/components/EtherscanLink' @@ -32,6 +33,8 @@ const OwnerComponent = ({ onTxExecute, onTxReject, owner, + pendingAcceptAction, + pendingRejectAction, showConfirmBtn, showExecuteBtn, showExecuteRejectBtn, @@ -43,18 +46,110 @@ const OwnerComponent = ({ const [imgCircle, setImgCircle] = React.useState(ConfirmSmallGreyCircle) React.useMemo(() => { + if (pendingAcceptAction || pendingRejectAction) { + setImgCircle(PendingSmallYellowCircle) + return + } if (confirmed) { setImgCircle(isCancelTx ? CancelSmallFilledCircle : ConfirmSmallFilledCircle) - } else if (thresholdReached || executor) { - setImgCircle(isCancelTx ? ConfirmSmallRedCircle : ConfirmSmallGreenCircle) + return } - }, [confirmed, thresholdReached, executor, isCancelTx]) + if (thresholdReached || executor) { + setImgCircle(isCancelTx ? ConfirmSmallRedCircle : ConfirmSmallGreenCircle) + return + } + setImgCircle(ConfirmSmallGreyCircle) + }, [confirmed, thresholdReached, executor, isCancelTx, pendingAcceptAction, pendingRejectAction]) - const getTimelineLine = () => (isCancelTx ? classes.verticalLineCancel : classes.verticalLineDone) + const getTimelineLine = () => { + if (pendingAcceptAction || pendingRejectAction) { + return classes.verticalPendingAction + } + if (isCancelTx) { + return classes.verticalLineCancel + } + return classes.verticalLineDone + } + + const confirmButton = () => { + if (pendingRejectAction) { + return null + } + if (pendingAcceptAction) { + return Pending + } + return ( + <> + {showConfirmBtn && ( + + )} + {showExecuteBtn && ( + + )} + + ) + } + + const rejectButton = () => { + if (pendingRejectAction) { + return Pending + } + if (pendingAcceptAction) { + return null + } + return ( + <> + {showRejectBtn && ( + + )} + {showExecuteRejectBtn && ( + + )} + + ) + } return ( -
+
@@ -66,61 +161,7 @@ const OwnerComponent = ({ - {owner === userAddress && ( - - {isCancelTx ? ( - <> - {showRejectBtn && ( - - )} - {showExecuteRejectBtn && ( - - )} - - ) : ( - <> - {showConfirmBtn && ( - - )} - {showExecuteBtn && ( - - )} - - )} - - )} + {owner === userAddress && {isCancelTx ? rejectButton() : confirmButton()}} {owner === executor && Executor} ) diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/OwnersList.tsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/OwnersList.tsx index 385da37e..8cd107f9 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/OwnersList.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/OwnersList.tsx @@ -38,7 +38,7 @@ const OwnersList = ({ userAddress={userAddress} /> ))} - {ownersUnconfirmed.map((owner) => ( + {ownersUnconfirmed.map(({ hasPendingAcceptActions, hasPendingRejectActions, owner }) => ( { const confirmationsEntry = tx.confirmations.find((conf) => conf.owner === owner.address) if (!confirmationsEntry) { - ownersNotConfirmed.push(owner.address) + ownersWithNoConfirmations.push(owner.address) } if (confirmationsEntry && confirmationsEntry.owner === userAddress) { currentUserNotConfirmed = false } }) - return [ownersNotConfirmed, currentUserNotConfirmed] + const confirmationPendingActions = tx.ownersWithPendingActions.get('confirm') + const confirmationRejectActions = tx.ownersWithPendingActions.get('reject') + + const ownersWithNoConfirmationsSorted = ownersWithNoConfirmations + .map((owner) => ({ + hasPendingAcceptActions: confirmationPendingActions.includes(owner), + hasPendingRejectActions: confirmationRejectActions.includes(owner), + owner, + })) + // Reorders the list of unconfirmed owners, owners with pendingActions should be first + .sort((ownerA, ownerB) => { + // If the first owner has pending actions, A should be before B + if (ownerA.hasPendingRejectActions || ownerA.hasPendingAcceptActions) { + return -1 + } + // The first owner has not pending actions but the second yes, B should be before A + if (ownerB.hasPendingRejectActions || ownerB.hasPendingAcceptActions) { + return 1 + } + // Otherwise do not change order + return 0 + }) + + return [ownersWithNoConfirmationsSorted, currentUserNotConfirmed] } const OwnersColumn = ({ diff --git a/src/routes/safe/store/actions/createTransaction.ts b/src/routes/safe/store/actions/createTransaction.ts index 42de4219..01c6046a 100644 --- a/src/routes/safe/store/actions/createTransaction.ts +++ b/src/routes/safe/store/actions/createTransaction.ts @@ -1,5 +1,6 @@ import { push } from 'connected-react-router' -import { List, Map, fromJS } from 'immutable' +import { List, Map } from 'immutable' +import { batch } from 'react-redux' import semverSatisfies from 'semver/functions/satisfies' import { onboardUser } from 'src/components/ConnectButton' @@ -22,30 +23,41 @@ import { getLastTx, getNewTxNonce, shouldExecuteTransaction } from 'src/routes/s import { getErrorMessage } from 'src/test/utils/ethereumErrors' import { makeConfirmation } from '../models/confirmation' import fetchTransactions from './transactions/fetchTransactions' +import { safeTransactionsSelector } from 'src/routes/safe/store/selectors' -export const removeTxFromStore = (tx, safeAddress, dispatch) => { +export const removeTxFromStore = (tx, safeAddress, dispatch, state) => { if (tx.isCancellationTx) { - dispatch(removeCancellationTransaction({ safeAddress, transaction: tx })) + const newTxStatus = 'awaiting_confirmations' + const transactions = safeTransactionsSelector(state) + const txsToUpdate = transactions + .filter((transaction) => Number(transaction.nonce) === Number(tx.nonce)) + .withMutations((list) => list.map((tx) => tx.set('status', newTxStatus))) + + batch(() => { + dispatch(addOrUpdateTransactions({ safeAddress, transactions: txsToUpdate })) + dispatch(removeCancellationTransaction({ safeAddress, transaction: tx })) + }) } else { dispatch(removeTransaction({ safeAddress, transaction: tx })) } } -export const storeTx = async (tx, safeAddress, dispatch) => { +export const storeTx = async (tx, safeAddress, dispatch, state) => { if (tx.isCancellationTx) { - dispatch( - addOrUpdateCancellationTransactions({ - safeAddress, - transactions: Map({ [`${tx.nonce}`]: tx }), - }), - ) + const newTxStatus = tx.isExecuted ? 'cancelled' : tx.status === 'pending' ? 'pending' : 'awaiting_confirmations' + const transactions = safeTransactionsSelector(state) + const txsToUpdate = transactions + .filter((transaction) => Number(transaction.nonce) === Number(tx.nonce)) + .withMutations((list) => + list.map((tx) => tx.set('status', newTxStatus).set('cancelled', newTxStatus === 'cancelled')), + ) + + batch(() => { + dispatch(addOrUpdateCancellationTransactions({ safeAddress, transactions: Map({ [`${tx.nonce}`]: tx }) })) + dispatch(addOrUpdateTransactions({ safeAddress, transactions: txsToUpdate })) + }) } else { - dispatch( - addOrUpdateTransactions({ - safeAddress, - transactions: List([tx]), - }), - ) + dispatch(addOrUpdateTransactions({ safeAddress, transactions: List([tx]) })) } } @@ -151,15 +163,26 @@ const createTransaction = ({ pendingExecutionKey = showSnackbar(notificationsQueue.pendingExecution, enqueueSnackbar, closeSnackbar) - await Promise.all([saveTxToHistory({ ...txArgs, txHash, origin }), storeTx(mockedTx, safeAddress, dispatch)]) + await Promise.all([ + saveTxToHistory({ ...txArgs, txHash, origin }), + storeTx( + mockedTx.updateIn( + ['ownersWithPendingActions', mockedTx.isCancellationTx ? 'reject' : 'confirm'], + (previous) => previous.push(from), + ), + safeAddress, + dispatch, + state, + ), + ]) dispatch(fetchTransactions(safeAddress)) } catch (e) { - removeTxFromStore(mockedTx, safeAddress, dispatch) + removeTxFromStore(mockedTx, safeAddress, dispatch, state) } }) .on('error', (error) => { closeSnackbar(pendingExecutionKey) - removeTxFromStore(mockedTx, safeAddress, dispatch) + removeTxFromStore(mockedTx, safeAddress, dispatch, state) console.error('Tx error: ', error) }) .then(async (receipt) => { @@ -188,9 +211,16 @@ const createTransaction = ({ : mockedTx.set('status', 'awaiting_confirmations') await storeTx( - toStoreTx.set('confirmations', fromJS([makeConfirmation({ owner: from })])), + toStoreTx.withMutations((record) => { + record + .set('confirmations', List([makeConfirmation({ owner: from })])) + .updateIn(['ownersWithPendingActions', toStoreTx.isCancellationTx ? 'reject' : 'confirm'], (previous) => + previous.pop(from), + ) + }), safeAddress, dispatch, + state, ) dispatch(fetchTransactions(safeAddress)) diff --git a/src/routes/safe/store/actions/processTransaction.ts b/src/routes/safe/store/actions/processTransaction.ts index fb7b7ab8..cf708ff8 100644 --- a/src/routes/safe/store/actions/processTransaction.ts +++ b/src/routes/safe/store/actions/processTransaction.ts @@ -117,18 +117,28 @@ const processTransaction = ({ pendingExecutionKey = showSnackbar(notificationsQueue.pendingExecution, enqueueSnackbar, closeSnackbar) try { - await saveTxToHistory({ ...txArgs, txHash }) - await storeTx(mockedTx, safeAddress, dispatch) + await Promise.all([ + saveTxToHistory({ ...txArgs, txHash }), + storeTx( + mockedTx.updateIn( + ['ownersWithPendingActions', mockedTx.isCancellationTx ? 'reject' : 'confirm'], + (previous) => previous.push(from), + ), + safeAddress, + dispatch, + state, + ), + ]) dispatch(fetchTransactions(safeAddress)) } catch (e) { closeSnackbar(pendingExecutionKey) - await storeTx(tx, safeAddress, dispatch) + await storeTx(tx, safeAddress, dispatch, state) console.error(e) } }) .on('error', (error) => { closeSnackbar(pendingExecutionKey) - storeTx(mockedTx.set('isSuccessful', false), safeAddress, dispatch) + storeTx(tx, safeAddress, dispatch, state) console.error('Processing transaction error: ', error) }) .then(async (receipt) => { @@ -159,9 +169,16 @@ const processTransaction = ({ : mockedTx.set('status', 'awaiting_confirmations') await storeTx( - toStoreTx.set('confirmations', fromJS([...tx.confirmations, makeConfirmation({ owner: from })])), + toStoreTx.withMutations((record) => { + record + .set('confirmations', fromJS([...tx.confirmations, makeConfirmation({ owner: from })])) + .updateIn(['ownersWithPendingActions', toStoreTx.isCancellationTx ? 'reject' : 'confirm'], (previous) => + previous.pop(from), + ) + }), safeAddress, dispatch, + state, ) dispatch(fetchTransactions(safeAddress)) diff --git a/src/routes/safe/store/models/transaction.ts b/src/routes/safe/store/models/transaction.ts index da1fb3ad..0968937d 100644 --- a/src/routes/safe/store/models/transaction.ts +++ b/src/routes/safe/store/models/transaction.ts @@ -1,4 +1,4 @@ -import { List, Record } from 'immutable' +import { List, Map, Record } from 'immutable' import { ZERO_ADDRESS } from 'src/logic/wallets/ethAddresses' @@ -22,6 +22,8 @@ export type TransactionStatus = | 'awaiting_execution' | 'pending' +export type PendingActionType = 'Confirm' | 'Reject' + export type TransactionProps = { baseGas: number blockNumber?: number | null @@ -48,6 +50,7 @@ export type TransactionProps = { nonce?: number | null operation: number origin: string | null + ownersWithPendingActions: Map> recipient: string refundParams: any refundReceiver: string @@ -86,6 +89,7 @@ export const makeTransaction = Record({ nonce: 0, operation: 0, origin: null, + ownersWithPendingActions: Map({ confirm: List([]), reject: List([]) }), recipient: '', refundParams: null, refundReceiver: ZERO_ADDRESS, From 46c9ac3e03ea53640d35900790e222ac38723eab Mon Sep 17 00:00:00 2001 From: fernandomg Date: Sat, 23 May 2020 02:09:21 -0300 Subject: [PATCH 36/65] refactor: update tx status when provider changes --- .../wallets/store/actions/fetchProvider.ts | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/logic/wallets/store/actions/fetchProvider.ts b/src/logic/wallets/store/actions/fetchProvider.ts index e535f7d0..8bae7327 100644 --- a/src/logic/wallets/store/actions/fetchProvider.ts +++ b/src/logic/wallets/store/actions/fetchProvider.ts @@ -1,4 +1,5 @@ import ReactGA from 'react-ga' +import { batch } from 'react-redux' import addProvider from './addProvider' @@ -7,11 +8,29 @@ import { NOTIFICATIONS, enhanceSnackbarForAction } from 'src/logic/notifications import enqueueSnackbar from 'src/logic/notifications/store/actions/enqueueSnackbar' import { ETHEREUM_NETWORK, ETHEREUM_NETWORK_IDS, getProviderInfo, getWeb3 } from 'src/logic/wallets/getWeb3' import { makeProvider } from 'src/logic/wallets/store/model/provider' +import { addOrUpdateTransactions } from 'src/routes/safe/store/actions/transactions/addOrUpdateTransactions' +import { store } from 'src/store' +import { safeSelector, safeTransactionsSelector } from 'src/routes/safe/store/selectors' +import { calculateTransactionStatus } from 'src/routes/safe/store/actions/transactions/utils/transactionHelpers' export const processProviderResponse = (dispatch, provider) => { const walletRecord = makeProvider(provider) + const state = store.getState() + const safe = safeSelector(state) + const safeAddress = safe.address + const transactions = safeTransactionsSelector(state) - dispatch(addProvider(walletRecord)) + batch(() => { + dispatch(addProvider(walletRecord)) + dispatch( + addOrUpdateTransactions({ + safeAddress, + transactions: transactions.withMutations((list) => + list.map((tx) => tx.set('status', calculateTransactionStatus(tx, safe, provider.account))), + ), + }), + ) + }) } const handleProviderNotification = (provider, dispatch) => { From 66b02b401d3cb290dac4c2acfea8a50e060526a0 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Sat, 23 May 2020 02:38:25 -0300 Subject: [PATCH 37/65] fix: update mocked tx status based on the tx receipt --- src/routes/safe/store/actions/createTransaction.ts | 4 ++-- src/routes/safe/store/actions/processTransaction.ts | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/routes/safe/store/actions/createTransaction.ts b/src/routes/safe/store/actions/createTransaction.ts index 01c6046a..2b4b8f05 100644 --- a/src/routes/safe/store/actions/createTransaction.ts +++ b/src/routes/safe/store/actions/createTransaction.ts @@ -205,8 +205,8 @@ const createTransaction = ({ .set('safeTxHash', receipt.events.ExecutionSuccess.returnValues.txHash) .set('executor', from) .set('isExecuted', true) - .set('isSuccessful', true) - .set('status', 'success') + .set('isSuccessful', receipt.status) + .set('status', receipt.status ? 'success' : 'failed') }) : mockedTx.set('status', 'awaiting_confirmations') diff --git a/src/routes/safe/store/actions/processTransaction.ts b/src/routes/safe/store/actions/processTransaction.ts index cf708ff8..0eb8a5c7 100644 --- a/src/routes/safe/store/actions/processTransaction.ts +++ b/src/routes/safe/store/actions/processTransaction.ts @@ -163,8 +163,11 @@ const processTransaction = ({ .set('executionDate', record.submissionDate) .set('executor', from) .set('isExecuted', true) - .set('isSuccessful', true) - .set('status', isCancelTransaction(record, safeAddress) ? 'cancelled' : 'success') + .set('isSuccessful', receipt.status) + .set( + 'status', + receipt.status ? (isCancelTransaction(record, safeAddress) ? 'cancelled' : 'success') : 'failed', + ) }) : mockedTx.set('status', 'awaiting_confirmations') From 00b1c7c3b0b91c884443bbbb6346efb33697864c Mon Sep 17 00:00:00 2001 From: fernandomg Date: Sat, 23 May 2020 02:53:14 -0300 Subject: [PATCH 38/65] chore: change hooks imports to relative paths --- src/routes/safe/container/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/safe/container/index.tsx b/src/routes/safe/container/index.tsx index 92efece0..395d3ea8 100644 --- a/src/routes/safe/container/index.tsx +++ b/src/routes/safe/container/index.tsx @@ -5,8 +5,8 @@ import { useSelector } from 'react-redux' import Page from 'src/components/layout/Page' import Layout from 'src/routes/safe/components/Layout' -import { useCheckForUpdates } from 'src/routes/safe/container/hooks/useCheckForUpdates' -import { useLoadSafe } from 'src/routes/safe/container/hooks/useLoadSafe' +import { useCheckForUpdates } from './hooks/useCheckForUpdates' +import { useLoadSafe } from './hooks/useLoadSafe' import { safeParamAddressFromStateSelector } from 'src/routes/safe/store/selectors' const INITIAL_STATE = { From 1742f84b862f736ecd42ddc5a839137a0f904bd7 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Sat, 23 May 2020 03:08:58 -0300 Subject: [PATCH 39/65] fix: `Hooks` import --- src/routes/safe/components/Balances/index.tsx | 2 +- src/test/safe.dom.settings.name.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/safe/components/Balances/index.tsx b/src/routes/safe/components/Balances/index.tsx index 551b73d5..105404e6 100644 --- a/src/routes/safe/components/Balances/index.tsx +++ b/src/routes/safe/components/Balances/index.tsx @@ -18,7 +18,7 @@ import CurrencyDropdown from 'src/routes/safe/components/CurrencyDropdown' import { safeFeaturesEnabledSelector, safeParamAddressFromStateSelector } from 'src/routes/safe/store/selectors' import { history } from 'src/store/index' import { wrapInSuspense } from 'src/utils/wrapInSuspense' -import { useFetchTokens } from '../../container/Hooks/useFetchTokens' +import { useFetchTokens } from '../../container/hooks/useFetchTokens' const Collectibles = React.lazy(() => import('src/routes/safe/components/Balances/Collectibles')) const Coins = React.lazy(() => import('src/routes/safe/components/Balances/Coins')) diff --git a/src/test/safe.dom.settings.name.test.ts b/src/test/safe.dom.settings.name.test.ts index f49053c7..b8386588 100644 --- a/src/test/safe.dom.settings.name.test.ts +++ b/src/test/safe.dom.settings.name.test.ts @@ -1,4 +1,4 @@ -// +// import { fireEvent } from '@testing-library/react' import { aNewStore } from 'src/store' import { aMinedSafe } from 'src/test/builder/safe.redux.builder' From e9153c54d4591acc3705987c2f442aa4676f15e2 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Sat, 23 May 2020 11:24:21 -0300 Subject: [PATCH 40/65] fix: wallet connection --- src/logic/contracts/generateBatchRequests.ts | 6 +++--- src/logic/wallets/store/actions/fetchProvider.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/logic/contracts/generateBatchRequests.ts b/src/logic/contracts/generateBatchRequests.ts index a7d7c529..1edaaa62 100644 --- a/src/logic/contracts/generateBatchRequests.ts +++ b/src/logic/contracts/generateBatchRequests.ts @@ -1,5 +1,5 @@ -// -import { getWeb3 } from 'src/logic/wallets/getWeb3' +// +import { web3ReadOnly } from 'src/logic/wallets/getWeb3' /** * Generates a batch request for grouping RPC calls @@ -12,7 +12,7 @@ import { getWeb3 } from 'src/logic/wallets/getWeb3' * @returns {Promise<[*]>} */ const generateBatchRequests = ({ abi, address, batch, context, methods }: any): any => { - const web3 = getWeb3() + const web3 = web3ReadOnly const contractInstance = new web3.eth.Contract(abi, address) const localBatch = batch ? null : new web3.BatchRequest() diff --git a/src/logic/wallets/store/actions/fetchProvider.ts b/src/logic/wallets/store/actions/fetchProvider.ts index 8bae7327..39d56726 100644 --- a/src/logic/wallets/store/actions/fetchProvider.ts +++ b/src/logic/wallets/store/actions/fetchProvider.ts @@ -26,7 +26,7 @@ export const processProviderResponse = (dispatch, provider) => { addOrUpdateTransactions({ safeAddress, transactions: transactions.withMutations((list) => - list.map((tx) => tx.set('status', calculateTransactionStatus(tx, safe, provider.account))), + list.map((tx) => tx.set('status', calculateTransactionStatus(tx, safe, walletRecord.account))), ), }), ) From 9b257d901ae6b7ba438c24c595ae942bc209a9ef Mon Sep 17 00:00:00 2001 From: fernandomg Date: Sat, 23 May 2020 15:51:23 -0300 Subject: [PATCH 41/65] fix: properly update txs status on safe's startup --- .../wallets/store/actions/fetchProvider.ts | 24 +++---------------- .../transactions/utils/transactionHelpers.ts | 20 ++++++++++++++++ 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/logic/wallets/store/actions/fetchProvider.ts b/src/logic/wallets/store/actions/fetchProvider.ts index 39d56726..1d3006ab 100644 --- a/src/logic/wallets/store/actions/fetchProvider.ts +++ b/src/logic/wallets/store/actions/fetchProvider.ts @@ -1,5 +1,4 @@ import ReactGA from 'react-ga' -import { batch } from 'react-redux' import addProvider from './addProvider' @@ -8,29 +7,12 @@ import { NOTIFICATIONS, enhanceSnackbarForAction } from 'src/logic/notifications import enqueueSnackbar from 'src/logic/notifications/store/actions/enqueueSnackbar' import { ETHEREUM_NETWORK, ETHEREUM_NETWORK_IDS, getProviderInfo, getWeb3 } from 'src/logic/wallets/getWeb3' import { makeProvider } from 'src/logic/wallets/store/model/provider' -import { addOrUpdateTransactions } from 'src/routes/safe/store/actions/transactions/addOrUpdateTransactions' -import { store } from 'src/store' -import { safeSelector, safeTransactionsSelector } from 'src/routes/safe/store/selectors' -import { calculateTransactionStatus } from 'src/routes/safe/store/actions/transactions/utils/transactionHelpers' +import { updateStoredTransactionsStatus } from 'src/routes/safe/store/actions/transactions/utils/transactionHelpers' export const processProviderResponse = (dispatch, provider) => { const walletRecord = makeProvider(provider) - const state = store.getState() - const safe = safeSelector(state) - const safeAddress = safe.address - const transactions = safeTransactionsSelector(state) - - batch(() => { - dispatch(addProvider(walletRecord)) - dispatch( - addOrUpdateTransactions({ - safeAddress, - transactions: transactions.withMutations((list) => - list.map((tx) => tx.set('status', calculateTransactionStatus(tx, safe, walletRecord.account))), - ), - }), - ) - }) + dispatch(addProvider(walletRecord)) + updateStoredTransactionsStatus(dispatch, walletRecord) } const handleProviderNotification = (provider, dispatch) => { diff --git a/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts b/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts index 3dd46b72..9b415471 100644 --- a/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts +++ b/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts @@ -14,6 +14,9 @@ import { makeTransaction } from 'src/routes/safe/store/models/transaction' import { CANCELLATION_TRANSACTIONS_REDUCER_ID } from 'src/routes/safe/store/reducer/cancellationTransactions' import { SAFE_REDUCER_ID } from 'src/routes/safe/store/reducer/safe' import { TRANSACTIONS_REDUCER_ID } from 'src/routes/safe/store/reducer/transactions' +import { store } from 'src/store' +import { safeSelector, safeTransactionsSelector } from 'src/routes/safe/store/selectors' +import { addOrUpdateTransactions } from 'src/routes/safe/store/actions/transactions/addOrUpdateTransactions' export const isEmptyData = (data?: string | null) => { return !data || data === EMPTY_DATA @@ -286,3 +289,20 @@ export const mockTransaction = (tx, safeAddress: string, state): Promise => txCode: EMPTY_DATA, }) } + +export const updateStoredTransactionsStatus = (dispatch, walletRecord) => { + const state = store.getState() + const safe = safeSelector(state) + if (safe) { + const safeAddress = safe.address + const transactions = safeTransactionsSelector(state) + dispatch( + addOrUpdateTransactions({ + safeAddress, + transactions: transactions.withMutations((list) => + list.map((tx) => tx.set('status', calculateTransactionStatus(tx, safe, walletRecord.account))), + ), + }), + ) + } +} From 712971225b881ddafb48cdb60823bbcaa886e709 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Sat, 23 May 2020 17:10:38 -0300 Subject: [PATCH 42/65] empty From bce4cf60e04a786a842893fc368ad108f8185a0b Mon Sep 17 00:00:00 2001 From: fernandomg Date: Tue, 26 May 2020 08:16:38 -0300 Subject: [PATCH 43/65] fix: use selector for `cancellationTxs`. This will prevent errors when there's no `cancellationTx` existent for the current safe as the selector defaults to an empty Map. --- .../safe/store/middleware/notificationsMiddleware.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/routes/safe/store/middleware/notificationsMiddleware.ts b/src/routes/safe/store/middleware/notificationsMiddleware.ts index ce6956e6..a28d76c7 100644 --- a/src/routes/safe/store/middleware/notificationsMiddleware.ts +++ b/src/routes/safe/store/middleware/notificationsMiddleware.ts @@ -13,8 +13,11 @@ import { ADD_INCOMING_TRANSACTIONS } from 'src/routes/safe/store/actions/addInco import { ADD_SAFE } from 'src/routes/safe/store/actions/addSafe' import { ADD_OR_UPDATE_TRANSACTIONS } from 'src/routes/safe/store/actions/transactions/addOrUpdateTransactions' import updateSafe from 'src/routes/safe/store/actions/updateSafe' -import { CANCELLATION_TRANSACTIONS_REDUCER_ID } from 'src/routes/safe/store/reducer/cancellationTransactions' -import { safeParamAddressFromStateSelector, safesMapSelector } from 'src/routes/safe/store/selectors' +import { + safeParamAddressFromStateSelector, + safesMapSelector, + safeCancellationTransactionsSelector, +} from 'src/routes/safe/store/selectors' import { loadFromStorage, saveToStorage } from 'src/utils/storage' @@ -75,7 +78,7 @@ const notificationsMiddleware = (store) => (next) => async (action) => { case ADD_OR_UPDATE_TRANSACTIONS: { const { safeAddress, transactions } = action.payload const userAddress: string = userAccountSelector(state) - const cancellationTransactions = state[CANCELLATION_TRANSACTIONS_REDUCER_ID].get(safeAddress) + const cancellationTransactions = safeCancellationTransactionsSelector(state) const awaitingTransactions = getAwaitingTransactions(transactions, cancellationTransactions, userAddress) const awaitingTxsSubmissionDateList = awaitingTransactions.map((tx) => tx.submissionDate) From 1947f1c470ceb651ff12617a3ac667f9640cf2ba Mon Sep 17 00:00:00 2001 From: fernandomg Date: Tue, 26 May 2020 08:19:09 -0300 Subject: [PATCH 44/65] refactor: import web3ReadOnly as web3 --- src/logic/contracts/generateBatchRequests.ts | 3 +-- src/logic/contracts/methodIds.ts | 4 +--- src/logic/tokens/utils/tokenHelpers.ts | 4 +--- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/logic/contracts/generateBatchRequests.ts b/src/logic/contracts/generateBatchRequests.ts index 1edaaa62..a4db1cfa 100644 --- a/src/logic/contracts/generateBatchRequests.ts +++ b/src/logic/contracts/generateBatchRequests.ts @@ -1,5 +1,5 @@ // -import { web3ReadOnly } from 'src/logic/wallets/getWeb3' +import { web3ReadOnly as web3 } from 'src/logic/wallets/getWeb3' /** * Generates a batch request for grouping RPC calls @@ -12,7 +12,6 @@ import { web3ReadOnly } from 'src/logic/wallets/getWeb3' * @returns {Promise<[*]>} */ const generateBatchRequests = ({ abi, address, batch, context, methods }: any): any => { - const web3 = web3ReadOnly const contractInstance = new web3.eth.Contract(abi, address) const localBatch = batch ? null : new web3.BatchRequest() diff --git a/src/logic/contracts/methodIds.ts b/src/logic/contracts/methodIds.ts index 3808b539..1137e2d7 100644 --- a/src/logic/contracts/methodIds.ts +++ b/src/logic/contracts/methodIds.ts @@ -1,4 +1,4 @@ -import { web3ReadOnly } from 'src/logic/wallets/getWeb3' +import { web3ReadOnly as web3 } from 'src/logic/wallets/getWeb3' // SAFE METHODS TO ITS ID // https://github.com/gnosis/safe-contracts/blob/development/test/safeMethodNaming.js @@ -53,7 +53,6 @@ const METHOD_TO_ID = { } export const decodeParamsFromSafeMethod = (data) => { - const web3 = web3ReadOnly const [methodId, params] = [data.slice(0, 10), data.slice(10)] switch (methodId) { @@ -110,7 +109,6 @@ const isSafeMethod = (methodId: string) => { } export const decodeMethods = (data: string) => { - const web3 = web3ReadOnly const [methodId, params] = [data.slice(0, 10), data.slice(10)] if (isSafeMethod(methodId)) { diff --git a/src/logic/tokens/utils/tokenHelpers.ts b/src/logic/tokens/utils/tokenHelpers.ts index b2417e88..b2c3f215 100644 --- a/src/logic/tokens/utils/tokenHelpers.ts +++ b/src/logic/tokens/utils/tokenHelpers.ts @@ -3,7 +3,7 @@ import generateBatchRequests from 'src/logic/contracts/generateBatchRequests' import { getStandardTokenContract, getTokenInfos } from 'src/logic/tokens/store/actions/fetchTokens' import { makeToken } from 'src/logic/tokens/store/model/token' import { ALTERNATIVE_TOKEN_ABI } from 'src/logic/tokens/utils/alternativeAbi' -import { web3ReadOnly } from 'src/logic/wallets/getWeb3' +import { web3ReadOnly as web3 } from 'src/logic/wallets/getWeb3' import { isEmptyData } from 'src/routes/safe/store/actions/transactions/utils/transactionHelpers' export const ETH_ADDRESS = '0x000' @@ -29,8 +29,6 @@ export const isAddressAToken = async (tokenAddress) => { // } catch { // return 'Not a token address' // } - - const web3 = web3ReadOnly const call = await web3.eth.call({ to: tokenAddress, data: web3.utils.sha3('totalSupply()') }) return call !== '0x' From 6fb71d1ec46e0ec03123dd2c8f35ffeac7a31fac Mon Sep 17 00:00:00 2001 From: fernandomg Date: Wed, 27 May 2020 08:47:44 -0300 Subject: [PATCH 45/65] chore: add types Not sure right now how to properly deal with `d.ts` files. So, I decided to let those types that depend on others inside a module. --- src/logic/contracts/methodIds.ts | 26 ++++- src/logic/tokens/store/model/token.ts | 16 ++- src/logic/tokens/utils/tokenHelpers.ts | 17 +++- .../loadOutgoingTransactions.ts | 7 +- .../transactions/utils/transactionHelpers.ts | 98 ++++++++++++------- src/routes/safe/store/models/confirmation.ts | 3 +- src/routes/safe/store/models/transaction.ts | 80 +++------------ .../safe/store/models/types/confirmation.d.ts | 10 ++ .../safe/store/models/types/transaction.ts | 71 ++++++++++++++ 9 files changed, 205 insertions(+), 123 deletions(-) create mode 100644 src/routes/safe/store/models/types/confirmation.d.ts create mode 100644 src/routes/safe/store/models/types/transaction.ts diff --git a/src/logic/contracts/methodIds.ts b/src/logic/contracts/methodIds.ts index 1137e2d7..351df109 100644 --- a/src/logic/contracts/methodIds.ts +++ b/src/logic/contracts/methodIds.ts @@ -52,8 +52,26 @@ const METHOD_TO_ID = { '0x694e80c3': SAFE_METHODS_NAMES.CHANGE_THRESHOLD, } -export const decodeParamsFromSafeMethod = (data) => { - const [methodId, params] = [data.slice(0, 10), data.slice(10)] +type SafeMethods = typeof SAFE_METHODS_NAMES[keyof typeof SAFE_METHODS_NAMES] +type TokenMethods = 'transfer' | 'transferFrom' | 'safeTransferFrom' + +type DecodedValues = Array<{ + name: string + value: string +}> + +type SafeDecodedParams = { + [key in SafeMethods]?: DecodedValues +} + +type TokenDecodedParams = { + [key in TokenMethods]?: DecodedValues +} + +export type DecodedMethods = SafeDecodedParams | TokenDecodedParams | null + +export const decodeParamsFromSafeMethod = (data: string): SafeDecodedParams | null => { + const [methodId, params] = [data.slice(0, 10) as keyof typeof METHOD_TO_ID | string, data.slice(10)] switch (methodId) { // swapOwner @@ -104,11 +122,11 @@ export const decodeParamsFromSafeMethod = (data) => { } } -const isSafeMethod = (methodId: string) => { +const isSafeMethod = (methodId: string): boolean => { return !!METHOD_TO_ID[methodId] } -export const decodeMethods = (data: string) => { +export const decodeMethods = (data: string): DecodedMethods => { const [methodId, params] = [data.slice(0, 10), data.slice(10)] if (isSafeMethod(methodId)) { diff --git a/src/logic/tokens/store/model/token.ts b/src/logic/tokens/store/model/token.ts index 1034fed5..fc072be2 100644 --- a/src/logic/tokens/store/model/token.ts +++ b/src/logic/tokens/store/model/token.ts @@ -1,6 +1,15 @@ -import { Record } from 'immutable' +import { Record, RecordOf } from 'immutable' -export const makeToken = Record({ +export type TokenProps = { + address: string + name: string + symbol: string + decimals: number | string + logoUri?: string | null + balance?: number | string +} + +export const makeToken = Record({ address: '', name: '', symbol: '', @@ -8,5 +17,6 @@ export const makeToken = Record({ logoUri: '', balance: undefined, }) - // balance is only set in extendedSafeTokensSelector when we display user's token balances + +export type Token = RecordOf diff --git a/src/logic/tokens/utils/tokenHelpers.ts b/src/logic/tokens/utils/tokenHelpers.ts index b2c3f215..3e94fb19 100644 --- a/src/logic/tokens/utils/tokenHelpers.ts +++ b/src/logic/tokens/utils/tokenHelpers.ts @@ -1,15 +1,16 @@ import logo from 'src/assets/icons/icon_etherTokens.svg' import generateBatchRequests from 'src/logic/contracts/generateBatchRequests' import { getStandardTokenContract, getTokenInfos } from 'src/logic/tokens/store/actions/fetchTokens' -import { makeToken } from 'src/logic/tokens/store/model/token' +import { makeToken, Token } from 'src/logic/tokens/store/model/token' import { ALTERNATIVE_TOKEN_ABI } from 'src/logic/tokens/utils/alternativeAbi' import { web3ReadOnly as web3 } from 'src/logic/wallets/getWeb3' import { isEmptyData } from 'src/routes/safe/store/actions/transactions/utils/transactionHelpers' +import { TxServiceModel } from 'src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions' export const ETH_ADDRESS = '0x000' export const SAFE_TRANSFER_FROM_WITHOUT_DATA_HASH = '42842e0e' -export const getEthAsToken = (balance: string) => { +export const getEthAsToken = (balance: string): Token => { return makeToken({ address: ETH_ADDRESS, name: 'Ether', @@ -20,7 +21,7 @@ export const getEthAsToken = (balance: string) => { }) } -export const isAddressAToken = async (tokenAddress) => { +export const isAddressAToken = async (tokenAddress): Promise => { // SECOND APPROACH: // They both seem to work the same // const tokenContract = await getStandardTokenContract() @@ -45,7 +46,9 @@ export const isSendERC721Transaction = (tx: any, txCode: string, knownTokens: an ) } -export const getERC20DecimalsAndSymbol = async (tokenAddress: string): Promise => { +export const getERC20DecimalsAndSymbol = async ( + tokenAddress: string, +): Promise<{ decimals: number; symbol: string }> => { const tokenInfos = await getTokenInfos(tokenAddress) if (tokenInfos === null) { @@ -61,7 +64,11 @@ export const getERC20DecimalsAndSymbol = async (tokenAddress: string): Promise { +export const isSendERC20Transaction = async ( + tx: TxServiceModel, + txCode: string, + knownTokens: any, +): Promise => { let isSendTokenTx = !isSendERC721Transaction(tx, txCode, knownTokens) && isTokenTransfer(tx) if (isSendTokenTx) { diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.ts b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.ts index 34d0214d..9665c071 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.ts +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.ts @@ -8,6 +8,7 @@ import FetchTransactions from 'src/routes/safe/store/actions/transactions/fetchT import { buildTx, isCancelTransaction } from 'src/routes/safe/store/actions/transactions/utils/transactionHelpers' import { SAFE_REDUCER_ID } from 'src/routes/safe/store/reducer/safe' import { store } from 'src/store' +import { DecodedMethods } from 'src/logic/contracts/methodIds' export type ConfirmationServiceModel = { owner: string @@ -16,17 +17,13 @@ export type ConfirmationServiceModel = { transactionHash: string } -export type DecodedData = { - [key: string]: Array<{ [key: string]: string | number }> -} - export type TxServiceModel = { baseGas: number blockNumber?: number | null confirmations: ConfirmationServiceModel[] creationTx?: boolean | null data?: string | null - dataDecoded?: DecodedData | null + dataDecoded?: DecodedMethods executionDate?: string | null executor: string gasPrice: number diff --git a/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts b/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts index 9b415471..b3965995 100644 --- a/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts +++ b/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts @@ -1,48 +1,57 @@ import { List, Map } from 'immutable' -import { decodeMethods } from 'src/logic/contracts/methodIds' +import { DecodedMethods, decodeMethods } from 'src/logic/contracts/methodIds' import { TOKEN_REDUCER_ID } from 'src/logic/tokens/store/reducer/tokens' import { getERC20DecimalsAndSymbol, isSendERC20Transaction, isSendERC721Transaction, } from 'src/logic/tokens/utils/tokenHelpers' -import { ZERO_ADDRESS, sameAddress } from 'src/logic/wallets/ethAddresses' +import { sameAddress, ZERO_ADDRESS } from 'src/logic/wallets/ethAddresses' import { EMPTY_DATA } from 'src/logic/wallets/ethTransactions' import { makeConfirmation } from 'src/routes/safe/store/models/confirmation' +import { Confirmation } from 'src/routes/safe/store/models/types/confirmation' import { makeTransaction } from 'src/routes/safe/store/models/transaction' +import { + Transaction, + TransactionStatus, + TransactionStatusValues, + TransactionTypes, + TransactionTypeValues, +} from 'src/routes/safe/store/models/types/transaction' import { CANCELLATION_TRANSACTIONS_REDUCER_ID } from 'src/routes/safe/store/reducer/cancellationTransactions' import { SAFE_REDUCER_ID } from 'src/routes/safe/store/reducer/safe' import { TRANSACTIONS_REDUCER_ID } from 'src/routes/safe/store/reducer/transactions' import { store } from 'src/store' import { safeSelector, safeTransactionsSelector } from 'src/routes/safe/store/selectors' import { addOrUpdateTransactions } from 'src/routes/safe/store/actions/transactions/addOrUpdateTransactions' +import { TxServiceModel } from 'src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions' -export const isEmptyData = (data?: string | null) => { +export const isEmptyData = (data?: string | null): boolean => { return !data || data === EMPTY_DATA } -export const isInnerTransaction = (tx: any, safeAddress: string): boolean => { +export const isInnerTransaction = (tx: TxServiceModel, safeAddress: string): boolean => { return sameAddress(tx.to, safeAddress) && Number(tx.value) === 0 } -export const isCancelTransaction = (tx: any, safeAddress: string): boolean => { +export const isCancelTransaction = (tx: TxServiceModel, safeAddress: string): boolean => { return isInnerTransaction(tx, safeAddress) && isEmptyData(tx.data) } -export const isPendingTransaction = (tx: any, cancelTx: any): boolean => { +export const isPendingTransaction = (tx: Transaction, cancelTx: Transaction): boolean => { return (!!cancelTx && cancelTx.status === 'pending') || tx.status === 'pending' } -export const isModifySettingsTransaction = (tx: any, safeAddress: string): boolean => { +export const isModifySettingsTransaction = (tx: TxServiceModel, safeAddress: string): boolean => { return isInnerTransaction(tx, safeAddress) && !isEmptyData(tx.data) } -export const isMultiSendTransaction = (tx: any): boolean => { +export const isMultiSendTransaction = (tx: TxServiceModel): boolean => { return !isEmptyData(tx.data) && tx.data.substring(0, 10) === '0x8d80ff0a' && Number(tx.value) === 0 } -export const isUpgradeTransaction = (tx: any): boolean => { +export const isUpgradeTransaction = (tx: TxServiceModel): boolean => { return ( !isEmptyData(tx.data) && isMultiSendTransaction(tx) && @@ -51,11 +60,16 @@ export const isUpgradeTransaction = (tx: any): boolean => { ) } -export const isOutgoingTransaction = (tx: any, safeAddress: string): boolean => { +export const isOutgoingTransaction = (tx: TxServiceModel, safeAddress: string): boolean => { return !sameAddress(tx.to, safeAddress) && !isEmptyData(tx.data) } -export const isCustomTransaction = async (tx: any, txCode: string, safeAddress: string, knownTokens: any) => { +export const isCustomTransaction = async ( + tx: TxServiceModel, + txCode: string, + safeAddress: string, + knownTokens: any, +): Promise => { return ( isOutgoingTransaction(tx, safeAddress) && !(await isSendERC20Transaction(tx, txCode, knownTokens)) && @@ -96,7 +110,7 @@ export const getRefundParams = async ( return refundParams } -export const getDecodedParams = (tx: any): any => { +export const getDecodedParams = (tx: TxServiceModel): DecodedMethods => { if (tx.dataDecoded) { return Object.keys(tx.dataDecoded).reduce((acc, key) => { acc[key] = { @@ -114,9 +128,9 @@ export const getDecodedParams = (tx: any): any => { return null } -export const getConfirmations = (tx: any): List => { +export const getConfirmations = (tx: TxServiceModel): List => { return List( - tx.confirmations.map((conf: any) => + tx.confirmations.map((conf) => makeConfirmation({ owner: conf.owner, hash: conf.transactionHash, @@ -126,7 +140,11 @@ export const getConfirmations = (tx: any): List => { ) } -export const isTransactionCancelled = (tx: any, outgoingTxs: Array, cancellationTxs: { number: any }): boolean => { +export const isTransactionCancelled = ( + tx: TxServiceModel, + outgoingTxs: Array, + cancellationTxs: { number: TxServiceModel }, +): boolean => { return ( // not executed !tx.isExecuted && @@ -137,49 +155,56 @@ export const isTransactionCancelled = (tx: any, outgoingTxs: Array, cancell ) } -export const calculateTransactionStatus = (tx: any, { owners, threshold }: any, currentUser?: string | null): any => { +export const calculateTransactionStatus = ( + tx: Transaction, + { owners, threshold }: any, + currentUser?: string | null, +): TransactionStatusValues => { let txStatus if (tx.isExecuted && tx.isSuccessful) { - txStatus = 'success' + txStatus = TransactionStatus.SUCCESS } else if (tx.cancelled) { - txStatus = 'cancelled' + txStatus = TransactionStatus.CANCELLED } else if (tx.confirmations.size === threshold) { - txStatus = 'awaiting_execution' + txStatus = TransactionStatus.AWAITING_EXECUTION } else if (tx.creationTx) { - txStatus = 'success' + txStatus = TransactionStatus.SUCCESS } else if (!tx.confirmations.size || !!tx.isPending) { - txStatus = 'pending' + txStatus = TransactionStatus.PENDING } else { const userConfirmed = tx.confirmations.filter((conf) => conf.owner === currentUser).size === 1 const userIsSafeOwner = owners.filter((owner) => owner.address === currentUser).size === 1 - txStatus = !userConfirmed && userIsSafeOwner ? 'awaiting_your_confirmation' : 'awaiting_confirmations' + txStatus = + !userConfirmed && userIsSafeOwner + ? TransactionStatus.AWAITING_YOUR_CONFIRMATION + : TransactionStatus.AWAITING_CONFIRMATIONS } if (tx.isSuccessful === false) { - txStatus = 'failed' + txStatus = TransactionStatus.FAILED } return txStatus } -export const calculateTransactionType = (tx: any): string => { - let txType = 'outgoing' +export const calculateTransactionType = (tx: Transaction): TransactionTypeValues => { + let txType = TransactionTypes.OUTGOING if (tx.isTokenTransfer) { - txType = 'token' + txType = TransactionTypes.TOKEN } else if (tx.isCollectibleTransfer) { - txType = 'collectible' + txType = TransactionTypes.COLLECTIBLE } else if (tx.modifySettingsTx) { - txType = 'settings' + txType = TransactionTypes.SETTINGS } else if (tx.isCancellationTx) { - txType = 'cancellation' + txType = TransactionTypes.CANCELLATION } else if (tx.customTx) { - txType = 'custom' + txType = TransactionTypes.CUSTOM } else if (tx.creationTx) { - txType = 'creation' + txType = TransactionTypes.CREATION } else if (tx.upgradeTx) { - txType = 'upgrade' + txType = TransactionTypes.UPGRADE } return txType @@ -193,7 +218,7 @@ export const buildTx = async ({ safe, tx, txCode, -}): Promise => { +}): Promise => { const safeAddress = safe.address const isModifySettingsTx = isModifySettingsTransaction(tx, safeAddress) const isTxCancelled = isTransactionCancelled(tx, outgoingTxs, cancellationTxs) @@ -208,7 +233,7 @@ export const buildTx = async ({ const confirmations = getConfirmations(tx) const { decimals = null, symbol = null } = isSendERC20Tx ? await getERC20DecimalsAndSymbol(tx.to) : {} - const txToStore = makeTransaction({ + const txToStore: Transaction = makeTransaction({ baseGas: tx.baseGas, blockNumber: tx.blockNumber, cancelled: isTxCancelled, @@ -252,7 +277,7 @@ export const buildTx = async ({ export const mockTransaction = (tx, safeAddress: string, state): Promise => { const submissionDate = new Date().toISOString() - const transactionStructure: any = { + const transactionStructure: TxServiceModel = { blockNumber: null, confirmationsRequired: null, dataDecoded: decodeMethods(tx.data), @@ -290,9 +315,10 @@ export const mockTransaction = (tx, safeAddress: string, state): Promise => }) } -export const updateStoredTransactionsStatus = (dispatch, walletRecord) => { +export const updateStoredTransactionsStatus = (dispatch, walletRecord): void => { const state = store.getState() const safe = safeSelector(state) + if (safe) { const safeAddress = safe.address const transactions = safeTransactionsSelector(state) diff --git a/src/routes/safe/store/models/confirmation.ts b/src/routes/safe/store/models/confirmation.ts index 6e66a003..81b63552 100644 --- a/src/routes/safe/store/models/confirmation.ts +++ b/src/routes/safe/store/models/confirmation.ts @@ -1,6 +1,7 @@ import { Record } from 'immutable' +import { ConfirmationProps } from './types/confirmation' -export const makeConfirmation = Record({ +export const makeConfirmation = Record({ owner: '', type: 'initialised', hash: '', diff --git a/src/routes/safe/store/models/transaction.ts b/src/routes/safe/store/models/transaction.ts index 0968937d..07a0e178 100644 --- a/src/routes/safe/store/models/transaction.ts +++ b/src/routes/safe/store/models/transaction.ts @@ -1,70 +1,14 @@ import { List, Map, Record } from 'immutable' import { ZERO_ADDRESS } from 'src/logic/wallets/ethAddresses' +import { + TransactionProps, + PendingActionType, + TransactionStatus, + TransactionTypes, +} from 'src/routes/safe/store/models/types/transaction' -export type TransactionType = - | 'incoming' - | 'outgoing' - | 'settings' - | 'custom' - | 'creation' - | 'cancellation' - | 'upgrade' - | 'token' - | 'collectible' - -export type TransactionStatus = - | 'awaiting_your_confirmation' - | 'awaiting_confirmations' - | 'success' - | 'failed' - | 'cancelled' - | 'awaiting_execution' - | 'pending' - -export type PendingActionType = 'Confirm' | 'Reject' - -export type TransactionProps = { - baseGas: number - blockNumber?: number | null - cancelled?: boolean - confirmations: List - creationTx: boolean - customTx: boolean - data?: string | null - decimals?: (number | string) | null - decodedParams: any - executionDate?: string | null - executionTxHash?: string | null - executor: string - gasPrice: number - gasToken: string - isCancellationTx: boolean - isCollectibleTransfer: boolean - isExecuted: boolean - isPending?: boolean - isSuccessful: boolean - isTokenTransfer: boolean - modifySettingsTx: boolean - multiSendTx: boolean - nonce?: number | null - operation: number - origin: string | null - ownersWithPendingActions: Map> - recipient: string - refundParams: any - refundReceiver: string - safeTxGas: number - safeTxHash: string - status?: TransactionStatus - submissionDate?: string | null - symbol?: string | null - type: TransactionType - upgradeTx: boolean - value: string -} - -export const makeTransaction = Record({ +export const makeTransaction = Record({ baseGas: 0, blockNumber: 0, cancelled: false, @@ -89,18 +33,16 @@ export const makeTransaction = Record({ nonce: 0, operation: 0, origin: null, - ownersWithPendingActions: Map({ confirm: List([]), reject: List([]) }), + ownersWithPendingActions: Map({ [PendingActionType.CONFIRM]: List([]), [PendingActionType.REJECT]: List([]) }), recipient: '', refundParams: null, refundReceiver: ZERO_ADDRESS, safeTxGas: 0, safeTxHash: '', - status: 'awaiting', + status: TransactionStatus.PENDING, submissionDate: '', symbol: '', - type: 'outgoing', + type: TransactionTypes.OUTGOING, upgradeTx: false, - value: 0, + value: '0', }) - -export type Transaction = Record diff --git a/src/routes/safe/store/models/types/confirmation.d.ts b/src/routes/safe/store/models/types/confirmation.d.ts new file mode 100644 index 00000000..65e879c9 --- /dev/null +++ b/src/routes/safe/store/models/types/confirmation.d.ts @@ -0,0 +1,10 @@ +import { RecordOf } from 'immutable' + +export type ConfirmationProps = { + owner: string + type: string + hash: string + signature: string | null +} + +export type Confirmation = RecordOf diff --git a/src/routes/safe/store/models/types/transaction.ts b/src/routes/safe/store/models/types/transaction.ts new file mode 100644 index 00000000..ea4e12e3 --- /dev/null +++ b/src/routes/safe/store/models/types/transaction.ts @@ -0,0 +1,71 @@ +export enum TransactionTypes { + INCOMING = 'incoming', + OUTGOING = 'outgoing', + SETTINGS = 'settings', + CUSTOM = 'custom', + CREATION = 'creation', + CANCELLATION = 'cancellation', + UPGRADE = 'upgrade', + TOKEN = 'token', + COLLECTIBLE = 'collectible', +} +export type TransactionTypeValues = typeof TransactionTypes[keyof typeof TransactionTypes] + +export enum TransactionStatus { + AWAITING_YOUR_CONFIRMATION = 'awaiting_your_confirmation', + AWAITING_CONFIRMATIONS = 'awaiting_confirmations', + SUCCESS = 'success', + FAILED = 'failed', + CANCELLED = 'cancelled', + AWAITING_EXECUTION = 'awaiting_execution', + PENDING = 'pending', +} +export type TransactionStatusValues = typeof TransactionStatus[keyof typeof TransactionStatus] + +export enum PendingActionType { + CONFIRM = 'confirm', + REJECT = 'reject', +} +export type PendingActionValues = PendingActionType[keyof PendingActionType] + +export type TransactionProps = { + baseGas: number + blockNumber?: number | null + cancelled?: boolean + confirmations: import('immutable').List + creationTx: boolean + customTx: boolean + data?: string | null + decimals?: (number | string) | null + decodedParams: import('src/logic/contracts/methodIds').DecodedMethods + executionDate?: string | null + executionTxHash?: string | null + executor: string + gasPrice: number + gasToken: string + isCancellationTx: boolean + isCollectibleTransfer: boolean + isExecuted: boolean + isPending?: boolean + isSuccessful: boolean + isTokenTransfer: boolean + modifySettingsTx: boolean + multiSendTx: boolean + nonce?: number | null + operation: number + origin: string | null + ownersWithPendingActions: import('immutable').Map> + recipient: string + refundParams: any + refundReceiver: string + safeTxGas: number + safeTxHash: string + status?: TransactionStatus + submissionDate?: string | null + symbol?: string | null + type: TransactionTypes + upgradeTx: boolean + value: string +} + +export type Transaction = import('immutable').RecordOf From 3b94bc906c56e5fef5c8b63b18ece02da5f4fb2b Mon Sep 17 00:00:00 2001 From: fernandomg Date: Wed, 27 May 2020 08:50:57 -0300 Subject: [PATCH 46/65] refactor: wrap `generateBatchRequest` into a more meaningful/descriptive funciton --- src/logic/tokens/store/actions/fetchTokens.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/logic/tokens/store/actions/fetchTokens.ts b/src/logic/tokens/store/actions/fetchTokens.ts index f96d6660..0e178f47 100644 --- a/src/logic/tokens/store/actions/fetchTokens.ts +++ b/src/logic/tokens/store/actions/fetchTokens.ts @@ -51,6 +51,13 @@ export const containsMethodByHash = async (contractAddress, methodHash) => { return byteCode.indexOf(methodHash.replace('0x', '')) !== -1 } +const getTokenValues = (tokenAddress) => + generateBatchRequests({ + abi: ERC20Detailed.abi, + address: tokenAddress, + methods: ['decimals', 'name', 'symbol'], + }) + export const getTokenInfos = async (tokenAddress) => { if (!tokenAddress) { return null @@ -65,11 +72,7 @@ export const getTokenInfos = async (tokenAddress) => { } // Otherwise we fetch it, save it to the store and return it - const [tokenDecimals, tokenName, tokenSymbol] = await generateBatchRequests({ - abi: ERC20Detailed.abi, - address: tokenAddress, - methods: ['decimals', 'name', 'symbol'], - }) + const [tokenDecimals, tokenName, tokenSymbol] = await getTokenValues(tokenAddress) if (tokenDecimals === null) { return null From 7c2f27cf2d09c53476bcef703d76eda49c4b35d5 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Wed, 27 May 2020 08:56:47 -0300 Subject: [PATCH 47/65] chore: clean file --- src/test/safe.dom.settings.name.test.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/safe.dom.settings.name.test.ts b/src/test/safe.dom.settings.name.test.ts index b8386588..a733d80d 100644 --- a/src/test/safe.dom.settings.name.test.ts +++ b/src/test/safe.dom.settings.name.test.ts @@ -1,11 +1,10 @@ -// import { fireEvent } from '@testing-library/react' import { aNewStore } from 'src/store' import { aMinedSafe } from 'src/test/builder/safe.redux.builder' import { renderSafeView } from 'src/test/builder/safe.dom.utils' import { sleep } from 'src/utils/timer' import '@testing-library/jest-dom/extend-expect' -import { SETTINGS_TAB_BTN_TEST_ID, SAFE_VIEW_NAME_HEADING_TEST_ID } from 'src/routes/safe/components/Layout/index' +import { SETTINGS_TAB_BTN_TEST_ID, SAFE_VIEW_NAME_HEADING_TEST_ID } from 'src/routes/safe/components/Layout' import { SAFE_NAME_INPUT_TEST_ID, SAFE_NAME_SUBMIT_BTN_TEST_ID } from 'src/routes/safe/components/Settings/SafeDetails' describe('DOM > Feature > Settings - Name', () => { From d0d19b0b3e9122c8229c61f9bd6d8ba7998ed909 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Wed, 27 May 2020 10:09:28 -0300 Subject: [PATCH 48/65] refactor: use default values for immutable getters --- src/routes/safe/store/selectors/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes/safe/store/selectors/index.ts b/src/routes/safe/store/selectors/index.ts index fc7d9276..b4401245 100644 --- a/src/routes/safe/store/selectors/index.ts +++ b/src/routes/safe/store/selectors/index.ts @@ -60,7 +60,7 @@ export const safeTransactionsSelector = createSelector( return List([]) } - return transactions.get(address) || List([]) + return transactions.get(address, List([])) }, ) @@ -86,7 +86,7 @@ export const safeCancellationTransactionsSelector = createSelector( return Map() } - return cancellationTransactions.get(address) || Map({}) + return cancellationTransactions.get(address, Map({})) }, ) @@ -102,7 +102,7 @@ export const safeIncomingTransactionsSelector = createSelector( return List([]) } - return incomingTransactions.get(address) || List([]) + return incomingTransactions.get(address, List([])) }, ) From 823fc40f7d60e3e3352472682bfbee85fee829a2 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Wed, 27 May 2020 10:10:13 -0300 Subject: [PATCH 49/65] refactor: simplify safe's fields selectors --- src/routes/safe/store/selectors/index.ts | 34 +++++++----------------- 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/src/routes/safe/store/selectors/index.ts b/src/routes/safe/store/selectors/index.ts index b4401245..4a63a9dc 100644 --- a/src/routes/safe/store/selectors/index.ts +++ b/src/routes/safe/store/selectors/index.ts @@ -167,37 +167,23 @@ export const safeBalancesSelector = createSelector(safeSelector, (safe) => { return safe.balances }) -export const safeNameSelector = createSelector(safeSelector, (safe) => { - return safe ? safe.name : undefined -}) +export const safeFieldSelector = (field) => (safe) => safe?.[field] -export const safeEthBalanceSelector = createSelector(safeSelector, (safe) => { - return safe ? safe.ethBalance : undefined -}) +export const safeNameSelector = createSelector(safeSelector, safeFieldSelector('name')) -export const safeNeedsUpdateSelector = createSelector(safeSelector, (safe) => { - return safe ? safe.needsUpdate : undefined -}) +export const safeEthBalanceSelector = createSelector(safeSelector, safeFieldSelector('ethBalance')) -export const safeCurrentVersionSelector = createSelector(safeSelector, (safe) => { - return safe ? safe.currentVersion : undefined -}) +export const safeNeedsUpdateSelector = createSelector(safeSelector, safeFieldSelector('needsUpdate')) -export const safeThresholdSelector = createSelector(safeSelector, (safe) => { - return safe ? safe.threshold : undefined -}) +export const safeCurrentVersionSelector = createSelector(safeSelector, safeFieldSelector('currentVersion')) -export const safeNonceSelector = createSelector(safeSelector, (safe) => { - return safe ? safe.nonce : undefined -}) +export const safeThresholdSelector = createSelector(safeSelector, safeFieldSelector('threshold')) -export const safeOwnersSelector = createSelector(safeSelector, (safe) => { - return safe ? safe.owners : undefined -}) +export const safeNonceSelector = createSelector(safeSelector, safeFieldSelector('nonce')) -export const safeFeaturesEnabledSelector = createSelector(safeSelector, (safe) => { - return safe ? safe.featuresEnabled : undefined -}) +export const safeOwnersSelector = createSelector(safeSelector, safeFieldSelector('owners')) + +export const safeFeaturesEnabledSelector = createSelector(safeSelector, safeFieldSelector('featuresEnabled')) export const getActiveTokensAddressesForAllSafes = createSelector(safesListSelector, (safes) => { const addresses = Set().withMutations((set) => { From e08083743d1c170cd910634ff7b4c8f6629e59bb Mon Sep 17 00:00:00 2001 From: fernandomg Date: Wed, 27 May 2020 10:13:28 -0300 Subject: [PATCH 50/65] refactor: fetch safe and tokens simultaneously --- src/routes/safe/container/hooks/useLoadSafe.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/routes/safe/container/hooks/useLoadSafe.tsx b/src/routes/safe/container/hooks/useLoadSafe.tsx index f0c2a0e5..448d020b 100644 --- a/src/routes/safe/container/hooks/useLoadSafe.tsx +++ b/src/routes/safe/container/hooks/useLoadSafe.tsx @@ -15,8 +15,10 @@ export const useLoadSafe = (safeAddress) => { const fetchData = () => { if (safeAddress) { dispatch(fetchLatestMasterContractVersion()) - .then(() => dispatch(fetchSafe(safeAddress))) - .then(() => dispatch(fetchSafeTokens(safeAddress))) + .then(() => { + dispatch(fetchSafe(safeAddress)) + return dispatch(fetchSafeTokens(safeAddress)) + }) .then(() => { dispatch(loadAddressBookFromStorage()) dispatch(fetchTransactions(safeAddress)) From 85b132de6ba94def755e2938ae5fe5db0cccb9a6 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Wed, 27 May 2020 10:36:59 -0300 Subject: [PATCH 51/65] refactor: FetchTransactions.ts from class to module --- .../fetchTransactions/FetchTransactions.ts | 69 ------------------- .../fetchTransactions/fetchTransactions.ts | 58 ++++++++++++++++ .../transactions/fetchTransactions/index.ts | 2 +- .../loadIncomingTransactions.ts | 39 ++--------- .../loadOutgoingTransactions.ts | 20 +++--- 5 files changed, 77 insertions(+), 111 deletions(-) delete mode 100644 src/routes/safe/store/actions/transactions/fetchTransactions/FetchTransactions.ts create mode 100644 src/routes/safe/store/actions/transactions/fetchTransactions/fetchTransactions.ts diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/FetchTransactions.ts b/src/routes/safe/store/actions/transactions/fetchTransactions/FetchTransactions.ts deleted file mode 100644 index cc8fadb9..00000000 --- a/src/routes/safe/store/actions/transactions/fetchTransactions/FetchTransactions.ts +++ /dev/null @@ -1,69 +0,0 @@ -import axios from 'axios' - -import { buildTxServiceUrl } from 'src/logic/safe/transactions' -import { buildIncomingTxServiceUrl } from 'src/logic/safe/transactions/incomingTxHistory' -import { TxServiceModel } from 'src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions' - -export interface FetchTransactionsInterface { - getServiceUrl(): string - getSafeAddress(): string - setPreviousEtag(eTag: string): void - fetch(): Promise -} - -class FetchTransactions implements FetchTransactionsInterface { - _fetchConfig: {} - _previousETag?: string | null - _safeAddress?: string | null - _txType = 'outgoing' - _url: string - - constructor(safeAddress: string, txType: string) { - this._safeAddress = safeAddress - this._txType = txType - this._url = this.getServiceUrl() - } - - getSafeAddress(): string { - return this._safeAddress - } - - getServiceUrl(): string { - return { - incoming: buildIncomingTxServiceUrl, - outgoing: buildTxServiceUrl, - }[this._txType](this._safeAddress) - } - - setPreviousEtag(eTag: string) { - this._previousETag = eTag ? eTag : this._previousETag - this._fetchConfig = eTag ? { headers: { 'If-None-Match': eTag } } : this._fetchConfig - } - - async fetch(): Promise { - try { - const response = await axios.get(this._url, this._fetchConfig) - - if (response.data.count > 0) { - const { etag } = response.headers - - if (this._previousETag !== etag) { - this.setPreviousEtag(etag) - return response.data.results - } - } - } catch (err) { - if (!(err && err.response && err.response.status === 304)) { - console.error(`Requests for outgoing transactions for ${this._safeAddress || 'unknown'} failed with 404`, err) - } else { - // NOTE: this is the expected implementation, currently the backend is not returning 304. - // So I check if the returned etag is the same instead (see above) - } - } - - // defaults to an empty array to avoid type errors - return [] - } -} - -export default FetchTransactions diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/fetchTransactions.ts b/src/routes/safe/store/actions/transactions/fetchTransactions/fetchTransactions.ts new file mode 100644 index 00000000..224c7c81 --- /dev/null +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/fetchTransactions.ts @@ -0,0 +1,58 @@ +import axios from 'axios' + +import { buildTxServiceUrl } from 'src/logic/safe/transactions' +import { buildIncomingTxServiceUrl } from 'src/logic/safe/transactions/incomingTxHistory' +import { TxServiceModel } from 'src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions' +import { IncomingTxServiceModel } from 'src/routes/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions' +import { TransactionTypes } from 'src/routes/safe/store/models/types/transaction' + +const getServiceUrl = (txType: string, safeAddress: string): string => { + return { + [TransactionTypes.INCOMING]: buildIncomingTxServiceUrl, + [TransactionTypes.OUTGOING]: buildTxServiceUrl, + }[txType](safeAddress) +} + +async function fetchTransactions( + txType: TransactionTypes.INCOMING, + safeAddress: string, + eTag: string | null, +): Promise<{ eTag: string | null; results: IncomingTxServiceModel[] }> +async function fetchTransactions( + txType: TransactionTypes.OUTGOING, + safeAddress: string, + eTag: string | null, +): Promise<{ eTag: string | null; results: TxServiceModel[] }> +async function fetchTransactions( + txType: TransactionTypes.INCOMING | TransactionTypes.OUTGOING, + safeAddress: string, + eTag: string | null, +): Promise<{ eTag: string; results: TxServiceModel[] | IncomingTxServiceModel[] }> { + try { + const url = getServiceUrl(txType, safeAddress) + const response = await axios.get(url, eTag ? { headers: { 'If-None-Match': eTag } } : undefined) + + if (response.data.count > 0) { + const { etag } = response.headers + + if (eTag !== etag) { + return { + eTag: etag, + results: response.data.results, + } + } + } + } catch (err) { + if (!(err && err.response && err.response.status === 304)) { + console.error(`Requests for outgoing transactions for ${safeAddress || 'unknown'} failed with 404`, err) + } else { + // NOTE: this is the expected implementation, currently the backend is not returning 304. + // So I check if the returned etag is the same instead (see above) + } + } + + // defaults to an empty array to avoid type errors + return { eTag, results: [] } +} + +export default fetchTransactions diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/index.ts b/src/routes/safe/store/actions/transactions/fetchTransactions/index.ts index f7927581..6e20a5c4 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions/index.ts +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/index.ts @@ -28,7 +28,7 @@ export default (safeAddress: string) => async (dispatch) => { const incomingTransactions = await loadIncomingTransactions(safeAddress) - if (incomingTransactions) { + if (incomingTransactions.get(safeAddress).size) { dispatch(addIncomingTransactions(incomingTransactions)) } } diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.ts b/src/routes/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.ts index fcd5114d..5bcb104c 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.ts +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/loadIncomingTransactions.ts @@ -1,14 +1,14 @@ -import axios from 'axios' import bn from 'bignumber.js' import { List, Map } from 'immutable' import generateBatchRequests from 'src/logic/contracts/generateBatchRequests' -import { buildIncomingTxServiceUrl } from 'src/logic/safe/transactions/incomingTxHistory' import { ALTERNATIVE_TOKEN_ABI } from 'src/logic/tokens/utils/alternativeAbi' import { web3ReadOnly } from 'src/logic/wallets/getWeb3' import { makeIncomingTransaction } from 'src/routes/safe/store/models/incomingTransaction' +import fetchTransactions from 'src/routes/safe/store/actions/transactions/fetchTransactions/fetchTransactions' +import { TransactionTypes } from 'src/routes/safe/store/models/types/transaction' -type IncomingTxServiceModel = { +export type IncomingTxServiceModel = { blockNumber: number transactionHash: string to: string @@ -68,37 +68,12 @@ const batchIncomingTxsTokenDataRequest = (txs: IncomingTxServiceModel[]) => { ) } -let prevIncomingTxsEtag = null +let previousETag = null export const loadIncomingTransactions = async (safeAddress: string) => { - let incomingTransactions: IncomingTxServiceModel[] = [] - try { - const config = prevIncomingTxsEtag - ? { - headers: { - 'If-None-Match': prevIncomingTxsEtag, - }, - } - : undefined - const url = buildIncomingTxServiceUrl(safeAddress) - const response = await axios.get(url, config) - if (response.data.count > 0) { - incomingTransactions = response.data.results - if (prevIncomingTxsEtag === response.headers.etag) { - // The txs are the same as we currently have, we don't have to proceed - return - } - prevIncomingTxsEtag = response.headers.etag - } - } catch (err) { - if (err && err.response && err.response.status === 304) { - // We return cached transactions - return - } else { - console.error(`Requests for incoming transactions for ${safeAddress} failed with 404`, err) - } - } + const { eTag, results } = await fetchTransactions(TransactionTypes.INCOMING, safeAddress, previousETag) + previousETag = eTag - const incomingTxsWithData = await batchIncomingTxsTokenDataRequest(incomingTransactions) + const incomingTxsWithData = await batchIncomingTxsTokenDataRequest(results) const incomingTxsRecord = incomingTxsWithData.map(buildIncomingTransactionFrom) return Map({ [safeAddress]: List(incomingTxsRecord) }) } diff --git a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.ts b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.ts index 9665c071..409453f8 100644 --- a/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.ts +++ b/src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions.ts @@ -1,14 +1,15 @@ -import { List, Map, fromJS } from 'immutable' +import { fromJS, List, Map } from 'immutable' import generateBatchRequests from 'src/logic/contracts/generateBatchRequests' import { TOKEN_REDUCER_ID } from 'src/logic/tokens/store/reducer/tokens' import { web3ReadOnly } from 'src/logic/wallets/getWeb3' import { PROVIDER_REDUCER_ID } from 'src/logic/wallets/store/reducer/provider' -import FetchTransactions from 'src/routes/safe/store/actions/transactions/fetchTransactions/FetchTransactions' import { buildTx, isCancelTransaction } from 'src/routes/safe/store/actions/transactions/utils/transactionHelpers' import { SAFE_REDUCER_ID } from 'src/routes/safe/store/reducer/safe' import { store } from 'src/store' import { DecodedMethods } from 'src/logic/contracts/methodIds' +import fetchTransactions from 'src/routes/safe/store/actions/transactions/fetchTransactions/fetchTransactions' +import { TransactionTypes } from 'src/routes/safe/store/models/types/transaction' export type ConfirmationServiceModel = { owner: string @@ -167,7 +168,7 @@ const batchProcessOutgoingTransactions = async ({ return { cancel, outgoing } } -let fetchOutgoingTxs: FetchTransactions | null = null +let previousETag = null export const loadOutgoingTransactions = async (safeAddress: string): Promise => { const defaultResponse = { cancel: Map(), @@ -187,12 +188,13 @@ export const loadOutgoingTransactions = async (safeAddress: string): Promise Date: Wed, 27 May 2020 13:32:06 -0300 Subject: [PATCH 52/65] chore: fixes after merge --- src/config/index.ts | 41 ++++++------ .../TxsTable/ExpandedTx/CreationTx/index.tsx | 19 +++--- .../TxsTable/ExpandedTx/IncomingTx/index.tsx | 8 +-- .../TxsTable/ExpandedTx/OutgoingTx/index.tsx | 8 +-- .../TxsTable/ExpandedTx/index.tsx | 3 +- .../Transactions/TxsTable/index.tsx | 62 ++++++------------- .../safe/store/actions/fetchSafeCreationTx.ts | 14 +++-- .../safe/store/actions/fetchTransactions.ts | 0 .../safe/store/models/types/transaction.ts | 6 ++ 9 files changed, 75 insertions(+), 86 deletions(-) delete mode 100644 src/routes/safe/store/actions/fetchTransactions.ts diff --git a/src/config/index.ts b/src/config/index.ts index bdcdb6dc..38f4102a 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -1,48 +1,47 @@ -// -import { ensureOnce } from "src/utils/singleton" +import { ensureOnce } from 'src/utils/singleton' import { ETHEREUM_NETWORK, getWeb3 } from 'src/logic/wallets/getWeb3' import { RELAY_API_URL, SIGNATURES_VIA_METAMASK, TX_SERVICE_HOST -} from "src/config/names" -import devConfig from "./development" -import testConfig from "./testing" -import stagingConfig from "./staging" -import prodConfig from "./production" -import mainnetDevConfig from "./development-mainnet" -import mainnetProdConfig from "./production-mainnet" -import mainnetStagingConfig from "./staging-mainnet" +} from 'src/config/names' +import devConfig from './development' +import testConfig from './testing' +import stagingConfig from './staging' +import prodConfig from './production' +import mainnetDevConfig from './development-mainnet' +import mainnetProdConfig from './production-mainnet' +import mainnetStagingConfig from './staging-mainnet' const configuration = () => { - if (process.env.NODE_ENV === "test") { + if (process.env.NODE_ENV === 'test') { return testConfig } - if (process.env.NODE_ENV === "production") { - if (process.env.REACT_APP_NETWORK === "mainnet") { - return process.env.REACT_APP_ENV === "production" + if (process.env.NODE_ENV === 'production') { + if (process.env.REACT_APP_NETWORK === 'mainnet') { + return process.env.REACT_APP_ENV === 'production' ? mainnetProdConfig : mainnetStagingConfig } - return process.env.REACT_APP_ENV === "production" + return process.env.REACT_APP_ENV === 'production' ? prodConfig : stagingConfig } - return process.env.REACT_APP_NETWORK === "mainnet" + return process.env.REACT_APP_NETWORK === 'mainnet' ? mainnetDevConfig : devConfig } export const getNetwork = () => - process.env.REACT_APP_NETWORK === "mainnet" + process.env.REACT_APP_NETWORK === 'mainnet' ? ETHEREUM_NETWORK.MAINNET : ETHEREUM_NETWORK.RINKEBY export const getNetworkId = () => - process.env.REACT_APP_NETWORK === "mainnet" ? 1 : 4 + process.env.REACT_APP_NETWORK === 'mainnet' ? 1 : 4 const getConfig = ensureOnce(configuration) @@ -74,9 +73,9 @@ export const getGoogleAnalyticsTrackingID = () => : process.env.REACT_APP_GOOGLE_ANALYTICS_ID_RINKEBY export const getIntercomId = () => - process.env.REACT_APP_ENV === "production" + process.env.REACT_APP_ENV === 'production' ? process.env.REACT_APP_INTERCOM_ID - : "plssl1fl" + : 'plssl1fl' export const getExchangeRatesUrl = () => 'https://api.exchangeratesapi.io/latest' @@ -88,4 +87,4 @@ export const buildSafeCreationTxUrl = (safeAddress) => { const base = getSafeCreationTxUri(address) return `${host}${base}` -} \ No newline at end of file +} diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/CreationTx/index.tsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/CreationTx/index.tsx index 8305985b..39181635 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/CreationTx/index.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/CreationTx/index.tsx @@ -1,11 +1,12 @@ -// @flow -import React from 'react' -import { formatDate } from '../../columns' -import Bold from '../../../../../../../components/layout/Bold' -import Paragraph from '../../../../../../../components/layout/Paragraph' -import EtherscanLink from '../../../../../../../components/EtherscanLink' import { makeStyles } from '@material-ui/core/styles' -import Block from '../../../../../../../components/layout/Block' +import React from 'react' + +import { formatDate } from 'src/routes/safe/components/Transactions/TxsTable/columns' +import Bold from 'src/components/layout/Bold' +import Paragraph from 'src/components/layout/Paragraph' +import EtherscanLink from 'src/components/EtherscanLink' +import Block from 'src/components/layout/Block' +import { TransactionTypes } from 'src/routes/safe/store/models/types/transaction' const useStyles = makeStyles({ address: { @@ -25,9 +26,7 @@ export const CreationTx = (props) => { const { tx } = props const classes = useStyles() if (!tx) return null - const isCreationTx = tx.type === 'creation' - - console.log('Classes', classes) + const isCreationTx = tx.type === TransactionTypes.CREATION return !isCreationTx ? null : ( <> diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/IncomingTx/index.tsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/IncomingTx/index.tsx index d0f9d383..86ad85d9 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/IncomingTx/index.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/IncomingTx/index.tsx @@ -1,8 +1,8 @@ import React from 'react' -import { INCOMING_TX_TYPES } from '../../../../../store/models/incomingTransaction' -import { formatDate } from '../../columns' -import Bold from '../../../../../../../components/layout/Bold' -import Paragraph from '../../../../../../../components/layout/Paragraph' +import { INCOMING_TX_TYPES } from 'src/routes/safe/store/models/incomingTransaction' +import { formatDate } from 'src/routes/safe/components/Transactions/TxsTable/columns' +import Bold from 'src/components/layout/Bold' +import Paragraph from 'src/components/layout/Paragraph' export const IncomingTx = (props) => { const { tx } = props diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OutgoingTx/index.tsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OutgoingTx/index.tsx index 1fafd089..02c853ba 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OutgoingTx/index.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OutgoingTx/index.tsx @@ -1,8 +1,8 @@ -// @flow import React from 'react' -import { formatDate } from '../../columns' -import Bold from '../../../../../../../components/layout/Bold' -import Paragraph from '../../../../../../../components/layout/Paragraph' + +import { formatDate } from 'src/routes/safe/components/Transactions/TxsTable/columns' +import Bold from 'src/components/layout/Bold' +import Paragraph from 'src/components/layout/Paragraph' export const OutgoingTx = (props) => { const { tx } = props diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/index.tsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/index.tsx index ca1f1cef..1abfbd59 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/index.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/index.tsx @@ -24,6 +24,7 @@ import { safeNonceSelector, safeThresholdSelector } from 'src/routes/safe/store/ import { IncomingTx } from './IncomingTx' import { CreationTx } from './CreationTx' import { OutgoingTx } from './OutgoingTx' +import { TransactionTypes } from 'src/routes/safe/store/models/types/transaction' const useStyles = makeStyles(styles as any) @@ -35,7 +36,7 @@ const ExpandedTx = ({ cancelTx, tx }) => { const openApproveModal = () => setOpenModal('approveTx') const closeModal = () => setOpenModal(null) const isIncomingTx = !!INCOMING_TX_TYPES[tx.type] - const isCreationTx = tx.type === 'creation' + const isCreationTx = tx.type === TransactionTypes.CREATION const thresholdReached = !isIncomingTx && threshold <= tx.confirmations.size const canExecute = !isIncomingTx && nonce === tx.nonce diff --git a/src/routes/safe/components/Transactions/TxsTable/index.tsx b/src/routes/safe/components/Transactions/TxsTable/index.tsx index a82f2b7e..bb74eea8 100644 --- a/src/routes/safe/components/Transactions/TxsTable/index.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/index.tsx @@ -19,8 +19,8 @@ import Table from 'src/components/Table' import { cellWidth } from 'src/components/Table/TableHead' import Block from 'src/components/layout/Block' import Row from 'src/components/layout/Row' -import { extendedTransactionsSelector } from 'src/routes/safe/container/selector' import { safeCancellationTransactionsSelector } from 'src/routes/safe/store/selectors' +import { extendedTransactionsSelector } from 'src/routes/safe/store/selectors/transactions' export const TRANSACTION_ROW_TEST_ID = 'transaction-row' @@ -101,49 +101,27 @@ const TxsTable = ({ classes }) => { - {!row.tx.creationTx && ( - - {expandedTx === row.safeTxHash ? : } - - )} + + {expandedTx === row.tx.safeTxHash ? : } + + + + + + ( + + )} + in={expandedTx === row.tx.safeTxHash} + timeout="auto" + unmountOnExit + /> - {!row.tx.creationTx && ( - - - ( - - )} - in={expandedTx === row.tx.safeTxHash} - timeout="auto" - unmountOnExit - /> - - - )} - {row.tx.creationTx && ( - - - ( - - )} - in={expandedTx === row.tx.safeTxHash} - timeout="auto" - unmountOnExit - /> - - - )} )) } diff --git a/src/routes/safe/store/actions/fetchSafeCreationTx.ts b/src/routes/safe/store/actions/fetchSafeCreationTx.ts index 99a72a8b..928d3b57 100644 --- a/src/routes/safe/store/actions/fetchSafeCreationTx.ts +++ b/src/routes/safe/store/actions/fetchSafeCreationTx.ts @@ -1,9 +1,11 @@ -// @flow import axios from 'axios' import { List } from 'immutable' -import { buildSafeCreationTxUrl } from '../../../../config' + +import { buildSafeCreationTxUrl } from 'src/config' import { addOrUpdateTransactions } from './transactions/addOrUpdateTransactions' -import { makeTransaction } from '../models/transaction' +import { makeTransaction } from 'src/routes/safe/store/models/transaction' +import { TransactionTypes, TransactionStatus } from 'src/routes/safe/store/models/types/transaction' +import { web3ReadOnly } from 'src/logic/wallets/getWeb3' const getCreationTx = async (safeAddress) => { const url = buildSafeCreationTxUrl(safeAddress) @@ -29,17 +31,21 @@ const fetchSafeCreationTx = (safeAddress) => async (dispatch) => { transactionHash, type, } = creationTxFetched - const txType = type || 'creation' + const txType = type || TransactionTypes.CREATION + const safeTxHash = web3ReadOnly.utils.toHex('this is the creation transaction') const creationTxAsRecord = makeTransaction({ created, creator, factoryAddress, masterCopy, + nonce: -1, setupData, creationTx, executionTxHash: transactionHash, type: txType, + safeTxHash, + status: TransactionStatus.SUCCESS, submissionDate: created, }) diff --git a/src/routes/safe/store/actions/fetchTransactions.ts b/src/routes/safe/store/actions/fetchTransactions.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/src/routes/safe/store/models/types/transaction.ts b/src/routes/safe/store/models/types/transaction.ts index ea4e12e3..53b47f00 100644 --- a/src/routes/safe/store/models/types/transaction.ts +++ b/src/routes/safe/store/models/types/transaction.ts @@ -33,6 +33,8 @@ export type TransactionProps = { blockNumber?: number | null cancelled?: boolean confirmations: import('immutable').List + created: boolean + creator: string creationTx: boolean customTx: boolean data?: string | null @@ -41,6 +43,7 @@ export type TransactionProps = { executionDate?: string | null executionTxHash?: string | null executor: string + factoryAddress: string gasPrice: number gasToken: string isCancellationTx: boolean @@ -49,6 +52,7 @@ export type TransactionProps = { isPending?: boolean isSuccessful: boolean isTokenTransfer: boolean + masterCopy: string modifySettingsTx: boolean multiSendTx: boolean nonce?: number | null @@ -60,9 +64,11 @@ export type TransactionProps = { refundReceiver: string safeTxGas: number safeTxHash: string + setupData: string status?: TransactionStatus submissionDate?: string | null symbol?: string | null + transactionHash: string type: TransactionTypes upgradeTx: boolean value: string From a5a99167f48e5502b9063febc70d23e77b216bf7 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Wed, 27 May 2020 14:34:25 -0300 Subject: [PATCH 53/65] fix: set default values for decimals and symbol to ETH --- .../safe/store/actions/transactions/utils/transactionHelpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts b/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts index b3965995..dbfc365d 100644 --- a/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts +++ b/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts @@ -231,7 +231,7 @@ export const buildTx = async ({ const refundParams = await getRefundParams(tx, getERC20DecimalsAndSymbol) const decodedParams = getDecodedParams(tx) const confirmations = getConfirmations(tx) - const { decimals = null, symbol = null } = isSendERC20Tx ? await getERC20DecimalsAndSymbol(tx.to) : {} + const { decimals = 18, symbol = 'ETH' } = isSendERC20Tx ? await getERC20DecimalsAndSymbol(tx.to) : {} const txToStore: Transaction = makeTransaction({ baseGas: tx.baseGas, From a68a2d32d002d8b29d82db619c1b614b24e9d377 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Wed, 27 May 2020 17:55:41 -0300 Subject: [PATCH 54/65] feature: calculate `safeTxHash` on client-side --- .eslintrc.js | 1 + package.json | 19 +++++---- .../safe/store/actions/createTransaction.ts | 16 ++++++-- .../transactions/utils/transactionHelpers.ts | 41 +++++++++++++++++++ .../safe/store/models/types/transaction.ts | 16 ++++++++ yarn.lock | 34 ++++++++++++++- 6 files changed, 113 insertions(+), 14 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 9c896455..041efd2c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -25,6 +25,7 @@ module.exports = { '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-non-null-assertion': 'off', '@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }], + '@typescript-eslint/ban-ts-ignore': 'off', }, settings: { react: { diff --git a/package.json b/package.json index cf777b44..f7cbc07c 100644 --- a/package.json +++ b/package.json @@ -167,10 +167,11 @@ "electron-is-dev": "^1.1.0", "electron-log": "4.1.2", "electron-updater": "4.3.1", + "eth-sig-util": "^2.5.3", "ethereum-ens": "0.8.0", "express": "^4.17.1", - "final-form-calculate": "^1.3.1", "final-form": "4.19.1", + "final-form-calculate": "^1.3.1", "history": "4.10.1", "immortal-db": "^1.0.2", "immutable": "^4.0.0-rc.9", @@ -182,9 +183,10 @@ "polished": "3.6.3", "qrcode.react": "1.0.0", "query-string": "6.12.1", + "react": "16.13.1", "react-dom": "16.13.1", - "react-final-form-listeners": "^1.0.2", "react-final-form": "6.4.0", + "react-final-form-listeners": "^1.0.2", "react-ga": "^2.7.0", "react-hot-loader": "4.12.21", "react-qr-reader": "^2.2.1", @@ -192,11 +194,10 @@ "react-router-dom": "5.2.0", "react-scripts": "^3.4.1", "react-window": "^1.8.5", - "react": "16.13.1", "recompose": "^0.30.0", + "redux": "4.0.5", "redux-actions": "^2.6.5", "redux-thunk": "^2.3.0", - "redux": "4.0.5", "reselect": "^4.0.0", "semver": "7.3.2", "styled-components": "^5.0.1", @@ -209,24 +210,24 @@ "@testing-library/user-event": "^7.1.2", "@types/jest": "^25.2.1", "@types/node": "^13.11.0", - "@types/react-dom": "^16.9.6", "@types/react": "^16.9.32", + "@types/react-dom": "^16.9.6", "@typescript-eslint/eslint-plugin": "^2.34.0", "@typescript-eslint/parser": "^2.34.0", "autoprefixer": "9.7.6", "cross-env": "^7.0.2", - "dotenv-expand": "^5.1.0", "dotenv": "^8.2.0", + "dotenv-expand": "^5.1.0", + "electron": "7.1.8", "electron-builder": "22.2.0", "electron-notarize": "^0.2.1", - "electron": "7.1.8", + "eslint": "^6.8.0", "eslint-config-prettier": "6.11.0", "eslint-plugin-import": "2.20.2", "eslint-plugin-jsx-a11y": "^6.2.3", "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-react": "^7.18.3", "eslint-plugin-sort-destructure-keys": "1.3.4", - "eslint": "^6.8.0", "ethereumjs-abi": "0.6.8", "husky": "^4.2.2", "lint-staged": "10.2.2", @@ -234,7 +235,7 @@ "prettier": "2.0.5", "react-app-rewired": "^2.1.6", "truffle": "5.1.23", - "typescript": "~3.7.2" , + "typescript": "~3.7.2", "wait-on": "5.0.0" } } diff --git a/src/routes/safe/store/actions/createTransaction.ts b/src/routes/safe/store/actions/createTransaction.ts index 2b4b8f05..ae09c2d4 100644 --- a/src/routes/safe/store/actions/createTransaction.ts +++ b/src/routes/safe/store/actions/createTransaction.ts @@ -6,9 +6,15 @@ import semverSatisfies from 'semver/functions/satisfies' import { onboardUser } from 'src/components/ConnectButton' import { getGnosisSafeInstanceAt } from 'src/logic/contracts/safeContracts' import { getNotificationsFromTxType, showSnackbar } from 'src/logic/notifications' -import { CALL, getApprovalTransaction, getExecutionTransaction, saveTxToHistory } from 'src/logic/safe/transactions' +import { + CALL, + getApprovalTransaction, + getExecutionTransaction, + SAFE_VERSION_FOR_OFFCHAIN_SIGNATURES, + saveTxToHistory, + tryOffchainSigning, +} from 'src/logic/safe/transactions' import { estimateSafeTxGas } from 'src/logic/safe/transactions/gasNew' -import { SAFE_VERSION_FOR_OFFCHAIN_SIGNATURES, tryOffchainSigning } from 'src/logic/safe/transactions/offchainSigner' import { getCurrentSafeVersion } from 'src/logic/safe/utils/safeVersion' import { ZERO_ADDRESS } from 'src/logic/wallets/ethAddresses' import { EMPTY_DATA } from 'src/logic/wallets/ethTransactions' @@ -18,7 +24,10 @@ import { addOrUpdateCancellationTransactions } from 'src/routes/safe/store/actio import { addOrUpdateTransactions } from 'src/routes/safe/store/actions/transactions/addOrUpdateTransactions' import { removeCancellationTransaction } from 'src/routes/safe/store/actions/transactions/removeCancellationTransaction' import { removeTransaction } from 'src/routes/safe/store/actions/transactions/removeTransaction' -import { mockTransaction } from 'src/routes/safe/store/actions/transactions/utils/transactionHelpers' +import { + generateSafeTxHash, + mockTransaction, +} from 'src/routes/safe/store/actions/transactions/utils/transactionHelpers' import { getLastTx, getNewTxNonce, shouldExecuteTransaction } from 'src/routes/safe/store/actions/utils' import { getErrorMessage } from 'src/test/utils/ethereumErrors' import { makeConfirmation } from '../models/confirmation' @@ -151,6 +160,7 @@ const createTransaction = ({ ...txArgs, confirmations: [], // this is used to determine if a tx is pending or not. See `calculateTransactionStatus` helper value: txArgs.valueInWei, + safeTxHash: generateSafeTxHash(safeAddress, txArgs), } const mockedTx = await mockTransaction(txToMock, safeAddress, state) diff --git a/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts b/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts index dbfc365d..d8e5bd8c 100644 --- a/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts +++ b/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts @@ -18,6 +18,7 @@ import { TransactionStatusValues, TransactionTypes, TransactionTypeValues, + TxArgs, } from 'src/routes/safe/store/models/types/transaction' import { CANCELLATION_TRANSACTIONS_REDUCER_ID } from 'src/routes/safe/store/reducer/cancellationTransactions' import { SAFE_REDUCER_ID } from 'src/routes/safe/store/reducer/safe' @@ -26,6 +27,7 @@ import { store } from 'src/store' import { safeSelector, safeTransactionsSelector } from 'src/routes/safe/store/selectors' import { addOrUpdateTransactions } from 'src/routes/safe/store/actions/transactions/addOrUpdateTransactions' import { TxServiceModel } from 'src/routes/safe/store/actions/transactions/fetchTransactions/loadOutgoingTransactions' +import { TypedDataUtils } from 'eth-sig-util' export const isEmptyData = (data?: string | null): boolean => { return !data || data === EMPTY_DATA @@ -332,3 +334,42 @@ export const updateStoredTransactionsStatus = (dispatch, walletRecord): void => ) } } + +export function generateSafeTxHash(safeAddress: string, txArgs: TxArgs): string { + const typedData = { + types: { + EIP712Domain: [{ type: 'address', name: 'verifyingContract' }], + SafeTx: [ + { type: 'address', name: 'to' }, + { type: 'uint256', name: 'value' }, + { type: 'bytes', name: 'data' }, + { type: 'uint8', name: 'operation' }, + { type: 'uint256', name: 'safeTxGas' }, + { type: 'uint256', name: 'baseGas' }, + { type: 'uint256', name: 'gasPrice' }, + { type: 'address', name: 'gasToken' }, + { type: 'address', name: 'refundReceiver' }, + { type: 'uint256', name: 'nonce' }, + ], + }, + domain: { + verifyingContract: safeAddress, + }, + primaryType: 'SafeTx', + message: { + to: txArgs.to, + value: txArgs.valueInWei, + data: txArgs.data, + operation: txArgs.operation, + safeTxGas: txArgs.safeTxGas, + baseGas: txArgs.baseGas, + gasPrice: txArgs.gasPrice, + gasToken: txArgs.gasToken, + refundReceiver: txArgs.refundReceiver, + nonce: txArgs.nonce, + }, + } + + // @ts-ignore + return `0x${TypedDataUtils.sign(typedData).toString('hex')}` +} diff --git a/src/routes/safe/store/models/types/transaction.ts b/src/routes/safe/store/models/types/transaction.ts index 53b47f00..83c7bd9c 100644 --- a/src/routes/safe/store/models/types/transaction.ts +++ b/src/routes/safe/store/models/types/transaction.ts @@ -75,3 +75,19 @@ export type TransactionProps = { } export type Transaction = import('immutable').RecordOf + +export type TxArgs = { + data: any + baseGas: number + gasToken: string + safeInstance: any + nonce: number + valueInWei: any + safeTxGas: number + refundReceiver: string + sender: any + sigs: string + to: any + operation: any + gasPrice: number +} diff --git a/yarn.lock b/yarn.lock index d47fc442..f4ba5da2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3933,7 +3933,7 @@ bn.js@4.11.8: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.4.0, bn.js@^4.8.0: +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.10.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.4.0, bn.js@^4.8.0: version "4.11.9" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== @@ -6861,6 +6861,18 @@ eth-sig-util@^1.4.2: ethereumjs-abi "git+https://github.com/ethereumjs/ethereumjs-abi.git" ethereumjs-util "^5.1.1" +eth-sig-util@^2.5.3: + version "2.5.3" + resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-2.5.3.tgz#6938308b38226e0b3085435474900b03036abcbe" + integrity sha512-KpXbCKmmBUNUTGh9MRKmNkIPietfhzBqqYqysDavLseIiMUGl95k6UcPEkALAZlj41e9E6yioYXc1PC333RKqw== + dependencies: + buffer "^5.2.1" + elliptic "^6.4.0" + ethereumjs-abi "0.6.5" + ethereumjs-util "^5.1.1" + tweetnacl "^1.0.0" + tweetnacl-util "^0.15.0" + eth-tx-summary@^3.1.2: version "3.2.4" resolved "https://registry.yarnpkg.com/eth-tx-summary/-/eth-tx-summary-3.2.4.tgz#e10eb95eb57cdfe549bf29f97f1e4f1db679035c" @@ -6951,6 +6963,14 @@ ethereum-public-key-to-address@0.0.1: meow "^5.0.0" secp256k1 "^3.7.1" +ethereumjs-abi@0.6.5: + version "0.6.5" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz#5a637ef16ab43473fa72a29ad90871405b3f5241" + integrity sha1-WmN+8Wq0NHP6cqKa2QhxQFs/UkE= + dependencies: + bn.js "^4.10.0" + ethereumjs-util "^4.3.0" + ethereumjs-abi@0.6.8, "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": version "0.6.8" resolved "git+https://github.com/ethereumjs/ethereumjs-abi.git#1cfbb13862f90f0b391d8a699544d5fe4dfb8c7b" @@ -7021,7 +7041,7 @@ ethereumjs-tx@^2.1.1, ethereumjs-tx@^2.1.2: ethereumjs-common "^1.5.0" ethereumjs-util "^6.0.0" -ethereumjs-util@4.5.0: +ethereumjs-util@4.5.0, ethereumjs-util@^4.3.0: version "4.5.0" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz#3e9428b317eebda3d7260d854fddda954b1f1bc6" integrity sha1-PpQosxfuvaPXJg2FT93alUsfG8Y= @@ -16004,11 +16024,21 @@ tunnel@^0.0.6: resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== +tweetnacl-util@^0.15.0: + version "0.15.1" + resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" + integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== + tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= +tweetnacl@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" From aefe721e8f0fabd55b109704bf0d66311347238f Mon Sep 17 00:00:00 2001 From: fernandomg Date: Thu, 28 May 2020 01:02:19 -0300 Subject: [PATCH 55/65] fix: owners column buttons statuses --- .../Transactions/TxsTable/ExpandedTx/OwnersColumn/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/index.tsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/index.tsx index dad74809..96624aeb 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/index.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OwnersColumn/index.tsx @@ -18,6 +18,7 @@ import Paragraph from 'src/components/layout/Paragraph/index' import { userAccountSelector } from 'src/logic/wallets/store/selectors' import { makeTransaction } from 'src/routes/safe/store/models/transaction' import { safeOwnersSelector, safeThresholdSelector } from 'src/routes/safe/store/selectors' +import { TransactionStatus } from 'src/routes/safe/store/models/types/transaction' function getOwnersConfirmations(tx, userAddress) { const ownersWhoConfirmed = [] @@ -75,7 +76,7 @@ function getPendingOwnersConfirmations(owners, tx, userAddress) { const OwnersColumn = ({ tx, - cancelTx = makeTransaction(), + cancelTx = makeTransaction({ isCancellationTx: true, status: TransactionStatus.AWAITING_YOUR_CONFIRMATION }), classes, thresholdReached, cancelThresholdReached, @@ -118,6 +119,7 @@ const OwnersColumn = ({ const showConfirmBtn = !tx.isExecuted && tx.status !== 'pending' && + cancelTx.status !== 'pending' && !tx.cancelled && userIsUnconfirmedOwner && !currentUserAlreadyConfirmed && @@ -128,6 +130,7 @@ const OwnersColumn = ({ const showRejectBtn = !cancelTx.isExecuted && !tx.isExecuted && + tx.status !== 'pending' && cancelTx.status !== 'pending' && userIsUnconfirmedCancelOwner && !currentUserAlreadyConfirmedCancel && From 1453de1162800686d5e1a7c94ebefa2416172346 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Thu, 28 May 2020 01:03:08 -0300 Subject: [PATCH 56/65] fix: avoid accessing `txHash` if it's not defined This scenario can be reproduced by rejecting a tx in the owner's wallet --- .../safe/store/actions/processTransaction.ts | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/routes/safe/store/actions/processTransaction.ts b/src/routes/safe/store/actions/processTransaction.ts index 0eb8a5c7..2a02aa86 100644 --- a/src/routes/safe/store/actions/processTransaction.ts +++ b/src/routes/safe/store/actions/processTransaction.ts @@ -168,6 +168,7 @@ const processTransaction = ({ 'status', receipt.status ? (isCancelTransaction(record, safeAddress) ? 'cancelled' : 'success') : 'failed', ) + .updateIn(['ownersWithPendingActions', 'reject'], (prev) => prev.clear()) }) : mockedTx.set('status', 'awaiting_confirmations') @@ -194,13 +195,20 @@ const processTransaction = ({ }) } catch (err) { console.error(err) - closeSnackbar(beforeExecutionKey) - closeSnackbar(pendingExecutionKey) - showSnackbar(notificationsQueue.afterExecutionError, enqueueSnackbar, closeSnackbar) - const executeData = safeInstance.contract.methods.approveHash(txHash).encodeABI() - const errMsg = await getErrorMessage(safeInstance.address, 0, executeData, from) - console.error(`Error executing the TX: ${errMsg}`) + if (txHash !== undefined) { + closeSnackbar(beforeExecutionKey) + + if (pendingExecutionKey) { + closeSnackbar(pendingExecutionKey) + } + + showSnackbar(notificationsQueue.afterExecutionError, enqueueSnackbar, closeSnackbar) + + const executeData = safeInstance.contract.methods.approveHash(txHash).encodeABI() + const errMsg = await getErrorMessage(safeInstance.address, 0, executeData, from) + console.error(`Error executing the TX: ${errMsg}`) + } } return txHash From 4e6741e1b9f918c383ecaedfc86abf89f9dd0ff4 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Thu, 28 May 2020 01:07:05 -0300 Subject: [PATCH 57/65] fix: set proper transaction statuses --- src/routes/safe/store/actions/createTransaction.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/routes/safe/store/actions/createTransaction.ts b/src/routes/safe/store/actions/createTransaction.ts index ae09c2d4..0c9e45db 100644 --- a/src/routes/safe/store/actions/createTransaction.ts +++ b/src/routes/safe/store/actions/createTransaction.ts @@ -33,10 +33,11 @@ import { getErrorMessage } from 'src/test/utils/ethereumErrors' import { makeConfirmation } from '../models/confirmation' import fetchTransactions from './transactions/fetchTransactions' import { safeTransactionsSelector } from 'src/routes/safe/store/selectors' +import { TransactionStatus } from 'src/routes/safe/store/models/types/transaction' export const removeTxFromStore = (tx, safeAddress, dispatch, state) => { if (tx.isCancellationTx) { - const newTxStatus = 'awaiting_confirmations' + const newTxStatus = TransactionStatus.AWAITING_YOUR_CONFIRMATION const transactions = safeTransactionsSelector(state) const txsToUpdate = transactions .filter((transaction) => Number(transaction.nonce) === Number(tx.nonce)) @@ -53,12 +54,19 @@ export const removeTxFromStore = (tx, safeAddress, dispatch, state) => { export const storeTx = async (tx, safeAddress, dispatch, state) => { if (tx.isCancellationTx) { - const newTxStatus = tx.isExecuted ? 'cancelled' : tx.status === 'pending' ? 'pending' : 'awaiting_confirmations' + let newTxStatus: TransactionStatus = TransactionStatus.AWAITING_YOUR_CONFIRMATION + + if (tx.isExecuted) { + newTxStatus = TransactionStatus.CANCELLED + } else if (tx.status === TransactionStatus.PENDING) { + newTxStatus = tx.status + } + const transactions = safeTransactionsSelector(state) const txsToUpdate = transactions .filter((transaction) => Number(transaction.nonce) === Number(tx.nonce)) .withMutations((list) => - list.map((tx) => tx.set('status', newTxStatus).set('cancelled', newTxStatus === 'cancelled')), + list.map((tx) => tx.set('status', newTxStatus).set('cancelled', newTxStatus === TransactionStatus.CANCELLED)), ) batch(() => { From 9660db211f70733f0017148a49fb48c033ca0a2f Mon Sep 17 00:00:00 2001 From: fernandomg Date: Thu, 28 May 2020 13:55:39 -0300 Subject: [PATCH 58/65] chore: update `yarn.lock` and remove duplicated entry in `.gitignore` --- .gitignore | 1 - yarn.lock | 25 +++++++++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 5c7da685..78cf7778 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ node_modules/ build/ .DS_Store -build/ yarn-error.log .env* .idea/ diff --git a/yarn.lock b/yarn.lock index fa27ca54..2c37c2ad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3918,7 +3918,7 @@ bluebird-lst@^1.0.9: dependencies: bluebird "^3.5.5" -bluebird@^3.5.0, bluebird@^3.5.5: +bluebird@^3.4.7, bluebird@^3.5.0, bluebird@^3.5.5: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== @@ -6722,7 +6722,7 @@ eth-block-tracker@^4.2.0, eth-block-tracker@^4.4.1, eth-block-tracker@^4.4.2: pify "^3.0.0" safe-event-emitter "^1.0.1" -eth-ens-namehash@2.0.8: +eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.0: version "2.0.8" resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" integrity sha1-IprEbsqG1S4MmR58sq74P/D2i88= @@ -6919,6 +6919,18 @@ ethereum-common@0.2.0: resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.2.0.tgz#13bf966131cce1eeade62a1b434249bb4cb120ca" integrity sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA== +ethereum-ens@0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/ethereum-ens/-/ethereum-ens-0.8.0.tgz#6d0f79acaa61fdbc87d2821779c4e550243d4c57" + integrity sha512-a8cBTF4AWw1Q1Y37V1LSCS9pRY4Mh3f8vCg5cbXCCEJ3eno1hbI/+Ccv9SZLISYpqQhaglP3Bxb/34lS4Qf7Bg== + dependencies: + bluebird "^3.4.7" + eth-ens-namehash "^2.0.0" + js-sha3 "^0.5.7" + pako "^1.0.4" + underscore "^1.8.3" + web3 "^1.0.0-beta.34" + ethereum-private-key-to-address@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/ethereum-private-key-to-address/-/ethereum-private-key-to-address-0.0.3.tgz#1f1dccaefd1198c2dcde55501f331a846bd0aad0" @@ -11943,7 +11955,7 @@ pad@^3.2.0: dependencies: wcwidth "^1.0.1" -pako@~1.0.5: +pako@^1.0.4, pako@~1.0.5: version "1.0.11" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== @@ -16112,6 +16124,11 @@ underscore@1.9.1: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== +underscore@^1.8.3: + version "1.10.2" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.10.2.tgz#73d6aa3668f3188e4adb0f1943bd12cfd7efaaaf" + integrity sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg== + unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" @@ -17075,7 +17092,7 @@ web3@1.2.1: web3-shh "1.2.1" web3-utils "1.2.1" -web3@1.2.8: +web3@1.2.8, web3@^1.0.0-beta.34: version "1.2.8" resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.8.tgz#20b24baa769e0224a708ef5bf196a5b83d19540b" integrity sha512-rXUn16VKxn2aIe9v0KX+bSm2JXdq/Vnj3lZ0Rub2Q5YUSycHdCBaDtJRukl/jB5ygAdyr5/cUwvJzhNDJSYsGw== From fda93a53c8ac21e6c155ec21006798afa2d4d521 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Fri, 29 May 2020 14:00:20 +0400 Subject: [PATCH 59/65] fix generateSafeTxHash typing --- .../transactions/utils/transactionHelpers.ts | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts b/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts index d8e5bd8c..2f514329 100644 --- a/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts +++ b/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts @@ -336,26 +336,29 @@ export const updateStoredTransactionsStatus = (dispatch, walletRecord): void => } export function generateSafeTxHash(safeAddress: string, txArgs: TxArgs): string { + const messageTypes = { + EIP712Domain: [{ type: 'address', name: 'verifyingContract' }], + SafeTx: [ + { type: 'address', name: 'to' }, + { type: 'uint256', name: 'value' }, + { type: 'bytes', name: 'data' }, + { type: 'uint8', name: 'operation' }, + { type: 'uint256', name: 'safeTxGas' }, + { type: 'uint256', name: 'baseGas' }, + { type: 'uint256', name: 'gasPrice' }, + { type: 'address', name: 'gasToken' }, + { type: 'address', name: 'refundReceiver' }, + { type: 'uint256', name: 'nonce' }, + ], + } + const primaryType: 'SafeTx' = 'SafeTx' + const typedData = { - types: { - EIP712Domain: [{ type: 'address', name: 'verifyingContract' }], - SafeTx: [ - { type: 'address', name: 'to' }, - { type: 'uint256', name: 'value' }, - { type: 'bytes', name: 'data' }, - { type: 'uint8', name: 'operation' }, - { type: 'uint256', name: 'safeTxGas' }, - { type: 'uint256', name: 'baseGas' }, - { type: 'uint256', name: 'gasPrice' }, - { type: 'address', name: 'gasToken' }, - { type: 'address', name: 'refundReceiver' }, - { type: 'uint256', name: 'nonce' }, - ], - }, + types: messageTypes, domain: { verifyingContract: safeAddress, }, - primaryType: 'SafeTx', + primaryType, message: { to: txArgs.to, value: txArgs.valueInWei, @@ -370,6 +373,5 @@ export function generateSafeTxHash(safeAddress: string, txArgs: TxArgs): string }, } - // @ts-ignore - return `0x${TypedDataUtils.sign(typedData).toString('hex')}` + return `0x${TypedDataUtils.sign(typedData).toString('hex')}` } From cdf76a8ad63f87e66193292d9c72982a435ad8c2 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Fri, 29 May 2020 15:05:44 +0400 Subject: [PATCH 60/65] turn on ban ts ignore rule --- .eslintrc.js | 1 - 1 file changed, 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 041efd2c..9c896455 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -25,7 +25,6 @@ module.exports = { '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-non-null-assertion': 'off', '@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }], - '@typescript-eslint/ban-ts-ignore': 'off', }, settings: { react: { From fccd886d8619e3715c0f52440ae46fff3e3854f8 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Fri, 29 May 2020 15:09:33 +0400 Subject: [PATCH 61/65] remove ethereum-ens dependency --- package.json | 1 - yarn.lock | 26 +++++--------------------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 09cb87df..affa579c 100644 --- a/package.json +++ b/package.json @@ -168,7 +168,6 @@ "electron-log": "4.1.2", "electron-updater": "4.3.1", "eth-sig-util": "^2.5.3", - "ethereum-ens": "0.8.0", "express": "^4.17.1", "final-form": "4.19.1", "final-form-calculate": "^1.3.1", diff --git a/yarn.lock b/yarn.lock index 2c37c2ad..5891ece2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3918,7 +3918,7 @@ bluebird-lst@^1.0.9: dependencies: bluebird "^3.5.5" -bluebird@^3.4.7, bluebird@^3.5.0, bluebird@^3.5.5: +bluebird@^3.5.0, bluebird@^3.5.5: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== @@ -6722,7 +6722,7 @@ eth-block-tracker@^4.2.0, eth-block-tracker@^4.4.1, eth-block-tracker@^4.4.2: pify "^3.0.0" safe-event-emitter "^1.0.1" -eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.0: +eth-ens-namehash@2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" integrity sha1-IprEbsqG1S4MmR58sq74P/D2i88= @@ -6919,18 +6919,6 @@ ethereum-common@0.2.0: resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.2.0.tgz#13bf966131cce1eeade62a1b434249bb4cb120ca" integrity sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA== -ethereum-ens@0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/ethereum-ens/-/ethereum-ens-0.8.0.tgz#6d0f79acaa61fdbc87d2821779c4e550243d4c57" - integrity sha512-a8cBTF4AWw1Q1Y37V1LSCS9pRY4Mh3f8vCg5cbXCCEJ3eno1hbI/+Ccv9SZLISYpqQhaglP3Bxb/34lS4Qf7Bg== - dependencies: - bluebird "^3.4.7" - eth-ens-namehash "^2.0.0" - js-sha3 "^0.5.7" - pako "^1.0.4" - underscore "^1.8.3" - web3 "^1.0.0-beta.34" - ethereum-private-key-to-address@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/ethereum-private-key-to-address/-/ethereum-private-key-to-address-0.0.3.tgz#1f1dccaefd1198c2dcde55501f331a846bd0aad0" @@ -11955,7 +11943,7 @@ pad@^3.2.0: dependencies: wcwidth "^1.0.1" -pako@^1.0.4, pako@~1.0.5: +pako@~1.0.5: version "1.0.11" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== @@ -16124,11 +16112,6 @@ underscore@1.9.1: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== -underscore@^1.8.3: - version "1.10.2" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.10.2.tgz#73d6aa3668f3188e4adb0f1943bd12cfd7efaaaf" - integrity sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg== - unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" @@ -17092,7 +17075,7 @@ web3@1.2.1: web3-shh "1.2.1" web3-utils "1.2.1" -web3@1.2.8, web3@^1.0.0-beta.34: +web3@1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.8.tgz#20b24baa769e0224a708ef5bf196a5b83d19540b" integrity sha512-rXUn16VKxn2aIe9v0KX+bSm2JXdq/Vnj3lZ0Rub2Q5YUSycHdCBaDtJRukl/jB5ygAdyr5/cUwvJzhNDJSYsGw== @@ -17264,6 +17247,7 @@ websocket-extensions@>=0.1.1: dependencies: debug "^2.2.0" es5-ext "^0.10.50" + gulp "^4.0.2" nan "^2.14.0" typedarray-to-buffer "^3.1.5" yaeti "^0.0.6" From bee6f021939c335ec9791b33eb18fecefa1d0265 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Fri, 29 May 2020 10:37:46 -0300 Subject: [PATCH 62/65] update `yarn.lock` --- yarn.lock | 861 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 833 insertions(+), 28 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5891ece2..1a5e2daa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2639,6 +2639,13 @@ ansi-align@^3.0.0: dependencies: string-width "^3.0.0" +ansi-colors@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9" + integrity sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA== + dependencies: + ansi-wrap "^0.1.0" + ansi-colors@^3.0.0, ansi-colors@^3.2.1: version "3.2.4" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" @@ -2656,6 +2663,13 @@ ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: dependencies: type-fest "^0.11.0" +ansi-gray@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251" + integrity sha1-KWLPVOyXksSFEKPetSRDaGHvclE= + dependencies: + ansi-wrap "0.1.0" + ansi-html@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" @@ -2701,6 +2715,11 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: "@types/color-name" "^1.1.1" color-convert "^2.0.1" +ansi-wrap@0.1.0, ansi-wrap@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" + integrity sha1-qCJQ3bABXponyoLoLqYDu/pF768= + any-observable@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b" @@ -2798,11 +2817,23 @@ app-module-path@^2.2.0: resolved "https://registry.yarnpkg.com/app-module-path/-/app-module-path-2.2.0.tgz#641aa55dfb7d6a6f0a8141c4b9c0aa50b6c24dd5" integrity sha1-ZBqlXft9am8KgUHEucCqULbCTdU= +append-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/append-buffer/-/append-buffer-1.0.2.tgz#d8220cf466081525efea50614f3de6514dfa58f1" + integrity sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE= + dependencies: + buffer-equal "^1.0.0" + aproba@^1.0.3, aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== +archy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= + are-we-there-yet@~1.1.2: version "1.1.5" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" @@ -2844,16 +2875,35 @@ arr-diff@^4.0.0: resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= -arr-flatten@^1.1.0: +arr-filter@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/arr-filter/-/arr-filter-1.1.2.tgz#43fdddd091e8ef11aa4c45d9cdc18e2dff1711ee" + integrity sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4= + dependencies: + make-iterator "^1.0.0" + +arr-flatten@^1.0.1, arr-flatten@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== +arr-map@^2.0.0, arr-map@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/arr-map/-/arr-map-2.0.2.tgz#3a77345ffc1cf35e2a91825601f9e58f2e24cac4" + integrity sha1-Onc0X/wc814qkYJWAfnljy4kysQ= + dependencies: + make-iterator "^1.0.0" + arr-union@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= +array-each@^1.0.0, array-each@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" + integrity sha1-p5SvDAWrF1KEbudTofIRoFugxE8= + array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" @@ -2883,6 +2933,35 @@ array-includes@^3.0.3, array-includes@^3.1.1: es-abstract "^1.17.0" is-string "^1.0.5" +array-initial@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/array-initial/-/array-initial-1.1.0.tgz#2fa74b26739371c3947bd7a7adc73be334b3d795" + integrity sha1-L6dLJnOTccOUe9enrcc74zSz15U= + dependencies: + array-slice "^1.0.0" + is-number "^4.0.0" + +array-last@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/array-last/-/array-last-1.3.0.tgz#7aa77073fec565ddab2493f5f88185f404a9d336" + integrity sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg== + dependencies: + is-number "^4.0.0" + +array-slice@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4" + integrity sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w== + +array-sort@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-sort/-/array-sort-1.0.0.tgz#e4c05356453f56f53512a7d1d6123f2c54c0a88a" + integrity sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg== + dependencies: + default-compare "^1.0.0" + get-value "^2.0.6" + kind-of "^5.0.2" + array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" @@ -2974,6 +3053,16 @@ astral-regex@^2.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== +async-done@^1.2.0, async-done@^1.2.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/async-done/-/async-done-1.3.2.tgz#5e15aa729962a4b07414f528a88cdf18e0b290a2" + integrity sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.2" + process-nextick-args "^2.0.0" + stream-exhaust "^1.0.1" + async-each@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" @@ -3006,6 +3095,13 @@ async-sema@^3.1.0: resolved "https://registry.yarnpkg.com/async-sema/-/async-sema-3.1.0.tgz#3a813beb261e4cc58b19213916a48e931e21d21e" integrity sha512-+JpRq3r0zjpRLDruS6q/nC4V5tzsaiu07521677Mdi5i+AkaU/aNJH38rYHJVQ4zvz+SSkjgc8FUI7qIZrR+3g== +async-settle@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/async-settle/-/async-settle-1.0.0.tgz#1d0a914bb02575bec8a8f3a74e5080f72b2c0c6b" + integrity sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs= + dependencies: + async-done "^1.2.2" + async@0.9.x: version "0.9.2" resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" @@ -3786,6 +3882,21 @@ babylon@^6.18.0: resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== +bach@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/bach/-/bach-1.2.0.tgz#4b3ce96bf27134f79a1b414a51c14e34c3bd9880" + integrity sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA= + dependencies: + arr-filter "^1.1.1" + arr-flatten "^1.0.1" + arr-map "^2.0.0" + array-each "^1.0.0" + array-initial "^1.0.0" + array-last "^1.1.1" + async-done "^1.2.2" + async-settle "^1.0.0" + now-and-later "^2.0.0" + backoff@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/backoff/-/backoff-2.5.0.tgz#f616eda9d3e4b66b8ca7fca79f695722c5f8e26f" @@ -4230,6 +4341,11 @@ buffer-crc32@~0.2.3: resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= +buffer-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-1.0.0.tgz#59616b498304d556abd466966b22eeda3eca5fbe" + integrity sha1-WWFrSYME1Var1GaWayLu2j7KX74= + buffer-fill@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" @@ -4491,6 +4607,11 @@ camelcase@^2.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= + camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" @@ -4586,7 +4707,7 @@ checkpoint-store@^1.1.0: dependencies: functional-red-black-tree "^1.0.1" -chokidar@^2.1.8: +chokidar@^2.0.0, chokidar@^2.1.8: version "2.1.8" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== @@ -4718,6 +4839,15 @@ cli-width@^2.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + cliui@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" @@ -4745,6 +4875,11 @@ cliui@^6.0.0: strip-ansi "^6.0.0" wrap-ansi "^6.2.0" +clone-buffer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" + integrity sha1-4+JbIHrE5wGvch4staFnksrD3Fg= + clone-deep@^0.2.4: version "0.2.4" resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-0.2.4.tgz#4e73dd09e9fb971cc38670c5dced9c1896481cc6" @@ -4772,6 +4907,11 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" +clone-stats@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" + integrity sha1-s3gt/4u1R04Yuba/D9/ngvh3doA= + clone@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" @@ -4782,6 +4922,15 @@ clone@^2.0.0, clone@^2.1.1: resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= +cloneable-readable@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.1.3.tgz#120a00cb053bfb63a222e709f9683ea2e11d8cec" + integrity sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ== + dependencies: + inherits "^2.0.1" + process-nextick-args "^2.0.0" + readable-stream "^2.3.5" + clsx@^1.0.4, clsx@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.0.tgz#62937c6adfea771247c34b54d320fb99624f5702" @@ -4806,6 +4955,15 @@ code-point-at@^1.0.0: resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= +collection-map@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-map/-/collection-map-1.0.0.tgz#aea0f06f8d26c780c2b75494385544b2255af18c" + integrity sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw= + dependencies: + arr-map "^2.0.2" + for-own "^1.0.0" + make-iterator "^1.0.0" + collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" @@ -4846,6 +5004,11 @@ color-string@^1.5.2: color-name "^1.0.0" simple-swizzle "^0.2.2" +color-support@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" + integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== + color@^3.0.0: version "3.1.2" resolved "https://registry.yarnpkg.com/color/-/color-3.1.2.tgz#68148e7f85d41ad7649c5fa8c8106f098d229e10" @@ -4950,7 +5113,7 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^1.5.0, concat-stream@^1.5.1, concat-stream@^1.6.2: +concat-stream@^1.5.0, concat-stream@^1.5.1, concat-stream@^1.6.0, concat-stream@^1.6.2: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== @@ -5038,7 +5201,7 @@ content-type@~1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== -convert-source-map@1.7.0, convert-source-map@^1.4.0, convert-source-map@^1.5.1, convert-source-map@^1.7.0: +convert-source-map@1.7.0, convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== @@ -5082,6 +5245,14 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= +copy-props@^2.0.1: + version "2.0.4" + resolved "https://registry.yarnpkg.com/copy-props/-/copy-props-2.0.4.tgz#93bb1cadfafd31da5bb8a9d4b41f471ec3a72dfe" + integrity sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A== + dependencies: + each-props "^1.3.0" + is-plain-object "^2.0.1" + core-js-compat@^3.6.2: version "3.6.5" resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.6.5.tgz#2a51d9a4e25dfd6e690251aa81f99e3c05481f1c" @@ -5603,7 +5774,7 @@ decamelize-keys@^1.0.0: decamelize "^1.1.0" map-obj "^1.0.0" -decamelize@^1.1.0, decamelize@^1.1.2, decamelize@^1.2.0: +decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= @@ -5712,6 +5883,13 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== +default-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-compare/-/default-compare-1.0.0.tgz#cb61131844ad84d84788fb68fd01681ca7781a2f" + integrity sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ== + dependencies: + kind-of "^5.0.2" + default-gateway@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-4.2.0.tgz#167104c7500c2115f6dd69b0a536bb8ed720552b" @@ -5720,6 +5898,11 @@ default-gateway@^4.2.0: execa "^1.0.0" ip-regex "^2.1.0" +default-resolution@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/default-resolution/-/default-resolution-2.0.0.tgz#bcb82baa72ad79b426a76732f1a81ad6df26d684" + integrity sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ= + defaults@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" @@ -5814,6 +5997,11 @@ destroy@~1.0.4: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= +detect-file@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" + integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= + detect-indent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" @@ -6077,6 +6265,14 @@ duplexify@^3.4.2, duplexify@^3.6.0: readable-stream "^2.0.0" stream-shift "^1.0.0" +each-props@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/each-props/-/each-props-1.3.2.tgz#ea45a414d16dd5cfa419b1a81720d5ca06892333" + integrity sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA== + dependencies: + is-plain-object "^2.0.1" + object.defaults "^1.1.0" + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -6355,7 +6551,7 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -es5-ext@^0.10.35, es5-ext@^0.10.50: +es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50: version "0.10.53" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== @@ -6369,7 +6565,7 @@ es6-error@^4.1.1: resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== -es6-iterator@2.0.3, es6-iterator@~2.0.3: +es6-iterator@2.0.3, es6-iterator@^2.0.1, es6-iterator@^2.0.3, es6-iterator@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= @@ -6391,6 +6587,16 @@ es6-symbol@^3.1.1, es6-symbol@~3.1.3: d "^1.0.1" ext "^1.1.2" +es6-weak-map@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" + integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== + dependencies: + d "1" + es5-ext "^0.10.46" + es6-iterator "^2.0.3" + es6-symbol "^3.1.1" + escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -7281,6 +7487,13 @@ expand-template@^2.0.3: resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== +expand-tilde@^2.0.0, expand-tilde@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" + integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= + dependencies: + homedir-polyfill "^1.0.1" + expect@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/expect/-/expect-24.9.0.tgz#b75165b4817074fa4a157794f46fe9f1ba15b6ca" @@ -7351,7 +7564,7 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@~3.0.2: +extend@^3.0.0, extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== @@ -7406,6 +7619,16 @@ fake-merkle-patricia-tree@^1.0.1: dependencies: checkpoint-store "^1.1.0" +fancy-log@^1.3.2: + version "1.3.3" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7" + integrity sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw== + dependencies: + ansi-gray "^0.1.1" + color-support "^1.1.3" + parse-node-version "^1.0.0" + time-stamp "^1.0.0" + fast-deep-equal@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" @@ -7656,6 +7879,42 @@ find-versions@^3.2.0: dependencies: semver-regex "^2.0.0" +findup-sync@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc" + integrity sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw= + dependencies: + detect-file "^1.0.0" + is-glob "^3.1.0" + micromatch "^3.0.4" + resolve-dir "^1.0.1" + +findup-sync@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" + integrity sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg== + dependencies: + detect-file "^1.0.0" + is-glob "^4.0.0" + micromatch "^3.0.4" + resolve-dir "^1.0.1" + +fined@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fined/-/fined-1.2.0.tgz#d00beccf1aa2b475d16d423b0238b713a2c4a37b" + integrity sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng== + dependencies: + expand-tilde "^2.0.2" + is-plain-object "^2.0.3" + object.defaults "^1.1.0" + object.pick "^1.2.0" + parse-filepath "^1.0.1" + +flagged-respawn@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.1.tgz#e7de6f1279ddd9ca9aac8a5971d618606b3aab41" + integrity sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q== + flat-cache@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" @@ -7675,7 +7934,7 @@ flatten@^1.0.2: resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b" integrity sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg== -flush-write-stream@^1.0.0: +flush-write-stream@^1.0.0, flush-write-stream@^1.0.2: version "1.1.1" resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== @@ -7721,6 +7980,13 @@ for-own@^0.1.3: dependencies: for-in "^1.0.1" +for-own@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b" + integrity sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs= + dependencies: + for-in "^1.0.1" + forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -7848,6 +8114,14 @@ fs-minipass@^2.0.0: dependencies: minipass "^3.0.0" +fs-mkdirp-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz#0b7815fc3201c6a69e14db98ce098c16935259eb" + integrity sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes= + dependencies: + graceful-fs "^4.1.11" + through2 "^2.0.3" + fs-write-stream-atomic@^1.0.8: version "1.0.10" resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" @@ -8001,11 +8275,39 @@ glob-parent@^5.0.0, glob-parent@~5.1.0: dependencies: is-glob "^4.0.1" +glob-stream@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-6.1.0.tgz#7045c99413b3eb94888d83ab46d0b404cc7bdde4" + integrity sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ= + dependencies: + extend "^3.0.0" + glob "^7.1.1" + glob-parent "^3.1.0" + is-negated-glob "^1.0.0" + ordered-read-streams "^1.0.0" + pumpify "^1.3.5" + readable-stream "^2.1.5" + remove-trailing-separator "^1.0.1" + to-absolute-glob "^2.0.0" + unique-stream "^2.0.2" + glob-to-regexp@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= +glob-watcher@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-5.0.3.tgz#88a8abf1c4d131eb93928994bc4a593c2e5dd626" + integrity sha512-8tWsULNEPHKQ2MR4zXuzSmqbdyV5PtwwCaWSGQ1WwHsJ07ilNeN1JB8ntxhckbnpSHaf9dXFUHzIWvm1I13dsg== + dependencies: + anymatch "^2.0.0" + async-done "^1.2.0" + chokidar "^2.0.0" + is-negated-glob "^1.0.0" + just-debounce "^1.0.0" + object.defaults "^1.1.0" + glob@7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" @@ -8057,6 +8359,26 @@ global-modules@2.0.0: dependencies: global-prefix "^3.0.0" +global-modules@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" + integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== + dependencies: + global-prefix "^1.0.1" + is-windows "^1.0.1" + resolve-dir "^1.0.0" + +global-prefix@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" + integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= + dependencies: + expand-tilde "^2.0.2" + homedir-polyfill "^1.0.1" + ini "^1.3.4" + is-windows "^1.0.1" + which "^1.2.14" + global-prefix@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" @@ -8149,6 +8471,13 @@ globule@^1.0.0: lodash "~4.17.12" minimatch "~3.0.2" +glogg@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.2.tgz#2d7dd702beda22eb3bffadf880696da6d846313f" + integrity sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA== + dependencies: + sparkles "^1.0.0" + got@9.6.0, got@^9.6.0: version "9.6.0" resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" @@ -8186,7 +8515,7 @@ got@^7.1.0: url-parse-lax "^1.0.0" url-to-options "^1.0.1" -graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.2: +graceful-fs@^4.0.0, graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.2: version "4.2.4" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== @@ -8206,6 +8535,47 @@ growly@^1.3.0: resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= +gulp-cli@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/gulp-cli/-/gulp-cli-2.2.1.tgz#376e427661b7996430a89d71c15df75defa3360a" + integrity sha512-yEMxrXqY8mJFlaauFQxNrCpzWJThu0sH1sqlToaTOT063Hub9s/Nt2C+GSLe6feQ/IMWrHvGOOsyES7CQc9O+A== + dependencies: + ansi-colors "^1.0.1" + archy "^1.0.0" + array-sort "^1.0.0" + color-support "^1.1.3" + concat-stream "^1.6.0" + copy-props "^2.0.1" + fancy-log "^1.3.2" + gulplog "^1.0.0" + interpret "^1.1.0" + isobject "^3.0.1" + liftoff "^3.1.0" + matchdep "^2.0.0" + mute-stdout "^1.0.0" + pretty-hrtime "^1.0.0" + replace-homedir "^1.0.0" + semver-greatest-satisfied-range "^1.1.0" + v8flags "^3.0.1" + yargs "^7.1.0" + +gulp@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/gulp/-/gulp-4.0.2.tgz#543651070fd0f6ab0a0650c6a3e6ff5a7cb09caa" + integrity sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA== + dependencies: + glob-watcher "^5.0.3" + gulp-cli "^2.2.0" + undertaker "^1.2.1" + vinyl-fs "^3.0.0" + +gulplog@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" + integrity sha1-4oxNRdBey77YGDY86PnFkmIp/+U= + dependencies: + glogg "^1.0.0" + gzip-size@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274" @@ -8409,6 +8779,13 @@ home-or-tmp@^2.0.0: os-homedir "^1.0.0" os-tmpdir "^1.0.1" +homedir-polyfill@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" + integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== + dependencies: + parse-passwd "^1.0.0" + hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: version "2.8.8" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" @@ -8857,7 +9234,7 @@ internal-slot@^1.0.2: has "^1.0.3" side-channel "^1.0.2" -interpret@^1.0.0: +interpret@^1.0.0, interpret@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== @@ -8869,6 +9246,11 @@ invariant@^2.2.2, invariant@^2.2.4: dependencies: loose-envify "^1.0.0" +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= + invert-kv@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" @@ -8899,6 +9281,14 @@ is-absolute-url@^3.0.3: resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q== +is-absolute@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" + integrity sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA== + dependencies: + is-relative "^1.0.0" + is-windows "^1.0.1" + is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" @@ -9114,6 +9504,11 @@ is-natural-number@^4.0.1: resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg= +is-negated-glob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-negated-glob/-/is-negated-glob-1.0.0.tgz#6910bca5da8c95e784b5751b976cf5a10fee36d2" + integrity sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI= + is-npm@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-3.0.0.tgz#ec9147bfb629c43f494cf67936a961edec7e8053" @@ -9126,6 +9521,11 @@ is-number@^3.0.0: dependencies: kind-of "^3.0.2" +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== + is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" @@ -9196,6 +9596,13 @@ is-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= +is-relative@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" + integrity sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA== + dependencies: + is-unc-path "^1.0.0" + is-resolvable@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" @@ -9245,12 +9652,24 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= -is-utf8@^0.2.0: +is-unc-path@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d" + integrity sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ== + dependencies: + unc-path-regex "^0.1.2" + +is-utf8@^0.2.0, is-utf8@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= -is-windows@^1.0.2: +is-valid-glob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa" + integrity sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao= + +is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== @@ -10137,6 +10556,11 @@ just-curry-it@^3.1.0: resolved "https://registry.yarnpkg.com/just-curry-it/-/just-curry-it-3.1.0.tgz#ab59daed308a58b847ada166edd0a2d40766fbc5" integrity sha512-mjzgSOFzlrurlURaHVjnQodyPNvrHrf1TbQP2XU9NSqBtHQPuHZ+Eb6TAJP7ASeJN9h9K0KXoRTs8u6ouHBKvg== +just-debounce@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/just-debounce/-/just-debounce-1.0.0.tgz#87fccfaeffc0b68cd19d55f6722943f929ea35ea" + integrity sha1-h/zPrv/AtozRnVX2cilD+SnqNeo= + keccak256@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/keccak256/-/keccak256-1.0.0.tgz#1ba55ce78ed3d63fb7091d045469007da984171d" @@ -10206,7 +10630,7 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" -kind-of@^5.0.0: +kind-of@^5.0.0, kind-of@^5.0.2: version "5.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== @@ -10236,6 +10660,14 @@ last-call-webpack-plugin@^3.0.0: lodash "^4.17.5" webpack-sources "^1.1.0" +last-run@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/last-run/-/last-run-1.1.1.tgz#45b96942c17b1c79c772198259ba943bebf8ca5b" + integrity sha1-RblpQsF7HHnHchmCWbqUO+v4yls= + dependencies: + default-resolution "^2.0.0" + es6-weak-map "^2.0.1" + latest-version@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face" @@ -10258,6 +10690,20 @@ lazy-val@^1.0.4: resolved "https://registry.yarnpkg.com/lazy-val/-/lazy-val-1.0.4.tgz#882636a7245c2cfe6e0a4e3ba6c5d68a137e5c65" integrity sha512-u93kb2fPbIrfzBuLjZE+w+fJbUUMhNDXxNmMfaqNgpfQf1CO5ZSe2LfsnBqVAk7i/2NF48OSoRj+Xe2VT+lE8Q== +lazystream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" + integrity sha1-9plf4PggOS9hOWvolGJAe7dxaOQ= + dependencies: + readable-stream "^2.0.5" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= + dependencies: + invert-kv "^1.0.0" + lcid@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" @@ -10265,6 +10711,13 @@ lcid@^2.0.0: dependencies: invert-kv "^2.0.0" +lead@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lead/-/lead-1.0.0.tgz#6f14f99a37be3a9dd784f5495690e5903466ee42" + integrity sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI= + dependencies: + flush-write-stream "^1.0.2" + left-pad@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" @@ -10340,6 +10793,20 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +liftoff@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-3.1.0.tgz#c9ba6081f908670607ee79062d700df062c52ed3" + integrity sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog== + dependencies: + extend "^3.0.0" + findup-sync "^3.0.0" + fined "^1.0.1" + flagged-respawn "^1.0.0" + is-plain-object "^2.0.4" + object.map "^1.0.0" + rechoir "^0.6.2" + resolve "^1.1.7" + lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" @@ -10644,6 +11111,13 @@ make-dir@^3.0.2: dependencies: semver "^6.0.0" +make-iterator@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6" + integrity sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw== + dependencies: + kind-of "^6.0.2" + makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" @@ -10663,7 +11137,7 @@ map-age-cleaner@^0.1.1: dependencies: p-defer "^1.0.0" -map-cache@^0.2.2: +map-cache@^0.2.0, map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= @@ -10685,6 +11159,16 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" +matchdep@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/matchdep/-/matchdep-2.0.0.tgz#c6f34834a0d8dbc3b37c27ee8bbcb27c7775582e" + integrity sha1-xvNINKDY28OzfCfui7yyfHd1WC4= + dependencies: + findup-sync "^2.0.0" + micromatch "^3.0.4" + resolve "^1.4.0" + stack-trace "0.0.10" + matcher@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/matcher/-/matcher-2.1.0.tgz#64e1041c15b993e23b786f93320a7474bf833c28" @@ -10850,7 +11334,7 @@ microevent.ts@~0.1.1: resolved "https://registry.yarnpkg.com/microevent.ts/-/microevent.ts-0.1.1.tgz#70b09b83f43df5172d0205a63025bce0f7357fa0" integrity sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g== -micromatch@^3.1.10, micromatch@^3.1.4: +micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -11200,6 +11684,11 @@ multihashes@^0.4.15, multihashes@~0.4.15: multibase "^0.7.0" varint "^5.0.0" +mute-stdout@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mute-stdout/-/mute-stdout-1.0.1.tgz#acb0300eb4de23a7ddeec014e3e96044b3472331" + integrity sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg== + mute-stream@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" @@ -11490,6 +11979,13 @@ normalize-url@^4.1.0: prop-types "^15.7.2" react-is "^16.9.0" +now-and-later@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/now-and-later/-/now-and-later-2.0.1.tgz#8e579c8685764a7cc02cb680380e94f43ccb1f7c" + integrity sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ== + dependencies: + once "^1.3.2" + npm-conf@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz#256cc47bd0e218c259c4e9550bf413bc2192aff9" @@ -11620,7 +12116,7 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.1.0: +object.assign@^4.0.4, object.assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== @@ -11630,6 +12126,16 @@ object.assign@^4.1.0: has-symbols "^1.0.0" object-keys "^1.0.11" +object.defaults@^1.0.0, object.defaults@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/object.defaults/-/object.defaults-1.1.0.tgz#3a7f868334b407dea06da16d88d5cd29e435fecf" + integrity sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8= + dependencies: + array-each "^1.0.1" + array-slice "^1.0.0" + for-own "^1.0.0" + isobject "^3.0.0" + object.entries@^1.1.0, object.entries@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.2.tgz#bc73f00acb6b6bb16c203434b10f9a7e797d3add" @@ -11657,13 +12163,29 @@ object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.0 define-properties "^1.1.3" es-abstract "^1.17.0-next.1" -object.pick@^1.3.0: +object.map@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz#cf83e59dc8fcc0ad5f4250e1f78b3b81bd801d37" + integrity sha1-z4Plncj8wK1fQlDh94s7gb2AHTc= + dependencies: + for-own "^1.0.0" + make-iterator "^1.0.0" + +object.pick@^1.2.0, object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= dependencies: isobject "^3.0.1" +object.reduce@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object.reduce/-/object.reduce-1.0.1.tgz#6fe348f2ac7fa0f95ca621226599096825bb03ad" + integrity sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60= + dependencies: + for-own "^1.0.0" + make-iterator "^1.0.0" + object.values@^1.1.0, object.values@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" @@ -11708,7 +12230,7 @@ on-headers@~1.0.2: resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== -once@^1.3.0, once@^1.3.1, once@^1.4.0: +once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= @@ -11767,6 +12289,13 @@ optionator@^0.8.1, optionator@^0.8.3: type-check "~0.3.2" word-wrap "~1.2.3" +ordered-read-streams@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz#77c0cb37c41525d64166d990ffad7ec6a0e1363e" + integrity sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4= + dependencies: + readable-stream "^2.0.1" + original-require@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/original-require/-/original-require-1.0.1.tgz#0f130471584cd33511c5ec38c8d59213f9ac5e20" @@ -11789,6 +12318,13 @@ os-homedir@^1.0.0: resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= + dependencies: + lcid "^1.0.0" + os-locale@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" @@ -11984,6 +12520,15 @@ parse-asn1@^5.0.0, parse-asn1@^5.1.5: pbkdf2 "^3.0.3" safe-buffer "^5.1.1" +parse-filepath@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891" + integrity sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE= + dependencies: + is-absolute "^1.0.0" + map-cache "^0.2.0" + path-root "^0.1.1" + parse-headers@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.3.tgz#5e8e7512383d140ba02f0c7aa9f49b4399c92515" @@ -12014,6 +12559,16 @@ parse-json@^5.0.0: json-parse-better-errors "^1.0.1" lines-and-columns "^1.1.6" +parse-node-version@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz#e2b5dbede00e7fa9bc363607f53327e8b073189b" + integrity sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA== + +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= + parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" @@ -12094,6 +12649,18 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== +path-root-regex@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" + integrity sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0= + +path-root@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7" + integrity sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc= + dependencies: + path-root-regex "^0.1.0" + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -13057,12 +13624,17 @@ pretty-format@^25.1.0, pretty-format@^25.2.1, pretty-format@^25.5.0: ansi-styles "^4.0.0" react-is "^16.12.0" +pretty-hrtime@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" + integrity sha1-t+PqQkNaTJsnWdmeDyAesZWALuE= + private@^0.1.6, private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== -process-nextick-args@~2.0.0: +process-nextick-args@^2.0.0, process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== @@ -13182,7 +13754,7 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" -pumpify@^1.3.3: +pumpify@^1.3.3, pumpify@^1.3.5: version "1.5.1" resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== @@ -13694,7 +14266,7 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -13977,7 +14549,24 @@ relateurl@^0.2.7: resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= -remove-trailing-separator@^1.0.1: +remove-bom-buffer@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz#c2bf1e377520d324f623892e33c10cac2c252b53" + integrity sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ== + dependencies: + is-buffer "^1.1.5" + is-utf8 "^0.2.1" + +remove-bom-stream@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz#05f1a593f16e42e1fb90ebf59de8e569525f9523" + integrity sha1-BfGlk/FuQuH7kOv1nejlaVJflSM= + dependencies: + remove-bom-buffer "^3.0.0" + safe-buffer "^5.1.0" + through2 "^2.0.3" + +remove-trailing-separator@^1.0.1, remove-trailing-separator@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= @@ -14010,6 +14599,20 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" +replace-ext@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.1.tgz#2d6d996d04a15855d967443631dd5f77825b016a" + integrity sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw== + +replace-homedir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/replace-homedir/-/replace-homedir-1.0.0.tgz#e87f6d513b928dde808260c12be7fec6ff6e798c" + integrity sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw= + dependencies: + homedir-polyfill "^1.0.1" + is-absolute "^1.0.0" + remove-trailing-separator "^1.1.0" + request-promise-core@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.3.tgz#e9a3c081b51380dfea677336061fea879a829ee9" @@ -14089,6 +14692,14 @@ resolve-cwd@^2.0.0: dependencies: resolve-from "^3.0.0" +resolve-dir@^1.0.0, resolve-dir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" + integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= + dependencies: + expand-tilde "^2.0.0" + global-modules "^1.0.0" + resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" @@ -14099,6 +14710,13 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== +resolve-options@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/resolve-options/-/resolve-options-1.1.0.tgz#32bb9e39c06d67338dc9378c0d6d6074566ad131" + integrity sha1-MrueOcBtZzONyTeMDW1gdFZq0TE= + dependencies: + value-or-function "^3.0.0" + resolve-pathname@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd" @@ -14137,7 +14755,7 @@ resolve@1.15.0: dependencies: path-parse "^1.0.6" -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.15.1, resolve@^1.3.2, resolve@^1.8.1: +resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.15.1, resolve@^1.3.2, resolve@^1.4.0, resolve@^1.8.1: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== @@ -14512,6 +15130,13 @@ semver-diff@^2.0.0: dependencies: semver "^5.0.3" +semver-greatest-satisfied-range@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz#13e8c2658ab9691cb0cd71093240280d36f77a5b" + integrity sha1-E+jCZYq5aRywzXEJMkAoDTb3els= + dependencies: + sver-compat "^1.5.0" + semver-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" @@ -14951,6 +15576,11 @@ source-map@^0.7.3: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== +sparkles@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.1.tgz#008db65edce6c50eec0c5e228e1945061dd0437c" + integrity sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw== + spdx-correct@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" @@ -15093,6 +15723,11 @@ stable@^0.1.8: resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== +stack-trace@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= + stack-utils@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" @@ -15154,6 +15789,11 @@ stream-each@^1.1.0: end-of-stream "^1.1.0" stream-shift "^1.0.0" +stream-exhaust@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/stream-exhaust/-/stream-exhaust-1.0.2.tgz#acdac8da59ef2bc1e17a2c0ccf6c320d120e555d" + integrity sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw== + stream-http@^2.7.2: version "2.8.3" resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" @@ -15201,7 +15841,7 @@ string-length@^3.1.0: astral-regex "^1.0.0" strip-ansi "^5.2.0" -string-width@^1.0.1: +string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= @@ -15500,6 +16140,14 @@ supports-color@^7.0.0, supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +sver-compat@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/sver-compat/-/sver-compat-1.5.0.tgz#3cf87dfeb4d07b4a3f14827bc186b3fd0c645cd8" + integrity sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg= + dependencies: + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" + svg-parser@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/svg-parser/-/svg-parser-2.0.4.tgz#fdc2e29e13951736140b76cb122c8ee6630eb6b5" @@ -15726,7 +16374,15 @@ throat@^4.0.0: resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo= -through2@^2.0.0, through2@^2.0.3: +through2-filter@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-3.0.0.tgz#700e786df2367c2c88cd8aa5be4cf9c1e7831254" + integrity sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA== + dependencies: + through2 "~2.0.0" + xtend "~4.0.0" + +through2@^2.0.0, through2@^2.0.3, through2@~2.0.0: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== @@ -15744,6 +16400,11 @@ thunky@^1.0.2: resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== +time-stamp@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" + integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= + timed-out@^4.0.0, timed-out@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" @@ -15783,6 +16444,14 @@ tmpl@1.0.x: resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= +to-absolute-glob@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1865f43d9e74b0822db9f145b78cff7d0f7c849b" + integrity sha1-GGX0PZ50sIItufFFt4z/fQ98hJs= + dependencies: + is-absolute "^1.0.0" + is-negated-glob "^1.0.0" + to-arraybuffer@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" @@ -15866,6 +16535,13 @@ to-space-case@^1.0.0: dependencies: to-no-case "^1.0.0" +to-through@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-through/-/to-through-2.0.0.tgz#fc92adaba072647bc0b67d6b03664aa195093af6" + integrity sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY= + dependencies: + through2 "^2.0.3" + toidentifier@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" @@ -16107,11 +16783,36 @@ unbzip2-stream@^1.0.9: buffer "^5.2.1" through "^2.3.8" +unc-path-regex@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" + integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo= + underscore@1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== +undertaker-registry@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/undertaker-registry/-/undertaker-registry-1.0.1.tgz#5e4bda308e4a8a2ae584f9b9a4359a499825cc50" + integrity sha1-XkvaMI5KiirlhPm5pDWaSZglzFA= + +undertaker@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/undertaker/-/undertaker-1.2.1.tgz#701662ff8ce358715324dfd492a4f036055dfe4b" + integrity sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA== + dependencies: + arr-flatten "^1.0.1" + arr-map "^2.0.0" + bach "^1.0.0" + collection-map "^1.0.0" + es6-weak-map "^2.0.1" + last-run "^1.1.0" + object.defaults "^1.0.0" + object.reduce "^1.0.0" + undertaker-registry "^1.0.0" + unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" @@ -16169,6 +16870,14 @@ unique-slug@^2.0.0: dependencies: imurmurhash "^0.1.4" +unique-stream@^2.0.2: + version "2.3.1" + resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.3.1.tgz#c65d110e9a4adf9a6c5948b28053d9a8d04cbeac" + integrity sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A== + dependencies: + json-stable-stringify-without-jsonify "^1.0.1" + through2-filter "^3.0.0" + unique-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" @@ -16415,6 +17124,13 @@ v8-compile-cache@^2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== +v8flags@^3.0.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.1.3.tgz#fc9dc23521ca20c5433f81cc4eb9b3033bb105d8" + integrity sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w== + dependencies: + homedir-polyfill "^1.0.1" + validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -16428,6 +17144,11 @@ value-equal@^1.0.1: resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-1.0.1.tgz#1e0b794c734c5c0cade179c437d356d931a34d6c" integrity sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw== +value-or-function@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813" + integrity sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM= + varint@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.0.tgz#d826b89f7490732fabc0c0ed693ed475dcb29ebf" @@ -16452,6 +17173,54 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +vinyl-fs@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-3.0.3.tgz#c85849405f67428feabbbd5c5dbdd64f47d31bc7" + integrity sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng== + dependencies: + fs-mkdirp-stream "^1.0.0" + glob-stream "^6.1.0" + graceful-fs "^4.0.0" + is-valid-glob "^1.0.0" + lazystream "^1.0.0" + lead "^1.0.0" + object.assign "^4.0.4" + pumpify "^1.3.5" + readable-stream "^2.3.3" + remove-bom-buffer "^3.0.0" + remove-bom-stream "^1.2.0" + resolve-options "^1.1.0" + through2 "^2.0.0" + to-through "^2.0.0" + value-or-function "^3.0.0" + vinyl "^2.0.0" + vinyl-sourcemap "^1.1.0" + +vinyl-sourcemap@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz#92a800593a38703a8cdb11d8b300ad4be63b3e16" + integrity sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY= + dependencies: + append-buffer "^1.0.2" + convert-source-map "^1.5.0" + graceful-fs "^4.1.6" + normalize-path "^2.1.1" + now-and-later "^2.0.0" + remove-bom-buffer "^3.0.0" + vinyl "^2.0.0" + +vinyl@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.0.tgz#d85b07da96e458d25b2ffe19fece9f2caa13ed86" + integrity sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg== + dependencies: + clone "^2.1.1" + clone-buffer "^1.0.0" + clone-stats "^1.0.0" + cloneable-readable "^1.0.0" + remove-trailing-separator "^1.0.1" + replace-ext "^1.0.0" + vm-browserify@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" @@ -17247,7 +18016,6 @@ websocket-extensions@>=0.1.1: dependencies: debug "^2.2.0" es5-ext "^0.10.50" - gulp "^4.0.2" nan "^2.14.0" typedarray-to-buffer "^3.1.5" yaeti "^0.0.6" @@ -17292,6 +18060,11 @@ whatwg-url@^7.0.0: tr46 "^1.0.1" webidl-conversions "^4.0.2" +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + integrity sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= + which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" @@ -17302,7 +18075,7 @@ which-pm-runs@^1.0.0: resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= -which@^1.2.9, which@^1.3.0, which@^1.3.1: +which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== @@ -17639,6 +18412,11 @@ xtend@~2.1.1: dependencies: object-keys "~0.4.0" +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= + "y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" @@ -17669,6 +18447,14 @@ yaml@^1.7.2: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== +yargs-parser@5.0.0-security.0: + version "5.0.0-security.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0-security.0.tgz#4ff7271d25f90ac15643b86076a2ab499ec9ee24" + integrity sha512-T69y4Ps64LNesYxeYGYPvfoMTt/7y1XtfpIslUeK4um+9Hu7hlGoRtaDLvdXb7+/tfq4opVa2HRY5xGip022rQ== + dependencies: + camelcase "^3.0.0" + object.assign "^4.1.0" + yargs-parser@^10.0.0: version "10.1.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" @@ -17751,6 +18537,25 @@ yargs@^15.0.2: y18n "^4.0.0" yargs-parser "^18.1.1" +yargs@^7.1.0: + version "7.1.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.1.tgz#67f0ef52e228d4ee0d6311acede8850f53464df6" + integrity sha512-huO4Fr1f9PmiJJdll5kwoS2e4GqzGSsMT3PPMpOwoVkOK8ckqAewMTZyA6LXVQWflleb/Z8oPBEvNsMft0XE+g== + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "5.0.0-security.0" + yauzl@^2.10.0, yauzl@^2.4.2: version "2.10.0" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" From 8e75e999ef6b0a45872e8a9f80a491edb630bd36 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Fri, 29 May 2020 14:25:24 -0300 Subject: [PATCH 63/65] fix: transaction details --- .../TxsTable/ExpandedTx/CreationTx/index.tsx | 13 +++-- .../TxsTable/ExpandedTx/IncomingTx/index.tsx | 23 ++++----- .../TxsTable/ExpandedTx/OutgoingTx/index.tsx | 22 +++++++-- .../ExpandedTx/TxDescription/utils.ts | 47 ++++++++++--------- 4 files changed, 62 insertions(+), 43 deletions(-) diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/CreationTx/index.tsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/CreationTx/index.tsx index 39181635..8d899ace 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/CreationTx/index.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/CreationTx/index.tsx @@ -22,13 +22,16 @@ const useStyles = makeStyles({ }, }) -export const CreationTx = (props) => { - const { tx } = props +export const CreationTx = ({ tx }) => { const classes = useStyles() - if (!tx) return null + + if (!tx) { + return null + } + const isCreationTx = tx.type === TransactionTypes.CREATION - return !isCreationTx ? null : ( + return isCreationTx ? ( <> Created: @@ -47,5 +50,5 @@ export const CreationTx = (props) => { {tx.masterCopy ? : 'n/a'} - ) + ) : null } diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/IncomingTx/index.tsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/IncomingTx/index.tsx index 86ad85d9..33aeca5c 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/IncomingTx/index.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/IncomingTx/index.tsx @@ -4,16 +4,17 @@ import { formatDate } from 'src/routes/safe/components/Transactions/TxsTable/col import Bold from 'src/components/layout/Bold' import Paragraph from 'src/components/layout/Paragraph' -export const IncomingTx = (props) => { - const { tx } = props - if (!tx) return null +export const IncomingTx = ({ tx }) => { + if (!tx) { + return null + } + const isIncomingTx = !!INCOMING_TX_TYPES[tx.type] - return !isIncomingTx ? null : ( - <> - - Created: - {formatDate(tx.executionDate)} - - - ) + + return isIncomingTx ? ( + + Created: + {formatDate(tx.executionDate)} + + ) : null } diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OutgoingTx/index.tsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OutgoingTx/index.tsx index 02c853ba..a1e3a60f 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OutgoingTx/index.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/OutgoingTx/index.tsx @@ -3,11 +3,23 @@ import React from 'react' import { formatDate } from 'src/routes/safe/components/Transactions/TxsTable/columns' import Bold from 'src/components/layout/Bold' import Paragraph from 'src/components/layout/Paragraph' +import { TransactionTypes } from 'src/routes/safe/store/models/types/transaction' -export const OutgoingTx = (props) => { - const { tx } = props - if (!tx || !(tx.type === 'outgoing')) return null - return ( +export const OutgoingTx = ({ tx }) => { + if (!tx) { + return null + } + + const isOutgoingTx = [ + TransactionTypes.OUTGOING, + TransactionTypes.UPGRADE, + TransactionTypes.CUSTOM, + TransactionTypes.SETTINGS, + TransactionTypes.COLLECTIBLE, + TransactionTypes.TOKEN, + ].includes(tx.type) + + return isOutgoingTx ? ( <> Created: @@ -36,5 +48,5 @@ export const OutgoingTx = (props) => { )} - ) + ) : null } diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/utils.ts b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/utils.ts index bcf7a81c..01159987 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/utils.ts +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/utils.ts @@ -26,34 +26,37 @@ export const getTxData = (tx) => { txData.tokenId = value txData.isCollectibleTransfer = true } + if (tx.modifySettingsTx) { + txData.recipient = tx.recipient + txData.modifySettingsTx = true + + if (tx.decodedParams[SAFE_METHODS_NAMES.REMOVE_OWNER]) { + const { _threshold, owner } = tx.decodedParams[SAFE_METHODS_NAMES.REMOVE_OWNER] + txData.action = SAFE_METHODS_NAMES.REMOVE_OWNER + txData.removedOwner = owner + txData.newThreshold = _threshold + } else if (tx.decodedParams[SAFE_METHODS_NAMES.CHANGE_THRESHOLD]) { + const { _threshold } = tx.decodedParams[SAFE_METHODS_NAMES.CHANGE_THRESHOLD] + txData.action = SAFE_METHODS_NAMES.CHANGE_THRESHOLD + txData.newThreshold = _threshold + } else if (tx.decodedParams[SAFE_METHODS_NAMES.ADD_OWNER_WITH_THRESHOLD]) { + const { _threshold, owner } = tx.decodedParams[SAFE_METHODS_NAMES.ADD_OWNER_WITH_THRESHOLD] + txData.action = SAFE_METHODS_NAMES.ADD_OWNER_WITH_THRESHOLD + txData.addedOwner = owner + txData.newThreshold = _threshold + } else if (tx.decodedParams[SAFE_METHODS_NAMES.SWAP_OWNER]) { + const { newOwner, oldOwner } = tx.decodedParams[SAFE_METHODS_NAMES.SWAP_OWNER] + txData.action = SAFE_METHODS_NAMES.SWAP_OWNER + txData.removedOwner = oldOwner + txData.addedOwner = newOwner + } + } } else if (tx.customTx) { txData.recipient = tx.recipient txData.data = tx.data txData.customTx = true } else if (Number(tx.value) > 0) { txData.recipient = tx.recipient - } else if (tx.modifySettingsTx) { - txData.recipient = tx.recipient - txData.modifySettingsTx = true - - if (tx.decodedParams) { - if (tx.decodedParams[SAFE_METHODS_NAMES.REMOVE_OWNER]) { - const { _threshold, owner } = tx.decodedParams[SAFE_METHODS_NAMES.REMOVE_OWNER] - txData.removedOwner = owner - txData.newThreshold = _threshold - } else if (tx.decodedParams[SAFE_METHODS_NAMES.CHANGE_THRESHOLD]) { - const { _threshold } = tx.decodedParams[SAFE_METHODS_NAMES.CHANGE_THRESHOLD] - txData.newThreshold = _threshold - } else if (tx.decodedParams[SAFE_METHODS_NAMES.ADD_OWNER_WITH_THRESHOLD]) { - const { _threshold, owner } = tx.decodedParams[SAFE_METHODS_NAMES.ADD_OWNER_WITH_THRESHOLD] - txData.addedOwner = owner - txData.newThreshold = _threshold - } else if (tx.decodedParams[SAFE_METHODS_NAMES.SWAP_OWNER]) { - const { newOwner, oldOwner } = tx.decodedParams[SAFE_METHODS_NAMES.SWAP_OWNER] - txData.removedOwner = oldOwner - txData.addedOwner = newOwner - } - } } else if (tx.isCancellationTx) { txData.cancellationTx = true } else if (tx.creationTx) { From 02bb5211a7d30bc69dbebc058474f91c3f3804a6 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Wed, 3 Jun 2020 10:34:31 -0300 Subject: [PATCH 64/65] fix errors when creating tx in safe v1.0.0 - Code was expecting `ExecutionSuccess` event. That's not part of v1.0.0 - `transactionHash` is part of the tx receipt, so no need to extract it from the event - `safeTxHash` is calculated client-side, so no longer needed to get it from tx receipt --- src/routes/safe/store/actions/createTransaction.ts | 3 +-- src/routes/safe/store/actions/processTransaction.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/routes/safe/store/actions/createTransaction.ts b/src/routes/safe/store/actions/createTransaction.ts index 0c9e45db..be558b0e 100644 --- a/src/routes/safe/store/actions/createTransaction.ts +++ b/src/routes/safe/store/actions/createTransaction.ts @@ -219,8 +219,7 @@ const createTransaction = ({ const toStoreTx = isExecution ? mockedTx.withMutations((record) => { record - .set('executionTxHash', receipt.events.ExecutionSuccess.transactionHash) - .set('safeTxHash', receipt.events.ExecutionSuccess.returnValues.txHash) + .set('executionTxHash', receipt.transactionHash) .set('executor', from) .set('isExecuted', true) .set('isSuccessful', receipt.status) diff --git a/src/routes/safe/store/actions/processTransaction.ts b/src/routes/safe/store/actions/processTransaction.ts index 2a02aa86..1d9556db 100644 --- a/src/routes/safe/store/actions/processTransaction.ts +++ b/src/routes/safe/store/actions/processTransaction.ts @@ -157,8 +157,7 @@ const processTransaction = ({ const toStoreTx = isExecution ? mockedTx.withMutations((record) => { record - .set('executionTxHash', receipt.events.ExecutionSuccess.transactionHash) - .set('safeTxHash', receipt.events.ExecutionSuccess.returnValues.txHash) + .set('executionTxHash', receipt.transactionHash) .set('blockNumber', receipt.blockNumber) .set('executionDate', record.submissionDate) .set('executor', from) From e6ea715aca3ba538e492de175785a60d9a266426 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Wed, 3 Jun 2020 10:38:38 -0300 Subject: [PATCH 65/65] update `yarn.lock` --- yarn.lock | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8991db61..b4af698f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4014,7 +4014,7 @@ bn.js@4.11.8: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.4.0, bn.js@^4.8.0: +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.10.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.4.0, bn.js@^4.8.0: version "4.11.9" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== @@ -6962,6 +6962,18 @@ eth-sig-util@^1.4.2: ethereumjs-abi "git+https://github.com/ethereumjs/ethereumjs-abi.git" ethereumjs-util "^5.1.1" +eth-sig-util@^2.5.3: + version "2.5.3" + resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-2.5.3.tgz#6938308b38226e0b3085435474900b03036abcbe" + integrity sha512-KpXbCKmmBUNUTGh9MRKmNkIPietfhzBqqYqysDavLseIiMUGl95k6UcPEkALAZlj41e9E6yioYXc1PC333RKqw== + dependencies: + buffer "^5.2.1" + elliptic "^6.4.0" + ethereumjs-abi "0.6.5" + ethereumjs-util "^5.1.1" + tweetnacl "^1.0.0" + tweetnacl-util "^0.15.0" + eth-tx-summary@^3.1.2: version "3.2.4" resolved "https://registry.yarnpkg.com/eth-tx-summary/-/eth-tx-summary-3.2.4.tgz#e10eb95eb57cdfe549bf29f97f1e4f1db679035c" @@ -7040,6 +7052,14 @@ ethereum-public-key-to-address@0.0.1: meow "^5.0.0" secp256k1 "^3.7.1" +ethereumjs-abi@0.6.5: + version "0.6.5" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz#5a637ef16ab43473fa72a29ad90871405b3f5241" + integrity sha1-WmN+8Wq0NHP6cqKa2QhxQFs/UkE= + dependencies: + bn.js "^4.10.0" + ethereumjs-util "^4.3.0" + ethereumjs-abi@0.6.8, "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": version "0.6.8" resolved "git+https://github.com/ethereumjs/ethereumjs-abi.git#1cfbb13862f90f0b391d8a699544d5fe4dfb8c7b" @@ -7110,7 +7130,7 @@ ethereumjs-tx@^2.1.1, ethereumjs-tx@^2.1.2: ethereumjs-common "^1.5.0" ethereumjs-util "^6.0.0" -ethereumjs-util@4.5.0: +ethereumjs-util@4.5.0, ethereumjs-util@^4.3.0: version "4.5.0" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz#3e9428b317eebda3d7260d854fddda954b1f1bc6" integrity sha1-PpQosxfuvaPXJg2FT93alUsfG8Y= @@ -16106,11 +16126,21 @@ tunnel@^0.0.6: resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== +tweetnacl-util@^0.15.0: + version "0.15.1" + resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" + integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== + tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= +tweetnacl@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" @@ -17021,9 +17051,9 @@ web3-provider-engine@^15.0.4: xhr "^2.2.0" xtend "^4.0.1" -"web3-provider-engine@git+https://github.com/trufflesuite/provider-engine.git#web3-one": +"web3-provider-engine@https://github.com/trufflesuite/provider-engine#web3-one": version "14.0.6" - resolved "git+https://github.com/trufflesuite/provider-engine.git#3538c60bc4836b73ccae1ac3f64c8fed8ef19c1a" + resolved "https://github.com/trufflesuite/provider-engine#3538c60bc4836b73ccae1ac3f64c8fed8ef19c1a" dependencies: async "^2.5.0" backoff "^2.5.0"