Merge pull request #7474 from MetaMask/Version-v7.6.1

Version v7.6.1 RC
feature/default_network_editable
Thomas Huang 5 years ago committed by GitHub
commit 72eb233ee9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .eslintrc
  2. 8
      CHANGELOG.md
  3. 2
      app/_locales/am/messages.json
  4. 2
      app/_locales/ar/messages.json
  5. 2
      app/_locales/bg/messages.json
  6. 2
      app/_locales/bn/messages.json
  7. 2
      app/_locales/ca/messages.json
  8. 2
      app/_locales/cs/messages.json
  9. 2
      app/_locales/da/messages.json
  10. 2
      app/_locales/de/messages.json
  11. 2
      app/_locales/el/messages.json
  12. 10
      app/_locales/en/messages.json
  13. 2
      app/_locales/es/messages.json
  14. 2
      app/_locales/es_419/messages.json
  15. 2
      app/_locales/et/messages.json
  16. 2
      app/_locales/fa/messages.json
  17. 2
      app/_locales/fi/messages.json
  18. 2
      app/_locales/fil/messages.json
  19. 2
      app/_locales/fr/messages.json
  20. 2
      app/_locales/he/messages.json
  21. 2
      app/_locales/hi/messages.json
  22. 2
      app/_locales/hn/messages.json
  23. 2
      app/_locales/hr/messages.json
  24. 2
      app/_locales/ht/messages.json
  25. 2
      app/_locales/hu/messages.json
  26. 2
      app/_locales/id/messages.json
  27. 2
      app/_locales/it/messages.json
  28. 2
      app/_locales/kn/messages.json
  29. 2
      app/_locales/ko/messages.json
  30. 2
      app/_locales/lt/messages.json
  31. 2
      app/_locales/lv/messages.json
  32. 2
      app/_locales/ms/messages.json
  33. 2
      app/_locales/nl/messages.json
  34. 2
      app/_locales/no/messages.json
  35. 2
      app/_locales/pl/messages.json
  36. 2
      app/_locales/pt/messages.json
  37. 2
      app/_locales/pt_BR/messages.json
  38. 2
      app/_locales/ro/messages.json
  39. 2
      app/_locales/ru/messages.json
  40. 2
      app/_locales/sk/messages.json
  41. 2
      app/_locales/sl/messages.json
  42. 2
      app/_locales/sr/messages.json
  43. 2
      app/_locales/sv/messages.json
  44. 2
      app/_locales/sw/messages.json
  45. 2
      app/_locales/ta/messages.json
  46. 2
      app/_locales/th/messages.json
  47. 2
      app/_locales/tr/messages.json
  48. 2
      app/_locales/uk/messages.json
  49. 2
      app/_locales/zh_TW/messages.json
  50. 2
      app/manifest.json
  51. 7
      app/scripts/controllers/app-state.js
  52. 1
      app/scripts/metamask-controller.js
  53. 2
      test/e2e/metamask-ui.spec.js
  54. 4
      ui/app/components/app/app-header/app-header.component.js
  55. 44
      ui/app/components/app/dai-migration-component/dai-migration-notification.component.js
  56. 16
      ui/app/components/app/dai-migration-component/dai-migration-notification.container.js
  57. 2
      ui/app/components/app/dropdowns/tests/menu.test.js
  58. 4
      ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js
  59. 2
      ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content.component.js
  60. 2
      ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js
  61. 2
      ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-component.test.js
  62. 8
      ui/app/components/app/home-notification/home-notification.component.js
  63. 2
      ui/app/components/app/modal/tests/modal.component.test.js
  64. 2
      ui/app/components/app/transaction-activity-log/tests/transaction-activity-log.component.test.js
  65. 2
      ui/app/components/app/transaction-list-item-details/tests/transaction-list-item-details.component.test.js
  66. 4
      ui/app/components/app/transaction-view-balance/transaction-view-balance.component.js
  67. 2
      ui/app/components/app/user-preferenced-currency-display/tests/user-preferenced-currency-display.component.test.js
  68. 2
      ui/app/components/ui/currency-input/tests/currency-input.component.test.js
  69. 2
      ui/app/components/ui/metafox-logo/tests/metafox-logo.component.test.js
  70. 2
      ui/app/components/ui/page-container/page-container-header/tests/page-container-header.component.test.js
  71. 7
      ui/app/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js
  72. 6
      ui/app/pages/confirm-approve/confirm-approve.component.js
  73. 2
      ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js
  74. 6
      ui/app/pages/create-account/create-account.component.js
  75. 4
      ui/app/pages/create-account/new-account.component.js
  76. 4
      ui/app/pages/send/account-list-item/account-list-item.component.js
  77. 2
      ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js
  78. 2
      ui/app/pages/send/send-content/tests/send-content-component.test.js
  79. 4
      ui/app/pages/send/send-footer/tests/send-footer-component.test.js
  80. 2
      ui/app/pages/send/tests/send-component.test.js
  81. 2
      ui/app/pages/send/to-autocomplete.component.js
  82. 2
      ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js
  83. 31
      ui/app/pages/settings/networks-tab/network-form/network-form.component.js
  84. 4
      ui/app/pages/settings/networks-tab/networks-tab.component.js
  85. 11
      ui/app/store/actions.js

@ -148,6 +148,7 @@
"operator-linebreak": [2, "after", { "overrides": { "?": "ignore", ":": "ignore" } }],
"padded-blocks": "off",
"quotes": [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}],
"react/jsx-boolean-value": 2,
"react/jsx-curly-brace-presence": [2, { "props": "never", "children": "never" }],
"react/jsx-equals-spacing": 2,
"react/no-deprecated": 0,

@ -2,7 +2,15 @@
## Current Develop Branch
## 7.6.1 Tue Nov 19 2019
- [#7475](https://github.com/MetaMask/metamask-extension/pull/7475): Add 'Remind Me Later' to the Maker notification
- [#7436](https://github.com/MetaMask/metamask-extension/pull/7436): Add additional rpcUrl verification
- [#7468](https://github.com/MetaMask/metamask-extension/pull/7468): Show transaction fee units on approve screen
## 7.6.0 Mon Nov 18 2019
- [#7450](https://github.com/MetaMask/metamask-extension/pull/7450): Add migration notification for users with non-zero Sai
- [#7461](https://github.com/MetaMask/metamask-extension/pull/7461): Import styles for showing multiple notifications
- [#7451](https://github.com/MetaMask/metamask-extension/pull/7451): Add button disabled when password is empty
## 7.5.3 Fri Nov 15 2019
- [#7412](https://github.com/MetaMask/metamask-extension/pull/7412): lock eth-contract-metadata (#7412)

@ -1344,7 +1344,7 @@
"updatedWithDate": {
"message": "የዘመነ $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URIs አግባብነት ያለው የ HTTP/HTTPS ቅድመ ቅጥያ ይፈልጋል።"
},
"usedByClients": {

@ -1340,7 +1340,7 @@
"updatedWithDate": {
"message": "تم تحديث $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "تتطلب الروابط بادئة HTTP/HTTPS مناسبة."
},
"usedByClients": {

@ -1343,7 +1343,7 @@
"updatedWithDate": {
"message": "Актуализирано $1 "
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI изискват съответния HTTP / HTTPS префикс."
},
"usedByClients": {

@ -1347,7 +1347,7 @@
"updatedWithDate": {
"message": "আপডট কর $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI গির যথযথ HTTP/HTTPS পির পরয়জন।"
},
"usedByClients": {

@ -1316,7 +1316,7 @@
"updatedWithDate": {
"message": "Actualitzat $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "Els URIs requereixen el prefix HTTP/HTTPS apropiat."
},
"usedByClients": {

@ -529,7 +529,7 @@
"unknownNetwork": {
"message": "Neznámá soukromá síť"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI vyžadují korektní HTTP/HTTPS prefix."
},
"usedByClients": {

@ -1313,7 +1313,7 @@
"updatedWithDate": {
"message": "Opdaterede $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "Links kræver det rette HTTP/HTTPS-præfix."
},
"usedByClients": {

@ -1304,7 +1304,7 @@
"updatedWithDate": {
"message": "$1 aktualisiert"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URIs benötigen die korrekten HTTP/HTTPS Präfixe."
},
"usedByClients": {

@ -1341,7 +1341,7 @@
"updatedWithDate": {
"message": "Ενημερώθηκε το $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "Τα URI απαιτούν το κατάλληλο πρόθεμα HTTP/HTTPS."
},
"usedByClients": {

@ -2,6 +2,9 @@
"migrateSai": {
"message": "A message from Maker: The new Multi-Collateral Dai token has been released. Your old tokens are now called Sai. Please upgrade your Sai tokens to the new Dai."
},
"migrateSaiInfo": {
"message": "To dismiss this notification you can migrate your tokens or hide SAI from the token list."
},
"migrate": {
"message": "Migrate"
},
@ -1474,8 +1477,11 @@
"updatedWithDate": {
"message": "Updated $1"
},
"uriErrorMsg": {
"message": "URIs require the appropriate HTTP/HTTPS prefix."
"urlErrorMsg": {
"message": "URLs require the appropriate HTTP/HTTPS prefix."
},
"urlExistsErrorMsg": {
"message": "URL is already present in existing list of networks"
},
"usedByClients": {
"message": "Used by a variety of different clients"

@ -1091,7 +1091,7 @@
"updatedWithDate": {
"message": "Actualizado $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI necesita el prefijo HTTP/HTTPS apropiado"
},
"usedByClients": {

@ -1326,7 +1326,7 @@
"updatedWithDate": {
"message": "Actualización: $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "Los URI deben tener el prefijo HTTP/HTTPS apropiado."
},
"usedByClients": {

@ -1337,7 +1337,7 @@
"updatedWithDate": {
"message": "Värskendatud $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI-d nõuavad sobivat HTTP/HTTPS-i prefiksit."
},
"usedByClients": {

@ -1347,7 +1347,7 @@
"updatedWithDate": {
"message": "بروزرسانی شد 1$1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URl ها نیازمند پیشوند مناسب HTTP/HTTPS اند."
},
"usedByClients": {

@ -1344,7 +1344,7 @@
"updatedWithDate": {
"message": "$1 päivitetty"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI:t vaativat asianmukaisen HTTP/HTTPS-etuliitteen."
},
"usedByClients": {

@ -1235,7 +1235,7 @@
"updatedWithDate": {
"message": "Na-update ang $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "Kinakailangan ng mga URI ang naaangkop na HTTP/HTTPS prefix."
},
"usedByClients": {

@ -1308,7 +1308,7 @@
"updatedWithDate": {
"message": "Mis à jour $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "Les URLs requièrent un préfixe HTTP/HTTPS approprié."
},
"usedByClients": {

@ -1341,7 +1341,7 @@
"updatedWithDate": {
"message": "עודכן $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "כתובות URI דורשות את קידומת HTTP/HTTPS המתאימה."
},
"usedByClients": {

@ -1341,7 +1341,7 @@
"updatedWithDate": {
"message": "$1 अपडट कि गय"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI क उपयत HTTP/HTTPS पिस क आवशयकत।"
},
"usedByClients": {

@ -491,7 +491,7 @@
"unknownNetwork": {
"message": "अजत निटवरक"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI-यआरआई क उपयत HTTP / HTTPS उपसरग क आवशयकत।"
},
"usedByClients": {

@ -1337,7 +1337,7 @@
"updatedWithDate": {
"message": "Ažurirano $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI-jevima se zahtijeva prikladan prefiks HTTP/HTTPS."
},
"usedByClients": {

@ -851,7 +851,7 @@
"updatedWithDate": {
"message": "Mete ajou $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URIs mande pou apwopriye prefiks HTTP / HTTPS a."
},
"usedByClients": {

@ -1337,7 +1337,7 @@
"updatedWithDate": {
"message": "$1 frissítve"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "Az URI-hez szükség van a megfelelő HTTP/HTTPS előtagra."
},
"usedByClients": {

@ -1316,7 +1316,7 @@
"updatedWithDate": {
"message": "Diperbarui $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI memerlukan awalan HTTP/HTTPS yang sesuai."
},
"usedByClients": {

@ -1307,7 +1307,7 @@
"updatedWithDate": {
"message": "Aggiornata $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "Gli URI richiedono un prefisso HTTP/HTTPS."
},
"usedByClients": {

@ -1347,7 +1347,7 @@
"updatedWithDate": {
"message": "$1 ನವಕರಿಸಲಿ"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI ಗಳಿತವದ HTTP/HTTPS ಪವಪರತಯಯದ ಅಗತಯವಿ."
},
"usedByClients": {

@ -1338,7 +1338,7 @@
"updatedWithDate": {
"message": "$1에 업데이트 됨"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI는 HTTP/HTTPS로 시작해야 합니다."
},
"usedByClients": {

@ -1347,7 +1347,7 @@
"updatedWithDate": {
"message": "Atnaujinta $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI reikia atitinkamo HTTP/HTTPS priešdėlio."
},
"usedByClients": {

@ -1343,7 +1343,7 @@
"updatedWithDate": {
"message": "Atjaunināts $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI jāsākas ar atbilstošo HTTP/HTTPS priedēkli."
},
"usedByClients": {

@ -1315,7 +1315,7 @@
"updatedWithDate": {
"message": "Dikemaskini $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI memerlukan awalan HTTP/HTTPS yang sesuai."
},
"usedByClients": {

@ -478,7 +478,7 @@
"unknownNetwork": {
"message": "Onbekend privénetwerk"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "Voor URI's is het juiste HTTP / HTTPS-voorvoegsel vereist."
},
"usedByClients": {

@ -1319,7 +1319,7 @@
"updatedWithDate": {
"message": "Oppdatert $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI-er krever det aktuelle HTTP/HTTPS-prefikset."
},
"usedByClients": {

@ -1332,7 +1332,7 @@
"updatedWithDate": {
"message": "Zaktualizowano $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI wymaga prawidłowego prefiksu HTTP/HTTPS."
},
"usedByClients": {

@ -488,7 +488,7 @@
"unknownNetwork": {
"message": "Rede Privada Desconhecida"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "Links requerem o prefixo HTTP/HTTPS apropriado."
},
"usedByClients": {

@ -1326,7 +1326,7 @@
"updatedWithDate": {
"message": "$1 atualizado"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URIs exigem o devido prefixo HTTP/HTTPS."
},
"usedByClients": {

@ -1328,7 +1328,7 @@
"updatedWithDate": {
"message": "Actualizat $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URL necesită prefixul potrivit HTTP/HTTPS."
},
"usedByClients": {

@ -542,7 +542,7 @@
"unknownNetwork": {
"message": "Неизвестная частная сеть"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "Для URI требуется соответствующий префикс HTTP/HTTPS."
},
"usedByClients": {

@ -1301,7 +1301,7 @@
"updatedWithDate": {
"message": "Aktualizované $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI vyžadují korektní HTTP/HTTPS prefix."
},
"usedByClients": {

@ -1329,7 +1329,7 @@
"updatedWithDate": {
"message": "Posodobljeno $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI zahtevajo ustrezno HTTP/HTTPS predpono."
},
"usedByClients": {

@ -1332,7 +1332,7 @@
"updatedWithDate": {
"message": "Ažuriran $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI-ovi zahtevaju odgovarajući prefiks HTTP / HTTPS."
},
"usedByClients": {

@ -1322,7 +1322,7 @@
"updatedWithDate": {
"message": "Uppdaterat $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI:er kräver lämpligt HTTP/HTTPS-prefix."
},
"usedByClients": {

@ -1325,7 +1325,7 @@
"updatedWithDate": {
"message": "Imesasishwa $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI huhitaji kiambishi sahihi cha HTTP/HTTPS."
},
"usedByClients": {

@ -554,7 +554,7 @@
"unknownNetwork": {
"message": "அறியபபடத தனி"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI கள சரின HTTP / HTTPS ம."
},
"usedByClients": {

@ -656,7 +656,7 @@
"updatedWithDate": {
"message": "อปเดต $1 แลว"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URI ตองมคำนำหนาเปน HTTP หรอ HTTPS"
},
"usedByClients": {

@ -547,7 +547,7 @@
"unknownNetwork": {
"message": "Bilinmeyen özel ağ"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URIler için HTTP/HTTPS öneki gerekmektedir."
},
"usedByClients": {

@ -1347,7 +1347,7 @@
"updatedWithDate": {
"message": "Оновлено $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URIs вимагають відповідного префікса HTTP/HTTPS."
},
"usedByClients": {

@ -1320,7 +1320,7 @@
"updatedWithDate": {
"message": "更新時間 $1"
},
"uriErrorMsg": {
"urlErrorMsg": {
"message": "URIs 需要加入適當的 HTTP/HTTPS 前綴字"
},
"usedByClients": {

@ -1,7 +1,7 @@
{
"name": "__MSG_appName__",
"short_name": "__MSG_appName__",
"version": "7.6.0",
"version": "7.6.1",
"manifest_version": 2,
"author": "https://metamask.io",
"description": "__MSG_appDescription__",

@ -13,6 +13,7 @@ class AppStateController {
this.onInactiveTimeout = onInactiveTimeout || (() => {})
this.store = new ObservableStore(extend({
timeoutMinutes: 0,
mkrMigrationReminderTimestamp: null,
}, initState))
this.timer = null
@ -23,6 +24,12 @@ class AppStateController {
this._setInactiveTimeout(preferences.autoLogoutTimeLimit)
}
setMkrMigrationReminderTimestamp (timestamp) {
this.store.updateState({
mkrMigrationReminderTimestamp: timestamp,
})
}
/**
* Sets the last active time to the current time
* @return {void}

@ -508,6 +508,7 @@ module.exports = class MetamaskController extends EventEmitter {
// AppStateController
setLastActiveTime: nodeify(this.appStateController.setLastActiveTime, this.appStateController),
setMkrMigrationReminderTimestamp: nodeify(this.appStateController.setMkrMigrationReminderTimestamp, this.appStateController),
// EnsController
tryReverseResolveAddress: nodeify(this.ensController.reverseResolveAddress, this.ensController),

@ -1190,7 +1190,7 @@ describe('MetaMask', function () {
await driver.wait(until.stalenessOf(gasModal))
const gasFeeInEth = await findElement(driver, By.css('.confirm-approve-content__transaction-details-content__secondary-fee'))
assert.equal(await gasFeeInEth.getText(), '0.0006')
assert.equal(await gasFeeInEth.getText(), '0.0006 ETH')
})
it('edits the permission', async () => {

@ -71,7 +71,7 @@ export default class AppHeader extends PureComponent {
<Identicon
address={selectedAddress}
diameter={32}
addBorder={true}
addBorder
/>
</div>
)
@ -92,7 +92,7 @@ export default class AppHeader extends PureComponent {
className={classnames('app-header', { 'app-header--back-drop': isUnlocked })}>
<div className="app-header__contents">
<MetaFoxLogo
unsetIconHeight={true}
unsetIconHeight
onClick={() => history.push(DEFAULT_ROUTE)}
/>
<div className="app-header__account-menu-container">

@ -1,3 +1,4 @@
import { DateTime } from 'luxon'
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import HomeNotification from '../home-notification'
@ -8,18 +9,37 @@ export default class DaiV1MigrationNotification extends PureComponent {
}
static defaultProps = {
mkrMigrationReminderTimestamp: null,
string: '',
symbol: '',
}
static propTypes = {
setMkrMigrationReminderTimestamp: PropTypes.func.isRequired,
mkrMigrationReminderTimestamp: PropTypes.string,
string: PropTypes.string,
symbol: PropTypes.string,
}
remindMeLater = () => {
const nextWeek = DateTime.utc().plus({
days: 7,
})
this.props.setMkrMigrationReminderTimestamp(nextWeek.toString())
}
render () {
const { t } = this.context
const { string: balanceString, symbol } = this.props
const { mkrMigrationReminderTimestamp, string: balanceString, symbol } = this.props
if (mkrMigrationReminderTimestamp) {
const reminderDateTime = DateTime.fromISO(mkrMigrationReminderTimestamp, {
zone: 'UTC',
})
if (reminderDateTime > DateTime.utc()) {
return null
}
}
if (!balanceString || !symbol) {
return null
@ -31,15 +51,27 @@ export default class DaiV1MigrationNotification extends PureComponent {
return (
<HomeNotification
descriptionText={t('migrateSai')}
descriptionText={(
<div>
{t('migrateSai')}
&nbsp;
<a
href="#"
onClick={() => {
window.open('https://blog.makerdao.com/multi-collateral-dai-is-live/', '_blank', 'noopener')
}}
>
{t('learnMore')}.
</a>
</div>
)}
acceptText={t('migrate')}
onAccept={() => {
window.open('https://migrate.makerdao.com', '_blank', 'noopener')
}}
ignoreText={t('learnMore')}
onIgnore={() => {
window.open('https://blog.makerdao.com/multi-collateral-dai-is-live/', '_blank', 'noopener')
}}
ignoreText={t('remindMeLater')}
onIgnore={this.remindMeLater}
infoText={t('migrateSaiInfo')}
/>
)
}

@ -3,18 +3,32 @@ import { compose } from 'recompose'
import DaiMigrationNotification from './dai-migration-notification.component'
import withTokenTracker from '../../../helpers/higher-order-components/with-token-tracker'
import { getSelectedAddress, getDaiV1Token } from '../../../selectors/selectors'
import { setMkrMigrationReminderTimestamp } from '../../../store/actions'
const mapStateToProps = (state) => {
const {
metamask: {
mkrMigrationReminderTimestamp,
},
} = state
const userAddress = getSelectedAddress(state)
const oldDai = getDaiV1Token(state)
return {
mkrMigrationReminderTimestamp,
userAddress,
token: oldDai,
}
}
const mapDispatchToProps = (dispatch) => {
return {
setMkrMigrationReminderTimestamp: (t) => dispatch(setMkrMigrationReminderTimestamp(t)),
}
}
export default compose(
connect(mapStateToProps),
connect(mapStateToProps, mapDispatchToProps),
withTokenTracker,
)(DaiMigrationNotification)

@ -11,7 +11,7 @@ describe('Dropdown Menu Components', () => {
beforeEach(() => {
wrapper = shallow(
<Menu className="Test Class" isShowing={true}/>
<Menu className="Test Class" isShowing/>
)
})

@ -26,9 +26,9 @@ describe('AdvancedTabContent Component', function () {
timeRemaining="21500"
transactionFee="$0.25"
insufficientBalance={false}
customPriceIsSafe={true}
customPriceIsSafe
isSpeedUp={false}
isEthereumNetwork={true}
isEthereumNetwork
/>)
})

@ -23,7 +23,7 @@ export default class BasicTabContent extends Component {
{!gasPriceButtonGroupProps.loading
? <GasPriceButtonGroup
className="gas-price-button-group--alt"
showCheck={true}
showCheck
{...gasPriceButtonGroupProps}
/>
: <Loading />

@ -204,7 +204,7 @@ export default class GasModalPageContainer extends Component {
}}
submitText={this.context.t('save')}
headerCloseText={this.context.t('close')}
hideCancel={true}
hideCancel
/>
</div>
)

@ -200,7 +200,7 @@ describe('GasModalPageContainer Component', function () {
customGasLimitInHex="mockCustomGasLimitInHex"
insufficientBalance={false}
disableSave={false}
hideBasic={true}
hideBasic
/>)
const renderTabsResult = wrapper.instance().renderTabs()

@ -17,12 +17,12 @@ export default class HomeNotification extends PureComponent {
}
static propTypes = {
acceptText: PropTypes.string.isRequired,
acceptText: PropTypes.node.isRequired,
onAccept: PropTypes.func,
ignoreText: PropTypes.string,
ignoreText: PropTypes.node,
onIgnore: PropTypes.func,
descriptionText: PropTypes.string.isRequired,
infoText: PropTypes.string,
descriptionText: PropTypes.node.isRequired,
infoText: PropTypes.node,
classNames: PropTypes.array,
}

@ -110,7 +110,7 @@ describe('Modal Component', () => {
cancelText="Cancel"
onSubmit={handleSubmit}
submitText="Submit"
submitDisabled={true}
submitDisabled
headerText="My Header"
onClose={handleCancel}
/>

@ -90,7 +90,7 @@ describe('TransactionActivityLog Component', () => {
onCancel={() => {}}
onRetry={() => {}}
primaryTransactionStatus="pending"
isEarliestNonce={true}
isEarliestNonce
/>,
{ context: { t: (str1, str2) => str2 ? str1 + str2 : str1 } }
)

@ -70,7 +70,7 @@ describe('TransactionListItemDetails Component', () => {
const wrapper = shallow(
<TransactionListItemDetails
transactionGroup={transactionGroup}
showSpeedUp={true}
showSpeedUp
/>,
{ context: { t: (str1, str2) => str2 ? str1 + str2 : str1 } }
)

@ -53,7 +53,7 @@ export default class TransactionViewBalance extends PureComponent {
value={balance}
type={PRIMARY}
ethNumberOfDecimals={4}
hideTitle={true}
hideTitle
/>
{
balanceIsCached ? <span className="transaction-view-balance__cached-star">*</span> : null
@ -69,7 +69,7 @@ export default class TransactionViewBalance extends PureComponent {
value={balance}
type={SECONDARY}
ethNumberOfDecimals={4}
hideTitle={true}
hideTitle
/>
)
}

@ -18,7 +18,7 @@ describe('UserPreferencedCurrencyDisplay Component', () => {
it('should pass all props to the CurrencyDisplay child component', () => {
const wrapper = shallow(
<UserPreferencedCurrencyDisplay
prop1={true}
prop1
prop2="test"
prop3={1}
/>

@ -130,7 +130,7 @@ describe('CurrencyInput Component', () => {
fiatSuffix="USD"
nativeSuffix="ETH"
useFiat
hideFiat={true}
hideFiat
nativeCurrency="ETH"
currentCurrency="usd"
conversionRate={231.06}

@ -16,7 +16,7 @@ describe('MetaFoxLogo', () => {
it('does not set icon height and width when unsetIconHeight is true', () => {
const wrapper = mount(
<MetaFoxLogo unsetIconHeight={true} />
<MetaFoxLogo unsetIconHeight />
)
assert.equal(wrapper.find('img.app-header__metafox-logo--icon').prop('width'), null)

@ -13,7 +13,7 @@ describe('Page Container Header', () => {
onClose = sinon.spy()
wrapper = shallow(<PageContainerHeader
showBackButton={true}
showBackButton
onBackButtonClick={onBackButtonClick}
backButtonStyles={style}
title="Test Title"

@ -5,6 +5,7 @@ import Identicon from '../../../components/ui/identicon'
import {
addressSummary,
} from '../../../helpers/utils/util'
import { formatCurrency } from '../../../helpers/utils/confirm-tx.util'
export default class ConfirmApproveContent extends Component {
static contextTypes = {
@ -26,6 +27,7 @@ export default class ConfirmApproveContent extends Component {
tokenBalance: PropTypes.string,
data: PropTypes.string,
toAddress: PropTypes.string,
currentCurrency: PropTypes.string,
fiatTransactionTotal: PropTypes.string,
ethTransactionTotal: PropTypes.string,
}
@ -68,6 +70,7 @@ export default class ConfirmApproveContent extends Component {
renderTransactionDetailsContent () {
const { t } = this.context
const {
currentCurrency,
ethTransactionTotal,
fiatTransactionTotal,
} = this.props
@ -78,10 +81,10 @@ export default class ConfirmApproveContent extends Component {
</div>
<div className="confirm-approve-content__transaction-details-content__fee">
<div className="confirm-approve-content__transaction-details-content__primary-fee">
{ fiatTransactionTotal }
{ formatCurrency(fiatTransactionTotal, currentCurrency) }
</div>
<div className="confirm-approve-content__transaction-details-content__secondary-fee">
{ ethTransactionTotal }
{ `${ethTransactionTotal} ETH` }
</div>
</div>
</div>

@ -62,6 +62,7 @@ export default class ConfirmApprove extends Component {
data,
decimals,
txData,
currentCurrency,
ethTransactionTotal,
fiatTransactionTotal,
...restProps
@ -78,7 +79,7 @@ export default class ConfirmApprove extends Component {
<ConfirmTransactionBase
toAddress={toAddress}
identiconAddress={tokenAddress}
showAccountInHeader={true}
showAccountInHeader
title={tokensText}
contentComponent={<ConfirmApproveContent
siteImage={siteImage}
@ -95,10 +96,11 @@ export default class ConfirmApprove extends Component {
showEditApprovalPermissionModal={showEditApprovalPermissionModal}
data={data}
toAddress={toAddress}
currentCurrency={currentCurrency}
ethTransactionTotal={ethTransactionTotal}
fiatTransactionTotal={fiatTransactionTotal}
/>}
hideSenderToRecipient={true}
hideSenderToRecipient
customTxParamsData={customPermissionAmount
? getCustomTxParamsData(data, { customPermissionAmount, tokenAmount, decimals })
: null

@ -261,7 +261,7 @@ export default class ConfirmTransactionBase extends Component {
customGasPrice={customGas.gasPrice}
customGasLimit={customGas.gasLimit}
insufficientBalance={insufficientBalance}
customPriceIsSafe={true}
customPriceIsSafe
isSpeedUp={false}
/>
: null

@ -47,17 +47,17 @@ export default class CreateAccountPage extends Component {
<div className="new-account__form">
<Switch>
<Route
exact={true}
exact
path={NEW_ACCOUNT_ROUTE}
component={NewAccountCreateForm}
/>
<Route
exact={true}
exact
path={IMPORT_ACCOUNT_ROUTE}
component={NewAccountImportForm}
/>
<Route
exact={true}
exact
path={CONNECT_HARDWARE_ROUTE}
component={ConnectHardwareForm}
/>

@ -58,13 +58,13 @@ export default class NewAccountCreateForm extends Component {
<div className="new-account-create-form__buttons">
<Button
type="default"
large={true}
large
className="new-account-create-form__button"
onClick={() => history.push(DEFAULT_ROUTE)}
>{this.context.t('cancel')}</Button>
<Button
type="secondary"
large={true}
large
className="new-account-create-form__button"
onClick={createClick}
>{this.context.t('create')}</Button>

@ -83,7 +83,7 @@ export default class AccountListItem extends Component {
<UserPreferencedCurrencyDisplay
type={PRIMARY}
value={balance}
hideTitle={true}
hideTitle
/>
{
balanceIsCached ? <span className="account-list-item__cached-star">*</span> : null
@ -94,7 +94,7 @@ export default class AccountListItem extends Component {
<UserPreferencedCurrencyDisplay
type={SECONDARY}
value={balance}
hideTitle={true}
hideTitle
/>
)
}

@ -130,7 +130,7 @@ export default class SendGasRow extends Component {
customGasPrice={gasPrice}
customGasLimit={gasLimit}
insufficientBalance={insufficientBalance}
customPriceIsSafe={true}
customPriceIsSafe
isSpeedUp={false}
/>
{ this.renderAdvancedOptionsButton() }

@ -16,7 +16,7 @@ describe('SendContent Component', function () {
beforeEach(() => {
wrapper = shallow(
<SendContent
showHexData={true}
showHexData
/>,
{ context: { t: str => str + '_t' } }
)

@ -29,7 +29,7 @@ describe('SendFooter Component', function () {
addToAddressBookIfNew={propsMethodSpies.addToAddressBookIfNew}
amount="mockAmount"
clearSend={propsMethodSpies.clearSend}
disabled={true}
disabled
editingTransactionId="mockEditingTransactionId"
errors={{}}
from={ { address: 'mockAddress', balance: 'mockBalance' } }
@ -186,7 +186,7 @@ describe('SendFooter Component', function () {
addToAddressBookIfNew={propsMethodSpies.addToAddressBookIfNew}
amount="mockAmount"
clearSend={propsMethodSpies.clearSend}
disabled={true}
disabled
editingTransactionId="mockEditingTransactionId"
errors={{}}
from={ { address: 'mockAddress', balance: 'mockBalance' } }

@ -58,7 +58,7 @@ describe('Send Component', function () {
recentBlocks={['mockBlock']}
selectedAddress="mockSelectedAddress"
selectedToken="mockSelectedToken"
showHexData={true}
showHexData
tokenBalance="mockTokenBalance"
tokenContract="mockTokenContract"
updateAndSetGasLimit={propsMethodSpies.updateAndSetGasLimit}

@ -61,7 +61,7 @@ export default class ToAutoComplete extends Component {
}}
icon={this.getListItemIcon(account.address, to)}
displayBalance={false}
displayAddress={true}
displayAddress
/>
))}
</div>

@ -100,7 +100,7 @@ export default class EditContact extends PureComponent {
onChange={e => this.setState({ newMemo: e.target.value })}
fullWidth
margin="dense"
multiline={true}
multiline
rows={3}
classes={{
inputMultiline: 'address-book__view-contact__text-area',

@ -24,6 +24,7 @@ export default class NetworkForm extends PureComponent {
isCurrentRpcTarget: PropTypes.bool,
blockExplorerUrl: PropTypes.string,
rpcPrefs: PropTypes.object,
rpcUrls: PropTypes.array,
}
state = {
@ -211,16 +212,28 @@ export default class NetworkForm extends PureComponent {
)
}
validateUrl = (url, stateKey) => {
const invalidUrlErrorMsg = stateKey === 'rpcUrl' ? 'invalidRPC' : 'invalidBlockExplorerURL'
isValidWhenAppended = url => {
const appendedRpc = `http://${url}`
return validUrl.isWebUri(appendedRpc) && !url.match(/^https?:\/\/$/)
}
if (validUrl.isWebUri(url) || (stateKey === 'blockExplorerUrl' && url === '')) {
this.setErrorTo(stateKey, '')
validateBlockExplorerURL = (url, stateKey) => {
if (!validUrl.isWebUri(url) && url !== '') {
this.setErrorTo(stateKey, this.context.t(this.isValidWhenAppended(url) ? 'urlErrorMsg' : 'invalidBlockExplorerURL'))
} else {
const appendedRpc = `http://${url}`
const validWhenAppended = validUrl.isWebUri(appendedRpc) && !url.match(/^https?:\/\/$/)
this.setErrorTo(stateKey, '')
}
}
validateUrlRpcUrl = (url, stateKey) => {
const { rpcUrls } = this.props
this.setErrorTo(stateKey, this.context.t(validWhenAppended ? 'uriErrorMsg' : invalidUrlErrorMsg))
if (!validUrl.isWebUri(url) && url !== '') {
this.setErrorTo(stateKey, this.context.t(this.isValidWhenAppended(url) ? 'urlErrorMsg' : 'invalidRPC'))
} else if (rpcUrls.includes(url)) {
this.setErrorTo(stateKey, this.context.t('urlExistsErrorMsg'))
} else {
this.setErrorTo(stateKey, '')
}
}
@ -254,7 +267,7 @@ export default class NetworkForm extends PureComponent {
{this.renderFormTextField(
'rpcUrl',
'rpc-url',
this.setStateWithValue('rpcUrl', this.validateUrl),
this.setStateWithValue('rpcUrl', this.validateUrlRpcUrl),
rpcUrl,
)}
{this.renderFormTextField(
@ -274,7 +287,7 @@ export default class NetworkForm extends PureComponent {
{this.renderFormTextField(
'blockExplorerUrl',
'block-explorer-url',
this.setStateWithValue('blockExplorerUrl', this.validateUrl),
this.setStateWithValue('blockExplorerUrl', this.validateBlockExplorerURL),
blockExplorerUrl,
'optionalBlockExplorerUrl',
)}

@ -20,7 +20,7 @@ export default class NetworksTab extends PureComponent {
location: PropTypes.object.isRequired,
networkIsSelected: PropTypes.bool,
networksTabIsInAddMode: PropTypes.bool,
networksToRender: PropTypes.array.isRequired,
networksToRender: PropTypes.arrayOf(PropTypes.object).isRequired,
selectedNetwork: PropTypes.object,
setNetworksTabAddMode: PropTypes.func.isRequired,
setRpcTarget: PropTypes.func.isRequired,
@ -177,6 +177,7 @@ export default class NetworksTab extends PureComponent {
editRpc,
networkDefaultedToProvider,
providerUrl,
networksToRender,
} = this.props
const envIsPopup = getEnvironmentType() === ENVIRONMENT_TYPE_POPUP
@ -189,6 +190,7 @@ export default class NetworksTab extends PureComponent {
shouldRenderNetworkForm
? (
<NetworkForm
rpcUrls={networksToRender.map(network => network.rpcUrl)}
setRpcTarget={setRpcTarget}
editRpc={editRpc}
networkName={label || labelKey && t(labelKey) || ''}

@ -367,6 +367,7 @@ var actions = {
// AppStateController-related actions
SET_LAST_ACTIVE_TIME: 'SET_LAST_ACTIVE_TIME',
setLastActiveTime,
setMkrMigrationReminderTimestamp,
getContractMethodData,
loadingMethoDataStarted,
@ -2755,6 +2756,16 @@ function setLastActiveTime () {
}
}
function setMkrMigrationReminderTimestamp (timestamp) {
return (dispatch) => {
background.setMkrMigrationReminderTimestamp(timestamp, (err) => {
if (err) {
return dispatch(actions.displayWarning(err.message))
}
})
}
}
function loadingMethoDataStarted () {
return {
type: actions.LOADING_METHOD_DATA_STARTED,

Loading…
Cancel
Save