Skip to content

Commit

Permalink
fix build and test
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxingloh committed Nov 10, 2023
1 parent 220ce3c commit 4efc5ed
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 7 additions & 1 deletion packages/crypto-frontmatter/src/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ import { readFile } from 'fs/promises';
import { join } from 'path';

import { decodeCaip19 } from './caip19';
import { FrontmatterContent, FrontmatterIndex, getFrontmatterCollection } from './index';
import { FrontmatterIndex, getFrontmatterCollection } from './index';

export interface FrontmatterContent extends FrontmatterIndex {
html: string;
caip2: string;
namespace: string;
}

/**
* Get FrontmatterContent using CAIP-19, returns undefined if not found
Expand Down
2 changes: 2 additions & 0 deletions packages/crypto-frontmatter/src/content.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ it('should getFrontmatterContent of eip155:1/erc20:0x00000000008943c65cAf789FFFC
fileId: expect.stringMatching(/[0-f]{64}/),
type: 'Frontmatter',
path: 'eip155:1/erc20:0x00000000008943c65cAf789FFFCF953bE156f6f8',
caip2: 'eip155:1',
namespace: 'erc20',
modifiedDate: expect.any(Number),
fields: {
title: 'Dharma USD Coin',
Expand Down
6 changes: 0 additions & 6 deletions packages/crypto-frontmatter/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ export interface FrontmatterImage {

export interface FrontmatterIndex {
path: string;
caip2: string;
namespace: string;
fileId: string;
modifiedDate: number;
type: string;
Expand All @@ -33,10 +31,6 @@ export interface FrontmatterIndex {
};
}

export interface FrontmatterContent extends FrontmatterIndex {
html: string;
}

export const SupportedCollections = [
['eip155:1', 'erc20'],
['eip155:10', 'erc20'],
Expand Down

0 comments on commit 4efc5ed

Please sign in to comment.