Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

split resadd types #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/rmrk2.0.0/classes/nft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export class NFT {
}::${VERSION}::${namespace}::${this.getId()}::${unicode}`;
}

public resadd(resource: Resource): string {
public resadd(resource: RessAddResouce): string {
if (!this.block) {
throw new Error(
"You can only add resource to an existing NFT. If you just minted this, please load a new, separate instance as the block number is an important part of an NFT's ID."
Expand Down Expand Up @@ -283,19 +283,22 @@ export interface Reactionmap {
[unicode: string]: string[];
}

export interface Resource {
export interface RessAddResouce {
id?: string;
base?: string;
src?: string;
parts?: string[];
metadata?: string;
slot?: string;
pending?: boolean;
thumb?: string;
theme?: Theme;
themeId?: string;
}

export interface Resource extends RessAddResouce {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 2 s ?

pending?: boolean;
}

export interface IResourceConsolidated {
id: string;
base?: string;
Expand Down