From 58e59acb10f43f8cfe6521377e254c9d01251242 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Wed, 20 May 2020 12:06:38 -0400 Subject: [PATCH] update types --- dist/bundle.es.js | 4 ++-- dist/flow-typed/File.js | 3 ++- flow-typed/File.js | 3 ++- src/redux/actions/file.js | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index 2640f15..ce66a5b 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -3958,10 +3958,10 @@ function doFileGet(uri, saveFile = true, onSuccess) { dispatch(doToast({ message: `File timeout for uri ${uri}`, isError: true })); } else { - if (streamInfo.purchase_receipt) { + if (streamInfo.purchase_receipt || streamInfo.content_fee) { dispatch({ type: PURCHASE_URI_COMPLETED, - data: { uri, purchaseReceipt: streamInfo.purchase_receipt } + data: { uri, purchaseReceipt: streamInfo.purchase_receipt || streamInfo.content_fee } }); } dispatch({ diff --git a/dist/flow-typed/File.js b/dist/flow-typed/File.js index 9a5f2ae..4b5bb12 100644 --- a/dist/flow-typed/File.js +++ b/dist/flow-typed/File.js @@ -11,7 +11,8 @@ declare type FileListItem = { claim_id: string, claim_name: string, completed: false, - purchase_receipt?: {}, + content_fee?: { txid: string }, + purchase_receipt?: { txid: string }, download_directory: string, download_path: string, file_name: string, diff --git a/flow-typed/File.js b/flow-typed/File.js index 9a5f2ae..4b5bb12 100644 --- a/flow-typed/File.js +++ b/flow-typed/File.js @@ -11,7 +11,8 @@ declare type FileListItem = { claim_id: string, claim_name: string, completed: false, - purchase_receipt?: {}, + content_fee?: { txid: string }, + purchase_receipt?: { txid: string }, download_directory: string, download_path: string, file_name: string, diff --git a/src/redux/actions/file.js b/src/redux/actions/file.js index 9af8bc3..2622fb5 100644 --- a/src/redux/actions/file.js +++ b/src/redux/actions/file.js @@ -39,10 +39,10 @@ export function doFileGet(uri: string, saveFile: boolean = true, onSuccess?: Get dispatch(doToast({ message: `File timeout for uri ${uri}`, isError: true })); } else { - if (streamInfo.purchase_receipt) { + if (streamInfo.purchase_receipt || streamInfo.content_fee) { dispatch({ type: ACTIONS.PURCHASE_URI_COMPLETED, - data: { uri, purchaseReceipt: streamInfo.purchase_receipt }, + data: { uri, purchaseReceipt: streamInfo.purchase_receipt || streamInfo.content_fee }, }); } dispatch({