Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

Web3 update 1.0.0-beta35 -> 1.2.0 #238

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
declare module drizzle {
export class Drizzle {
constructor(options: any, store: any);
constructor(options: any, store?: any);

addContract(contractConfig: any, ...args: any[]): void;
addContract(contractConfig: any, events?: any[]): void;

deleteContract(contractName: any): void;
deleteContract(contractName: string): void;

findContractByAddress(address: any): any;

Expand Down
5,772 changes: 2,932 additions & 2,840 deletions package-lock.json

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,30 @@
},
"license": "ISC",
"dependencies": {
"@babel/runtime": "^7.4.4",
"deepmerge": "^3.2.0",
"@babel/runtime": "^7.5.5",
"deepmerge": "^4.0.0",
"eth-block-tracker-es5": "^2.3.2",
"is-plain-object": "^2.0.4",
"redux": "^4.0.1",
"redux-saga": "^0.16.0",
"web3": "1.0.0-beta.35"
"redux": "^4.0.4",
"redux-saga": "^1.0.5",
"web3": "^1.2.0"
},
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/plugin-proposal-object-rest-spread": "^7.4.4",
"@babel/core": "^7.5.5",
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
"@babel/plugin-transform-arrow-functions": "^7.2.0",
"@babel/plugin-transform-runtime": "^7.4.4",
"@babel/preset-env": "^7.4.4",
"babel-loader": "^8.0.5",
"eslint": "^5.16.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-jest": "^22.5.1",
"ganache-core": "^2.5.5",
"jest": "^24.7.1",
"@babel/plugin-transform-runtime": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"babel-loader": "^8.0.6",
"eslint": "^6.1.0",
"eslint-config-standard": "^13.0.1",
"eslint-plugin-jest": "^22.14.0",
"ganache-core": "^2.6.0",
"jest": "^24.8.0",
"prettier-standard": "^9.1.1",
"standard": "^12.0.1",
"webpack": "^4.30.0",
"webpack-cli": "^3.3.1",
"standard": "^13.1.0",
"webpack": "^4.38.0",
"webpack-cli": "^3.3.6",
"webpack-merge": "^4.2.1",
"redux-mock-store": "^1.5.3"
}
Expand Down
4 changes: 2 additions & 2 deletions src/contracts/contractsSaga.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function * callSendContractTx ({
var finalArgTest = false

if (typeof finalArg === 'object') {
var finalArgTest = yield call(isSendOrCallOptions, finalArg)
finalArgTest = yield call(isSendOrCallOptions, finalArg)
}

if (finalArgTest) {
Expand Down Expand Up @@ -169,7 +169,7 @@ function * callCallContractFn ({
var finalArgTest = false

if (typeof finalArg === 'object') {
var finalArgTest = yield call(isSendOrCallOptions, finalArg)
finalArgTest = yield call(isSendOrCallOptions, finalArg)
}

if (finalArgTest) {
Expand Down
2 changes: 1 addition & 1 deletion src/drizzleStatus/drizzleStatusSaga.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { call, put, select, takeLatest } from 'redux-saga/effects'
import { call, put, takeLatest } from 'redux-saga/effects'

// Initialization Functions
import { initializeWeb3, getNetworkId } from '../web3/web3Saga'
Expand Down
1 change: 1 addition & 0 deletions src/web3/constants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export const WEB3_INITIALIZING = 'WEB3_INITIALIZING'
export const WEB3_INITIALIZED = 'WEB3_INITIALIZED'
export const WEB3_FAILED = 'WEB3_FAILED'
export const WEB3_ERROR = 'WEB3_ERROR'
export const WEB3_USER_DENIED = 'WEB3_USER_DENIED'

export const NETWORK_ID_FETCHED = 'NETWORK_ID_FETCHED'
Expand Down
3 changes: 1 addition & 2 deletions src/web3/web3Saga.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { call, put } from 'redux-saga/effects'
import * as Action from './constants'

var Web3 = require('web3')
import Web3 from 'web3'

/*
* Initialization
Expand Down
6 changes: 3 additions & 3 deletions test/web3.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe('Resolving Web3', () => {
const result = await runSaga({
dispatch: (action) => dispatched.push(action),
getState: () => ({ state: 'test' })
}, initializeWeb3, { options: {} }).done
}, initializeWeb3, { options: {} }).toPromise()

// result should be a proper web3 provider
expect(result).toBeInstanceOf(require('web3'))
Expand All @@ -94,7 +94,7 @@ describe('Resolving Web3', () => {
},
initializeWeb3,
{ options: {} }
).done
).toPromise()

// saga result should be undefined if an exception occurs
expect(web3Result).toBe(undefined)
Expand All @@ -113,7 +113,7 @@ describe('Resolving Web3', () => {
const result = await runSaga({
dispatch: (action) => dispatched.push(action),
getState: () => ({ state: 'test' })
}, initializeWeb3, { options: {} }).done
}, initializeWeb3, { options: {} }).toPromise()

// saga result is undefined when exception is thrown
expect(result).toBe(undefined)
Expand Down