Skip to content

Commit

Permalink
Fix ETH gas limit text state (#1405)
Browse files Browse the repository at this point in the history
* Save ETH gas limit text state

* Reformat
  • Loading branch information
aminsato authored Nov 27, 2024
1 parent ee55f3d commit 90f4831
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,11 @@ internal class GasSettingsViewModel @Inject constructor(
}

private fun loadEthData(chain: Chain, spec: BlockChainSpecificAndUtxo){
val specific = spec.blockChainSpecific as BlockChainSpecific.Ethereum

val gasLimit = specific.gasLimit
val gasLimit = if (gasLimitState.text.isEmpty()) {
(spec.blockChainSpecific as BlockChainSpecific.Ethereum).gasLimit
} else {
gasLimitState.text.toString().toBigInteger()
}

gasLimitState.setTextAndPlaceCursorAtEnd(gasLimit.toString())

Expand Down

0 comments on commit 90f4831

Please sign in to comment.