-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: support json token uri #901
Conversation
} | ||
} | ||
} | ||
function detechTokenUriFormat(token_uri: string) { | ||
if (token_uri.split(',')[0] === SUPPORT_DECODED_TOKEN_URI.BASE64) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
startWiths
@@ -172,12 +177,31 @@ export async function getMetadata(token_uri: string): Promise<{ | |||
image?: string; | |||
animation_url?: string; | |||
}> { | |||
const tokenUriType = detechTokenUriFormat(token_uri); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
detect
@@ -172,12 +177,31 @@ export async function getMetadata(token_uri: string): Promise<{ | |||
image?: string; | |||
animation_url?: string; | |||
}> { | |||
const tokenUriType = detechTokenUriFormat(token_uri); | |||
switch (tokenUriType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gộp vào hàm detect, trả ra kết quả là string, expect là json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sửa cái raw true ở github
token_uri: "{"name": "Mahojin NFT #20", "description": "Mahojin NFT!", "image": "https://d1kfhpz1mqv5dj.cloudfront.net/generated-image/08-24/480b5c77-ae17-4367-8232-db7aa4841da1-e1/2b197e2d.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA5JYVRCSCA2KUTZNV%2F20240830%2Fap-northeast-2%2Fs3%2Faws4_request&X-Amz-Date=20240830T132217Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=ddce63e66ae11ce3fba794e6a323b9c1bbb0ae0839e8f89a3c7f4d6417da20a6\"}"