1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

fix web3 version + use truffle-hdwallet

This commit is contained in:
Jernej Pregelj 2019-06-17 16:27:57 +02:00
parent d8f4ebe7b4
commit d364a7beef
3 changed files with 2136 additions and 2605 deletions

View File

@ -1,19 +1,20 @@
/// <reference types="Cypress" /> /// <reference types="Cypress" />
import Web3 from 'web3' import Web3 from 'web3'
import PrivateKeyProvider from 'truffle-privatekey-provider' import HDWalletProvider from 'truffle-hdwallet-provider'
context('Consume', () => { context('Consume', () => {
beforeEach(() => { beforeEach(() => {
cy.on('window:before:load', win => { cy.on('window:before:load', win => {
const provider = new PrivateKeyProvider( const provider = new HDWalletProvider(
'd631de5b7e9cf451135896c833187c8b4dc230bf47756a9a2ca4ffccc161175e', 'taxi music thumb unique chat sand crew more leg another off lamp',
'http://localhost:8545' 'https://nile.dev-ocean.com'
) )
win.web3 = new Web3(provider) win.web3 = new Web3(provider)
win.ethereum = win.web3
}) })
cy.visit( cy.visit(
'http://localhost:3000/asset/did:op:52f2ed716f97463e97beeb414195a075b606675874204e3da39b0c237377dbd3' 'http://localhost:3000/asset/did:op:48870c70dac448949634c41817c8017dc558ce59ad774002996e9811b97a36d5'
) )
// wait for the asset details to have loaded // wait for the asset details to have loaded
cy.get('button', { timeout: 10000 }).should('have.length', 1) cy.get('button', { timeout: 10000 }).should('have.length', 1)

4721
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -24,7 +24,10 @@
"cypress:run": "cypress run", "cypress:run": "cypress run",
"cypress:open": "cypress open" "cypress:open": "cypress open"
}, },
"dependencies": {}, "dependencies": {
"web3": "1.0.0-beta.37",
"truffle-hdwallet-provider": "^1.0.10"
},
"devDependencies": { "devDependencies": {
"@release-it/bumper": "^1.0.2", "@release-it/bumper": "^1.0.2",
"@typescript-eslint/eslint-plugin": "^1.7.0", "@typescript-eslint/eslint-plugin": "^1.7.0",
@ -45,9 +48,7 @@
"stylelint-config-bigchaindb": "^1.2.2", "stylelint-config-bigchaindb": "^1.2.2",
"stylelint-config-css-modules": "^1.4.0", "stylelint-config-css-modules": "^1.4.0",
"stylelint-config-standard": "^18.3.0", "stylelint-config-standard": "^18.3.0",
"truffle-privatekey-provider": "^1.1.0", "typescript": "3.4.5"
"typescript": "3.4.5",
"web3": "^1.0.0-beta.55"
}, },
"repository": { "repository": {
"type": "git", "type": "git",