Skip to content

Commit

Permalink
fix: merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
wkolod committed Nov 16, 2023
1 parent 7258ce4 commit 73fdf58
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions src/__tests__/nft.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ describe("Testing NFT functions", () => {
const { data } = await akord.nft.getAsset(nftId);
expect(data).toEqual(await file.arrayBuffer());

const fileBuffer = await akord.file.get(nft.asset.getUri(StorageType.S3), nft.vaultId);
expect(fileBuffer).toEqual(await file.arrayBuffer());

const assetUri = await akord.nft.getUri(nftId);
expect(assetUri).toBeTruthy();
expect(assetUri).toEqual(nft.asset.getUri(StorageType.ARWEAVE));
Expand Down
5 changes: 2 additions & 3 deletions src/core/nft.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { NodeService } from "./node";
import { FileVersion, StorageType, nodeType } from "../types/node";
import { StackCreateOptions } from "./stack";
import { FileVersion, StackCreateOptions, StorageType, nodeType } from "../types";
import { FileLike } from "../types/file";
import { FileService } from "./file";
import { NFT, NFTMetadata } from "../types/nft";
Expand Down Expand Up @@ -75,7 +74,7 @@ class NFTService extends NodeService<NFT> {
*/
public async getAsset(nftId: string): Promise<FileVersion & { data: ArrayBuffer }> {
const nft = new NFT(await this.api.getNode<NFT>(nftId, this.objectType));
const { fileData } = await this.api.downloadFile(nft.getUri(StorageType.S3), { public: true });
const { fileData } = await this.api.downloadFile(nft.getUri(StorageType.S3));
return { data: fileData, ...nft.asset } as FileVersion & { data: ArrayBuffer };
}

Expand Down
3 changes: 2 additions & 1 deletion src/types/nft.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { AssetMetadata } from "./asset";
import { FileVersion, Node, StorageType } from "./node";
import { Node, StorageType } from "./node";
import { FileVersion } from "../types";

export class NFT extends Node {
ticker: string;
Expand Down

0 comments on commit 73fdf58

Please sign in to comment.