Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
const transaction = getTransaction(state)
const pending = getPending(state)
const nativeAmount = sceneState.nativeAmount
// const nativeAmount = getNativeAmount(state)
let error = getError(state)
let errorMsg = null
let resetSlider = false
if (error && error.message === 'broadcastError') {
error = null
resetSlider = true
}
errorMsg = error ? error.message : ''
if (error && error.name === errorNames.NoAmountSpecifiedError) errorMsg = ''
const networkFee = transaction ? transaction.networkFee : null
const parentNetworkFee = transaction && transaction.parentNetworkFee ? transaction.parentNetworkFee : null
const uniqueIdentifier = sceneState.parsedUri.uniqueIdentifier
const transactionMetadata = sceneState.transactionMetadata
const exchangeRates = state.exchangeRates
const out = {
balanceInCrypto,
balanceInFiat,
currencyCode,
transactionMetadata,
errorMsg,
exchangeRates,
fiatCurrencyCode: guiWallet.fiatCurrencyCode,
fiatPerCrypto,
forceUpdateGuiCounter: getForceUpdateGuiCounter(state),
const transaction = getTransaction(state)
const pending = getPending(state)
const nativeAmount = sceneState.nativeAmount
// const nativeAmount = getNativeAmount(state)
let error = getError(state)
let errorMsg = null
let resetSlider = false
// consider refactoring this method for resetting slider
if (error && (error.message === 'broadcastError' || error.message === 'transactionCancelled')) {
error = null
resetSlider = true
}
errorMsg = error ? error.message : ''
if (error && error.name === errorNames.NoAmountSpecifiedError) errorMsg = ''
const networkFee = transaction ? transaction.networkFee : null
const parentNetworkFee = transaction && transaction.parentNetworkFee ? transaction.parentNetworkFee : null
const uniqueIdentifier = sceneState.guiMakeSpendInfo.uniqueIdentifier
const transactionMetadata = sceneState.transactionMetadata
const exchangeRates = state.exchangeRates
const { toggleCryptoOnTop } = sceneState
const { spendingLimits } = state.ui.settings
const out = {
balanceInCrypto,
balanceInFiat,
currencyCode,
currencyInfo: currencyInfo || null,
transactionMetadata,
errorMsg,