diff --git a/dist/bundle.es.js b/dist/bundle.es.js index 2a9f916..b08a080 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -3192,7 +3192,7 @@ function doSetDraftTransactionAddress(address) { }; } -function doSendTip(params, isSupport, successCallback, errorCallback) { +function doSendTip(params, isSupport, successCallback, errorCallback, shouldNotify = true) { return (dispatch, getState) => { const state = getState(); const balance = selectBalance(state); @@ -3208,19 +3208,21 @@ function doSendTip(params, isSupport, successCallback, errorCallback) { return; } - const success = () => { - dispatch(doToast({ - message: shouldSupport ? __('You deposited %amount% LBRY Credits as a support!', { amount: params.amount }) : __('You sent %amount% LBRY Credits as a tip, Mahalo!', { amount: params.amount }), - linkText: __('History'), - linkTarget: '/wallet' - })); + const success = response => { + if (shouldNotify) { + dispatch(doToast({ + message: shouldSupport ? __('You deposited %amount% LBRY Credits as a support!', { amount: params.amount }) : __('You sent %amount% LBRY Credits as a tip, Mahalo!', { amount: params.amount }), + linkText: __('History'), + linkTarget: '/wallet' + })); + } dispatch({ type: SUPPORT_TRANSACTION_COMPLETED }); if (successCallback) { - successCallback(); + successCallback(response); } }; diff --git a/src/redux/actions/wallet.js b/src/redux/actions/wallet.js index 8d73e90..97254df 100644 --- a/src/redux/actions/wallet.js +++ b/src/redux/actions/wallet.js @@ -349,7 +349,7 @@ export function doSetDraftTransactionAddress(address) { }; } -export function doSendTip(params, isSupport, successCallback, errorCallback) { +export function doSendTip(params, isSupport, successCallback, errorCallback, shouldNotify = true) { return (dispatch, getState) => { const state = getState(); const balance = selectBalance(state); @@ -368,23 +368,25 @@ export function doSendTip(params, isSupport, successCallback, errorCallback) { return; } - const success = () => { - dispatch( - doToast({ - message: shouldSupport - ? __('You deposited %amount% LBRY Credits as a support!', { amount: params.amount }) - : __('You sent %amount% LBRY Credits as a tip, Mahalo!', { amount: params.amount }), - linkText: __('History'), - linkTarget: '/wallet', - }) - ); + const success = response => { + if (shouldNotify) { + dispatch( + doToast({ + message: shouldSupport + ? __('You deposited %amount% LBRY Credits as a support!', { amount: params.amount }) + : __('You sent %amount% LBRY Credits as a tip, Mahalo!', { amount: params.amount }), + linkText: __('History'), + linkTarget: '/wallet', + }) + ); + } dispatch({ type: ACTIONS.SUPPORT_TRANSACTION_COMPLETED, }); if (successCallback) { - successCallback(); + successCallback(response); } };