Bind fetch for browser reference resolution
This commit is contained in:
@@ -93,7 +93,10 @@ const fetchManifest = async (manifestTxId: string): Promise<{
|
||||
const resolveReferenceManifestTxId = async (): Promise<string> => {
|
||||
if (!MANIFEST_REFERENCE_NAME) return "";
|
||||
|
||||
const names = new ReferenceClient({ gateway: ARWEAVE_GATEWAY });
|
||||
const names = new ReferenceClient({
|
||||
gateway: ARWEAVE_GATEWAY,
|
||||
fetch: (...args) => fetch(...args)
|
||||
});
|
||||
const value = await names.resolveName(MANIFEST_REFERENCE_NAME);
|
||||
if (typeof value !== "string" || value.length === 0) {
|
||||
throw new Error(`Reference ${MANIFEST_REFERENCE_NAME} did not resolve to a manifest id`);
|
||||
|
||||
Reference in New Issue
Block a user