Merge pull request #426 from poanetwork/update-inpage-provider
Update inpage provider: add ethereum.request method support
This commit is contained in:
commit
8ee6c6bfcc
|
@ -2,6 +2,8 @@
|
|||
|
||||
## Current Master
|
||||
|
||||
- [#426](https://github.com/poanetwork/nifty-wallet/pull/426) - Update inpage provider: add ethereum.request method support
|
||||
|
||||
## 5.1.6 Tue Oct 27 2020
|
||||
|
||||
- [#419](https://github.com/poanetwork/nifty-wallet/pull/419) - Add 10% margin for gas price in case of RSK chains
|
||||
|
|
|
@ -6,7 +6,7 @@ import { CapabilitiesController as RpcCap } from 'rpc-cap'
|
|||
import { ethErrors } from 'eth-json-rpc-errors'
|
||||
import { cloneDeep } from 'lodash'
|
||||
|
||||
import createMethodMiddleware from './methodMiddleware'
|
||||
import createMethodMiddleware from './permissionsMethodMiddleware'
|
||||
import PermissionsLogController from './permissionsLog'
|
||||
|
||||
// Methods that do not require any permissions to use:
|
||||
|
@ -102,11 +102,14 @@ export class PermissionsController {
|
|||
*/
|
||||
getAccounts (origin) {
|
||||
// return new Promise((resolve, _) => {
|
||||
|
||||
// const req = { method: 'eth_accounts' }
|
||||
// const res = {}
|
||||
// this.permissions.providerMiddlewareFunction(
|
||||
// { origin }, req, res, () => {}, _end
|
||||
// { origin },
|
||||
// req,
|
||||
// res,
|
||||
// () => undefined,
|
||||
// _end,
|
||||
// )
|
||||
|
||||
// function _end () {
|
||||
|
|
|
@ -39,8 +39,6 @@ import MetamaskInpageProvider from 'nifty-wallet-inpage-provider'
|
|||
// TODO:deprecate:Q1-2020
|
||||
import 'web3/dist/web3.min.js'
|
||||
|
||||
import setupDappAutoReload from './lib/auto-reload.js'
|
||||
|
||||
restoreContextAfterImports()
|
||||
|
||||
log.setDefaultLevel(process.env.METAMASK_DEBUG ? 'debug' : 'warn')
|
||||
|
@ -83,8 +81,6 @@ log.debug('Nifty Wallet - injected web3')
|
|||
|
||||
proxiedInpageProvider._web3Ref = web3.eth
|
||||
|
||||
setupDappAutoReload(web3, inpageProvider.publicConfigStore)
|
||||
|
||||
//
|
||||
// end deprecate:Q1-2020
|
||||
//
|
||||
|
|
|
@ -2167,9 +2167,9 @@
|
|||
}
|
||||
},
|
||||
"@rsksmart/rsk-contract-metadata": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@rsksmart/rsk-contract-metadata/-/rsk-contract-metadata-1.0.2.tgz",
|
||||
"integrity": "sha512-rlS9hEJit9g/ytdIoprKR/OYYX9P1pVIy0FPU3m1CqghaR9JvoTJFGUvqEA8AIqemLdrZbYRc22BB8Yw+ifSfA=="
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@rsksmart/rsk-contract-metadata/-/rsk-contract-metadata-1.0.3.tgz",
|
||||
"integrity": "sha512-eKJlOvs7VYGqCDdMP4KxXB8+132+DyXfQ6K6AhL+BvM022ot8IQFzqPjPCUIp4IxLzwJ1qgN6iTmLMRg9eTY6A=="
|
||||
},
|
||||
"@rsksmart/rsk-testnet-contract-metadata": {
|
||||
"version": "1.0.2",
|
||||
|
@ -11356,9 +11356,9 @@
|
|||
}
|
||||
},
|
||||
"eth-contract-metadata": {
|
||||
"version": "1.13.0",
|
||||
"resolved": "https://registry.npmjs.org/eth-contract-metadata/-/eth-contract-metadata-1.13.0.tgz",
|
||||
"integrity": "sha512-9CjXHX8IdXysUEvOHdbCsjdAwM1E98jaeK2HeOqm/9S/vOZ8YryaBBt/YSiBq3MkpCwf+d1pEQ53p96rsdy52w=="
|
||||
"version": "1.17.0",
|
||||
"resolved": "https://registry.npmjs.org/eth-contract-metadata/-/eth-contract-metadata-1.17.0.tgz",
|
||||
"integrity": "sha512-vlw4OiW3+9J3kJfEtPCyiSW9fhdWTqrAhXcvdMY2CevGxbhvOd5Lz59DeWerSTV3IoSXttghDurPA76dAeTV+A=="
|
||||
},
|
||||
"eth-ens-namehash": {
|
||||
"version": "2.0.8",
|
||||
|
@ -16819,15 +16819,7 @@
|
|||
"requires": {
|
||||
"eth-json-rpc-middleware": "^4.4.0",
|
||||
"eth-rpc-errors": "^3.0.0",
|
||||
"json-rpc-engine": "^5.1.3",
|
||||
"node-fetch": "^2.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"node-fetch": {
|
||||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
||||
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
|
||||
}
|
||||
"json-rpc-engine": "^5.1.3"
|
||||
}
|
||||
},
|
||||
"eth-json-rpc-middleware": {
|
||||
|
@ -39656,18 +39648,47 @@
|
|||
"dev": true
|
||||
},
|
||||
"nifty-wallet-inpage-provider": {
|
||||
"version": "github:poanetwork/nifty-wallet-inpage-provider#3555f24d10ab7a5ba3bfbb2c0f6ff0eb8895e05c",
|
||||
"from": "github:poanetwork/nifty-wallet-inpage-provider#1.5.1",
|
||||
"version": "github:poanetwork/nifty-wallet-inpage-provider#a12fc40aaf98e8ed20cf587177b363d0fa95ae03",
|
||||
"from": "github:poanetwork/nifty-wallet-inpage-provider#2.0.0",
|
||||
"requires": {
|
||||
"eth-json-rpc-errors": "^2.0.2",
|
||||
"eth-rpc-errors": "^2.1.1",
|
||||
"fast-deep-equal": "^2.0.1",
|
||||
"json-rpc-engine": "^5.1.5",
|
||||
"json-rpc-engine": "^5.2.0",
|
||||
"json-rpc-middleware-stream": "^2.1.1",
|
||||
"loglevel": "^1.6.1",
|
||||
"obj-multiplex": "^1.0.0",
|
||||
"obs-store": "^4.0.3",
|
||||
"pump": "^3.0.0",
|
||||
"safe-event-emitter": "^1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"eth-rpc-errors": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/eth-rpc-errors/-/eth-rpc-errors-2.1.1.tgz",
|
||||
"integrity": "sha512-MY3zAa5ZF8hvgQu1HOF9agaK5GgigBRGpTJ8H0oVlE0NqMu13CW6syyjLXdeIDCGQTbUeHliU1z9dVmvMKx1Tg==",
|
||||
"requires": {
|
||||
"fast-safe-stringify": "^2.0.6"
|
||||
}
|
||||
},
|
||||
"json-rpc-engine": {
|
||||
"version": "5.4.0",
|
||||
"resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-5.4.0.tgz",
|
||||
"integrity": "sha512-rAffKbPoNDjuRnXkecTjnsE3xLLrb00rEkdgalINhaYVYIxDwWtvYBr9UFbhTvPB1B2qUOLoFd/cV6f4Q7mh7g==",
|
||||
"requires": {
|
||||
"eth-rpc-errors": "^3.0.0",
|
||||
"safe-event-emitter": "^1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"eth-rpc-errors": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eth-rpc-errors/-/eth-rpc-errors-3.0.0.tgz",
|
||||
"integrity": "sha512-iPPNHPrLwUlR9xCSYm7HHQjWBasor3+KZfRvwEWxMz3ca0yqnlBeJrnyphkGIXZ4J7AMAaOLmwy4AWhnxOiLxg==",
|
||||
"requires": {
|
||||
"fast-safe-stringify": "^2.0.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"nise": {
|
||||
|
|
|
@ -86,8 +86,8 @@
|
|||
"@babel/runtime": "^7.5.5",
|
||||
"@material-ui/core": "^4.1.1",
|
||||
"@rsksmart/rns-registry": "^1.0.4",
|
||||
"@rsksmart/rsk-contract-metadata": "^1.0.2",
|
||||
"@rsksmart/rsk-testnet-contract-metadata": "^1.0.1",
|
||||
"@rsksmart/rsk-contract-metadata": "^1.0.3",
|
||||
"@rsksmart/rsk-testnet-contract-metadata": "^1.0.2",
|
||||
"@zxing/library": "^0.8.0",
|
||||
"abi-decoder": "^1.2.0",
|
||||
"asmcrypto.js": "0.22.0",
|
||||
|
@ -112,7 +112,7 @@
|
|||
"dnode": "^1.2.2",
|
||||
"end-of-stream": "^1.4.4",
|
||||
"eth-block-tracker": "^4.4.2",
|
||||
"eth-contract-metadata": "^1.13.0",
|
||||
"eth-contract-metadata": "^1.17.0",
|
||||
"eth-ens-namehash": "^2.0.8",
|
||||
"eth-json-rpc-errors": "^2.0.2",
|
||||
"eth-json-rpc-filters": "github:poanetwork/eth-json-rpc-filters#3.0.2",
|
||||
|
@ -160,7 +160,7 @@
|
|||
"mkdirp": "^0.5.5",
|
||||
"multihashes": "^0.4.12",
|
||||
"nanoid": "^2.1.6",
|
||||
"nifty-wallet-inpage-provider": "github:poanetwork/nifty-wallet-inpage-provider#1.5.1",
|
||||
"nifty-wallet-inpage-provider": "github:poanetwork/nifty-wallet-inpage-provider#2.0.0",
|
||||
"nonce-tracker": "^1.0.0",
|
||||
"number-to-bn": "^1.7.0",
|
||||
"obj-multiplex": "^1.0.0",
|
||||
|
|
Loading…
Reference in New Issue