Skip to content

Commit

Permalink
Merge pull request #16 from TheMarstonConnell/marston/200-years
Browse files Browse the repository at this point in the history
  • Loading branch information
karnthis authored Feb 15, 2024
2 parents 6fec69e + aaef61e commit 83645bb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jackallabs/jackal.js",
"version": "2.2.0",
"version": "2.3.0",
"description": "Javascript library for interacting with the Jackal Chain",
"keywords": [
"jackal",
Expand Down Expand Up @@ -41,6 +41,10 @@
{
"name": "Daniel Ahn",
"email": "[email protected]"
},
{
"name": "Marston Connell",
"email": "[email protected]"
}
],
"license": "MIT",
Expand Down
10 changes: 6 additions & 4 deletions src/classes/fileIo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ export default class FileIo implements IFileIo {
async staggeredUploadFiles(
sourceHashMap: IUploadList,
parent: IFolderHandler,
tracker: IStaggeredTracker
tracker: IStaggeredTracker,
payOnce?: boolean,
): Promise<void> {
if (!this.walletRef.traits)
throw new Error(signerNotEnabled('FileIo', 'staggeredUploadFiles'))
Expand Down Expand Up @@ -366,7 +367,7 @@ export default class FileIo implements IFileIo {
acc[curr.handler.getWhoAmI()] = curr.handler.getMeta()
return acc
}, {} as IFileMetaHashMap)
const readyToBroadcast = await this.rawAfterUpload(processValues)
const readyToBroadcast = await this.rawAfterUpload(processValues, payOnce)
.catch(err => {
throw err
})
Expand Down Expand Up @@ -394,7 +395,8 @@ export default class FileIo implements IFileIo {
* @private
*/
private async rawAfterUpload(
ids: IQueueItemPostUpload[]
ids: IQueueItemPostUpload[],
payOnce?: boolean,
): Promise<EncodeObject[]> {
if (!this.walletRef.traits)
throw new Error(signerNotEnabled('FileIo', 'rawAfterUpload'))
Expand Down Expand Up @@ -442,7 +444,7 @@ export default class FileIo implements IFileIo {
const msgSign: EncodeObject = pH.storageTx.msgSignContract({
creator,
cid,
payOnce: false
payOnce: payOnce || false
})
return [msgPost, msgSign]
})
Expand Down
3 changes: 2 additions & 1 deletion src/interfaces/classes/IFileIo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export default interface IFileIo {
staggeredUploadFiles(
sourceHashMap: IUploadList,
parent: IFolderHandler,
tracker: IStaggeredTracker
tracker: IStaggeredTracker,
payOnce?: boolean,
): Promise<void>
downloadFolder(rawPath: string): Promise<IFolderHandler>
downloadFile(
Expand Down

0 comments on commit 83645bb

Please sign in to comment.