update types

This commit is contained in:
Sean Yesmunt 2020-05-20 12:06:38 -04:00
parent 02831fe359
commit 58e59acb10
4 changed files with 8 additions and 6 deletions

4
dist/bundle.es.js vendored
View file

@ -3958,10 +3958,10 @@ function doFileGet(uri, saveFile = true, onSuccess) {
dispatch(doToast({ message: `File timeout for uri ${uri}`, isError: true })); dispatch(doToast({ message: `File timeout for uri ${uri}`, isError: true }));
} else { } else {
if (streamInfo.purchase_receipt) { if (streamInfo.purchase_receipt || streamInfo.content_fee) {
dispatch({ dispatch({
type: PURCHASE_URI_COMPLETED, type: PURCHASE_URI_COMPLETED,
data: { uri, purchaseReceipt: streamInfo.purchase_receipt } data: { uri, purchaseReceipt: streamInfo.purchase_receipt || streamInfo.content_fee }
}); });
} }
dispatch({ dispatch({

View file

@ -11,7 +11,8 @@ declare type FileListItem = {
claim_id: string, claim_id: string,
claim_name: string, claim_name: string,
completed: false, completed: false,
purchase_receipt?: {}, content_fee?: { txid: string },
purchase_receipt?: { txid: string },
download_directory: string, download_directory: string,
download_path: string, download_path: string,
file_name: string, file_name: string,

3
flow-typed/File.js vendored
View file

@ -11,7 +11,8 @@ declare type FileListItem = {
claim_id: string, claim_id: string,
claim_name: string, claim_name: string,
completed: false, completed: false,
purchase_receipt?: {}, content_fee?: { txid: string },
purchase_receipt?: { txid: string },
download_directory: string, download_directory: string,
download_path: string, download_path: string,
file_name: string, file_name: string,

View file

@ -39,10 +39,10 @@ export function doFileGet(uri: string, saveFile: boolean = true, onSuccess?: Get
dispatch(doToast({ message: `File timeout for uri ${uri}`, isError: true })); dispatch(doToast({ message: `File timeout for uri ${uri}`, isError: true }));
} else { } else {
if (streamInfo.purchase_receipt) { if (streamInfo.purchase_receipt || streamInfo.content_fee) {
dispatch({ dispatch({
type: ACTIONS.PURCHASE_URI_COMPLETED, type: ACTIONS.PURCHASE_URI_COMPLETED,
data: { uri, purchaseReceipt: streamInfo.purchase_receipt }, data: { uri, purchaseReceipt: streamInfo.purchase_receipt || streamInfo.content_fee },
}); });
} }
dispatch({ dispatch({