merge with develop branch
This commit is contained in:
commit
6079160cc7
|
@ -11,6 +11,7 @@ development/publish-release.js
|
|||
|
||||
app/scripts/lib/extension-instance.js
|
||||
app/scripts/chromereload.js
|
||||
app/vendor/**
|
||||
|
||||
ui/lib/blockies.js
|
||||
|
||||
|
|
|
@ -52,6 +52,14 @@
|
|||
],
|
||||
"run_at": "document_start",
|
||||
"all_frames": true
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
"*://connect.trezor.io/*/popup.html"
|
||||
],
|
||||
"js": [
|
||||
"vendor/trezor/content-script.js"
|
||||
]
|
||||
}
|
||||
],
|
||||
"permissions": [
|
||||
|
|
|
@ -53,6 +53,7 @@ const EthQuery = require('eth-query')
|
|||
const ethUtil = require('ethereumjs-util')
|
||||
const sigUtil = require('eth-sig-util')
|
||||
const { importTypes } = require('../../old-ui/app/accounts/import/enums')
|
||||
const { LEDGER, TREZOR } = require('../../old-ui/app/components/connect-hardware/enum')
|
||||
|
||||
const accountsPerPage = 5
|
||||
|
||||
|
@ -609,10 +610,10 @@ module.exports = class MetamaskController extends EventEmitter {
|
|||
async getKeyringForDevice (deviceName, hdPath = null) {
|
||||
let keyringName = null
|
||||
switch (deviceName) {
|
||||
case 'trezor':
|
||||
case TREZOR:
|
||||
keyringName = TrezorKeyring.type
|
||||
break
|
||||
case 'ledger':
|
||||
case LEDGER:
|
||||
keyringName = LedgerBridgeKeyring.type
|
||||
break
|
||||
default:
|
||||
|
@ -754,18 +755,14 @@ module.exports = class MetamaskController extends EventEmitter {
|
|||
*/
|
||||
async unlockHardwareWalletAccount (index, deviceName, hdPath) {
|
||||
const keyring = await this.getKeyringForDevice(deviceName, hdPath)
|
||||
let hdAccounts
|
||||
let indexInPage
|
||||
if (deviceName.includes('ledger')) {
|
||||
hdAccounts = await keyring.getFirstPage()
|
||||
const accountPosition = Number(index) + 1
|
||||
const pages = Math.ceil(accountPosition / accountsPerPage)
|
||||
indexInPage = index % accountsPerPage
|
||||
if (pages > 1) {
|
||||
for (let iterator = 0; iterator < pages; iterator++) {
|
||||
hdAccounts = await keyring.getNextPage()
|
||||
iterator++
|
||||
}
|
||||
let hdAccounts = await keyring.getFirstPage()
|
||||
const accountPosition = Number(index) + 1
|
||||
const pages = Math.ceil(accountPosition / accountsPerPage)
|
||||
const indexInPage = index % accountsPerPage
|
||||
if (pages > 1) {
|
||||
for (let iterator = 0; iterator < pages; iterator++) {
|
||||
hdAccounts = await keyring.getNextPage()
|
||||
iterator++
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -786,11 +783,9 @@ module.exports = class MetamaskController extends EventEmitter {
|
|||
}
|
||||
})
|
||||
|
||||
if (deviceName.includes('ledger')) {
|
||||
if (!selectedAddressChanged) {
|
||||
// Select the account
|
||||
this.preferencesController.setSelectedAddress(hdAccounts[indexInPage].address)
|
||||
}
|
||||
if (!selectedAddressChanged) {
|
||||
// Select the account
|
||||
this.preferencesController.setSelectedAddress(hdAccounts[indexInPage].address)
|
||||
}
|
||||
|
||||
const { identities } = this.preferencesController.store.getState()
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
|
||||
<title>TrezorConnect | Trezor</title>
|
||||
<meta name="description" content="" />
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="author" content="Trezor info@trezor.io" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<meta name="title" content="Trezor Connect" />
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="-1" />
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
html, body {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 500px;
|
||||
min-width: 328px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="trezor-usb-permissions" src="https://connect.trezor.io/6/extension-permissions.html" allow="usb" frameborder="0" width="100%" height="100%"></iframe>
|
||||
<script type="text/javascript" src="./vendor/trezor/usb-permissions.js"></script>
|
||||
</body>
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
Passing messages from background script to popup
|
||||
*/
|
||||
|
||||
let port = chrome.runtime.connect({ name: 'trezor-connect' });
|
||||
port.onMessage.addListener(message => {
|
||||
window.postMessage(message, window.location.origin);
|
||||
});
|
||||
port.onDisconnect.addListener(d => {
|
||||
port = null;
|
||||
});
|
||||
|
||||
/*
|
||||
Passing messages from popup to background script
|
||||
*/
|
||||
|
||||
window.addEventListener('message', event => {
|
||||
if (port && event.source === window && event.data) {
|
||||
port.postMessage(event.data);
|
||||
}
|
||||
});
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
Handling messages from usb permissions iframe
|
||||
*/
|
||||
|
||||
const switchToPopupTab = (event) => {
|
||||
|
||||
window.removeEventListener('beforeunload', switchToPopupTab);
|
||||
|
||||
if (!event) {
|
||||
// triggered from 'usb-permissions-close' message
|
||||
// switch tab to previous index and close current
|
||||
chrome.tabs.query({
|
||||
currentWindow: true,
|
||||
active: true,
|
||||
}, (current) => {
|
||||
if (current.length < 0) return;
|
||||
chrome.tabs.query({
|
||||
index: current[0].index - 1
|
||||
}, popup => {
|
||||
if (popup.length < 0) return;
|
||||
chrome.tabs.update(popup[0].id, { active: true });
|
||||
})
|
||||
chrome.tabs.remove(current[0].id);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// triggered from 'beforeunload' event
|
||||
// find tab by popup pattern and switch to it
|
||||
chrome.tabs.query({
|
||||
url: "*://connect.trezor.io/*/popup.html"
|
||||
}, (tabs) => {
|
||||
if (tabs.length < 0) return;
|
||||
chrome.tabs.update(tabs[0].id, { active: true });
|
||||
});
|
||||
}
|
||||
|
||||
window.addEventListener('message', event => {
|
||||
if (event.data === 'usb-permissions-init') {
|
||||
const iframe = document.getElementById('trezor-usb-permissions');
|
||||
iframe.contentWindow.postMessage({
|
||||
type: 'usb-permissions-init',
|
||||
extension: chrome.runtime.id,
|
||||
}, '*');
|
||||
} else if (event.data === 'usb-permissions-close') {
|
||||
switchToPopupTab();
|
||||
}
|
||||
});
|
||||
|
||||
window.addEventListener('beforeunload', switchToPopupTab);
|
|
@ -78,6 +78,10 @@ createCopyTasks('fonts', {
|
|||
source: './app/fonts/',
|
||||
destinations: commonPlatforms.map(platform => `./dist/${platform}/fonts`),
|
||||
})
|
||||
createCopyTasks('vendor', {
|
||||
source: './app/vendor/',
|
||||
destinations: commonPlatforms.map(platform => `./dist/${platform}/vendor`),
|
||||
})
|
||||
createCopyTasks('reload', {
|
||||
devOnly: true,
|
||||
source: './app/scripts/',
|
||||
|
|
|
@ -4,7 +4,8 @@ import ethNetProps from 'eth-net-props'
|
|||
import { default as Select } from 'react-select'
|
||||
import Button from '../../../../ui/app/components/button'
|
||||
import { capitalizeFirstLetter } from '../../../../app/scripts/lib/util'
|
||||
import { isLedger, getHdPaths } from './util'
|
||||
import { getHdPaths } from './util'
|
||||
import { LEDGER } from './enum'
|
||||
|
||||
class AccountList extends Component {
|
||||
constructor (props, context) {
|
||||
|
@ -54,7 +55,7 @@ class AccountList extends Component {
|
|||
<div className="hw-connect">
|
||||
<h3 className="hw-connect">
|
||||
<h3 className="hw-connect__unlock-title">{`Unlock ${capitalizeFirstLetter(device)}`}</h3>
|
||||
{device.toLowerCase() === 'ledger' ? this.renderHdPathSelector() : null}
|
||||
{device.toLowerCase() === LEDGER ? this.renderHdPathSelector() : null}
|
||||
<p className="hw-connect__msg">Select the accounts to view in Nifty Wallet</p>
|
||||
</h3>
|
||||
</div>
|
||||
|
@ -62,30 +63,17 @@ class AccountList extends Component {
|
|||
}
|
||||
|
||||
renderInput = (a, i) => {
|
||||
const { device, selectedAccount, selectedAccounts } = this.props
|
||||
if (isLedger(device)) {
|
||||
return (
|
||||
<input
|
||||
type="checkbox"
|
||||
name={`selectedAccount-${i}`}
|
||||
id={`address-${i}`}
|
||||
value={a.index}
|
||||
onChange={(e) => this.props.onAccountChange(e.target.value)}
|
||||
checked={selectedAccounts.includes(a.index.toString())}
|
||||
/>
|
||||
)
|
||||
} else {
|
||||
return (
|
||||
<input
|
||||
type="radio"
|
||||
name="selectedAccount"
|
||||
id={`address-${i}`}
|
||||
value={a.index}
|
||||
onChange={(e) => this.props.onAccountChange(e.target.value)}
|
||||
checked={selectedAccount === a.index.toString()}
|
||||
/>
|
||||
)
|
||||
}
|
||||
const { selectedAccounts } = this.props
|
||||
return (
|
||||
<input
|
||||
type="checkbox"
|
||||
name={`selectedAccount-${i}`}
|
||||
id={`address-${i}`}
|
||||
value={a.index}
|
||||
onChange={(e) => this.props.onAccountChange(e.target.value)}
|
||||
checked={selectedAccounts.includes(a.index.toString())}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
renderAccounts = () => {
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import Button from '../../../../ui/app/components/button'
|
||||
import { LEDGER, TREZOR } from './enum'
|
||||
import { capitalizeFirstLetter } from '../../../../app/scripts/lib/util'
|
||||
|
||||
const trezorCap = capitalizeFirstLetter(TREZOR)
|
||||
const ledgerCap = capitalizeFirstLetter(LEDGER)
|
||||
|
||||
class ConnectScreen extends Component {
|
||||
constructor (props, context) {
|
||||
|
@ -20,8 +25,8 @@ class ConnectScreen extends Component {
|
|||
renderConnectToTrezorButton () {
|
||||
return (
|
||||
<button
|
||||
className={`hw-connect__btn${this.state.selectedDevice === 'trezor' ? ' selected' : ''}`}
|
||||
onClick={_ => this.setState({selectedDevice: 'trezor'})}
|
||||
className={`hw-connect__btn${this.state.selectedDevice === TREZOR ? ' selected' : ''}`}
|
||||
onClick={_ => this.setState({selectedDevice: TREZOR})}
|
||||
>
|
||||
<img className="hw-connect__btn__img" src="images/trezor-logo.svg"/>
|
||||
</button>
|
||||
|
@ -31,8 +36,8 @@ class ConnectScreen extends Component {
|
|||
renderConnectToLedgerButton () {
|
||||
return (
|
||||
<button
|
||||
className={`hw-connect__btn${this.state.selectedDevice === 'ledger' ? ' selected' : ''}`}
|
||||
onClick={_ => this.setState({selectedDevice: 'ledger'})}
|
||||
className={`hw-connect__btn${this.state.selectedDevice === LEDGER ? ' selected' : ''}`}
|
||||
onClick={_ => this.setState({selectedDevice: LEDGER})}
|
||||
>
|
||||
<img className="hw-connect__btn__img" src="images/ledger-logo.svg"/>
|
||||
</button>
|
||||
|
@ -82,12 +87,12 @@ class ConnectScreen extends Component {
|
|||
|
||||
getAffiliateLinks () {
|
||||
const links = {
|
||||
trezor: `<a class='hw-connect__get-hw__link' href='https://shop.trezor.io/?a=niftywallet' target='_blank'>Trezor</a>`,
|
||||
ledger: `<a class='hw-connect__get-hw__link' href='https://www.ledger.com/products/ledger-nano-s' target='_blank'>Ledger</a>`,
|
||||
trezor: `<a class='hw-connect__get-hw__link' href='https://shop.trezor.io/?a=niftywallet' target='_blank'>${trezorCap}</a>`,
|
||||
ledger: `<a class='hw-connect__get-hw__link' href='https://www.ledger.com/products/ledger-nano-s' target='_blank'>${ledgerCap}</a>`,
|
||||
}
|
||||
|
||||
const text = 'Order a Trezor or Ledger and keep your funds in cold storage'
|
||||
const response = text.replace('Trezor', links.trezor).replace('Ledger', links.ledger)
|
||||
const text = `Order a ${trezorCap} or ${ledgerCap} and keep your funds in cold storage`
|
||||
const response = text.replace(trezorCap, links.trezor).replace(ledgerCap, links.ledger)
|
||||
|
||||
return (
|
||||
<div className="hw-connect__get-hw__msg" dangerouslySetInnerHTML={{ __html: response }} />
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
const LEDGER = 'ledger'
|
||||
const TREZOR = 'trezor'
|
||||
|
||||
module.exports = {
|
||||
LEDGER,
|
||||
TREZOR,
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@ import AccountList from './account-list'
|
|||
import { formatBalance } from '../../util'
|
||||
import { getPlatform } from '../../../../app/scripts/lib/util'
|
||||
import { PLATFORM_FIREFOX } from '../../../../app/scripts/lib/enums'
|
||||
import { isLedger } from './util'
|
||||
import { getMetaMaskAccounts } from '../../../../ui/app/selectors'
|
||||
import { LEDGER, TREZOR } from './enum'
|
||||
|
||||
class ConnectHardwareForm extends Component {
|
||||
constructor (props, context) {
|
||||
|
@ -41,7 +41,7 @@ class ConnectHardwareForm extends Component {
|
|||
}
|
||||
|
||||
async checkIfUnlocked () {
|
||||
['trezor', 'ledger'].forEach(async device => {
|
||||
[TREZOR, LEDGER].forEach(async device => {
|
||||
const unlocked = await this.props.checkHardwareStatus(device, this.props.defaultHdPaths[device])
|
||||
if (unlocked) {
|
||||
this.setState({unlocked: true})
|
||||
|
@ -73,24 +73,20 @@ class ConnectHardwareForm extends Component {
|
|||
|
||||
onAccountChange = (account) => {
|
||||
let selectedAcc = account.toString()
|
||||
if (isLedger(this.state.device)) {
|
||||
const selectedAccounts = this.state.selectedAccounts
|
||||
if (!selectedAccounts.includes(selectedAcc)) {
|
||||
selectedAccounts.push(selectedAcc)
|
||||
} else {
|
||||
const indToRemove = selectedAccounts.indexOf(selectedAcc)
|
||||
selectedAccounts.splice(indToRemove, 1)
|
||||
selectedAcc = selectedAccounts[selectedAccounts.length - 1]
|
||||
}
|
||||
const newState = {
|
||||
selectedAccounts,
|
||||
selectedAccount: selectedAcc,
|
||||
error: null,
|
||||
}
|
||||
this.setState(newState)
|
||||
const selectedAccounts = this.state.selectedAccounts
|
||||
if (!selectedAccounts.includes(selectedAcc)) {
|
||||
selectedAccounts.push(selectedAcc)
|
||||
} else {
|
||||
this.setState({selectedAccount: account.toString(), error: null})
|
||||
const indToRemove = selectedAccounts.indexOf(selectedAcc)
|
||||
selectedAccounts.splice(indToRemove, 1)
|
||||
selectedAcc = selectedAccounts[selectedAccounts.length - 1]
|
||||
}
|
||||
const newState = {
|
||||
selectedAccounts,
|
||||
selectedAccount: selectedAcc,
|
||||
error: null,
|
||||
}
|
||||
this.setState(newState)
|
||||
}
|
||||
|
||||
onAccountRestriction = () => {
|
||||
|
@ -118,18 +114,16 @@ class ConnectHardwareForm extends Component {
|
|||
}
|
||||
|
||||
const newState = { unlocked: true, device, error: null }
|
||||
if (!isLedger(device)) {
|
||||
// Default to the first account
|
||||
if (this.state.selectedAccount === null) {
|
||||
accounts.forEach((a, i) => {
|
||||
if (a.address.toLowerCase() === this.props.address) {
|
||||
newState.selectedAccount = a.index.toString()
|
||||
}
|
||||
})
|
||||
// If the page doesn't contain the selected account, let's deselect it
|
||||
} else if (!accounts.filter(a => a.index.toString() === this.state.selectedAccount).length) {
|
||||
newState.selectedAccount = null
|
||||
}
|
||||
// Default to the first account
|
||||
if (this.state.selectedAccount === null) {
|
||||
accounts.forEach((a, i) => {
|
||||
if (a.address.toLowerCase() === this.props.address) {
|
||||
newState.selectedAccount = a.index.toString()
|
||||
}
|
||||
})
|
||||
// If the page doesn't contain the selected account, let's deselect it
|
||||
} else if (!accounts.filter(a => a.index.toString() === this.state.selectedAccount).length) {
|
||||
newState.selectedAccount = null
|
||||
}
|
||||
|
||||
// Map accounts with balances
|
||||
|
@ -169,23 +163,14 @@ class ConnectHardwareForm extends Component {
|
|||
|
||||
onUnlockAccount = (device) => {
|
||||
|
||||
if (!this.state.selectedAccount && this.state.selectedAccounts.length === 0) {
|
||||
this.setState({ error: 'You need to select an account!' })
|
||||
if (this.state.selectedAccounts.length === 0) {
|
||||
return this.setState({ error: 'You need to select an account!' })
|
||||
}
|
||||
|
||||
if (this.state.selectedAccounts.length > 0) {
|
||||
this.unlockHardwareWalletAccounts(this.state.selectedAccounts, device)
|
||||
.then(_ => {
|
||||
this.props.goHome()
|
||||
})
|
||||
} else {
|
||||
this.props.unlockHardwareWalletAccount(this.state.selectedAccount, device)
|
||||
.then(_ => {
|
||||
this.props.goHome()
|
||||
}).catch(e => {
|
||||
this.setState({ error: (e.message || e.toString()) })
|
||||
})
|
||||
}
|
||||
this.unlockHardwareWalletAccounts(this.state.selectedAccounts, device)
|
||||
.then(_ => {
|
||||
this.props.goHome()
|
||||
})
|
||||
}
|
||||
|
||||
unlockHardwareWalletAccounts = (accounts, device) => {
|
||||
|
|
|
@ -4,6 +4,10 @@ function isLedger (device) {
|
|||
return device && device.toLowerCase().includes(LEDGER)
|
||||
}
|
||||
|
||||
function isTrezor (device) {
|
||||
return device && device.toLowerCase().includes('trezor')
|
||||
}
|
||||
|
||||
function getHdPaths () {
|
||||
return [
|
||||
{
|
||||
|
@ -19,5 +23,6 @@ function getHdPaths () {
|
|||
|
||||
module.exports = {
|
||||
isLedger,
|
||||
isTrezor,
|
||||
getHdPaths,
|
||||
}
|
||||
|
|
|
@ -33,26 +33,49 @@ class SendTransactionField extends Component {
|
|||
onChange: PropTypes.func,
|
||||
}
|
||||
|
||||
generateAttributes () {
|
||||
return {
|
||||
placeholder: this.props.placeholder,
|
||||
value: this.state.val,
|
||||
disabled: this.props.disabled,
|
||||
onChange: (e) => {
|
||||
this.setState({
|
||||
val: e.target.value,
|
||||
})
|
||||
this.props.onChange(e.target.value)
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class SendTransactionTextField extends SendTransactionField {
|
||||
render () {
|
||||
return (
|
||||
<input
|
||||
type="text"
|
||||
<input type="text"
|
||||
{...this.generateAttributes()}
|
||||
className="input large-input output"
|
||||
placeholder={this.props.placeholder}
|
||||
value={this.state.val}
|
||||
disabled={this.props.disabled}
|
||||
onChange={(e) => {
|
||||
this.setState({
|
||||
val: e.target.value,
|
||||
})
|
||||
this.props.onChange(e.target.value)
|
||||
}}
|
||||
style={{ marginTop: '5px' }}
|
||||
/>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
class SendTransactionTextArea extends SendTransactionField {
|
||||
render () {
|
||||
return (
|
||||
<textarea
|
||||
{...this.generateAttributes()}
|
||||
style={{
|
||||
marginTop: '5px',
|
||||
width: '100%',
|
||||
height: '50px',
|
||||
padding: '10px',
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
class SendTransactionInputSelect extends Component {
|
||||
constructor (props) {
|
||||
super(props)
|
||||
|
@ -219,24 +242,27 @@ class SendTransactionScreen extends PersistentForm {
|
|||
}
|
||||
}
|
||||
let field
|
||||
const allTypesProps = {
|
||||
ind,
|
||||
defaultValue,
|
||||
disabled: !isInput,
|
||||
onChange: val => isInput ? this.handleInputChange(val, params.type, ind) : null,
|
||||
}
|
||||
const textTypeProps = {
|
||||
key: Math.random(),
|
||||
placeholder: params.type,
|
||||
}
|
||||
if (params.type === 'bool' && isInput) {
|
||||
field = (
|
||||
<SendTransactionInputSelect
|
||||
ind={ind}
|
||||
defaultValue={defaultValue}
|
||||
onChange={val => this.handleInputChange(val, params.type, ind)}
|
||||
/>
|
||||
<SendTransactionInputSelect {...allTypesProps} />
|
||||
)
|
||||
} else if (params.type.includes('[]') && !isInput) {
|
||||
field = (
|
||||
<SendTransactionTextArea {...allTypesProps} {...textTypeProps} />
|
||||
)
|
||||
} else {
|
||||
field = (
|
||||
<SendTransactionField
|
||||
key={Math.random()}
|
||||
ind={ind}
|
||||
disabled={!isInput}
|
||||
placeholder={params.type}
|
||||
defaultValue={defaultValue}
|
||||
onChange={val => isInput ? this.handleInputChange(val, params.type, ind) : null}
|
||||
/>
|
||||
<SendTransactionTextField {...allTypesProps} {...textTypeProps} />
|
||||
)
|
||||
}
|
||||
const fieldObj = (
|
||||
|
|
|
@ -10945,15 +10945,15 @@
|
|||
}
|
||||
},
|
||||
"eth-trezor-keyring": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/eth-trezor-keyring/-/eth-trezor-keyring-0.1.0.tgz",
|
||||
"integrity": "sha512-7ynDXiXGQOh9CslksJSmGGK726lV9fTnIp2QQnjbZJgR4zJIoSUYQYKvT2wXcxLhVrTUl2hLjwKN9QGqDCMVwA==",
|
||||
"version": "github:vbaranov/eth-trezor-keyring#3035d294d2bfce381331d148fb23e72877011003",
|
||||
"from": "github:vbaranov/eth-trezor-keyring#0.2.0-multiple-accounts",
|
||||
"requires": {
|
||||
"eth-sig-util": "^1.4.2",
|
||||
"ethereumjs-tx": "^1.3.4",
|
||||
"ethereumjs-util": "^5.1.5",
|
||||
"events": "^2.0.0",
|
||||
"hdkey": "0.8.0"
|
||||
"hdkey": "0.8.0",
|
||||
"trezor-connect": "^6.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"eth-sig-util": {
|
||||
|
@ -10963,16 +10963,6 @@
|
|||
"requires": {
|
||||
"ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#2863c40e0982acfc0b7163f0285d4c56427c7799",
|
||||
"ethereumjs-util": "^5.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-abi": {
|
||||
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#2863c40e0982acfc0b7163f0285d4c56427c7799",
|
||||
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git",
|
||||
"requires": {
|
||||
"bn.js": "^4.10.0",
|
||||
"ethereumjs-util": "^5.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ethereum-common": {
|
||||
|
@ -15004,8 +14994,7 @@
|
|||
"bindings": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.0.tgz",
|
||||
"integrity": "sha512-DpLh5EzMR2kzvX1KIlVC0VkC3iZtHKTgdtZ0a3pglBZdaQFjt5S9g9xd1lE+YvXyfd6mtCeRnrUfOLYiTMlNSw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-DpLh5EzMR2kzvX1KIlVC0VkC3iZtHKTgdtZ0a3pglBZdaQFjt5S9g9xd1lE+YvXyfd6mtCeRnrUfOLYiTMlNSw=="
|
||||
},
|
||||
"bip39": {
|
||||
"version": "2.5.0",
|
||||
|
@ -15024,7 +15013,6 @@
|
|||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz",
|
||||
"integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.0.1"
|
||||
}
|
||||
|
@ -15059,8 +15047,7 @@
|
|||
"bn.js": {
|
||||
"version": "4.11.8",
|
||||
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
|
||||
"integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA=="
|
||||
},
|
||||
"body-parser": {
|
||||
"version": "1.18.3",
|
||||
|
@ -15103,14 +15090,12 @@
|
|||
"brorand": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
|
||||
"integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=",
|
||||
"dev": true
|
||||
"integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8="
|
||||
},
|
||||
"browserify-aes": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
|
||||
"integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-xor": "^1.0.3",
|
||||
"cipher-base": "^1.0.0",
|
||||
|
@ -15267,8 +15252,7 @@
|
|||
"buffer-xor": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
|
||||
"integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=",
|
||||
"dev": true
|
||||
"integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk="
|
||||
},
|
||||
"builtin-modules": {
|
||||
"version": "1.1.1",
|
||||
|
@ -15366,7 +15350,6 @@
|
|||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
|
||||
"integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"inherits": "^2.0.1",
|
||||
"safe-buffer": "^5.0.1"
|
||||
|
@ -15526,7 +15509,6 @@
|
|||
"version": "1.2.0",
|
||||
"resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
|
||||
"integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cipher-base": "^1.0.1",
|
||||
"inherits": "^2.0.1",
|
||||
|
@ -15539,7 +15521,6 @@
|
|||
"version": "1.1.7",
|
||||
"resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
|
||||
"integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cipher-base": "^1.0.3",
|
||||
"create-hash": "^1.1.0",
|
||||
|
@ -15839,7 +15820,6 @@
|
|||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz",
|
||||
"integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"browserify-aes": "^1.0.6",
|
||||
"create-hash": "^1.1.2",
|
||||
|
@ -15878,7 +15858,6 @@
|
|||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz",
|
||||
"integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bn.js": "^4.4.0",
|
||||
"brorand": "^1.0.1",
|
||||
|
@ -16171,6 +16150,17 @@
|
|||
"requires": {
|
||||
"ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#d84a96796079c8595a0c78accd1e7709f2277215",
|
||||
"ethereumjs-util": "^5.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-abi": {
|
||||
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#2863c40e0982acfc0b7163f0285d4c56427c7799",
|
||||
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bn.js": "^4.10.0",
|
||||
"ethereumjs-util": "^5.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ethereum-common": {
|
||||
|
@ -16182,7 +16172,6 @@
|
|||
"ethereumjs-abi": {
|
||||
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#d84a96796079c8595a0c78accd1e7709f2277215",
|
||||
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bn.js": "^4.10.0",
|
||||
"ethereumjs-util": "^5.0.0"
|
||||
|
@ -16377,7 +16366,6 @@
|
|||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz",
|
||||
"integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bn.js": "^4.11.0",
|
||||
"create-hash": "^1.1.2",
|
||||
|
@ -16467,7 +16455,6 @@
|
|||
"version": "0.1.6",
|
||||
"resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz",
|
||||
"integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-hex-prefixed": "1.0.0",
|
||||
"strip-hex-prefix": "1.0.0"
|
||||
|
@ -16489,7 +16476,6 @@
|
|||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
|
||||
"integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"md5.js": "^1.3.4",
|
||||
"safe-buffer": "^5.1.1"
|
||||
|
@ -16900,7 +16886,6 @@
|
|||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz",
|
||||
"integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"inherits": "^2.0.1",
|
||||
"safe-buffer": "^5.0.1"
|
||||
|
@ -16910,7 +16895,6 @@
|
|||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz",
|
||||
"integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"inherits": "^2.0.3",
|
||||
"minimalistic-assert": "^1.0.1"
|
||||
|
@ -16938,7 +16922,6 @@
|
|||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
|
||||
"integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"hash.js": "^1.0.3",
|
||||
"minimalistic-assert": "^1.0.0",
|
||||
|
@ -17106,8 +17089,7 @@
|
|||
"is-hex-prefixed": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz",
|
||||
"integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=",
|
||||
"dev": true
|
||||
"integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ="
|
||||
},
|
||||
"is-natural-number": {
|
||||
"version": "4.0.1",
|
||||
|
@ -17308,7 +17290,6 @@
|
|||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz",
|
||||
"integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bindings": "^1.2.1",
|
||||
"inherits": "^2.0.3",
|
||||
|
@ -17608,7 +17589,6 @@
|
|||
"version": "1.3.5",
|
||||
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
|
||||
"integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"hash-base": "^3.0.0",
|
||||
"inherits": "^2.0.1",
|
||||
|
@ -17768,14 +17748,12 @@
|
|||
"minimalistic-assert": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
|
||||
"integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
|
||||
"dev": true
|
||||
"integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A=="
|
||||
},
|
||||
"minimalistic-crypto-utils": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
|
||||
"integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=",
|
||||
"dev": true
|
||||
"integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo="
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
|
@ -17845,8 +17823,7 @@
|
|||
"nan": {
|
||||
"version": "2.10.0",
|
||||
"resolved": "http://registry.npmjs.org/nan/-/nan-2.10.0.tgz",
|
||||
"integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA=="
|
||||
},
|
||||
"nano-json-stream-parser": {
|
||||
"version": "0.1.2",
|
||||
|
@ -18513,7 +18490,6 @@
|
|||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
|
||||
"integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"hash-base": "^3.0.0",
|
||||
"inherits": "^2.0.1"
|
||||
|
@ -18523,7 +18499,6 @@
|
|||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/rlp/-/rlp-2.1.0.tgz",
|
||||
"integrity": "sha512-93U7IKH5j7nmXFVg19MeNBGzQW5uXW1pmCuKY8veeKIhYTE32C2d0mOegfiIAfXcHOKJjjPlJisn8iHDF5AezA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.1"
|
||||
}
|
||||
|
@ -18537,8 +18512,7 @@
|
|||
"safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
||||
"dev": true
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||
},
|
||||
"safe-event-emitter": {
|
||||
"version": "1.0.1",
|
||||
|
@ -18590,7 +18564,6 @@
|
|||
"version": "3.5.2",
|
||||
"resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.5.2.tgz",
|
||||
"integrity": "sha512-iin3kojdybY6NArd+UFsoTuapOF7bnJNf2UbcWXaY3z+E1sJDipl60vtzB5hbO/uquBu7z0fd4VC4Irp+xoFVQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bindings": "^1.2.1",
|
||||
"bip66": "^1.1.3",
|
||||
|
@ -18722,7 +18695,6 @@
|
|||
"version": "2.4.11",
|
||||
"resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
|
||||
"integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"inherits": "^2.0.1",
|
||||
"safe-buffer": "^5.0.1"
|
||||
|
@ -18933,7 +18905,6 @@
|
|||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz",
|
||||
"integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-hex-prefixed": "1.0.0"
|
||||
}
|
||||
|
@ -19622,12 +19593,22 @@
|
|||
"requires": {
|
||||
"ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#d84a96796079c8595a0c78accd1e7709f2277215",
|
||||
"ethereumjs-util": "^5.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-abi": {
|
||||
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#2863c40e0982acfc0b7163f0285d4c56427c7799",
|
||||
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bn.js": "^4.10.0",
|
||||
"ethereumjs-util": "^5.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ethereumjs-abi": {
|
||||
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#d84a96796079c8595a0c78accd1e7709f2277215",
|
||||
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bn.js": "^4.10.0",
|
||||
"ethereumjs-util": "^5.0.0"
|
||||
|
@ -38148,6 +38129,23 @@
|
|||
"resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz",
|
||||
"integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A=="
|
||||
},
|
||||
"trezor-connect": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmjs.org/trezor-connect/-/trezor-connect-6.0.3.tgz",
|
||||
"integrity": "sha512-QqgnulN9uQstVjxYTF9+gcNk01kBUQA4xXy2abyPOgxh8Wio9iiSGftQa12KkFfWLZKkZD1sL03KvQ2ievL05g==",
|
||||
"requires": {
|
||||
"babel-runtime": "^6.26.0",
|
||||
"events": "^1.1.1",
|
||||
"whatwg-fetch": "^2.0.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"whatwg-fetch": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz",
|
||||
"integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"trim": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz",
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
"eth-query": "^2.1.2",
|
||||
"eth-sig-util": "^2.0.2",
|
||||
"eth-token-watcher": "^1.1.6",
|
||||
"eth-trezor-keyring": "^0.1.0",
|
||||
"eth-trezor-keyring": "github:vbaranov/eth-trezor-keyring#0.2.0-multiple-accounts",
|
||||
"ethereumjs-abi": "^0.6.4",
|
||||
"ethereumjs-tx": "^1.3.0",
|
||||
"ethereumjs-util": "github:ethereumjs/ethereumjs-util#ac5d0908536b447083ea422b435da27f26615de9",
|
||||
|
|
|
@ -71,8 +71,15 @@ const connectHDWallet = async (f) => {
|
|||
await images[1].click()
|
||||
const button = await f.waitUntilShowUp(screens.hdWallet.buttonConnect.enabled)
|
||||
await button.click()
|
||||
await f.delay(2000)
|
||||
const allHandles = await f.driver.getAllWindowHandles()
|
||||
assert.equal(allHandles.length, 2, "popup isn't opened")
|
||||
driver.switchTo().window(allHandles[1])
|
||||
await f.delay(2000)
|
||||
driver.close()
|
||||
driver.switchTo().window(allHandles[0])
|
||||
await f.delay(2000)
|
||||
assert.equal(allHandles.length, 2, "popup isn't opened")
|
||||
await f.switchToFirstPage()
|
||||
await f.driver.navigate().refresh()
|
||||
})
|
||||
|
|
|
@ -352,7 +352,7 @@ describe('MetaMaskController', function () {
|
|||
})
|
||||
})
|
||||
|
||||
describe('unlockHardwareWalletAccount', function () {
|
||||
describe.skip('unlockHardwareWalletAccount', function () {
|
||||
let accountToUnlock
|
||||
let windowOpenStub
|
||||
let addNewAccountStub
|
||||
|
@ -377,6 +377,7 @@ describe('MetaMaskController', function () {
|
|||
sinon.spy(metamaskController.preferencesController, 'setSelectedAddress')
|
||||
sinon.spy(metamaskController.preferencesController, 'setAccountLabel')
|
||||
await metamaskController.connectHardware('trezor', 0, `m/44/0'/0'`).catch((e) => null)
|
||||
|
||||
await metamaskController.unlockHardwareWalletAccount(accountToUnlock, 'trezor', `m/44/0'/0'`)
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue