Setting the fee asset to always be BTS
This commit is contained in:
parent
208238c7ed
commit
50ed47c797
2 changed files with 6 additions and 2 deletions
|
@ -53,6 +53,7 @@ import java.text.DecimalFormatSymbols
|
||||||
import java.util.ArrayList
|
import java.util.ArrayList
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
import kotlin.Comparator
|
||||||
|
|
||||||
class SendTransactionFragment : ConnectedFragment(), ZXingScannerView.ResultHandler,
|
class SendTransactionFragment : ConnectedFragment(), ZXingScannerView.ResultHandler,
|
||||||
BaseSecurityLockDialog.OnPINPatternEnteredListener {
|
BaseSecurityLockDialog.OnPINPatternEnteredListener {
|
||||||
|
@ -316,9 +317,9 @@ class SendTransactionFragment : ConnectedFragment(), ZXingScannerView.ResultHand
|
||||||
|
|
||||||
transaction!!.blockData = BlockData(headBlockNumber, headBlockId, expirationTime)
|
transaction!!.blockData = BlockData(headBlockNumber, headBlockId, expirationTime)
|
||||||
|
|
||||||
val asset = Asset(mBalancesDetailsAdapter!!.getItem(spAsset.selectedItemPosition)!!.id)
|
var feeAsset = Asset(Constants.CORE_ASSET)
|
||||||
|
|
||||||
val id = mNetworkService?.sendMessage(GetRequiredFees(transaction!!, asset), GetRequiredFees.REQUIRED_API)
|
val id = mNetworkService?.sendMessage(GetRequiredFees(transaction!!, feeAsset), GetRequiredFees.REQUIRED_API)
|
||||||
if (id != null) responseMap.append(id, RESPONSE_GET_REQUIRED_FEES)
|
if (id != null) responseMap.append(id, RESPONSE_GET_REQUIRED_FEES)
|
||||||
} else {
|
} else {
|
||||||
context?.toast(getString(R.string.msg__transaction_not_sent))
|
context?.toast(getString(R.string.msg__transaction_not_sent))
|
||||||
|
|
|
@ -145,4 +145,7 @@ object Constants {
|
||||||
|
|
||||||
/** Key used to add the account ID to the Crashlytics report*/
|
/** Key used to add the account ID to the Crashlytics report*/
|
||||||
const val CRASHLYTICS_KEY_ACCOUNT_ID = "crashlytics_key_account_id"
|
const val CRASHLYTICS_KEY_ACCOUNT_ID = "crashlytics_key_account_id"
|
||||||
|
|
||||||
|
/** Definition of the system core (BTS) asset id */
|
||||||
|
const val CORE_ASSET = "1.3.0"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue