From 0b7c423d8efad244ca668446ea102e57b65613a2 Mon Sep 17 00:00:00 2001 From: Xmader Date: Tue, 17 Nov 2020 11:13:16 -0500 Subject: [PATCH] fix: mscz file ref --- src/mscz.ts | 4 ++-- src/scoreinfo.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mscz.ts b/src/mscz.ts index 9bce25c..627c006 100644 --- a/src/mscz.ts +++ b/src/mscz.ts @@ -9,8 +9,8 @@ export const fetchMscz = async (): Promise => { const url = scoreinfo.msczCidUrl msczBufferP = (async (): Promise => { const r0 = await fetch(url) - const { Cid: { '/': cid } } = await r0.json() - const r = await fetch(`https://ipfs.infura.io/ipfs/${cid as string}`) + const { Key } = await r0.json() + const r = await fetch(`https://ipfs.infura.io/ipfs/${Key as string}`) const data = await r.arrayBuffer() return data })() diff --git a/src/scoreinfo.ts b/src/scoreinfo.ts index be01043..b9988f0 100644 --- a/src/scoreinfo.ts +++ b/src/scoreinfo.ts @@ -78,7 +78,7 @@ export const scoreinfo = { }, get msczCidUrl (this: typeof scoreinfo): string { - return `https://ipfs.infura.io:5001/api/v0/dag/resolve?arg=${this.msczIpfsRef}` + return `https://ipfs.infura.io:5001/api/v0/block/stat?arg=${this.msczIpfsRef}` }, get sheetImgType (): 'svg' | 'png' {