(Feature) [xDai] - Create network-based configurations#1420
(Feature) [xDai] - Create network-based configurations#1420fernandomg merged 14 commits intofeature/#1353-xDai-compatibilityfrom
Conversation
Co-authored-by: Matias Dastugue <matias.dastugue@altoros.com>
|
CLA Assistant Lite All Contributors have signed the CLA. |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
…ai-generic-configs
…ai-generic-configs
|
Travis automatic deployment: |
|
Travis automatic deployment: |
Co-authored-by: Matias Dastugue <matias.dastugue@altoros.com>
Co-authored-by: Matias Dastugue <matias.dastugue@altoros.com>
Co-authored-by: Matias Dastugue <matias.dastugue@altoros.com>
Co-authored-by: Matias Dastugue <matias.dastugue@altoros.com>
|
Travis automatic deployment: |
Co-authored-by: Matias Dastugue <matias.dastugue@altoros.com>
|
Travis automatic deployment: |
…ai-generic-configs
|
Travis automatic deployment: |
| "!src/**/test/**/*", | ||
| "!src/**/assets/**", | ||
| "!src/config/**/*" | ||
| "!src/**/assets/**" |
There was a problem hiding this comment.
not to be done now, but should we change the version to v3.0.0?
There was a problem hiding this comment.
Something to consider. We should talk about this when preparing release
| @@ -0,0 +1,59 @@ | |||
| import { ETHEREUM_NETWORK } from 'src/logic/wallets/getWeb3' | |||
There was a problem hiding this comment.
can we do the opposite? I mean defining the networks here and import them in 'src/logic/wallets/getWeb3'
There was a problem hiding this comment.
I agree, but we preferred doing it later (in a different PR) because there are lots of files that import this enum, and it will make a lot of noise.
And probably we should wrap the ETHEREUM_NETWORK[getNetwork()] into a function.
There was a problem hiding this comment.
Don't forget to create a ticket for this
There was a problem hiding this comment.
@dasanra, @nicosampler it's done in 4e5e8bf (#1422)
| } | ||
|
|
||
| type GasPrice = { | ||
| gasPrice: number |
There was a problem hiding this comment.
I'm not sure about this, I thought it was going to be a URL or NULL, if a URL is provided, then the service in charge to resolve the gas calculation will do all it's needed to return a value. If it's NULL the service will return a hardcoded value.
If you don't like that alternative and would suggest typing this value like so:
gasPriceInfo: number | string
There was a problem hiding this comment.
mhh... but, where will you define the hardcoded value depending on the network you're using?
In regard to the type, why will you need a string type for that value?
There was a problem hiding this comment.
I don't see the problem here. This may be necessary to be different depending on the network, so the fallback value should be configurable
Any more feedback to add @nicosampler ?
| import { ETHEREUM_NETWORK } from 'src/logic/wallets/getWeb3' | ||
| import { isValidURL } from 'src/utils/url' | ||
|
|
||
| describe('Network config file test', () => { |
There was a problem hiding this comment.
shouldn't it be Networks config files?
| const { color } = networkConfig.network | ||
|
|
||
| // Then | ||
| const s = new Option().style |
There was a problem hiding this comment.
just curious, is there a reason to use an Option instead of another element?
src/config/networks/network.d.ts
Outdated
| } | ||
|
|
||
| export type EnvironmentSettings = GasPrice & { | ||
| txServiceUri: string |
There was a problem hiding this comment.
didn't know the difference between URL and URI, so I found this: https://danielmiessler.com/study/difference-between-uri-url/#:~:text=A%20URI%20is%20an%20identifier,as%20HTTPs%20%2C%20FTP%20%2C%20etc.
Seems like we should use URL instead of URI.
|
Travis automatic deployment: |
|
Travis automatic deployment: |
Closes #1414, by:
A special note for reviewers: we added
GAS_PRICE