diff --git a/dist/bundle.es.js b/dist/bundle.es.js index c5abcd6..17d88f5 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -191,7 +191,7 @@ const SET_FILE_LIST_SORT = 'SET_FILE_LIST_SORT'; const PURCHASE_URI_STARTED = 'PURCHASE_URI_STARTED'; const PURCHASE_URI_COMPLETED = 'PURCHASE_URI_COMPLETED'; const PURCHASE_URI_FAILED = 'PURCHASE_URI_FAILED'; -const DELETE_PURCHASED_URI = 'DELETE_PURCHASED_URI'; +const CLEAR_PURCHASED_URI_SUCCESS = 'CLEAR_PURCHASED_URI_SUCCESS'; // Search const SEARCH_START = 'SEARCH_START'; @@ -470,7 +470,7 @@ var action_types = /*#__PURE__*/Object.freeze({ PURCHASE_URI_STARTED: PURCHASE_URI_STARTED, PURCHASE_URI_COMPLETED: PURCHASE_URI_COMPLETED, PURCHASE_URI_FAILED: PURCHASE_URI_FAILED, - DELETE_PURCHASED_URI: DELETE_PURCHASED_URI, + CLEAR_PURCHASED_URI_SUCCESS: CLEAR_PURCHASED_URI_SUCCESS, SEARCH_START: SEARCH_START, SEARCH_SUCCESS: SEARCH_SUCCESS, SEARCH_FAIL: SEARCH_FAIL, @@ -4030,10 +4030,9 @@ function doPurchaseUri(uri, costInfo, saveFile = true, onSuccess) { }; } -function doDeletePurchasedUri(uri) { +function doClearPurchasedUriSuccess() { return { - type: DELETE_PURCHASED_URI, - data: { uri } + type: CLEAR_PURCHASED_URI_SUCCESS }; } @@ -5731,6 +5730,12 @@ reducers[PURCHASE_URI_FAILED] = state => { }); }; +reducers[CLEAR_PURCHASED_URI_SUCCESS] = state => { + return _extends$9({}, state, { + purchaseUriSuccess: false + }); +}; + function claimsReducer(state = defaultState, action) { const handler = reducers[action.type]; if (handler) return handler(state, action); @@ -6937,6 +6942,7 @@ exports.doCheckPublishNameAvailability = doCheckPublishNameAvailability; exports.doCheckReflectingFiles = doCheckReflectingFiles; exports.doClaimSearch = doClaimSearch; exports.doClearPublish = doClearPublish; +exports.doClearPurchasedUriSuccess = doClearPurchasedUriSuccess; exports.doClearRepostError = doClearRepostError; exports.doClearSupport = doClearSupport; exports.doCommentAbandon = doCommentAbandon; @@ -6945,7 +6951,6 @@ exports.doCommentHide = doCommentHide; exports.doCommentList = doCommentList; exports.doCommentUpdate = doCommentUpdate; exports.doCreateChannel = doCreateChannel; -exports.doDeletePurchasedUri = doDeletePurchasedUri; exports.doDeleteTag = doDeleteTag; exports.doDismissError = doDismissError; exports.doDismissToast = doDismissToast; diff --git a/dist/flow-typed/File.js b/dist/flow-typed/File.js index e74d7de..5c29dd4 100644 --- a/dist/flow-typed/File.js +++ b/dist/flow-typed/File.js @@ -70,7 +70,7 @@ declare type PurchaseUriStarted = { }; declare type DeletePurchasedUri = { - type: ACTIONS.DELETE_PURCHASED_URI, + type: ACTIONS.CLEAR_PURCHASED_URI_SUCCESS, data: { uri: string, }, diff --git a/flow-typed/File.js b/flow-typed/File.js index e74d7de..5c29dd4 100644 --- a/flow-typed/File.js +++ b/flow-typed/File.js @@ -70,7 +70,7 @@ declare type PurchaseUriStarted = { }; declare type DeletePurchasedUri = { - type: ACTIONS.DELETE_PURCHASED_URI, + type: ACTIONS.CLEAR_PURCHASED_URI_SUCCESS, data: { uri: string, }, diff --git a/src/constants/action_types.js b/src/constants/action_types.js index dc3e0e6..8be3f24 100644 --- a/src/constants/action_types.js +++ b/src/constants/action_types.js @@ -168,7 +168,7 @@ export const SET_FILE_LIST_SORT = 'SET_FILE_LIST_SORT'; export const PURCHASE_URI_STARTED = 'PURCHASE_URI_STARTED'; export const PURCHASE_URI_COMPLETED = 'PURCHASE_URI_COMPLETED'; export const PURCHASE_URI_FAILED = 'PURCHASE_URI_FAILED'; -export const DELETE_PURCHASED_URI = 'DELETE_PURCHASED_URI'; +export const CLEAR_PURCHASED_URI_SUCCESS = 'CLEAR_PURCHASED_URI_SUCCESS'; // Search export const SEARCH_START = 'SEARCH_START'; diff --git a/src/index.js b/src/index.js index b780f88..483b152 100644 --- a/src/index.js +++ b/src/index.js @@ -78,7 +78,7 @@ export { doPurchaseList, } from 'redux/actions/claims'; -export { doDeletePurchasedUri, doPurchaseUri, doFileGet } from 'redux/actions/file'; +export { doClearPurchasedUriSuccess, doPurchaseUri, doFileGet } from 'redux/actions/file'; export { doFetchFileInfo, diff --git a/src/redux/actions/file.js b/src/redux/actions/file.js index 056fc78..6ad2a0b 100644 --- a/src/redux/actions/file.js +++ b/src/redux/actions/file.js @@ -123,9 +123,8 @@ export function doPurchaseUri( }; } -export function doDeletePurchasedUri(uri: string) { +export function doClearPurchasedUriSuccess() { return { - type: ACTIONS.DELETE_PURCHASED_URI, - data: { uri }, + type: ACTIONS.CLEAR_PURCHASED_URI_SUCCESS, }; } diff --git a/src/redux/reducers/claims.js b/src/redux/reducers/claims.js index f133067..cdb34fc 100644 --- a/src/redux/reducers/claims.js +++ b/src/redux/reducers/claims.js @@ -733,6 +733,13 @@ reducers[ACTIONS.PURCHASE_URI_FAILED] = (state: State): State => { }; }; +reducers[ACTIONS.CLEAR_PURCHASED_URI_SUCCESS] = (state: State): State => { + return { + ...state, + purchaseUriSuccess: false, + }; +}; + export function claimsReducer(state: State = defaultState, action: any) { const handler = reducers[action.type]; if (handler) return handler(state, action);