Skip to content

Commit

Permalink
fix: set vault context on stack#getVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrvis committed Nov 13, 2023
1 parent 7824d1e commit f2cd643
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ class StackService extends NodeService<Stack> {
const service = new FileService(this.wallet, this.api);
const stackProto = await this.api.getNode<Stack>(stackId, objectType.STACK);
const stack = new Stack(stackProto, stackProto.__keys__);
await service.setVaultContext(stack.vaultId);
const version = stack.getVersion(index);
if (!service.isPublic) {
await version.decrypt();
}
await service.setVaultContext(stack.vaultId);
const data = await service.download(version.getUri(StorageType.S3), { responseType: options.responseType, chunkSize: version.chunkSize || version.size });
return { ...version, data };
}
Expand Down

0 comments on commit f2cd643

Please sign in to comment.