Skip to content

Commit

Permalink
chore: wallet types cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
shelegdmitriy committed Jul 24, 2024
1 parent 7de40ad commit b1d6534
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion apps/ticketing/src/stores/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { SignMessageMethod } from '@near-wallet-selector/core/src/lib/walle
import type { WalletSelectorModal } from '@near-wallet-selector/modal-ui';
import { create } from 'zustand';

import { KEYPOM_CONTRACT_ID } from '@/utils/common';
import { KEYPOM_CONTRACT_ID } from '@/utils/config';

type WalletStore = {
account: AccountState | null;
Expand Down
14 changes: 3 additions & 11 deletions apps/ticketing/src/utils/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { setupFastAuthWallet } from 'near-fastauth-wallet';
import { usePurchasedTickets } from '@/hooks/usePurchasedTickets';

import { NETWORK_ID } from './config';
import { FunderEventMetadata, TicketMetadataExtra } from './helpers';
import type { FunderEventMetadata, TicketMetadataExtra } from './helpers';

const modules = [
setupMyNearWallet(),
Expand All @@ -23,19 +23,11 @@ const modules = [
}),
];

const TESTNET_WALLET_SELECTOR_PARAMS: WalletSelectorParams = {
network: 'testnet',
export const WALLET_SELECTOR_PARAMS: WalletSelectorParams = {
network: NETWORK_ID,
modules,
};

const MAINNET_WALLET_SELECTOR_PARAMS: WalletSelectorParams = {
network: 'mainnet',
modules,
};

export const WALLET_SELECTOR_PARAMS =
NETWORK_ID === 'mainnet' ? MAINNET_WALLET_SELECTOR_PARAMS : TESTNET_WALLET_SELECTOR_PARAMS;

export type EventDataForWallet = {
event: FunderEventMetadata;
tickets: {
Expand Down

0 comments on commit b1d6534

Please sign in to comment.