From 6d5ff7976ed456e0995e012f010c5de82d1aa3a0 Mon Sep 17 00:00:00 2001 From: Patricio Date: Mon, 17 May 2021 17:54:36 -0300 Subject: [PATCH] fix: typo toLowerCase, add report to server when transfer confirm --- src/pages/wallet/transfer.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pages/wallet/transfer.js b/src/pages/wallet/transfer.js index 8c6b85ed..47f6cd45 100644 --- a/src/pages/wallet/transfer.js +++ b/src/pages/wallet/transfer.js @@ -929,10 +929,10 @@ class Transfer extends Component { if (symbol === 'BTC') { value = balance.minus(common.convertUnitToCoinAmount(symbol, feeParams.fees, precision)); } else if (symbol === 'RBTC') { - finalToAddress = finalToAddress.toLowercase(); + finalToAddress = finalToAddress.toLowerCase(); value = balance.minus(common.convertUnitToCoinAmount(symbol, feeParams.gas.times(feeParams.gasPrice), precision)); } else { - finalToAddress = finalToAddress.toLowercase(); + finalToAddress = finalToAddress.toLowerCase(); value = balance; } } @@ -950,8 +950,12 @@ class Transfer extends Component { this.setState({ loading: false }); console.log(`confirm, error: ${error.message}`); const buttonText = 'button.retry'; - const notification = getErrorNotification(error.code, buttonText) || getDefaultTxFailedErrorNotification(buttonText); + const decodedNotification = getErrorNotification(error.code, buttonText); + const notification = decodedNotification || getDefaultTxFailedErrorNotification(buttonText); addNotification(notification); + if (!decodedNotification) { + reportErrorToServer({ developerComment: 'transfer.js->confirm()', errorObject: error }); + } if (error.code === ERROR_CODE.NOT_ENOUGH_BALANCE || ERROR_CODE.NOT_ENOUGH_BTC || ERROR_CODE.NOT_ENOUGH_RBTC) { getBalance({ symbol, type, address, needFetch: true,