diff --git a/package.json b/package.json index 9c031179..343eb359 100644 --- a/package.json +++ b/package.json @@ -47,10 +47,10 @@ "@fortawesome/react-fontawesome": "^0.0.17", "@ledgerhq/common": "2.3.0", "@ledgerhq/currencies": "^2.3.0", - "@ledgerhq/hw-app-btc": "^2.2.0", - "@ledgerhq/hw-app-eth": "^2.2.0", - "@ledgerhq/hw-transport": "^2.2.0", - "@ledgerhq/hw-transport-node-hid": "^2.2.0", + "@ledgerhq/hw-app-btc": "^3.0.2", + "@ledgerhq/hw-app-eth": "^3.0.0", + "@ledgerhq/hw-transport": "^3.0.0", + "@ledgerhq/hw-transport-node-hid": "^3.0.0", "axios": "^0.17.1", "babel-runtime": "^6.26.0", "bcryptjs": "^2.4.3", @@ -70,11 +70,11 @@ "object-path": "^0.11.4", "qrcode": "^1.2.0", "query-string": "^5.1.0", - "raven": "^2.4.0", - "raven-js": "^3.22.1", + "raven": "^2.4.1", + "raven-js": "^3.22.2", "react": "^16.2.0", "react-dom": "^16.2.0", - "react-i18next": "^7.3.4", + "react-i18next": "^7.3.6", "react-mortal": "^3.2.0", "react-motion": "^0.5.2", "react-qr-reader": "^2.0.1", @@ -91,15 +91,15 @@ "smooth-scrollbar": "^8.2.6", "source-map-support": "^0.5.3", "styled-components": "^3.1.6", - "styled-system": "^1.1.4" + "styled-system": "^1.1.7" }, "devDependencies": { - "@storybook/addon-actions": "^3.3.12", - "@storybook/addon-knobs": "^3.3.12", - "@storybook/addon-links": "^3.3.12", - "@storybook/addon-options": "^3.3.12", - "@storybook/addons": "^3.3.12", - "@storybook/react": "^3.3.12", + "@storybook/addon-actions": "^3.3.13", + "@storybook/addon-knobs": "^3.3.13", + "@storybook/addon-links": "^3.3.13", + "@storybook/addon-options": "^3.3.13", + "@storybook/addons": "^3.3.13", + "@storybook/react": "^3.3.13", "babel-core": "^6.26.0", "babel-eslint": "^8.2.1", "babel-loader": "^7.1.2", @@ -120,7 +120,7 @@ "eslint-config-airbnb": "^16.1.0", "eslint-config-prettier": "^2.9.0", "eslint-import-resolver-babel-module": "^4.0.0", - "eslint-plugin-flowtype": "^2.42.0", + "eslint-plugin-flowtype": "^2.43.0", "eslint-plugin-import": "^2.8.0", "eslint-plugin-jsx-a11y": "^6.0.3", "eslint-plugin-react": "^7.6.1", @@ -131,6 +131,6 @@ "node-loader": "^0.6.0", "prettier": "^1.10.2", "react-hot-loader": "^4.0.0-beta.21", - "webpack": "^3.10.0" + "webpack": "^3.11.0" } } diff --git a/src/actions/accounts.js b/src/actions/accounts.js index 17db0b2b..4e0ee38d 100644 --- a/src/actions/accounts.js +++ b/src/actions/accounts.js @@ -28,12 +28,6 @@ export const addAccount: AddAccount = payload => ({ payload, }) -export type UpdateAccount = Account => { type: string, payload: Account } -export const updateAccount: AddAccount = payload => ({ - type: 'DB:UPDATE_ACCOUNT', - payload, -}) - export type RemoveAccount = Account => { type: string, payload: Account } export const removeAccount: RemoveAccount = payload => ({ type: 'DB:REMOVE_ACCOUNT', @@ -56,8 +50,19 @@ export const updateOrderAccounts: UpdateOrderAccounts = (orderAccounts: string) getState, ) => { const { accounts } = getState() + dispatch({ type: 'DB:SET_ACCOUNTS', payload: sortAccounts(accounts, orderAccounts), }) } + +export type UpdateAccount = Account => (Function, Function) => void +export const updateAccount: UpdateAccount = payload => (dispatch, getState) => { + const { settings } = getState() + dispatch({ + type: 'UPDATE_ACCOUNT', + payload, + }) + dispatch(updateOrderAccounts(settings.orderAccounts)) +} diff --git a/src/components/modals/SettingsAccount.js b/src/components/modals/SettingsAccount.js index 1874e301..e67fdb44 100644 --- a/src/components/modals/SettingsAccount.js +++ b/src/components/modals/SettingsAccount.js @@ -7,11 +7,9 @@ import { push } from 'react-router-redux' import { MODAL_SETTINGS_ACCOUNT } from 'constants' -import type { MapStateToProps } from 'react-redux' import type { Account } from 'types/common' -import { updateOrderAccounts, updateAccount, removeAccount } from 'actions/accounts' -import { getOrderAccounts } from 'reducers/settings' +import { updateAccount, removeAccount } from 'actions/accounts' import { setDataModal, closeModal } from 'reducers/modals' import Box from 'components/base/Box' @@ -22,37 +20,30 @@ import Text from 'components/base/Text' import Icon from 'components/base/Icon' type State = { - accountName: string, + accountName: string | null, editName: boolean, nameHovered: boolean, } type Props = { closeModal: Function, - orderAccounts: string, push: Function, removeAccount: Function, setDataModal: Function, updateAccount: Function, - updateOrderAccounts: Function, } -const mapStateToProps: MapStateToProps<*, *, *> = state => ({ - orderAccounts: getOrderAccounts(state), -}) - const mapDispatchToProps = { closeModal, push, removeAccount, setDataModal, updateAccount, - updateOrderAccounts, } const defaultState = { editName: false, - accountName: '', + accountName: null, nameHovered: false, } @@ -72,7 +63,7 @@ class SettingsAccount extends PureComponent { return { ...account, - ...(accountName !== '' + ...(accountName !== null ? { name: accountName, } @@ -107,14 +98,16 @@ class SettingsAccount extends PureComponent { e.preventDefault() const { updateAccount, setDataModal } = this.props + const { accountName } = this.state - updateAccount(account) - setDataModal(MODAL_SETTINGS_ACCOUNT, { account }) - this.updateOrderAccounts() + if (accountName !== '') { + updateAccount(account) + setDataModal(MODAL_SETTINGS_ACCOUNT, { account }) - this.setState({ - editName: false, - }) + this.setState({ + editName: false, + }) + } } handleArchiveAccount = (account: Account) => () => { @@ -127,7 +120,6 @@ class SettingsAccount extends PureComponent { updateAccount({ ...account, archived: true }) } - this.updateOrderAccounts() closeModal(MODAL_SETTINGS_ACCOUNT) push('/') } @@ -137,12 +129,6 @@ class SettingsAccount extends PureComponent { ...defaultState, }) - updateOrderAccounts() { - const { updateOrderAccounts, orderAccounts } = this.props - - updateOrderAccounts(orderAccounts) - } - render() { const { editName, nameHovered } = this.state @@ -211,4 +197,4 @@ class SettingsAccount extends PureComponent { } } -export default connect(mapStateToProps, mapDispatchToProps)(SettingsAccount) +export default connect(null, mapDispatchToProps)(SettingsAccount) diff --git a/yarn.lock b/yarn.lock index 1f019e70..025c2200 100644 --- a/yarn.lock +++ b/yarn.lock @@ -152,35 +152,35 @@ dependencies: querystring "^0.2.0" -"@ledgerhq/hw-app-btc@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-btc/-/hw-app-btc-2.2.0.tgz#c5c99c8974ab8df378f773c5b03052304ce3812b" +"@ledgerhq/hw-app-btc@^3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-btc/-/hw-app-btc-3.0.2.tgz#4bad5d65eeef3711083d681a19d58c63cc12fe02" dependencies: - "@ledgerhq/hw-transport" "^2.2.0" + "@ledgerhq/hw-transport" "^3.0.0" create-hash "^1.1.3" -"@ledgerhq/hw-app-eth@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-eth/-/hw-app-eth-2.2.0.tgz#e8b3591ebb24565d5bacbca5d4c2a0ab99eb965a" +"@ledgerhq/hw-app-eth@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-eth/-/hw-app-eth-3.0.0.tgz#0cc66865f44a1a0b6bbb5711e3585f6b58188a1c" dependencies: - "@ledgerhq/hw-transport" "^2.2.0" + "@ledgerhq/hw-transport" "^3.0.0" -"@ledgerhq/hw-transport-node-hid@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-2.2.0.tgz#da24caf79401f4d3fd841a724e71928c841ae84c" +"@ledgerhq/hw-transport-node-hid@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-3.0.0.tgz#eda95b99fa5d43e8703dbc0682fdb2a386a0dd25" dependencies: - "@ledgerhq/hw-transport" "^2.2.0" + "@ledgerhq/hw-transport" "^3.0.0" node-hid "^0.7.2" -"@ledgerhq/hw-transport@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-2.2.0.tgz#32d6374e6cfacbb4b9b0a545cdd2f6bf3d64623f" +"@ledgerhq/hw-transport@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-3.0.0.tgz#0a191626f906aa8b786b762a0e08641956c17ede" dependencies: events "^1.1.1" -"@storybook/addon-actions@^3.3.12": - version "3.3.12" - resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-3.3.12.tgz#1bd2668918a62f32c0907af14946cdd0c6be66f5" +"@storybook/addon-actions@^3.3.13": + version "3.3.13" + resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-3.3.13.tgz#6ba603e5254ab01d16f9ff97c1656f3746710059" dependencies: deep-equal "^1.0.1" global "^4.3.2" @@ -189,9 +189,9 @@ react-inspector "^2.2.2" uuid "^3.1.0" -"@storybook/addon-knobs@^3.3.12": - version "3.3.12" - resolved "https://registry.yarnpkg.com/@storybook/addon-knobs/-/addon-knobs-3.3.12.tgz#371c3d5b50bd0220a7f0d18e5c20794fb6292545" +"@storybook/addon-knobs@^3.3.13": + version "3.3.13" + resolved "https://registry.yarnpkg.com/@storybook/addon-knobs/-/addon-knobs-3.3.13.tgz#21e1bf22dfb83a62c74223f6e01620225dbff219" dependencies: babel-runtime "^6.26.0" deep-equal "^1.0.1" @@ -205,41 +205,41 @@ react-textarea-autosize "^5.2.1" util-deprecate "^1.0.2" -"@storybook/addon-links@^3.3.12": - version "3.3.12" - resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-3.3.12.tgz#e1bb6e207506a45bea9e5f64cd78c045327412b7" +"@storybook/addon-links@^3.3.13": + version "3.3.13" + resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-3.3.13.tgz#ea27db37e609a9036e4e6164ed52edf768b99eef" dependencies: - "@storybook/components" "^3.3.12" + "@storybook/components" "^3.3.13" global "^4.3.2" prop-types "^15.5.10" -"@storybook/addon-options@^3.3.12": - version "3.3.12" - resolved "https://registry.yarnpkg.com/@storybook/addon-options/-/addon-options-3.3.12.tgz#d0f19936c2ca8ed4e900cf68760db4eeda24ce16" +"@storybook/addon-options@^3.3.13": + version "3.3.13" + resolved "https://registry.yarnpkg.com/@storybook/addon-options/-/addon-options-3.3.13.tgz#d2cbddb640737d0853f2f4bc8958ba58be6cfa30" -"@storybook/addons@^3.3.12": - version "3.3.12" - resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-3.3.12.tgz#682927b5ac4baad796922eec505a7e956a3f79d9" +"@storybook/addons@^3.3.13": + version "3.3.13" + resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-3.3.13.tgz#b5c0395494b856cadc5bcb946cab7c206bc4f9af" -"@storybook/channel-postmessage@^3.3.12": - version "3.3.12" - resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-3.3.12.tgz#a4e7ac32ff84d2cc41bf3a5f30608ce5f82bcf82" +"@storybook/channel-postmessage@^3.3.13": + version "3.3.13" + resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-3.3.13.tgz#35eda62a97d0d1479452dc3a5338d320d5117083" dependencies: - "@storybook/channels" "^3.3.12" + "@storybook/channels" "^3.3.13" global "^4.3.2" json-stringify-safe "^5.0.1" -"@storybook/channels@^3.3.12": - version "3.3.12" - resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-3.3.12.tgz#aa4106888971f9e689511093b0e6f2b569973a09" +"@storybook/channels@^3.3.13": + version "3.3.13" + resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-3.3.13.tgz#892b80c89329198096761f4f3ddf11d9b252fc61" -"@storybook/client-logger@^3.3.12": - version "3.3.12" - resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-3.3.12.tgz#5307eba4d63d6dc54676e14a40bc0d4be3439d92" +"@storybook/client-logger@^3.3.13": + version "3.3.13" + resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-3.3.13.tgz#a8d3120cf7e013a9e467c05dd440f529b3a93254" -"@storybook/components@^3.3.12": - version "3.3.12" - resolved "https://registry.yarnpkg.com/@storybook/components/-/components-3.3.12.tgz#e2571ca7150488f4ac3fa1cd1f70fa91ce38da8b" +"@storybook/components@^3.3.13": + version "3.3.13" + resolved "https://registry.yarnpkg.com/@storybook/components/-/components-3.3.13.tgz#003addacf9c98d61a35246eb7c76908d38d323c4" dependencies: glamor "^2.20.40" glamorous "^4.11.2" @@ -253,9 +253,9 @@ "@storybook/react-simple-di" "^1.2.1" babel-runtime "6.x.x" -"@storybook/node-logger@^3.3.12": - version "3.3.12" - resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-3.3.12.tgz#97251cfa46be4a0d856b394f5dbbf32d6ab2f2cd" +"@storybook/node-logger@^3.3.13": + version "3.3.13" + resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-3.3.13.tgz#ecc26dca0cdea4cf0b182e3b3c0c3e8466ca7764" dependencies: chalk "^2.3.0" npmlog "^4.1.2" @@ -285,17 +285,17 @@ dependencies: babel-runtime "^6.5.0" -"@storybook/react@^3.3.12": - version "3.3.12" - resolved "https://registry.yarnpkg.com/@storybook/react/-/react-3.3.12.tgz#f1f6587499e0aaa7b14be911a53d09a61e219ccd" - dependencies: - "@storybook/addon-actions" "^3.3.12" - "@storybook/addon-links" "^3.3.12" - "@storybook/addons" "^3.3.12" - "@storybook/channel-postmessage" "^3.3.12" - "@storybook/client-logger" "^3.3.12" - "@storybook/node-logger" "^3.3.12" - "@storybook/ui" "^3.3.12" +"@storybook/react@^3.3.13": + version "3.3.13" + resolved "https://registry.yarnpkg.com/@storybook/react/-/react-3.3.13.tgz#5b610e09158582d24a7e748663e27372185c2a19" + dependencies: + "@storybook/addon-actions" "^3.3.13" + "@storybook/addon-links" "^3.3.13" + "@storybook/addons" "^3.3.13" + "@storybook/channel-postmessage" "^3.3.13" + "@storybook/client-logger" "^3.3.13" + "@storybook/node-logger" "^3.3.13" + "@storybook/ui" "^3.3.13" airbnb-js-shims "^1.4.0" autoprefixer "^7.2.3" babel-loader "^7.1.2" @@ -347,11 +347,11 @@ webpack-dev-middleware "^1.12.2" webpack-hot-middleware "^2.21.0" -"@storybook/ui@^3.3.12": - version "3.3.12" - resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-3.3.12.tgz#b0a9cd83423c4d6cded0a0340fc4f48d5bdf3bc0" +"@storybook/ui@^3.3.13": + version "3.3.13" + resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-3.3.13.tgz#97656822a6503bf07b66a0288c757768f5451805" dependencies: - "@storybook/components" "^3.3.12" + "@storybook/components" "^3.3.13" "@storybook/mantra-core" "^1.7.2" "@storybook/react-komposer" "^2.0.3" babel-runtime "^6.26.0" @@ -447,6 +447,10 @@ ajv-keywords@^2.0.0, ajv-keywords@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" +ajv-keywords@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.1.0.tgz#ac2b27939c543e95d2c06e7f7f5c27be4aa543be" + ajv@^4.9.1: version "4.11.8" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" @@ -463,6 +467,14 @@ ajv@^5.0.0, ajv@^5.1.0, ajv@^5.1.5, ajv@^5.2.3, ajv@^5.3.0, ajv@^5.5.0: fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" +ajv@^6.1.0: + version "6.1.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.1.1.tgz#978d597fbc2b7d0e5a5c3ddeb149a682f2abfa0e" + dependencies: + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" @@ -3746,9 +3758,9 @@ eslint-module-utils@^2.1.1: debug "^2.6.8" pkg-dir "^1.0.0" -eslint-plugin-flowtype@^2.42.0: - version "2.42.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.42.0.tgz#7fcc98df4ed9482a22ac10ba4ca48d649c4c733a" +eslint-plugin-flowtype@^2.43.0: + version "2.43.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.43.0.tgz#47cdac5f01cda53f1c3e8477f0c83fee66a1606e" dependencies: lodash "^4.15.0" @@ -5916,10 +5928,6 @@ lru-cache@^4.0.1, lru-cache@^4.1.1: pseudomap "^1.0.2" yallist "^2.1.2" -lsmod@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lsmod/-/lsmod-1.0.0.tgz#9a00f76dca36eb23fa05350afe1b585d4299e64b" - macaddress@^0.2.8: version "0.2.8" resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" @@ -7433,16 +7441,15 @@ range-parser@^1.0.3, range-parser@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" -raven-js@^3.22.1: - version "3.22.1" - resolved "https://registry.yarnpkg.com/raven-js/-/raven-js-3.22.1.tgz#1117f00dfefaa427ef6e1a7d50bbb1fb998a24da" +raven-js@^3.22.2: + version "3.22.2" + resolved "https://registry.yarnpkg.com/raven-js/-/raven-js-3.22.2.tgz#85785928ebd664049e54efd0db8ff28da0cbb374" -raven@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/raven/-/raven-2.4.0.tgz#49b7d5f838e5893f31dd72f82d05a35e42203f60" +raven@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/raven/-/raven-2.4.1.tgz#7a6a6ff1c42d0a3892308f44c94273e7f88677fd" dependencies: cookie "0.3.1" - lsmod "1.0.0" md5 "^2.2.1" stack-trace "0.0.9" timed-out "4.0.1" @@ -7531,9 +7538,9 @@ react-html-attributes@^1.3.0: dependencies: html-element-attributes "^1.0.0" -react-i18next@^7.3.4: - version "7.3.4" - resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-7.3.4.tgz#d5932d47ac7f0d723eecef492ea97b7232673706" +react-i18next@^7.3.6: + version "7.3.6" + resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-7.3.6.tgz#3e4fdd0be7735aa53343720684247ba7f6cfd51a" dependencies: hoist-non-react-statics "2.3.1" html-parse-stringify2 "2.0.1" @@ -8810,9 +8817,9 @@ styled-components@^3.1.6: stylis-rule-sheet "^0.0.7" supports-color "^3.2.3" -styled-system@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/styled-system/-/styled-system-1.1.4.tgz#904521a5142e85345c76956c50524e4d05a88af3" +styled-system@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/styled-system/-/styled-system-1.1.7.tgz#b9b6906aaec41b9c79f40780e07dc39b81fe93fb" dependencies: prop-types "^15.6.0" @@ -9523,6 +9530,33 @@ webpack@^3.10.0: webpack-sources "^1.0.1" yargs "^8.0.2" +webpack@^3.11.0: + version "3.11.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.11.0.tgz#77da451b1d7b4b117adaf41a1a93b5742f24d894" + dependencies: + acorn "^5.0.0" + acorn-dynamic-import "^2.0.0" + ajv "^6.1.0" + ajv-keywords "^3.1.0" + async "^2.1.2" + enhanced-resolve "^3.4.0" + escope "^3.6.0" + interpret "^1.0.0" + json-loader "^0.5.4" + json5 "^0.5.1" + loader-runner "^2.3.0" + loader-utils "^1.1.0" + memory-fs "~0.4.1" + mkdirp "~0.5.0" + node-libs-browser "^2.0.0" + source-map "^0.5.3" + supports-color "^4.2.1" + tapable "^0.2.7" + uglifyjs-webpack-plugin "^0.4.6" + watchpack "^1.4.0" + webpack-sources "^1.0.1" + yargs "^8.0.2" + webrtc-adapter@^5.0.6: version "5.0.6" resolved "https://registry.yarnpkg.com/webrtc-adapter/-/webrtc-adapter-5.0.6.tgz#7946fca194dadf869bb6c8cae1011dfda03f40c7"