Skip to content

Commit

Permalink
hardcode network
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornkihlberg committed Aug 23, 2023
1 parent 5c2aa60 commit 3440163
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/token-metadata-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
};

0 comments on commit 3440163

Please sign in to comment.