Updated on 2026-08-14
This commit is contained in:
parent
b3a6a8dc9b
commit
180e2b9c4e
2 changed files with 7 additions and 17 deletions
|
|
@ -15,7 +15,7 @@ android {
|
|||
applicationId "com.tangem.wallet"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 28
|
||||
versionCode 97
|
||||
versionCode 98
|
||||
versionName "0.810.1." + generateVersionName()
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ class SendTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallback {
|
|||
|
||||
nfcManager = NfcManager(this, this)
|
||||
|
||||
|
||||
ctx = TangemContext.loadFromBundle(this, intent.extras)
|
||||
tx = intent.getStringExtra(EXTRA_TX)
|
||||
|
||||
|
|
@ -57,14 +56,10 @@ class SendTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallback {
|
|||
val electrumBodyListener: ServerApiHelperElectrum.ElectrumRequestDataListener = object : ServerApiHelperElectrum.ElectrumRequestDataListener {
|
||||
override fun onSuccess(electrumRequest: ElectrumRequest?) {
|
||||
if (electrumRequest!!.isMethod(ElectrumRequest.METHOD_SendTransaction)) {
|
||||
try {
|
||||
if (electrumRequest.resultString.isEmpty())
|
||||
finishWithError("Rejected by node: " + electrumRequest.getError())
|
||||
|
||||
if (electrumRequest.resultString.isEmpty())
|
||||
finishWithError("Rejected by node: " + electrumRequest.getError())
|
||||
else
|
||||
finishWithSuccess()
|
||||
} catch (e: JSONException) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -79,18 +74,13 @@ class SendTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallback {
|
|||
override fun onSuccess(method: String, infuraResponse: InfuraResponse) {
|
||||
when (method) {
|
||||
ServerApiHelper.INFURA_ETH_SEND_RAW_TRANSACTION -> {
|
||||
try {
|
||||
//infuraResponse.result - it's HashTX
|
||||
if (infuraResponse.result.isEmpty())
|
||||
finishWithError("Rejected by node: " + infuraResponse.error)
|
||||
|
||||
if (infuraResponse.result.isEmpty())
|
||||
finishWithError("Rejected by node: " + infuraResponse.error)
|
||||
else {
|
||||
val nonce = (ctx.coinData!! as EthData).confirmedTXCount
|
||||
nonce.add(BigInteger.valueOf(1))
|
||||
(ctx.coinData!! as EthData).confirmedTXCount = nonce
|
||||
|
||||
finishWithSuccess()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue