safe-react/patches/web3-eth+1.2.11.patch
Agustin Pane 3f6a8ee3f8
(Feature) - EWC/Volta ENS support on web3 patch (#1596)
* Adds patch-package and postinstall

* Creates a patch to add EWC and Volta in web3-eth and web3-eth-ens

* Adds support for ewc in isValidEnsName

* Update web3 ewc patch

* Enables ens lookup for ewc and volta

* Fix eslint

* Update patch
Fix patch-package script in package.json

Co-authored-by: Fernando <fernando.greco@gmail.com>
Co-authored-by: nicolas <nicosampler@users.noreply.github.com>
Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
2020-11-18 14:42:00 -03:00

20 lines
862 B
Diff

diff --git a/node_modules/web3-eth/src/getNetworkType.js b/node_modules/web3-eth/src/getNetworkType.js
index 3be3a20..88edbd9 100644
--- a/node_modules/web3-eth/src/getNetworkType.js
+++ b/node_modules/web3-eth/src/getNetworkType.js
@@ -63,6 +63,14 @@ var getNetworkType = function (callback) {
id === 42) {
returnValue = 'kovan';
}
+ if (genesis.hash === '0x0b6d3e680af2fc525392c720666cce58e3d8e6fe75ba4b48cb36bcc69039229b' &&
+ id === 246) {
+ returnValue = 'energyWebChain';
+ }
+ if (genesis.hash === '0xebd8b413ca7b7f84a8dd20d17519ce2b01954c74d94a0a739a3e416abe0e43e5' &&
+ id === 73799) {
+ returnValue = 'volta';
+ }
if (_.isFunction(callback)) {
callback(null, returnValue);