feat(send): save shielded transaction

This commit is contained in:
George Lima 2019-02-11 10:46:55 -03:00
parent 96f508310e
commit 23899e0e61
1 changed files with 10 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import {
} from '../redux/modules/send';
import { filterObjectNullKeys } from '../utils/filter-object-null-keys';
import { saveShieldedTransaction } from '../../services/shielded-transactions';
import type { AppState } from '../types/app-state';
import type { Dispatch } from '../types/redux';
@ -92,6 +93,15 @@ const mapDispatchToProps = (dispatch: Dispatch) => ({
if (operationStatus && operationStatus.status === 'success') {
clearInterval(interval);
if (from.startsWith('z')) {
saveShieldedTransaction({
category: 'send',
time: Date.now() / 1000,
address: '(Shielded)',
amount: new BigNumber(amount).toNumber(),
memo,
});
}
dispatch(sendTransactionSuccess({ operationId: operationStatus.result.txid }));
}