From 0c0d2fc00db8c77301d3bfdd1465f65d9f244d00 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 19 Nov 2019 13:33:37 +0400 Subject: [PATCH 1/2] wip --- src/logic/notifications/notificationBuilder.js | 4 ++-- src/logic/notifications/notificationTypes.js | 2 +- src/routes/safe/store/actions/createTransaction.js | 3 ++- src/routes/safe/store/actions/processTransaction.js | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/logic/notifications/notificationBuilder.js b/src/logic/notifications/notificationBuilder.js index c2c0a9cb..006df334 100644 --- a/src/logic/notifications/notificationBuilder.js +++ b/src/logic/notifications/notificationBuilder.js @@ -34,8 +34,8 @@ const confirmationTxNotificationsQueue: NotificationsQueue = { pendingExecution: NOTIFICATIONS.TX_CONFIRMATION_PENDING_MSG, afterRejection: NOTIFICATIONS.TX_REJECTED_MSG, afterExecution: { - noMoreConfirmationsNeeded: NOTIFICATIONS.TX_CONFIRMATION_EXECUTED_MSG, - moreConfirmationsNeeded: null, + noMoreConfirmationsNeeded: NOTIFICATIONS.TX_EXECUTED_MSG, + moreConfirmationsNeeded: NOTIFICATIONS.TX_CONFIRMATION_EXECUTED_MSG, }, afterExecutionError: NOTIFICATIONS.TX_CONFIRMATION_FAILED_MSG, } diff --git a/src/logic/notifications/notificationTypes.js b/src/logic/notifications/notificationTypes.js index 14d18439..34b12c33 100644 --- a/src/logic/notifications/notificationTypes.js +++ b/src/logic/notifications/notificationTypes.js @@ -129,7 +129,7 @@ export const NOTIFICATIONS: Notifications = { options: { variant: INFO, persist: true }, }, TX_CONFIRMATION_EXECUTED_MSG: { - message: 'Confirmation transaction succesful', + message: 'Confirmation transaction was successful', options: { variant: SUCCESS, persist: false, autoHideDuration: longDuration }, }, TX_CONFIRMATION_FAILED_MSG: { diff --git a/src/routes/safe/store/actions/createTransaction.js b/src/routes/safe/store/actions/createTransaction.js index 2b85ee40..04ff30d1 100644 --- a/src/routes/safe/store/actions/createTransaction.js +++ b/src/routes/safe/store/actions/createTransaction.js @@ -108,6 +108,7 @@ const createTransaction = ( return receipt.transactionHash }) } catch (err) { + console.error(err) closeSnackbar(beforeExecutionKey) closeSnackbar(pendingExecutionKey) showSnackbar(notificationsQueue.afterExecutionError, enqueueSnackbar, closeSnackbar) @@ -116,7 +117,7 @@ const createTransaction = ( .execTransaction(to, valueInWei, txData, CALL, 0, 0, 0, ZERO_ADDRESS, ZERO_ADDRESS, sigs) .encodeABI() const errMsg = await getErrorMessage(safeInstance.address, 0, executeDataUsedSignatures, from) - console.error(`Error executing the TX: ${errMsg}`) + console.error(`Error creating the TX: ${errMsg}`) } return txHash diff --git a/src/routes/safe/store/actions/processTransaction.js b/src/routes/safe/store/actions/processTransaction.js index 1df89980..e3425387 100644 --- a/src/routes/safe/store/actions/processTransaction.js +++ b/src/routes/safe/store/actions/processTransaction.js @@ -143,6 +143,7 @@ const processTransaction = ( return receipt.transactionHash }) } catch (err) { + console.error(err) closeSnackbar(beforeExecutionKey) closeSnackbar(pendingExecutionKey) showSnackbar(notificationsQueue.afterExecutionError, enqueueSnackbar, closeSnackbar) From 9282fc053ae071efa358fe8c0f461dadd3b4630a Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 19 Nov 2019 13:40:17 +0400 Subject: [PATCH 2/2] update react-final-form because of bugfix in version 6.3.2 --- package.json | 6 ++--- yarn.lock | 65 ++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 51 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 2024f02d..ea52704d 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "axios": "0.19.0", "bignumber.js": "9.0.0", "connected-react-router": "6.6.0", - "date-fns": "2.7.0", + "date-fns": "2.8.0", "ethereum-ens": "0.7.8", "final-form": "4.18.6", "history": "4.10.1", @@ -55,7 +55,7 @@ "qrcode.react": "1.0.0", "react": "16.12.0", "react-dom": "16.12.0", - "react-final-form": "6.3.0", + "react-final-form": "6.3.2", "react-final-form-listeners": "^1.0.2", "react-hot-loader": "4.12.18", "react-qr-reader": "^2.2.1", @@ -102,7 +102,7 @@ "@storybook/addon-links": "5.2.6", "@storybook/react": "5.2.6", "@testing-library/react": "9.3.2", - "autoprefixer": "9.7.1", + "autoprefixer": "9.7.2", "babel-core": "^7.0.0-bridge.0", "babel-eslint": "10.0.3", "babel-jest": "24.9.0", diff --git a/yarn.lock b/yarn.lock index e00ea78e..585cfcdd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3633,7 +3633,20 @@ atob@^2.1.1: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autoprefixer@9.7.1, autoprefixer@^9.4.9: +autoprefixer@9.7.2: + version "9.7.2" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.2.tgz#26cf729fbb709323b40171a874304884dcceffed" + integrity sha512-LCAfcdej1182uVvPOZnytbq61AhnOZ/4JelDaJGDeNwewyU1AMaNthcHsyz1NRjTmd2FkurMckLWfkHg3Z//KA== + dependencies: + browserslist "^4.7.3" + caniuse-lite "^1.0.30001010" + chalk "^2.4.2" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^7.0.23" + postcss-value-parser "^4.0.2" + +autoprefixer@^9.4.9: version "9.7.1" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.1.tgz#9ffc44c55f5ca89253d9bb7186cefb01ef57747f" integrity sha512-w3b5y1PXWlhYulevrTJ0lizkQ5CyqfeU6BIRDbuhsMupstHQOeb1Ur80tcB1zxSu7AwyY/qCQ7Vvqklh31ZBFw== @@ -4974,6 +4987,15 @@ browserslist@^4.0.0, browserslist@^4.6.0, browserslist@^4.7.2: electron-to-chromium "^1.3.295" node-releases "^1.1.38" +browserslist@^4.7.3: + version "4.7.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.3.tgz#02341f162b6bcc1e1028e30624815d4924442dc3" + integrity sha512-jWvmhqYpx+9EZm/FxcZSbUZyDEvDTLDi3nSAKbzEkyWvtI0mNSmUosey+5awDW1RUlrgXbQb5A6qY1xQH9U6MQ== + dependencies: + caniuse-lite "^1.0.30001010" + electron-to-chromium "^1.3.306" + node-releases "^1.1.40" + bs58@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-2.0.1.tgz#55908d58f1982aba2008fa1bed8f91998a29bf8d" @@ -5265,7 +5287,7 @@ 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.30000989, caniuse-lite@^1.0.30001004, caniuse-lite@^1.0.30001006: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001004, caniuse-lite@^1.0.30001006, caniuse-lite@^1.0.30001010: version "1.0.30001010" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001010.tgz#397a14034d384260453cc81994f494626d34b938" integrity sha512-RA5GH9YjFNea4ZQszdWgh2SC+dpLiRAg4VDQS2b5JRI45OxmbGrYocYHTa9x0bKMQUE7uvHkNPNffUr+pCxSGw== @@ -6373,10 +6395,10 @@ data-urls@^1.0.0: whatwg-mimetype "^2.2.0" whatwg-url "^7.0.0" -date-fns@2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.7.0.tgz#8271d943cc4636a1f27698f1b8d6a9f1ceb74026" - integrity sha512-wxYp2PGoUDN5ZEACc61aOtYFvSsJUylIvCjpjDOqM1UDaKIIuMJ9fAnMYFHV3TQaDpfTVxhwNK/GiCaHKuemTA== +date-fns@2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.8.0.tgz#628d865367e30e45747ed1e8b0c1572090b04f55" + integrity sha512-nbZMIMsoD7QiIKipZ5+XRTCtHZad1ch8OEkLaJxjGL6ThAK2IWAdjmAUAS7Fdz5fCaVWtqc+c8pAsN/MX8eaew== debug-fabulous@0.0.X: version "0.0.4" @@ -6979,7 +7001,7 @@ ejs@^2.6.1: resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.2.tgz#749037c4c09bd57626a6140afbe6b7e650661614" integrity sha512-rHGwtpl67oih3xAHbZlpw5rQAt+YV1mSCu2fUZ9XNrfaGEhom7E+AUiMci+ByP4aSfuAWx7hE0BPuJLMrpXwOw== -electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.295, electron-to-chromium@^1.3.47: +electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.295, electron-to-chromium@^1.3.306, electron-to-chromium@^1.3.47: version "1.3.306" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.306.tgz#e8265301d053d5f74e36cb876486830261fbe946" integrity sha512-frDqXvrIROoYvikSKTIKbHbzO6M3/qC6kCIt/1FOa9kALe++c4VAJnwjSFvf1tYLEUsP2n9XZ4XSCyqc3l7A/A== @@ -12903,7 +12925,7 @@ node-pre-gyp@^0.12.0: semver "^5.3.0" tar "^4" -node-releases@^1.1.29, node-releases@^1.1.38: +node-releases@^1.1.29, node-releases@^1.1.38, node-releases@^1.1.40: version "1.1.40" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.40.tgz#a94facfa8e2d612302601ca1361741d529c4515a" integrity sha512-r4LPcC5b/bS8BdtWH1fbeK88ib/wg9aqmg6/s3ngNLn2Ewkn/8J6Iw3P9RTlfIAdSdvYvQl2thCY5Y+qTAQ2iQ== @@ -14270,6 +14292,15 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.1 source-map "^0.6.1" supports-color "^6.1.0" +postcss@^7.0.23: + version "7.0.23" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.23.tgz#9f9759fad661b15964f3cfc3140f66f1e05eadc1" + integrity sha512-hOlMf3ouRIFXD+j2VJecwssTwbvsPGJVMzupptg+85WA+i7MwyrydmQAgY3R+m0Bc0exunhbJmijy8u8+vufuQ== + dependencies: + chalk "^2.4.2" + source-map "^0.6.1" + supports-color "^6.1.0" + pre-commit@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/pre-commit/-/pre-commit-1.2.2.tgz#dbcee0ee9de7235e57f79c56d7ce94641a69eec6" @@ -14870,13 +14901,13 @@ react-final-form-listeners@^1.0.2: dependencies: "@babel/runtime" "^7.1.5" -react-final-form@6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/react-final-form/-/react-final-form-6.3.0.tgz#b85ae123a3796b3e0c8f56033c8a5037f4497e76" - integrity sha512-jijhXR1fFGUBQwNOSqF4MK8XJO7Ynl1p8vcFsnQS0INSkGI52+4IagjUgtHj3w8EviIHPFK/Eflji6FELUl07w== +react-final-form@6.3.2: + version "6.3.2" + resolved "https://registry.yarnpkg.com/react-final-form/-/react-final-form-6.3.2.tgz#2c331540c8f5cbf6fbe75ecd98849a03b34dba6e" + integrity sha512-3eXCd9ScouKbf7GJubhUP0s8+aYCsltjjWZtvOKV+E0AeRjXmzQZfUAsKM+395+v1dLIyenB3x22ZQms2tWFRQ== dependencies: "@babel/runtime" "^7.4.5" - ts-essentials "^2.0.8" + ts-essentials "^3.0.2" react-focus-lock@^1.18.3: version "1.19.1" @@ -17936,10 +17967,10 @@ tryer@^1.0.1: resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8" integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA== -ts-essentials@^2.0.8: - version "2.0.12" - resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-2.0.12.tgz#c9303f3d74f75fa7528c3d49b80e089ab09d8745" - integrity sha512-3IVX4nI6B5cc31/GFFE+i8ey/N2eA0CZDbo6n0yrz0zDX8ZJ8djmU1p+XRz7G3is0F3bB3pu2pAroFdAWQKU3w== +ts-essentials@^3.0.2: + version "3.0.4" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-3.0.4.tgz#e783fc31ddce38e19429d2e7171d1c42654f3715" + integrity sha512-lVxvv4CzJURUagjsE3D2PwMK3yVZw0eGXWSlvXVI/cY5vICt5yQ/Cx9Row5fKRcy/rXXz1wzmmVHQtjJoL+lvg== ts-pnp@^1.1.2: version "1.1.5"