feat(wallet): Add new action and reducer to clear support transaction
This commit is contained in:
parent
e5440ba860
commit
d4ea2ca385
5 changed files with 26 additions and 9 deletions
22
dist/bundle.es.js
vendored
22
dist/bundle.es.js
vendored
|
@ -15,7 +15,6 @@ const CHANNEL_NEW = 'new';
|
||||||
const PAGE_SIZE = 20;
|
const PAGE_SIZE = 20;
|
||||||
|
|
||||||
var claim = /*#__PURE__*/Object.freeze({
|
var claim = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
MINIMUM_PUBLISH_BID: MINIMUM_PUBLISH_BID,
|
MINIMUM_PUBLISH_BID: MINIMUM_PUBLISH_BID,
|
||||||
CHANNEL_ANONYMOUS: CHANNEL_ANONYMOUS,
|
CHANNEL_ANONYMOUS: CHANNEL_ANONYMOUS,
|
||||||
CHANNEL_NEW: CHANNEL_NEW,
|
CHANNEL_NEW: CHANNEL_NEW,
|
||||||
|
@ -71,6 +70,7 @@ const SEND_TRANSACTION_FAILED = 'SEND_TRANSACTION_FAILED';
|
||||||
const SUPPORT_TRANSACTION_STARTED = 'SUPPORT_TRANSACTION_STARTED';
|
const SUPPORT_TRANSACTION_STARTED = 'SUPPORT_TRANSACTION_STARTED';
|
||||||
const SUPPORT_TRANSACTION_COMPLETED = 'SUPPORT_TRANSACTION_COMPLETED';
|
const SUPPORT_TRANSACTION_COMPLETED = 'SUPPORT_TRANSACTION_COMPLETED';
|
||||||
const SUPPORT_TRANSACTION_FAILED = 'SUPPORT_TRANSACTION_FAILED';
|
const SUPPORT_TRANSACTION_FAILED = 'SUPPORT_TRANSACTION_FAILED';
|
||||||
|
const CLEAR_SUPPORT_TRANSACTION = 'CLEAR_SUPPORT_TRANSACTION';
|
||||||
const WALLET_ENCRYPT_START = 'WALLET_ENCRYPT_START';
|
const WALLET_ENCRYPT_START = 'WALLET_ENCRYPT_START';
|
||||||
const WALLET_ENCRYPT_COMPLETED = 'WALLET_ENCRYPT_COMPLETED';
|
const WALLET_ENCRYPT_COMPLETED = 'WALLET_ENCRYPT_COMPLETED';
|
||||||
const WALLET_ENCRYPT_FAILED = 'WALLET_ENCRYPT_FAILED';
|
const WALLET_ENCRYPT_FAILED = 'WALLET_ENCRYPT_FAILED';
|
||||||
|
@ -269,7 +269,6 @@ const TOGGLE_BLOCK_CHANNEL = 'TOGGLE_BLOCK_CHANNEL';
|
||||||
const USER_STATE_POPULATE = 'USER_STATE_POPULATE';
|
const USER_STATE_POPULATE = 'USER_STATE_POPULATE';
|
||||||
|
|
||||||
var action_types = /*#__PURE__*/Object.freeze({
|
var action_types = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
WINDOW_FOCUSED: WINDOW_FOCUSED,
|
WINDOW_FOCUSED: WINDOW_FOCUSED,
|
||||||
DAEMON_READY: DAEMON_READY,
|
DAEMON_READY: DAEMON_READY,
|
||||||
DAEMON_VERSION_MATCH: DAEMON_VERSION_MATCH,
|
DAEMON_VERSION_MATCH: DAEMON_VERSION_MATCH,
|
||||||
|
@ -313,6 +312,7 @@ var action_types = /*#__PURE__*/Object.freeze({
|
||||||
SUPPORT_TRANSACTION_STARTED: SUPPORT_TRANSACTION_STARTED,
|
SUPPORT_TRANSACTION_STARTED: SUPPORT_TRANSACTION_STARTED,
|
||||||
SUPPORT_TRANSACTION_COMPLETED: SUPPORT_TRANSACTION_COMPLETED,
|
SUPPORT_TRANSACTION_COMPLETED: SUPPORT_TRANSACTION_COMPLETED,
|
||||||
SUPPORT_TRANSACTION_FAILED: SUPPORT_TRANSACTION_FAILED,
|
SUPPORT_TRANSACTION_FAILED: SUPPORT_TRANSACTION_FAILED,
|
||||||
|
CLEAR_SUPPORT_TRANSACTION: CLEAR_SUPPORT_TRANSACTION,
|
||||||
WALLET_ENCRYPT_START: WALLET_ENCRYPT_START,
|
WALLET_ENCRYPT_START: WALLET_ENCRYPT_START,
|
||||||
WALLET_ENCRYPT_COMPLETED: WALLET_ENCRYPT_COMPLETED,
|
WALLET_ENCRYPT_COMPLETED: WALLET_ENCRYPT_COMPLETED,
|
||||||
WALLET_ENCRYPT_FAILED: WALLET_ENCRYPT_FAILED,
|
WALLET_ENCRYPT_FAILED: WALLET_ENCRYPT_FAILED,
|
||||||
|
@ -506,7 +506,6 @@ const OTHER = 'other';
|
||||||
const COPYRIGHT = 'copyright';
|
const COPYRIGHT = 'copyright';
|
||||||
|
|
||||||
var licenses = /*#__PURE__*/Object.freeze({
|
var licenses = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
CC_LICENSES: CC_LICENSES,
|
CC_LICENSES: CC_LICENSES,
|
||||||
NONE: NONE,
|
NONE: NONE,
|
||||||
PUBLIC_DOMAIN: PUBLIC_DOMAIN,
|
PUBLIC_DOMAIN: PUBLIC_DOMAIN,
|
||||||
|
@ -537,7 +536,6 @@ const HISTORY = 'user_history';
|
||||||
const WALLET = 'wallet';
|
const WALLET = 'wallet';
|
||||||
|
|
||||||
var pages = /*#__PURE__*/Object.freeze({
|
var pages = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
AUTH: AUTH,
|
AUTH: AUTH,
|
||||||
BACKUP: BACKUP,
|
BACKUP: BACKUP,
|
||||||
CHANNEL: CHANNEL,
|
CHANNEL: CHANNEL,
|
||||||
|
@ -587,7 +585,6 @@ const RECEIVE_INTERESTS_NOTIFICATIONS = 'receiveInterestsNotifications';
|
||||||
const RECEIVE_CREATOR_NOTIFICATIONS = 'receiveCreatorNotifications';
|
const RECEIVE_CREATOR_NOTIFICATIONS = 'receiveCreatorNotifications';
|
||||||
|
|
||||||
var settings = /*#__PURE__*/Object.freeze({
|
var settings = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
CREDIT_REQUIRED_ACKNOWLEDGED: CREDIT_REQUIRED_ACKNOWLEDGED,
|
CREDIT_REQUIRED_ACKNOWLEDGED: CREDIT_REQUIRED_ACKNOWLEDGED,
|
||||||
NEW_USER_ACKNOWLEDGED: NEW_USER_ACKNOWLEDGED,
|
NEW_USER_ACKNOWLEDGED: NEW_USER_ACKNOWLEDGED,
|
||||||
EMAIL_COLLECTION_ACKNOWLEDGED: EMAIL_COLLECTION_ACKNOWLEDGED,
|
EMAIL_COLLECTION_ACKNOWLEDGED: EMAIL_COLLECTION_ACKNOWLEDGED,
|
||||||
|
@ -615,7 +612,6 @@ const TITLE = 'title';
|
||||||
const FILENAME = 'filename';
|
const FILENAME = 'filename';
|
||||||
|
|
||||||
var sort_options = /*#__PURE__*/Object.freeze({
|
var sort_options = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
DATE_NEW: DATE_NEW,
|
DATE_NEW: DATE_NEW,
|
||||||
DATE_OLD: DATE_OLD,
|
DATE_OLD: DATE_OLD,
|
||||||
TITLE: TITLE,
|
TITLE: TITLE,
|
||||||
|
@ -629,7 +625,6 @@ const COMPLETE = 'complete';
|
||||||
const MANUAL = 'manual';
|
const MANUAL = 'manual';
|
||||||
|
|
||||||
var thumbnail_upload_statuses = /*#__PURE__*/Object.freeze({
|
var thumbnail_upload_statuses = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
API_DOWN: API_DOWN,
|
API_DOWN: API_DOWN,
|
||||||
READY: READY,
|
READY: READY,
|
||||||
IN_PROGRESS: IN_PROGRESS,
|
IN_PROGRESS: IN_PROGRESS,
|
||||||
|
@ -649,7 +644,6 @@ const UPDATE = 'update';
|
||||||
const ABANDON = 'abandon';
|
const ABANDON = 'abandon';
|
||||||
|
|
||||||
var transaction_types = /*#__PURE__*/Object.freeze({
|
var transaction_types = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
ALL: ALL,
|
ALL: ALL,
|
||||||
SPEND: SPEND,
|
SPEND: SPEND,
|
||||||
RECEIVE: RECEIVE,
|
RECEIVE: RECEIVE,
|
||||||
|
@ -665,7 +659,6 @@ var transaction_types = /*#__PURE__*/Object.freeze({
|
||||||
const PAGE_SIZE$1 = 50;
|
const PAGE_SIZE$1 = 50;
|
||||||
|
|
||||||
var transaction_list = /*#__PURE__*/Object.freeze({
|
var transaction_list = /*#__PURE__*/Object.freeze({
|
||||||
__proto__: null,
|
|
||||||
PAGE_SIZE: PAGE_SIZE$1
|
PAGE_SIZE: PAGE_SIZE$1
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -2419,6 +2412,12 @@ function doSendTip(amount, claimId, isSupport, successCallback, errorCallback) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function doClearSupport() {
|
||||||
|
return {
|
||||||
|
type: CLEAR_SUPPORT_TRANSACTION
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
function doWalletEncrypt(newPassword) {
|
function doWalletEncrypt(newPassword) {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
|
@ -5120,6 +5119,10 @@ const walletReducer = handleActions({
|
||||||
sendingSupport: false
|
sendingSupport: false
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
[CLEAR_SUPPORT_TRANSACTION]: state => _extends$f({}, state, {
|
||||||
|
sendingSupport: false
|
||||||
|
}),
|
||||||
|
|
||||||
[WALLET_STATUS_COMPLETED]: (state, action) => _extends$f({}, state, {
|
[WALLET_STATUS_COMPLETED]: (state, action) => _extends$f({}, state, {
|
||||||
walletIsEncrypted: action.result
|
walletIsEncrypted: action.result
|
||||||
}),
|
}),
|
||||||
|
@ -5340,6 +5343,7 @@ exports.doCheckAddressIsMine = doCheckAddressIsMine;
|
||||||
exports.doCheckPendingPublishes = doCheckPendingPublishes;
|
exports.doCheckPendingPublishes = doCheckPendingPublishes;
|
||||||
exports.doClaimSearch = doClaimSearch;
|
exports.doClaimSearch = doClaimSearch;
|
||||||
exports.doClearPublish = doClearPublish;
|
exports.doClearPublish = doClearPublish;
|
||||||
|
exports.doClearSupport = doClearSupport;
|
||||||
exports.doCommentCreate = doCommentCreate;
|
exports.doCommentCreate = doCommentCreate;
|
||||||
exports.doCommentList = doCommentList;
|
exports.doCommentList = doCommentList;
|
||||||
exports.doCreateChannel = doCreateChannel;
|
exports.doCreateChannel = doCreateChannel;
|
||||||
|
|
|
@ -47,6 +47,7 @@ export const SEND_TRANSACTION_FAILED = 'SEND_TRANSACTION_FAILED';
|
||||||
export const SUPPORT_TRANSACTION_STARTED = 'SUPPORT_TRANSACTION_STARTED';
|
export const SUPPORT_TRANSACTION_STARTED = 'SUPPORT_TRANSACTION_STARTED';
|
||||||
export const SUPPORT_TRANSACTION_COMPLETED = 'SUPPORT_TRANSACTION_COMPLETED';
|
export const SUPPORT_TRANSACTION_COMPLETED = 'SUPPORT_TRANSACTION_COMPLETED';
|
||||||
export const SUPPORT_TRANSACTION_FAILED = 'SUPPORT_TRANSACTION_FAILED';
|
export const SUPPORT_TRANSACTION_FAILED = 'SUPPORT_TRANSACTION_FAILED';
|
||||||
|
export const CLEAR_SUPPORT_TRANSACTION = 'CLEAR_SUPPORT_TRANSACTION';
|
||||||
export const WALLET_ENCRYPT_START = 'WALLET_ENCRYPT_START';
|
export const WALLET_ENCRYPT_START = 'WALLET_ENCRYPT_START';
|
||||||
export const WALLET_ENCRYPT_COMPLETED = 'WALLET_ENCRYPT_COMPLETED';
|
export const WALLET_ENCRYPT_COMPLETED = 'WALLET_ENCRYPT_COMPLETED';
|
||||||
export const WALLET_ENCRYPT_FAILED = 'WALLET_ENCRYPT_FAILED';
|
export const WALLET_ENCRYPT_FAILED = 'WALLET_ENCRYPT_FAILED';
|
||||||
|
|
|
@ -111,6 +111,7 @@ export {
|
||||||
doWalletStatus,
|
doWalletStatus,
|
||||||
doSetTransactionListFilter,
|
doSetTransactionListFilter,
|
||||||
doUpdateBlockHeight,
|
doUpdateBlockHeight,
|
||||||
|
doClearSupport,
|
||||||
} from 'redux/actions/wallet';
|
} from 'redux/actions/wallet';
|
||||||
|
|
||||||
export { doToggleTagFollow, doAddTag, doDeleteTag } from 'redux/actions/tags';
|
export { doToggleTagFollow, doAddTag, doDeleteTag } from 'redux/actions/tags';
|
||||||
|
|
|
@ -258,6 +258,12 @@ export function doSendTip(amount, claimId, isSupport, successCallback, errorCall
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function doClearSupport() {
|
||||||
|
return {
|
||||||
|
type: ACTIONS.CLEAR_SUPPORT_TRANSACTION,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export function doWalletEncrypt(newPassword) {
|
export function doWalletEncrypt(newPassword) {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
|
|
|
@ -223,6 +223,11 @@ export const walletReducer = handleActions(
|
||||||
sendingSupport: false,
|
sendingSupport: false,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
[ACTIONS.CLEAR_SUPPORT_TRANSACTION]: (state: WalletState) => ({
|
||||||
|
...state,
|
||||||
|
sendingSupport: false,
|
||||||
|
}),
|
||||||
|
|
||||||
[ACTIONS.WALLET_STATUS_COMPLETED]: (state: WalletState, action) => ({
|
[ACTIONS.WALLET_STATUS_COMPLETED]: (state: WalletState, action) => ({
|
||||||
...state,
|
...state,
|
||||||
walletIsEncrypted: action.result,
|
walletIsEncrypted: action.result,
|
||||||
|
|
Loading…
Reference in a new issue