diff --git a/src/libs/IOUUtils.js b/src/libs/IOUUtils.js index ada242b6c331..bfa603c9a6e3 100644 --- a/src/libs/IOUUtils.js +++ b/src/libs/IOUUtils.js @@ -1,14 +1,5 @@ -import Onyx from 'react-native-onyx'; -import lodashGet from 'lodash/get'; -import ONYXKEYS from '../ONYXKEYS'; import CONST from '../CONST'; -let isNetworkOffline = false; -Onyx.connect({ - key: ONYXKEYS.NETWORK, - callback: val => isNetworkOffline = lodashGet(val, 'isOffline', false), -}); - /** * Calculates the amount per user given a list of participants * @param {Array} participants - List of logins for the participants in the chat. It should not include the current user's login. @@ -50,7 +41,7 @@ function calculateAmount(participants, total, isDefaultUser = false) { * @returns {Object} */ function updateIOUOwnerAndTotal(iouReport, actorEmail, amount, currency, type = CONST.IOU.REPORT_ACTION_TYPE.CREATE) { - if (currency !== iouReport.currency && isNetworkOffline) { + if (currency !== iouReport.currency) { return iouReport; }