Skip to content

Commit

Permalink
Merge pull request #305 from torusresearch/develop
Browse files Browse the repository at this point in the history
Release v1.9.13
  • Loading branch information
chaitanyapotti authored Mar 22, 2021
2 parents fab81d4 + 157f00e commit 6064390
Show file tree
Hide file tree
Showing 7 changed files with 385 additions and 362 deletions.
198 changes: 99 additions & 99 deletions examples/vue-app/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/vue-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@toruslabs/torus-embed": "file:../../toruslabs-torus-embed-1.9.9.tgz",
"@toruslabs/torus-embed": "file:../../toruslabs-torus-embed-1.9.12.tgz",
"core-js": "^3.8.2",
"eth-sig-util": "^3.0.0",
"ethers": "^5.0.25",
Expand Down
5 changes: 5 additions & 0 deletions examples/vue-app/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ export default {
network: {
host: this.chainIdNetworkMap[this.chainId], // mandatory
chainId: this.chainId,
// chainId: 336,
// networkName: 'DES Network',
// host: 'https://quorum.block360.io/https',
// ticker: 'DES',
// tickerName: 'DES Coin',
},
showTorusButton: true,
// integrity: {
Expand Down
501 changes: 251 additions & 250 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@toruslabs/torus.js": "^2.3.0",
"create-hash": "^1.2.0",
"deepmerge": "^4.2.2",
"eth-rpc-errors": "^4.0.2",
"eth-rpc-errors": "^4.0.3",
"fast-deep-equal": "^3.1.3",
"is-stream": "^2.0.0",
"json-rpc-engine": "^6.1.0",
Expand All @@ -46,33 +46,33 @@
"safe-event-emitter": "^1.0.1"
},
"devDependencies": {
"@babel/cli": "^7.13.0",
"@babel/core": "^7.13.1",
"@babel/cli": "^7.13.10",
"@babel/core": "^7.13.10",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-object-rest-spread": "^7.13.0",
"@babel/plugin-transform-runtime": "^7.13.7",
"@babel/preset-env": "^7.13.5",
"@babel/runtime-corejs3": "^7.13.7",
"@babel/plugin-proposal-object-rest-spread": "^7.13.8",
"@babel/plugin-transform-runtime": "^7.13.10",
"@babel/preset-env": "^7.13.10",
"@babel/runtime-corejs3": "^7.13.10",
"assert": "^2.0.0",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.2.2",
"cross-env": "^7.0.3",
"eslint": "^7.20.0",
"eslint": "^7.22.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^8.1.0",
"eslint-config-standard": "^16.0.2",
"eslint-loader": "^4.0.2",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-mocha": "^8.0.0",
"eslint-plugin-mocha": "^8.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-simple-import-sort": "^7.0.0",
"express": "^4.17.1",
"husky": "^4.3.8",
"lint-staged": "^10.5.4",
"mocha": "^8.3.0",
"mocha": "^8.3.2",
"parallel-webpack": "^2.6.0",
"prettier": "^2.2.1",
"puppeteer": "^5.5.0",
Expand Down
9 changes: 7 additions & 2 deletions src/embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ class Torus {
host: 'mainnet',
chainId: null,
networkName: '',
blockExplorer: '',
ticker: '',
tickerName: '',
},
loginConfig = {},
showTorusButton = true,
Expand Down Expand Up @@ -600,7 +603,7 @@ class Torus {
}
}

setProvider({ host = 'mainnet', chainId = null, networkName = '' } = {}) {
setProvider({ host = 'mainnet', chainId = null, networkName = '', ...rest } = {}) {
return new Promise((resolve, reject) => {
const providerChangeStream = this.communicationMux.getStream('provider_change')
const handler = (chunk) => {
Expand All @@ -625,6 +628,7 @@ class Torus {
host,
chainId,
networkName,
...rest,
},
type: configuration.networkList.includes(host) ? undefined : 'rpc',
preopenInstanceId,
Expand All @@ -635,7 +639,7 @@ class Torus {
}

/** @ignore */
_setProvider({ host = 'mainnet', chainId = null, networkName = '' } = {}) {
_setProvider({ host = 'mainnet', chainId = null, networkName = '', ...rest } = {}) {
return new Promise((resolve, reject) => {
if (!this.isInitalized) {
const providerChangeStream = this.communicationMux.getStream('provider_change')
Expand All @@ -656,6 +660,7 @@ class Torus {
host,
chainId,
networkName,
...rest,
},
type: configuration.networkList.includes(host) ? undefined : 'rpc',
override: true,
Expand Down
12 changes: 12 additions & 0 deletions types/embed.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,18 @@ interface NetworkInterface {
* Name of the network
*/
networkName?: string
/**
* Url of the block explorer
*/
blockExplorer?: string,
/**
* Default currency ticker of the network (e.g: BNB)
*/
ticker?: string,
/**
* Name for currency ticker (e.g: `Binance Coin`)
*/
tickerName?: string,
}

interface JsonRPCResponse {
Expand Down

0 comments on commit 6064390

Please sign in to comment.