Setting the fee asset to always be BTS

master
Nelson R. Perez 2019-11-11 14:20:47 -05:00
parent 208238c7ed
commit 50ed47c797
2 changed files with 6 additions and 2 deletions

View File

@ -53,6 +53,7 @@ import java.text.DecimalFormatSymbols
import java.util.ArrayList
import java.util.Locale
import java.util.concurrent.TimeUnit
import kotlin.Comparator
class SendTransactionFragment : ConnectedFragment(), ZXingScannerView.ResultHandler,
BaseSecurityLockDialog.OnPINPatternEnteredListener {
@ -316,9 +317,9 @@ class SendTransactionFragment : ConnectedFragment(), ZXingScannerView.ResultHand
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)
} else {
context?.toast(getString(R.string.msg__transaction_not_sent))

View File

@ -145,4 +145,7 @@ object Constants {
/** Key used to add the account ID to the Crashlytics report*/
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"
}