Skip to content

Commit

Permalink
fix(frontend): 🐛 don't externalize mirror node client dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
apttx committed Dec 16, 2024
1 parent 6452ba1 commit ec2312f
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 27 deletions.
2 changes: 1 addition & 1 deletion frontend/src/lib/hedera/MirrorNodeClient.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LedgerId } from '@hashgraph/sdk'
import type { Client, Params } from 'virtual:mirrorNode'
import type { Client, Params } from '@tikz/hedera-mirror-node-ts'

export const getMirrorNodeUrl = (ledgerId: LedgerId) => {
switch (ledgerId) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/hedera/collection/get.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AccountId, LedgerId } from '@hashgraph/sdk'
import { TokenTypeFilter, tokenUtils as getTokenUtils } from 'virtual:mirrorNode'
import { TokenTypeFilter, tokenUtils as getTokenUtils } from '@tikz/hedera-mirror-node-ts'
import { MirrorNodeClient } from '../MirrorNodeClient'

export interface TokenInfo {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/hedera/getNfts.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PUBLIC_IPFS_GATEWAY_BASE_URL } from '$env/static/public'
import type { IpfsUri, Nft } from '$lib/nft'
import { LedgerId, TokenId } from '@hashgraph/sdk'
import { nftUtils as getNftUtils } from 'virtual:mirrorNode'
import { nftUtils as getNftUtils } from '@tikz/hedera-mirror-node-ts'
import { MirrorNodeClient } from './MirrorNodeClient'

export type GetNfts = (options: {
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/lib/mirrorNode/virtual:mirrorNode.d.ts

This file was deleted.

19 changes: 0 additions & 19 deletions frontend/src/lib/mirrorNode/virtualMirrorNode.ts

This file was deleted.

6 changes: 4 additions & 2 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { sveltekit } from '@sveltejs/kit/vite'
import { defineConfig } from 'vite'
import { getVirtualHashConnectPlugin } from './src/lib/hashconnect/virtualHashConnect'
import { getVirtualMirrorNodePlugin } from './src/lib/mirrorNode/virtualMirrorNode'

export default defineConfig({
plugins: [getVirtualHashConnectPlugin(), getVirtualMirrorNodePlugin(), sveltekit()],
plugins: [getVirtualHashConnectPlugin(), sveltekit()],
ssr: {
noExternal: ['@tikz/hedera-mirror-node-ts'],
},
})

0 comments on commit ec2312f

Please sign in to comment.