Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesSmartCell committed Sep 20, 2022
1 parent 4736f6d commit d43105c
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions app/src/main/java/com/alphawallet/app/widget/InputAmount.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.alphawallet.app.widget;

import static com.alphawallet.app.C.GAS_LIMIT_MIN;
import static com.alphawallet.app.repository.TokensRealmSource.databaseKey;

import android.content.Context;
import android.content.res.TypedArray;
import android.os.Handler;
Expand Down Expand Up @@ -44,9 +47,6 @@
import io.realm.RealmQuery;
import timber.log.Timber;

import static com.alphawallet.app.C.GAS_LIMIT_MIN;
import static com.alphawallet.app.repository.TokensRealmSource.databaseKey;

/**
* Created by JB on 10/11/2020.
*/
Expand Down Expand Up @@ -387,8 +387,8 @@ private void setupAllFunds()
if (token.isEthereum() && token.hasPositiveBalance())
{
RealmGasSpread gasSpread = tokensService.getTickerRealmInstance().where(RealmGasSpread.class)
.equalTo("chainId", token.tokenInfo.chainId)
.findFirst();
.equalTo("chainId", token.tokenInfo.chainId)
.findFirst();

if (gasSpread != null && gasSpread.getGasPrice().compareTo(BigInteger.ZERO) > 0)
{
Expand All @@ -399,19 +399,19 @@ private void setupAllFunds()
{
gasFetch.setVisibility(View.VISIBLE);
Web3j web3j = TokenRepository.getWeb3jService(token.tokenInfo.chainId);
Completable.fromRunnable( () ->
{
try
{
onLatestGasPrice(web3j.ethGasPrice().sendAsync().get().getGasPrice());
}
catch (Exception e)
{
e.printStackTrace();
onGasFetchError(e);
}
}
)
Completable.fromRunnable(() ->
{
try
{
onLatestGasPrice(web3j.ethGasPrice().sendAsync().get().getGasPrice());
}
catch (Exception e)
{
e.printStackTrace();
onGasFetchError(e);
}
}
)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(() -> {}, this::onGasFetchError)
Expand Down

0 comments on commit d43105c

Please sign in to comment.