Updated on 2026-08-14
This commit is contained in:
commit
6948b2e6b5
1 changed files with 11 additions and 6 deletions
|
|
@ -209,7 +209,7 @@ public class TokenEngine extends CoinEngine {
|
|||
if (coinData == null) return false;
|
||||
if (coinData.getBalanceInInternalUnits() == null && coinData.getBalanceAlterInInternalUnits() == null)
|
||||
return false;
|
||||
return (coinData.getBalanceInInternalUnits() != null && coinData.getBalanceInInternalUnits().notZero() ) ||
|
||||
return (coinData.getBalanceInInternalUnits() != null && coinData.getBalanceInInternalUnits().notZero()) ||
|
||||
(coinData.getBalanceAlterInInternalUnits() != null && coinData.getBalanceAlterInInternalUnits().notZero());
|
||||
}
|
||||
|
||||
|
|
@ -576,7 +576,10 @@ public class TokenEngine extends CoinEngine {
|
|||
|
||||
|
||||
int gasLimitInt = 60000;
|
||||
if (amountValue.getCurrency().equals("DGX") || amountValue.getCurrency().equals("CGT")) {
|
||||
if (amountValue.getCurrency().equals("DGX") ||
|
||||
amountValue.getCurrency().equals("CGT") ||
|
||||
amountValue.getCurrency().equals("AWG")
|
||||
) {
|
||||
gasLimitInt = 300000;
|
||||
}
|
||||
|
||||
|
|
@ -740,7 +743,7 @@ public class TokenEngine extends CoinEngine {
|
|||
public void onFail(String method, String message) {
|
||||
Log.e(TAG, "onFail: " + method + " " + message);
|
||||
ctx.setError(message);
|
||||
if (serverApiInfura.isRequestsSequenceCompleted()&& serverApiBlockcypher.isRequestsSequenceCompleted()) {
|
||||
if (serverApiInfura.isRequestsSequenceCompleted() && serverApiBlockcypher.isRequestsSequenceCompleted()) {
|
||||
blockchainRequestsCallbacks.onComplete(false);
|
||||
} else {
|
||||
blockchainRequestsCallbacks.onProgress();
|
||||
|
|
@ -775,7 +778,7 @@ public class TokenEngine extends CoinEngine {
|
|||
Log.e(TAG, "FAIL BLOCKCYPHER_ADDRESS Exception");
|
||||
}
|
||||
|
||||
if (serverApiInfura.isRequestsSequenceCompleted()&& serverApiBlockcypher.isRequestsSequenceCompleted()) {
|
||||
if (serverApiInfura.isRequestsSequenceCompleted() && serverApiBlockcypher.isRequestsSequenceCompleted()) {
|
||||
blockchainRequestsCallbacks.onComplete(!ctx.hasError());
|
||||
} else {
|
||||
blockchainRequestsCallbacks.onProgress();
|
||||
|
|
@ -923,7 +926,7 @@ public class TokenEngine extends CoinEngine {
|
|||
@Override
|
||||
public void onSuccess(String method, InfuraResponse infuraResponse) {
|
||||
if (method.equals(ServerApiInfura.INFURA_ETH_SEND_RAW_TRANSACTION)) {
|
||||
if (infuraResponse.getResult()==null || infuraResponse.getResult().isEmpty()) {
|
||||
if (infuraResponse.getResult() == null || infuraResponse.getResult().isEmpty()) {
|
||||
ctx.setError("Rejected by node: " + infuraResponse.getError());
|
||||
blockchainRequestsCallbacks.onComplete(false);
|
||||
} else {
|
||||
|
|
@ -961,5 +964,7 @@ public class TokenEngine extends CoinEngine {
|
|||
return getBalance().getCurrency().equals(Blockchain.Ethereum.getCurrency());
|
||||
}
|
||||
|
||||
public int pendingTransactionTimeoutInSeconds() { return 10; }
|
||||
public int pendingTransactionTimeoutInSeconds() {
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue