Skip to content

Commit

Permalink
cloud_functions: import fix
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-gray committed Apr 5, 2024
1 parent d6c1407 commit 5952601
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions cloud_functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"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"
},
"dependencies": {
"@certusone/wormhole-sdk": "^0.10.13",
"@coral-xyz/anchor": "^0.29.0",
"@cosmjs/cosmwasm-stargate": "^0.31.1",
"@google-cloud/bigtable": "^4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion cloud_functions/src/alarmMissingVaas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
explorerTx,
getEnvironment,
} from '@wormhole-foundation/wormhole-monitor-common';
import chainIdToName from '@wormhole-foundation/wormhole-monitor-common/src/chainIdToName';
import { chainIdToName } from '@wormhole-foundation/wormhole-monitor-common';
import { Firestore } from 'firebase-admin/firestore';
import { MissingVaasByChain, commonGetMissingVaas } from './getMissingVaas';
import { ObservedMessage, ReobserveInfo, SlackInfo } from './types';
Expand Down
3 changes: 1 addition & 2 deletions common/src/chainIdToName.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { toChain } from '@wormhole-foundation/sdk-base';

const chainIdToName = (chainId: number) => {
export const chainIdToName = (chainId: number) => {
try {
return toChain(chainId);
} catch (e) {}
return 'Unknown';
};
export default chainIdToName;
2 changes: 1 addition & 1 deletion dashboard/src/components/Accountant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
getSortedRowModel,
useReactTable,
} from '@tanstack/react-table';
import chainIdToName from '@wormhole-foundation/wormhole-monitor-common/dist/chainIdToName';
import { chainIdToName } from '@wormhole-foundation/wormhole-monitor-common';
import { Buffer } from 'buffer';
import numeral from 'numeral';
import { memo, useCallback, useEffect, useMemo, useState } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/components/Alerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { Environment, useCurrentEnvironment } from '../contexts/NetworkContext';
import { ChainIdToHeartbeats } from '../hooks/useChainHeartbeats';
import { GUARDIAN_SET_3 } from '../utils/consts';
import { Heartbeat } from '../utils/getLastHeartbeats';
import chainIdToName from '@wormhole-foundation/wormhole-monitor-common/dist/chainIdToName';
import { chainIdToName } from '@wormhole-foundation/wormhole-monitor-common';

export const BEHIND_DIFF = 1000;
export const CHAIN_LESS_THAN_MAX_WARNING_THRESHOLD = 2;
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/components/Chains.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import CollapsibleSection from './CollapsibleSection';
import Table from './Table';
import { CHAIN_ICON_MAP } from '../utils/consts';
import { chainToChainId } from '@wormhole-foundation/sdk-base';
import chainIdToName from '@wormhole-foundation/wormhole-monitor-common/dist/chainIdToName';
import { chainIdToName } from '@wormhole-foundation/wormhole-monitor-common';

const columnHelper = createColumnHelper<HeartbeatInfo>();

Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/components/Governor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import EnqueuedVAAChecker from './EnqueuedVAAChecker';
import { ExplorerAssetURL } from './ExplorerAssetURL';
import { ExplorerTxHash } from './ExplorerTxHash';
import Table from './Table';
import chainIdToName from '@wormhole-foundation/wormhole-monitor-common/dist/chainIdToName';
import { chainIdToName } from '@wormhole-foundation/wormhole-monitor-common';

const calculatePercent = (notional: GovernorGetAvailableNotionalByChainResponse_Entry): number => {
try {
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/components/Guardians.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import { Heartbeat } from '../utils/getLastHeartbeats';
import { isHeartbeatUnhealthy } from './Chains';
import CollapsibleSection from './CollapsibleSection';
import Table from './Table';
import chainIdToName from '@wormhole-foundation/wormhole-monitor-common/dist/chainIdToName';
import { chainIdToName } from '@wormhole-foundation/wormhole-monitor-common';

const columnHelper = createColumnHelper<Heartbeat>();

Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/components/MainnetGovernor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import EnqueuedVAAChecker from './EnqueuedVAAChecker';
import { ExplorerAssetURL } from './ExplorerAssetURL';
import { ExplorerTxHash } from './ExplorerTxHash';
import Table from './Table';
import chainIdToName from '@wormhole-foundation/wormhole-monitor-common/dist/chainIdToName';
import { chainIdToName } from '@wormhole-foundation/wormhole-monitor-common';

const calculatePercent = (notional: AvailableNotionalByChain): number => {
try {
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/components/Monitor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import useMonitorInfo, { MissesByChain, ObservedMessage } from '../hooks/useMoni
import { DataWrapper, getEmptyDataWrapper, receiveDataWrapper } from '../utils/DataWrapper';
import { CHAIN_ICON_MAP } from '../utils/consts';
import CollapsibleSection from './CollapsibleSection';
import chainIdToName from '@wormhole-foundation/wormhole-monitor-common/dist/chainIdToName';
import { chainIdToName } from '@wormhole-foundation/wormhole-monitor-common';

const inlineIconButtonSx: SxProps<Theme> = {
fontSize: '1em',
Expand Down
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5952601

Please sign in to comment.