| 4 | global.web3, global.Issuer, global.defaultGasPrice, global.remoteNetwork; |
| 5 | |
| 6 | function getGasPrice(networkId) { |
| 7 | let gasPrice; |
| 8 | switch (networkId) { |
| 9 | case 1: //Mainnet |
| 10 | gasPrice = 4000000000; |
| 11 | break; |
| 12 | case 3: //Ropsten |
| 13 | gasPrice = 50000000000; |
| 14 | break; |
| 15 | case 15: //Ganache |
| 16 | gasPrice = 50000000000; |
| 17 | break; |
| 18 | case 42: //Kovan |
| 19 | gasPrice = 50000000000; |
| 20 | break; |
| 21 | default: |
| 22 | throw new Error('Network ID not identified'); |
| 23 | } |
| 24 | return gasPrice; |
| 25 | } |
| 26 | |
| 27 | function providerValidator(url) { |
| 28 | var expression = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g; |