Skip to content

Commit 5952601

Browse files
committed
cloud_functions: import fix
1 parent d6c1407 commit 5952601

11 files changed

+12
-10
lines changed

cloud_functions/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"gcp-build": "npm i ./dist/src/wormhole-foundation-wormhole-monitor-common-0.0.1.tgz ./dist/src/wormhole-foundation-wormhole-monitor-database-0.0.1.tgz"
1313
},
1414
"dependencies": {
15+
"@certusone/wormhole-sdk": "^0.10.13",
1516
"@coral-xyz/anchor": "^0.29.0",
1617
"@cosmjs/cosmwasm-stargate": "^0.31.1",
1718
"@google-cloud/bigtable": "^4.1.0",

cloud_functions/src/alarmMissingVaas.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
explorerTx,
77
getEnvironment,
88
} from '@wormhole-foundation/wormhole-monitor-common';
9-
import chainIdToName from '@wormhole-foundation/wormhole-monitor-common/src/chainIdToName';
9+
import { chainIdToName } from '@wormhole-foundation/wormhole-monitor-common';
1010
import { Firestore } from 'firebase-admin/firestore';
1111
import { MissingVaasByChain, commonGetMissingVaas } from './getMissingVaas';
1212
import { ObservedMessage, ReobserveInfo, SlackInfo } from './types';

common/src/chainIdToName.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { toChain } from '@wormhole-foundation/sdk-base';
22

3-
const chainIdToName = (chainId: number) => {
3+
export const chainIdToName = (chainId: number) => {
44
try {
55
return toChain(chainId);
66
} catch (e) {}
77
return 'Unknown';
88
};
9-
export default chainIdToName;

dashboard/src/components/Accountant.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
getSortedRowModel,
2626
useReactTable,
2727
} from '@tanstack/react-table';
28-
import chainIdToName from '@wormhole-foundation/wormhole-monitor-common/dist/chainIdToName';
28+
import { chainIdToName } from '@wormhole-foundation/wormhole-monitor-common';
2929
import { Buffer } from 'buffer';
3030
import numeral from 'numeral';
3131
import { memo, useCallback, useEffect, useMemo, useState } from 'react';

dashboard/src/components/Alerts.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { Environment, useCurrentEnvironment } from '../contexts/NetworkContext';
1919
import { ChainIdToHeartbeats } from '../hooks/useChainHeartbeats';
2020
import { GUARDIAN_SET_3 } from '../utils/consts';
2121
import { Heartbeat } from '../utils/getLastHeartbeats';
22-
import chainIdToName from '@wormhole-foundation/wormhole-monitor-common/dist/chainIdToName';
22+
import { chainIdToName } from '@wormhole-foundation/wormhole-monitor-common';
2323

2424
export const BEHIND_DIFF = 1000;
2525
export const CHAIN_LESS_THAN_MAX_WARNING_THRESHOLD = 2;

dashboard/src/components/Chains.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import CollapsibleSection from './CollapsibleSection';
4444
import Table from './Table';
4545
import { CHAIN_ICON_MAP } from '../utils/consts';
4646
import { chainToChainId } from '@wormhole-foundation/sdk-base';
47-
import chainIdToName from '@wormhole-foundation/wormhole-monitor-common/dist/chainIdToName';
47+
import { chainIdToName } from '@wormhole-foundation/wormhole-monitor-common';
4848

4949
const columnHelper = createColumnHelper<HeartbeatInfo>();
5050

dashboard/src/components/Governor.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import EnqueuedVAAChecker from './EnqueuedVAAChecker';
3535
import { ExplorerAssetURL } from './ExplorerAssetURL';
3636
import { ExplorerTxHash } from './ExplorerTxHash';
3737
import Table from './Table';
38-
import chainIdToName from '@wormhole-foundation/wormhole-monitor-common/dist/chainIdToName';
38+
import { chainIdToName } from '@wormhole-foundation/wormhole-monitor-common';
3939

4040
const calculatePercent = (notional: GovernorGetAvailableNotionalByChainResponse_Entry): number => {
4141
try {

dashboard/src/components/Guardians.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import { Heartbeat } from '../utils/getLastHeartbeats';
4646
import { isHeartbeatUnhealthy } from './Chains';
4747
import CollapsibleSection from './CollapsibleSection';
4848
import Table from './Table';
49-
import chainIdToName from '@wormhole-foundation/wormhole-monitor-common/dist/chainIdToName';
49+
import { chainIdToName } from '@wormhole-foundation/wormhole-monitor-common';
5050

5151
const columnHelper = createColumnHelper<Heartbeat>();
5252

dashboard/src/components/MainnetGovernor.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import EnqueuedVAAChecker from './EnqueuedVAAChecker';
4444
import { ExplorerAssetURL } from './ExplorerAssetURL';
4545
import { ExplorerTxHash } from './ExplorerTxHash';
4646
import Table from './Table';
47-
import chainIdToName from '@wormhole-foundation/wormhole-monitor-common/dist/chainIdToName';
47+
import { chainIdToName } from '@wormhole-foundation/wormhole-monitor-common';
4848

4949
const calculatePercent = (notional: AvailableNotionalByChain): number => {
5050
try {

dashboard/src/components/Monitor.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import useMonitorInfo, { MissesByChain, ObservedMessage } from '../hooks/useMoni
3333
import { DataWrapper, getEmptyDataWrapper, receiveDataWrapper } from '../utils/DataWrapper';
3434
import { CHAIN_ICON_MAP } from '../utils/consts';
3535
import CollapsibleSection from './CollapsibleSection';
36-
import chainIdToName from '@wormhole-foundation/wormhole-monitor-common/dist/chainIdToName';
36+
import { chainIdToName } from '@wormhole-foundation/wormhole-monitor-common';
3737

3838
const inlineIconButtonSx: SxProps<Theme> = {
3939
fontSize: '1em',

package-lock.json

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)