From 344016368dfbd316e437be31d00bc69dd1e8427c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Kihlberg?= Date: Wed, 23 Aug 2023 11:06:58 +0200 Subject: [PATCH] hardcode network --- packages/token-metadata-client/src/index.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/token-metadata-client/src/index.ts b/packages/token-metadata-client/src/index.ts index 60afd182..4272a05b 100644 --- a/packages/token-metadata-client/src/index.ts +++ b/packages/token-metadata-client/src/index.ts @@ -2,13 +2,14 @@ export interface TokenMetadata { precision: number; symbol: string; name: string; + network: "mainnet" | "preview" | "preprod"; } export const lookupToken = ( policyId: string, tokenName: string -): TokenMetadata | Error => { +): TokenMetadata => { if (policyId === "" && tokenName === "") - return { precision: 1e-6, symbol: "₳", name: "Ada" }; - return new Error("not found"); + return { precision: 1e-6, symbol: "₳", name: "Ada", network: "mainnet" }; + throw new Error("not found"); };