diff --git a/explorer/src/api/constants.ts b/explorer/src/api/constants.ts index f00c9ec280..66618a9b1f 100644 --- a/explorer/src/api/constants.ts +++ b/explorer/src/api/constants.ts @@ -24,3 +24,6 @@ export const MIXNODE_API_ERROR = "We're having trouble finding that record, plea export const NYM_WEBSITE = 'https://nymtech.net'; export const NYM_BIG_DIPPER = 'https://mixnet.explorers.guru'; + +export const NYM_MIXNET_CONTRACT = + process.env.NYM_MIXNET_CONTRACT || 'n17srjznxl9dvzdkpwpw24gg668wc73val88a6m5ajg6ankwvz9wtst0cznr'; diff --git a/explorer/src/components/Delegations/DelegateModal.tsx b/explorer/src/components/Delegations/DelegateModal.tsx index c2b0da2e0a..fc12f82664 100644 --- a/explorer/src/components/Delegations/DelegateModal.tsx +++ b/explorer/src/components/Delegations/DelegateModal.tsx @@ -9,9 +9,9 @@ import { ModalListItem } from './ModalListItem'; import { DelegationModalProps } from './DelegationModal'; import { unymToNym, validateAmount } from '../../utils/currency'; import { urls } from '../../utils'; +import { NYM_MIXNET_CONTRACT } from '../../api/constants'; const MIN_AMOUNT_TO_DELEGATE = 10; -const MIXNET_CONTRACT_ADDRESS = 'n17srjznxl9dvzdkpwpw24gg668wc73val88a6m5ajg6ankwvz9wtst0cznr'; export const DelegateModal: FCWithChildren<{ mixId: number; @@ -97,7 +97,7 @@ export const DelegateModal: FCWithChildren<{ const signerClient = await getSigningCosmWasmClient(); const tx = await signerClient.execute( delgationAddress, - MIXNET_CONTRACT_ADDRESS, + NYM_MIXNET_CONTRACT, { delegate_to_mixnode: { mix_id: delegationMixId,