Skip to content

Commit

Permalink
move folder
Browse files Browse the repository at this point in the history
  • Loading branch information
KorbinianK committed May 2, 2024
1 parent 34d52b7 commit cc43137
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 16 deletions.

This file was deleted.

2 changes: 1 addition & 1 deletion packages/bridge-ui/src/libs/bridge/fetchNFTs.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { Address } from 'viem';

import type { FetchNftArgs } from '$api/infrastructure/types/common';
import { isL2Chain } from '$libs/chain';
import { eventIndexerApiServices } from '$libs/eventIndexer/initEventIndexer';
import { type NFT, TokenType } from '$libs/token';
import { fetchNFTImageUrl } from '$libs/token/fetchNFTImageUrl';
import { getTokenWithInfoFromAddress } from '$libs/token/getTokenWithInfoFromAddress';
import { getLogger } from '$libs/util/logger';
import type { FetchNftArgs } from '$nftAPI/infrastructure/types/common';

const log = getLogger('bridge:fetchNFTs');

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import type { NFT } from '$nftAPI/domain/models/NFT';
import type { FetchNftArgs } from '$nftAPI/infrastructure/types/common';

export interface INFTRepository {
findByAddress({ address, chainId, refresh }: FetchNftArgs): Promise<NFT[]>;
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import Moralis from 'moralis';
import { type Address, zeroAddress } from 'viem';

import type { INFTRepository } from '$api/domain/interfaces/INFTRepository';
import type { NFT } from '$api/domain/models/NFT';
import { mapToNFTFromMoralis } from '$api/infrastructure/mappers/nft/MoralisNFTMapper';
import type { NFTApiData } from '$api/infrastructure/types/moralis';
import { moralisApiConfig } from '$config';
import { MORALIS_API_KEY } from '$env/static/private';
import type { INFTRepository } from '$nftAPI/domain/interfaces/INFTRepository';
import type { NFT } from '$nftAPI/domain/models/NFT';
import { mapToNFTFromMoralis } from '$nftAPI/infrastructure/mappers/nft/MoralisNFTMapper';
import type { NFTApiData } from '$nftAPI/infrastructure/types/moralis';

import type { FetchNftArgs } from '../types/common';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Address } from 'viem';

import type { NFT } from '$api/domain/models/NFT';
import type { NFTApiData } from '$api/infrastructure/types/moralis';
import type { TokenType } from '$libs/token';
import type { NFT } from '$nftAPI/domain/models/NFT';
import type { NFTApiData } from '$nftAPI/infrastructure/types/moralis';

export function mapToNFTFromMoralis(apiData: NFTApiData, chainId: number): NFT {
return {
Expand Down
4 changes: 2 additions & 2 deletions packages/bridge-ui/src/routes/api/nft/+server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { RequestHandler } from '@sveltejs/kit';

import { NFTService } from '$api/domain/services/NFTService';
import moralisRepository from '$api/infrastructure/api/MoralisNFTRepository.server';
import { NFTService } from '$nftAPI/domain/services/NFTService';
import moralisRepository from '$nftAPI/infrastructure/api/MoralisNFTRepository.server';

const nftService = new NFTService(moralisRepository);

Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"$chainConfig": ["./src/generated/chainConfig.ts"],
"$relayerConfig": ["./src/generated/relayerConfig.ts"],
"$customToken": ["./src/generated/customTokenConfig.ts"],
"$api/*": ["./src/api/*"],
"$nftAPI/*": ["./src/libs/nft/*"],
"$mocks": ["./src/tests/mocks/index.ts"]
},

Expand Down

0 comments on commit cc43137

Please sign in to comment.