Skip to content

Commit

Permalink
Do not save the GasPrice for Rinkeby, Goerli and xDAI
Browse files Browse the repository at this point in the history
Also set default to 1GWEI
In the future get info from ethereum-lists/chains

ethereum-lists/chains#162
  • Loading branch information
jewel528 committed Feb 24, 2021
1 parent c48107a commit a0f8a02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/org/walleth/data/Values.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import java.math.BigInteger
val ETH_IN_WEI = BigInteger("1000000000000000000")
val GIGA = BigDecimal(1_000_000_000L) // for Gwei calc

var DEFAULT_GAS_PRICE = BigInteger("20000000000")
var DEFAULT_GAS_PRICE = BigInteger("1000000000")
var DEFAULT_GAS_LIMIT_ETH_TX = BigInteger("21000")

const val DEFAULT_PASSWORD = "default"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ class CreateTransactionActivity : BaseSubActivity() {
private fun storeDefaultGasPriceAndFinish() {
val gasPrice = getGasPrice()
val chainId = chainInfoProvider.getCurrentChainId()
if (gasPrice != settings.getGasPriceFor(chainId.value)) {
if ( !listOf(valueOf(4L),valueOf(5L),valueOf(100L)).contains(chainId.value) && gasPrice != settings.getGasPriceFor(chainId.value)) {
AlertDialog.Builder(this)
.setTitle(getString(R.string.default_gas_price, chainInfoProvider.getCurrent()!!.name))
.setMessage(R.string.store_gas_price)
Expand Down

0 comments on commit a0f8a02

Please sign in to comment.