repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/models/msg/ibc/msg_connection_counterparty.ts
packages/ui/src/models/msg/ibc/msg_connection_counterparty.ts
import * as R from 'ramda'; import type { Categories } from '@/models/msg/types'; class MsgCounterpartyConnection { public category: Categories; public type: string; public signer: string; public json: object; constructor(payload: object) { this.category = 'ibc'; this.type = R.pathOr('', ['type']...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/models/msg/ibc/msg_client_submit_misbehaviour.ts
packages/ui/src/models/msg/ibc/msg_client_submit_misbehaviour.ts
import * as R from 'ramda'; import type { Categories } from '@/models/msg/types'; class MsgSubmitMisbehaviour { public category: Categories; public type: string; public signer: string; public clientId: string; public json: object; constructor(payload: object) { this.category = 'ibc'; this.type...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/models/msg/slashing/msg_unjail.ts
packages/ui/src/models/msg/slashing/msg_unjail.ts
import * as R from 'ramda'; import type { Categories } from '@/models/msg/types'; class MsgUnjail { public category: Categories; public type: string; public validatorAddress: string; public json: object; constructor(payload: object) { this.category = 'slashing'; this.type = R.pathOr('', ['type'],...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/models/distribution_params/index.ts
packages/ui/src/models/distribution_params/index.ts
import * as R from 'ramda'; class DistributionParams { public baseProposerReward: number; public bonusProposerReward: number; public communityTax: number; public withdrawAddressEnabled: boolean; constructor(payload: object) { this.baseProposerReward = R.pathOr(0, ['baseProposerReward'], payload); ...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/models/staking_params/index.ts
packages/ui/src/models/staking_params/index.ts
import * as R from 'ramda'; import chainConfig from '@/chainConfig'; const { primaryTokenUnit } = chainConfig(); class StakingParams { public bondDenom: string; public unbondingTime: number; public maxEntries: number; public historicalEntries: number; public maxValidators: number; constructor(payload...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/index.ts
packages/ui/src/utils/index.ts
export { a11yProps } from '@/utils/a11yProps'; export { convertMsgType } from '@/utils/convert_msg_type'; export { default as dayjs } from '@/utils/dayjs'; export { formatNumber, formatToken, formatTokenByExponent, removeEndingZeros, } from '@/utils/format_token'; export { getDenom } from '@/utils/get_denom'; e...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/dayjs/index.ts
packages/ui/src/utils/dayjs/index.ts
import dayjs from 'dayjs'; import advancedFormat from 'dayjs/plugin/advancedFormat'; import relativeTime from 'dayjs/plugin/relativeTime'; import timezone from 'dayjs/plugin/timezone'; import updateLocal from 'dayjs/plugin/updateLocale'; import utc from 'dayjs/plugin/utc'; // ==========================================...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/merge_state_change/index.ts
packages/ui/src/utils/merge_state_change/index.ts
import * as R from 'ramda'; /** * Util function to merge 2 objects together * Mostly used for recoil state changes * @param prevState prevstate object * @param change change object * @returns newly merged object replacing prev state items with new state items */ export const mergeStateChange = <T extends object>...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/isKeyOf/index.ts
packages/ui/src/utils/isKeyOf/index.ts
function isKeyOf<T extends object>(key: string, obj: T): key is keyof T & string { return key in obj; } export default isKeyOf;
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/merge_refs/index.ts
packages/ui/src/utils/merge_refs/index.ts
/* eslint-disable no-restricted-syntax */ import { MutableRefObject, RefCallback } from 'react'; /** * helper function to merge multiple refs * @param refs */ export const mergeRefs = <T>(...refs: Array<MutableRefObject<T> | RefCallback<T>>) => { const filteredRefs = refs.filter(Boolean); if (!filteredRefs.len...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/convert_msg_type/index.ts
packages/ui/src/utils/convert_msg_type/index.ts
/** * Helper Function to convert msg raw type data to human readable msg title * @param type The raw type you wish to convert */ export const convertMsgType = (type: string[]) => { const typeTitle = type?.map((eachType) => { const wordIndex = eachType.indexOf('Msg'); const msgStringLength = 'Msg'.length; ...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/get_middle_ellipsis/index.ts
packages/ui/src/utils/get_middle_ellipsis/index.ts
/** * Helper function to help generate ellpsis in the middle of text */ export const getMiddleEllipsis = ( str: string, options?: { beginning?: number; ending?: number; } ) => { const oneThird = Math.floor(str.length / 3); const { beginning = oneThird + oneThird, ending = oneThird } = options ?? {};...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/hex_to_bech32/index.ts
packages/ui/src/utils/hex_to_bech32/index.ts
import { bech32 } from 'bech32'; /** * Util that converts a hex in to bech32 * @param address address * @param prefix chain address prefix * @returns bech32 */ export const hexToBech32 = (address: string, prefix: string) => { const addressBuffer = Buffer.from(address, 'hex'); return bech32.encode(prefix, bech...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/a11yProps/index.ts
packages/ui/src/utils/a11yProps/index.ts
/** * Mui helper to return a11yProps tabs * @param index the index of the tab * @returns an object with `id` and `aria-controls` */ export const a11yProps = (index: number | string) => ({ id: `simple-tab-${index}`, 'aria-controls': `simple-tabpanel-${index}`, });
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/go_to_page/index.ts
packages/ui/src/utils/go_to_page/index.ts
import chainConfig from '@/chainConfig'; const { prefix } = chainConfig(); export const HOME = '/'; export const BLOCKS = '/blocks'; export const BLOCK_DETAILS = (slot: string | number): string => `/blocks/${slot}`; export const VALIDATOR_DETAILS = (address: string): string => `/validators/${address}`; export const V...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/time/index.ts
packages/ui/src/utils/time/index.ts
/** * util to conver nano to seconds * @param nano * @returns seconds */ export const nanoToSeconds = (nano: number) => nano / 1000000000; /** * Util to convert seconds to days * @param seconds * @returns days */ export const secondsToDays = (seconds: number) => seconds / (3600 * 24);
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/get_validator_status/index.ts
packages/ui/src/utils/get_validator_status/index.ts
/** * Util to get the validator status and theme * @param status 0-3 * @param jailed boolean * @returns an object with status and theme */ export const getValidatorStatus = (status: number, jailed: boolean, tombstoned: boolean) => { const results: { status: string; theme: TagTheme } = { status: 'na', the...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/replace_nan/index.ts
packages/ui/src/utils/replace_nan/index.ts
/** * Util that replaces the word NaN and Infinity to 100 * @param format string * @param base 0 * @returns new string */ export const replaceNaN = (format: string, base = '0') => format.replace('NaN', base).replace('Infinity', '100');
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/prefix_convert/index.ts
packages/ui/src/utils/prefix_convert/index.ts
import { bech32 } from 'bech32'; import chainConfig from '@/chainConfig'; const { prefix } = chainConfig(); export const toValidatorAddress = (address: string) => { if (!address) { return ''; } const decode = bech32.decode(address).words; return bech32.encode(prefix.validator, decode); }; export const is...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/get_denom/index.ts
packages/ui/src/utils/get_denom/index.ts
import chainConfig from '@/chainConfig'; const { primaryTokenUnit } = chainConfig(); /** * Helper Function to get Denom from a list * @param denom The denom you wish to convert to * @param value The value in base denom value */ export const getDenom = (list: MsgCoin[] = [], denom = primaryTokenUnit): MsgCoin => {...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/localstorage/index.ts
packages/ui/src/utils/localstorage/index.ts
const isClient = typeof window === 'object'; /** * Util to get item from localstorage * @param key * @param value * @returns the localstorage item */ export const getItem = <P>(key: string, value: P): P => { if (isClient) { const persistedString = localStorage.getItem(key); if (persistedString === null)...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/get_validator_condition/index.ts
packages/ui/src/utils/get_validator_condition/index.ts
/** * Util to get a validator's current condition * @param signedBlockWindow the chain's * @param missedBlockCounter * @returns number out of 100 */ export const getValidatorCondition = (signedBlockWindow: number, missedBlockCounter: number) => (1 - missedBlockCounter / signedBlockWindow) * 100; /** * Returns ...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/format_token/index.test.tsx
packages/ui/src/utils/format_token/index.test.tsx
import { formatNumber, formatToken, removeEndingZeros } from '@/utils/format_token'; // ================================== // unit tests // ================================== describe('utils: removeEndingZeros', () => { it('format correctly #1', async () => { const results = removeEndingZeros('1000000'); exp...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/utils/format_token/index.ts
packages/ui/src/utils/format_token/index.ts
import Big from 'big.js'; import numeral from 'numeral'; import chainConfig from '@/chainConfig'; const { tokenUnits } = chainConfig(); /** * Util to help me correctly transform a base denom amount * in to a display denom amount * @param value the current amount * @param denom the denom to convert the amount in t...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/wallet/atom.ts
packages/ui/src/recoil/wallet/atom.ts
import { atom } from 'recoil'; export interface AtomState { openAuthorizeConnectionDialog: boolean; openInstallKeplrExtensionDialog: boolean; openLoginDialog: boolean; openLoginSuccessDialog: boolean; openPairConnectWalletDialog: boolean; openPairKeplrExtensionDialog: boolean; openSelectNetworkDialog: bo...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/wallet/types.ts
packages/ui/src/recoil/wallet/types.ts
export interface AtomState { openAuthorizeConnectionDialog: boolean; openInstallKeplrExtensionDialog: boolean; openLoginDialog: boolean; openLoginSuccessDialog: boolean; openPairConnectWalletDialog: boolean; openPairKeplrExtensionDialog: boolean; openSelectNetworkDialog: boolean; walletConnectURI: strin...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/wallet/selectors.ts
packages/ui/src/recoil/wallet/selectors.ts
import { DefaultValue, ReadOnlySelectorOptions, selector } from 'recoil'; import { atomState } from '@/recoil/wallet/atom'; import { mergeStateChange } from '@/utils/merge_state_change'; const getOpenLoginDialog: ReadOnlySelectorOptions<boolean>['get'] = ({ get }) => { const state = get(atomState); return state.op...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/wallet/index.ts
packages/ui/src/recoil/wallet/index.ts
export { atomState } from '@/recoil/wallet/atom'; export { useWalletRecoil } from '@/recoil/wallet/hooks'; export { readOpenAuthorizeConnectionDialog, readOpenInstallKeplrExtensionDialog, readOpenLoginDialog, readOpenLoginSuccessDialog, readOpenPairConnectWalletDialog, readOpenPairKeplrExtensionDialog, re...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/wallet/hooks.ts
packages/ui/src/recoil/wallet/hooks.ts
import { useEffect } from 'react'; import { useRecoilState } from 'recoil'; import { atomState } from '@/recoil/wallet/atom'; export const useWalletRecoil = () => { const [wallet, setWallet] = useRecoilState(atomState); useEffect(() => { // set the wallet values }, [ setWallet, wallet.openAuthorizeC...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/user/atom.ts
packages/ui/src/recoil/user/atom.ts
import { atom } from 'recoil'; export interface PubKey { readonly type: string; readonly value: string; } export interface AtomState { address: string; pubKey: PubKey; walletName: string; loggedIn: boolean; } const initialState: AtomState = { address: '', pubKey: { type: '', value: '' }, walletName...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/user/types.ts
packages/ui/src/recoil/user/types.ts
import { PubKey } from '@/recoil/user/atom'; export interface AtomState { address: string; pubKey: PubKey; walletName: string; loggedIn: boolean; }
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/user/selectors.ts
packages/ui/src/recoil/user/selectors.ts
import { atomState, PubKey } from '@/recoil/user/atom'; import { mergeStateChange } from '@/utils/merge_state_change'; import { DefaultValue, ReadOnlySelectorOptions, selector } from 'recoil'; const getUserAddress: ReadOnlySelectorOptions<string>['get'] = ({ get }) => { const state = get(atomState); return state.a...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/user/index.ts
packages/ui/src/recoil/user/index.ts
export { atomState } from '@/recoil/user/atom'; export { useUserRecoil } from '@/recoil/user/hooks'; export { readUserAddress, writeUserAddress, readIsUserLoggedIn, writeIsUserLoggedIn, readUserPubKey, writeUserPubKey, readWalletName, writeWalletName, } from '@/recoil/user/selectors'; export type { Atom...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/user/hooks.ts
packages/ui/src/recoil/user/hooks.ts
import { atomState } from '@/recoil/user/atom'; import type { AtomState } from '@/recoil/user/types'; import { ADDRESS_KEY, PUBKEY_KEY, WALLET_NAME_KEY } from '@/utils/localstorage'; import { useEffect, useState } from 'react'; import { useRecoilState } from 'recoil'; const isClient = typeof window === 'object'; expo...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/settings/atom.ts
packages/ui/src/recoil/settings/atom.ts
import { atom } from 'recoil'; import chainConfig from '@/chainConfig'; import type { AtomState } from '@/recoil/settings/types'; const { themes } = chainConfig(); const initialState: AtomState = { theme: themes.default as AtomState['theme'], dateFormat: 'locale', timeFormat: '12-hour', txListFormat: 'compact...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/settings/utils.tsx
packages/ui/src/recoil/settings/utils.tsx
import chainConfig from '@/chainConfig'; import type { Theme } from '@/recoil/settings/types'; import { defaultTheme, isThemeSupported, themeDictionary } from '@/styles'; const { themes } = chainConfig(); // ================================ // CONSTANTS // ================================ export const THEME_LIST: The...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/settings/types.ts
packages/ui/src/recoil/settings/types.ts
export type Theme = 'light' | 'dark' | 'device' | 'deuteranopia' | 'tritanopia' | 'achromatopsia'; export type Date = 'locale' | 'utc'; export type TimeFormat = '12-hour' | '24-hour'; export type Tx = 'compact' | 'detailed'; export interface AtomState { theme: Theme; dateFormat: Date; timeFormat: TimeFormat; t...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/settings/selectors.ts
packages/ui/src/recoil/settings/selectors.ts
import { DefaultValue, ReadOnlySelectorOptions, selector } from 'recoil'; import { atomState } from '@/recoil/settings/atom'; import type { Date, TimeFormat, Theme, Tx } from '@/recoil/settings/types'; import { DATE_KEY, setItem, THEME_KEY, TX_KEY, TIME_FORMAT_KEY } from '@/utils/localstorage'; import { mergeStateChang...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/settings/index.ts
packages/ui/src/recoil/settings/index.ts
export { atomState } from '@/recoil/settings/atom'; export { useSettingsRecoil } from '@/recoil/settings/hooks'; export { readDate, readTimeFormat, readTheme, readTx, writeDate, writeTimeFormat, writeTheme, writeTx, } from '@/recoil/settings/selectors'; export type { AtomState, Date, Theme, Tx, TimeForm...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/settings/hooks.ts
packages/ui/src/recoil/settings/hooks.ts
import { useEffect } from 'react'; import { useRecoilState } from 'recoil'; import chainConfig from '@/chainConfig'; import { atomState } from '@/recoil/settings/atom'; import type { AtomState, Theme } from '@/recoil/settings/types'; import { THEME_DICTIONARY } from '@/recoil/settings/utils'; import { DATE_KEY, getItem...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/validators/atom.ts
packages/ui/src/recoil/validators/atom.ts
import { atomFamily } from 'recoil'; import type { AtomState } from '@/recoil/validators/types'; const initialState: AtomState = null; export const atomFamilyState = atomFamily<AtomState, string>({ key: 'validator', default: initialState, });
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/validators/types.ts
packages/ui/src/recoil/validators/types.ts
export type AtomState = { delegator: string; validator: string; } | null;
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/validators/selectors.ts
packages/ui/src/recoil/validators/selectors.ts
import { ReadOnlySelectorOptions, selectorFamily } from 'recoil'; import { atomFamilyState } from '@/recoil/validators/atom'; import type { AtomState } from '@/recoil/validators/types'; /** * Takes a consensus address and returns the delegator and validator * address if we have a record of it. * Returns null if no ...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/validators/index.ts
packages/ui/src/recoil/validators/index.ts
export { atomFamilyState } from '@/recoil/validators/atom'; export { readValidator, writeValidator } from '@/recoil/validators/selectors'; export type { AtomState } from '@/recoil/validators/types';
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/validators/hooks.ts
packages/ui/src/recoil/validators/hooks.ts
import { useEffect } from 'react'; import { useRecoilCallback } from 'recoil'; import { AtomState as ValidatorAtomState } from 'ui/recoil/validators'; import { useValidatorAddressesQuery } from '@/graphql/types/general_types'; import { atomFamilyState as profileAtomFamilyState } from '@/recoil/profiles/atom'; import ty...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/transactions_filter/atom.ts
packages/ui/src/recoil/transactions_filter/atom.ts
import { atom } from 'recoil'; import type { AtomState } from '@/recoil/transactions_filter/types'; const initialState: AtomState = { filter: '{}', openDialog: false, selectedMsgTypes: [], }; export const atomState = atom<AtomState>({ key: 'txsFilter', default: initialState, });
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/transactions_filter/types.ts
packages/ui/src/recoil/transactions_filter/types.ts
export interface AtomState { filter: string; openDialog: boolean; selectedMsgTypes: string[]; }
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/transactions_filter/selectors.ts
packages/ui/src/recoil/transactions_filter/selectors.ts
import { DefaultValue, ReadOnlySelectorOptions, selector } from 'recoil'; import { atomState } from '@/recoil/transactions_filter/atom'; import { mergeStateChange } from '@/utils/merge_state_change'; const getFilter: ReadOnlySelectorOptions<string>['get'] = ({ get }) => { const state = get(atomState); return state...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/transactions_filter/index.ts
packages/ui/src/recoil/transactions_filter/index.ts
export { atomState } from '@/recoil/transactions_filter/atom'; export { useTxsFilterRecoil } from '@/recoil/transactions_filter/hooks'; export { readFilter, writeFilter, writeOpenDialog, readOpenDialog, readSelectedMsgTypes, writeSelectedMsgTypes, } from '@/recoil/transactions_filter/selectors'; export type...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/transactions_filter/hooks.ts
packages/ui/src/recoil/transactions_filter/hooks.ts
import { useEffect } from 'react'; import { useRecoilState } from 'recoil'; import { atomState } from '@/recoil/transactions_filter/atom'; import type { AtomState } from '@/recoil/transactions_filter/types'; const isClient = typeof window === 'object'; export const useTxsFilterRecoil = () => { const [txsFilter, set...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/profiles/atom.ts
packages/ui/src/recoil/profiles/atom.ts
import { atomFamily } from 'recoil'; import type { AtomState } from '@/recoil/profiles/types'; const initialState: AtomState = null; export const atomFamilyState = atomFamily<AtomState, string>({ key: 'profile', default: initialState, });
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/profiles/types.ts
packages/ui/src/recoil/profiles/types.ts
export type AtomState = | { moniker: string; imageUrl?: string; } | null | boolean; export interface Profile { moniker: string; imageUrl?: string; }
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/profiles/selectors.ts
packages/ui/src/recoil/profiles/selectors.ts
import { bech32 } from 'bech32'; import { GetRecoilValue, selectorFamily } from 'recoil'; import chainConfig from '@/chainConfig'; import { atomFamilyState } from '@/recoil/profiles/atom'; import type { AtomState as ProfileAtomState } from '@/recoil/profiles/types'; import { readValidator } from '@/recoil/validators'; ...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/profiles/index.ts
packages/ui/src/recoil/profiles/index.ts
export { atomFamilyState } from '@/recoil/profiles/atom'; export { useProfileRecoil, useProfilesRecoil } from '@/recoil/profiles/hooks'; export { readDelegatorAddress, readDelegatorAddresses, readProfile, readProfileExist, readProfiles, readProfilesExist, validatorToDelegatorAddress, writeProfile, } fro...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/profiles/hooks.ts
packages/ui/src/recoil/profiles/hooks.ts
import { useRecoilValue } from 'recoil'; import chainConfig from '@/chainConfig'; import useShallowMemo from '@/hooks/useShallowMemo'; import { useDesmosProfile } from '@/hooks/use_desmos_profile'; import { readDelegatorAddress, readDelegatorAddresses, readProfile, readProfiles, } from '@/recoil/profiles/select...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/market/atom.ts
packages/ui/src/recoil/market/atom.ts
import { atom } from 'recoil'; import type { AtomState } from '@/recoil/market/types'; const initialState: AtomState = { price: null, supply: { value: '0', displayDenom: '', baseDenom: '', exponent: 0, }, marketCap: null, inflation: 0, communityPool: { value: '0', displayDenom: '', ...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/market/types.ts
packages/ui/src/recoil/market/types.ts
export interface AtomState { price: number | null; supply: TokenUnit; marketCap: number | null; inflation: number; communityPool: TokenUnit; apr: number; }
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/market/selectors.ts
packages/ui/src/recoil/market/selectors.ts
import { DefaultValue, ReadOnlySelectorOptions, selector } from 'recoil'; import { atomState } from '@/recoil/market/atom'; import type { AtomState } from '@/recoil/market/types'; import { mergeStateChange } from '@/utils/merge_state_change'; const getMarket: ReadOnlySelectorOptions<AtomState>['get'] = ({ get }) => { ...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/market/index.ts
packages/ui/src/recoil/market/index.ts
export * from '@/recoil/market/atom'; export * from '@/recoil/market/hooks'; export * from '@/recoil/market/selectors'; export * from '@/recoil/market/types';
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/recoil/market/hooks.ts
packages/ui/src/recoil/market/hooks.ts
import Big from 'big.js'; import numeral from 'numeral'; import { SetterOrUpdater, useRecoilState } from 'recoil'; import chainConfig from '@/chainConfig'; import { MarketDataQuery, useMarketDataQuery } from '@/graphql/types/general_types'; import { writeMarket } from '@/recoil/market/selectors'; import type { AtomStat...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/index.ts
packages/ui/src/screens/index.ts
export { default as Error } from '@/screens/error';
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/params/index.tsx
packages/ui/src/screens/params/index.tsx
import { NextSeo } from 'next-seo'; import useAppTranslation from '@/hooks/useAppTranslation'; import BoxDetails from '@/components/box_details'; import Layout from '@/components/layout'; import LoadAndExist from '@/components/load_and_exist'; import { useParams } from '@/screens/params/hooks'; import useStyles from '@...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/params/utils.tsx
packages/ui/src/screens/params/utils.tsx
import type { Distribution, Gov, Minting, Slashing, Staking } from '@/screens/params/types'; import { nanoToSeconds, secondsToDays } from '@/utils/time'; import type { TFunction } from '@/hooks/useAppTranslation'; import numeral from 'numeral'; const convertBySeconds = (seconds: number, t: TFunction) => { const SECO...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/params/styles.ts
packages/ui/src/screens/params/styles.ts
import { CSSObject } from '@emotion/react'; import { makeStyles } from 'tss-react/mui'; const useStyles = makeStyles()((theme) => ({ root: { ...(theme.mixins.layout as CSSObject), display: 'grid', gridTemplateRows: 'auto', gap: theme.spacing(1), '& a': { color: theme.palette.custom.fonts.hi...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/params/types.ts
packages/ui/src/screens/params/types.ts
export interface Staking { bondDenom: string; unbondingTime: number; maxEntries: number; historicalEntries: number; maxValidators: number; } export interface Slashing { downtimeJailDuration: number; minSignedPerWindow: number; signedBlockWindow: number; slashFractionDoubleSign: number; slashFractio...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/params/hooks.ts
packages/ui/src/screens/params/hooks.ts
import numeral from 'numeral'; import * as R from 'ramda'; import { useCallback, useState } from 'react'; import chainConfig from '@/chainConfig'; import { ParamsQuery, useParamsQuery } from '@/graphql/types/general_types'; import { DistributionParams, GovParams, MintParams, SlashingParams, StakingParams } from '@/mode...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/index.test.tsx
packages/ui/src/screens/proposal_details/index.test.tsx
import { ProposalDetailsDocument } from '@/graphql/types/general_types'; import ProposalDetails from '@/screens/proposal_details'; import { mockClient } from '@/tests/mocks/mockApollo'; import MockTheme from '@/tests/mocks/MockTheme'; import wait from '@/tests/utils/wait'; import { ApolloProvider } from '@apollo/client...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/index.tsx
packages/ui/src/screens/proposal_details/index.tsx
import { NextSeo } from 'next-seo'; import useAppTranslation from '@/hooks/useAppTranslation'; import Layout from '@/components/layout'; import LoadAndExist from '@/components/load_and_exist'; import Deposits from '@/screens/proposal_details/components/deposits'; import Overview from '@/screens/proposal_details/compone...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/utils.tsx
packages/ui/src/screens/proposal_details/utils.tsx
export const getProposalType = (proposalType: string) => { let type = proposalType; if (proposalType === '/cosmos.gov.v1beta1.TextProposal') { type = 'textProposal'; } if (proposalType === '/cosmos.params.v1beta1.ParameterChangeProposal') { type = 'parameterChangeProposal'; } if (proposalType === ...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/styles.ts
packages/ui/src/screens/proposal_details/styles.ts
import { CSSObject } from '@emotion/react'; import { makeStyles } from 'tss-react/mui'; const useStyles = makeStyles()((theme) => ({ root: { ...(theme.mixins.layout as CSSObject), display: 'grid', gridTemplateColumns: '1fr', gridTemplateRows: 'min-content min-content auto', gap: theme.spacing(1),...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/types.ts
packages/ui/src/screens/proposal_details/types.ts
export interface OverviewType { title: string; id: number; proposer: string; description: string; status: string; submitTime: string; proposalType: string; depositEndTime: string; votingStartTime: string | null; votingEndTime: string | null; content: { recipient: string; amount: Array<{ ...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/hooks.ts
packages/ui/src/screens/proposal_details/hooks.ts
import { useRouter } from 'next/router'; import * as R from 'ramda'; import { useCallback, useState } from 'react'; import type { ProposalState } from '@/screens/proposal_details/types'; import { ProposalDetailsQuery, useProposalDetailsQuery } from '@/graphql/types/general_types'; // ========================= // overv...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/index.ts
packages/ui/src/screens/proposal_details/components/index.ts
import Deposits from '@/screens/proposal_details/components/deposits'; import Overview from '@/screens/proposal_details/components/overview'; import Votes from '@/screens/proposal_details/components/votes'; import VotesGraph from '@/screens/proposal_details/components/votes_graph'; export { Overview, Votes, Deposits, ...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes/index.tsx
packages/ui/src/screens/proposal_details/components/votes/index.tsx
import Box from '@/components/box'; import NoData from '@/components/no_data'; import { usePagination } from '@/hooks/use_pagination'; import useShallowMemo from '@/hooks/useShallowMemo'; import Desktop from '@/screens/proposal_details/components/votes/components/desktop'; import Mobile from '@/screens/proposal_details...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes/utils.tsx
packages/ui/src/screens/proposal_details/components/votes/utils.tsx
import type { VoteType } from '@/screens/proposal_details/components/votes/types'; export const getVoteKey = (vote: string) => { const votes = { VOTE_OPTION_YES: 'yes', VOTE_OPTION_NO: 'no', VOTE_OPTION_NO_WITH_VETO: 'veto', VOTE_OPTION_ABSTAIN: 'abstain', NOT_VOTED: 'notVoted', }; return vo...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes/styles.ts
packages/ui/src/screens/proposal_details/components/votes/styles.ts
import { makeStyles } from 'tss-react/mui'; const useStyles = makeStyles()((theme) => ({ root: { overflow: 'hidden', [theme.breakpoints.up('md')]: { display: 'flex', flexDirection: 'column', }, }, list: { flex: 1, [theme.breakpoints.up('md')]: { overflow: 'auto', }, },...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes/types.ts
packages/ui/src/screens/proposal_details/components/votes/types.ts
export interface VoteType { vote: string; user: string; } export interface VoteCount { yes: number; no: number; veto: number; abstain: number; didNotVote: number; } export interface VoteState { data: VoteType[]; voteCount: VoteCount; validatorsNotVoted: VoteType[]; tab: number; } export type Ite...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes/hooks.ts
packages/ui/src/screens/proposal_details/components/votes/hooks.ts
import { useRouter } from 'next/router'; import * as R from 'ramda'; import { SyntheticEvent, useCallback, useState } from 'react'; import { ProposalDetailsVotesQuery, useProposalDetailsVotesQuery, } from '@/graphql/types/general_types'; import type { VoteState } from '@/screens/proposal_details/components/votes/ty...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes/components/index.ts
packages/ui/src/screens/proposal_details/components/votes/components/index.ts
import Desktop from '@/screens/proposal_details/components/votes/components/desktop'; import Mobile from '@/screens/proposal_details/components/votes/components/mobile'; import Paginate from '@/screens/proposal_details/components/votes/components/paginate'; import Tabs from '@/screens/proposal_details/components/votes/...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes/components/mobile/index.tsx
packages/ui/src/screens/proposal_details/components/votes/components/mobile/index.tsx
import Divider from '@mui/material/Divider'; import Typography from '@mui/material/Typography'; import useAppTranslation from '@/hooks/useAppTranslation'; import { FC, Fragment } from 'react'; import AvatarName from '@/components/avatar_name'; import { useProfileRecoil } from '@/recoil/profiles/hooks'; import useStyles...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes/components/mobile/styles.ts
packages/ui/src/screens/proposal_details/components/votes/components/mobile/styles.ts
import { makeStyles } from 'tss-react/mui'; const useStyles = makeStyles()((theme) => ({ list: { margin: theme.spacing(2, 0), }, item: { marginBottom: theme.spacing(2), '& .label': { marginBottom: theme.spacing(1), color: theme.palette.custom.fonts.fontThree, }, '& p.value': { ...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes/components/desktop/index.tsx
packages/ui/src/screens/proposal_details/components/votes/components/desktop/index.tsx
/* eslint-disable no-nested-ternary */ import Table from '@mui/material/Table'; import TableBody from '@mui/material/TableBody'; import TableCell from '@mui/material/TableCell'; import TableHead from '@mui/material/TableHead'; import TableRow from '@mui/material/TableRow'; import useAppTranslation from '@/hooks/useAppT...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes/components/desktop/utils.tsx
packages/ui/src/screens/proposal_details/components/votes/components/desktop/utils.tsx
export const columns: { key: string; align?: 'left' | 'center' | 'right' | 'justify' | 'inherit'; width: number; }[] = [ { key: 'voter', // width: 34, width: 50, }, // { // key: 'votingPower', // width: 33, // align: 'right', // }, { key: 'vote', // width: 33, width: ...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes/components/tabs/index.test.tsx
packages/ui/src/screens/proposal_details/components/votes/components/tabs/index.test.tsx
import renderer from 'react-test-renderer'; import TabsHeader from '@/screens/proposal_details/components/votes/components/tabs'; import MockTheme from '@/tests/mocks/MockTheme'; // ================================== // mocks // ================================== jest.mock('@/components/search', () => (props: JSX.Intr...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes/components/tabs/index.tsx
packages/ui/src/screens/proposal_details/components/votes/components/tabs/index.tsx
import Tab from '@mui/material/Tab'; import Tabs from '@mui/material/Tabs'; import useAppTranslation from '@/hooks/useAppTranslation'; import { ComponentProps, FC } from 'react'; import { a11yProps } from '@/utils/a11yProps'; import { tabLabels } from '@/screens/proposal_details/components/votes/components/tabs/utils';...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes/components/tabs/utils.tsx
packages/ui/src/screens/proposal_details/components/votes/components/tabs/utils.tsx
export const tabLabels = (data: { yes: number; no: number; abstain: number; veto: number; notVoted: number; }) => { const { yes, no, abstain, veto, notVoted } = data; const total = yes + no + abstain + veto; return [ { key: 'all', num: total, }, { key: 'yes', num: ye...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes/components/tabs/styles.ts
packages/ui/src/screens/proposal_details/components/votes/components/tabs/styles.ts
import { makeStyles } from 'tss-react/mui'; const useStyles = makeStyles()((theme) => ({ root: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', }, searchBar: { display: 'none', [theme.breakpoints.up('lg')]: { display: 'block', width: '300px', '& .Mui...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes/components/paginate/index.test.tsx
packages/ui/src/screens/proposal_details/components/votes/components/paginate/index.test.tsx
import renderer from 'react-test-renderer'; import Paginate from '@/screens/proposal_details/components/votes/components/paginate'; import MockTheme from '@/tests/mocks/MockTheme'; // ================================== // mocks // ================================== jest.mock('@/components/pagination', () => (props: JS...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes/components/paginate/index.tsx
packages/ui/src/screens/proposal_details/components/votes/components/paginate/index.tsx
import { ComponentProps, FC } from 'react'; import Pagination from '@/components/pagination'; import useStyles from '@/screens/proposal_details/components/votes/components/paginate/styles'; type Properties = 'total' | 'page' | 'rowsPerPage' | 'handlePageChange' | 'handleRowsPerPageChange'; type PaginateProps = Pick<Co...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes/components/paginate/styles.ts
packages/ui/src/screens/proposal_details/components/votes/components/paginate/styles.ts
import { makeStyles } from 'tss-react/mui'; const useStyles = makeStyles()((theme) => ({ root: { marginTop: theme.spacing(3), }, })); export default useStyles;
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes_graph/index.tsx
packages/ui/src/screens/proposal_details/components/votes_graph/index.tsx
import Box from '@/components/box'; import InfoPopover from '@/components/info_popover'; import QuorumExplanation from '@/screens/proposal_details/components/votes_graph/components/quorum_explanation'; import { useVotesGraph } from '@/screens/proposal_details/components/votes_graph/hooks'; import useStyles from '@/scre...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes_graph/utils.tsx
packages/ui/src/screens/proposal_details/components/votes_graph/utils.tsx
import { ThemeOptions } from '@mui/material/styles'; import Big from 'big.js'; import * as R from 'ramda'; import { formatNumber } from '@/utils/format_token'; import type { VotesType } from '@/screens/proposal_details/components/votes_graph/types'; type FormatGraphType = { data: VotesType; theme: ThemeOptions; ...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes_graph/styles.ts
packages/ui/src/screens/proposal_details/components/votes_graph/styles.ts
import { makeStyles } from 'tss-react/mui'; const useStyles = makeStyles()((theme) => ({ root: { [theme.breakpoints.up('lg')]: { display: 'flex', alignItems: 'center', }, position: 'relative', }, pie: { display: 'flex', alignItems: 'center', justifyContent: 'center', }, le...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes_graph/types.ts
packages/ui/src/screens/proposal_details/components/votes_graph/types.ts
export interface VotesType { yes: TokenUnit; no: TokenUnit; abstain: TokenUnit; veto: TokenUnit; } export interface VotesGraphState { votes: VotesType; bonded: TokenUnit; quorum: string; }
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes_graph/hooks.ts
packages/ui/src/screens/proposal_details/components/votes_graph/hooks.ts
import Big from 'big.js'; import { useRouter } from 'next/router'; import * as R from 'ramda'; import { useCallback, useState } from 'react'; import chainConfig from '@/chainConfig'; import { ProposalDetailsTallyQuery, useProposalDetailsTallyQuery, } from '@/graphql/types/general_types'; import type { VotesGraphSta...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes_graph/components/index.tsx
packages/ui/src/screens/proposal_details/components/votes_graph/components/index.tsx
import QuorumExplanation from '@/screens/proposal_details/components/votes_graph/components/quorum_explanation'; export { QuorumExplanation };
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes_graph/components/quorum_explanation/index.tsx
packages/ui/src/screens/proposal_details/components/votes_graph/components/quorum_explanation/index.tsx
import Typography from '@mui/material/Typography'; import AppTrans from '@/components/AppTrans'; import useStyles from '@/screens/proposal_details/components/votes_graph/components/quorum_explanation/styles'; const QuorumExplanation = (props: { quorum: string }) => { const { classes } = useStyles(); return ( ...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/votes_graph/components/quorum_explanation/styles.ts
packages/ui/src/screens/proposal_details/components/votes_graph/components/quorum_explanation/styles.ts
import { makeStyles } from 'tss-react/mui'; const useStyles = makeStyles()(() => ({ root: { height: '100%', }, })); export default useStyles;
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/overview/index.test.tsx
packages/ui/src/screens/proposal_details/components/overview/index.test.tsx
import renderer from 'react-test-renderer'; import Overview from '@/screens/proposal_details/components/overview'; import MockTheme from '@/tests/mocks/MockTheme'; // ================================== // mocks // ================================== jest.mock('@/components/single_proposal', () => (props: JSX.IntrinsicE...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false
forbole/big-dipper-2.0-cosmos
https://github.com/forbole/big-dipper-2.0-cosmos/blob/de058820eacedc2e9cbe82ad7fec8239faedeeff/packages/ui/src/screens/proposal_details/components/overview/index.tsx
packages/ui/src/screens/proposal_details/components/overview/index.tsx
import { FC, useCallback } from 'react'; import { useRecoilValue } from 'recoil'; import Divider from '@mui/material/Divider'; import Typography from '@mui/material/Typography'; import numeral from 'numeral'; import * as R from 'ramda'; import Box from '@/components/box'; import Markdown from '@/components/markdown'; i...
typescript
Apache-2.0
de058820eacedc2e9cbe82ad7fec8239faedeeff
2026-01-05T04:51:16.060495Z
false