Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
fix: typo toLowerCase, add report to server when transfer confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
patogallaiovlabs committed May 17, 2021
1 parent 9e6136d commit 6d5ff79
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/pages/wallet/transfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand All @@ -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,
Expand Down

0 comments on commit 6d5ff79

Please sign in to comment.