├── cypress.json
├── .dockerignore
├── .babelrc
├── public
├── locales
│ └── en
│ │ ├── profiles.json
│ │ └── blocks.json
├── icons
│ ├── favicon.ico
│ ├── favicon-16x16.png
│ ├── favicon-32x32.png
│ ├── mstile-150x150.png
│ ├── apple-touch-icon.png
│ ├── android-chrome-192x192.png
│ ├── android-chrome-512x512.png
│ ├── browserconfig.xml
│ └── site.webmanifest
├── fonts
│ ├── HindMadurai-Medium.ttf
│ └── HindMadurai-Regular.ttf
└── images
│ └── default_cover_pattern.png
├── src
├── screens
│ ├── 404
│ │ ├── index.tsx
│ │ └── styles.ts
│ ├── proposals
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ └── list
│ │ │ │ ├── components
│ │ │ │ ├── index.ts
│ │ │ │ └── total
│ │ │ │ │ └── index.tsx
│ │ │ │ └── __snapshots__
│ │ │ │ └── index.test.tsx.snap
│ │ ├── types.ts
│ │ └── styles.ts
│ ├── validators
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ └── list
│ │ │ │ ├── components
│ │ │ │ ├── tabs
│ │ │ │ │ └── utils.ts
│ │ │ │ ├── mobile
│ │ │ │ │ ├── component
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ └── __snapshots__
│ │ │ │ │ │ └── index.test.tsx.snap
│ │ │ │ ├── condition
│ │ │ │ │ ├── __snapshots__
│ │ │ │ │ │ └── index.test.tsx.snap
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── index.test.tsx
│ │ │ │ │ └── styles.ts
│ │ │ │ ├── voting_power_explanation
│ │ │ │ │ ├── styles.ts
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── desktop
│ │ │ │ │ └── __snapshots__
│ │ │ │ │ │ └── index.test.tsx.snap
│ │ │ │ └── index.ts
│ │ │ │ ├── __snapshots__
│ │ │ │ └── index.test.tsx.snap
│ │ │ │ ├── types.ts
│ │ │ │ └── styles.ts
│ │ ├── __snapshots__
│ │ │ └── index.test.tsx.snap
│ │ ├── styles.ts
│ │ └── index.tsx
│ ├── profile_details
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ └── connections
│ │ │ │ ├── components
│ │ │ │ ├── index.ts
│ │ │ │ └── desktop
│ │ │ │ │ └── utils.ts
│ │ │ │ └── __snapshots__
│ │ │ │ └── index.test.tsx.snap
│ │ ├── types.ts
│ │ └── styles.ts
│ ├── home
│ │ ├── components
│ │ │ ├── data_blocks
│ │ │ │ ├── components
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── single_block
│ │ │ │ │ │ ├── __snapshots__
│ │ │ │ │ │ └── index.test.tsx.snap
│ │ │ │ │ │ └── index.test.tsx
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ ├── blocks
│ │ │ │ ├── components
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── desktop
│ │ │ │ │ │ ├── utils.ts
│ │ │ │ │ │ └── styles.tsx
│ │ │ │ └── types.ts
│ │ │ ├── transactions
│ │ │ │ ├── components
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── desktop
│ │ │ │ │ │ ├── utils.ts
│ │ │ │ │ │ └── styles.tsx
│ │ │ │ ├── types.ts
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ ├── hero
│ │ │ │ ├── components
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── token_price
│ │ │ │ │ │ ├── hooks.ts
│ │ │ │ │ │ └── styles.ts
│ │ │ │ ├── types.ts
│ │ │ │ └── index.tsx
│ │ │ └── index.ts
│ │ ├── __snapshots__
│ │ │ └── index.test.tsx.snap
│ │ └── index.tsx
│ ├── app
│ │ └── components
│ │ │ ├── index.ts
│ │ │ ├── inner_app
│ │ │ └── index.tsx
│ │ │ └── recoil_debugger
│ │ │ └── index.tsx
│ ├── blocks
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ ├── mobile
│ │ │ │ └── styles.ts
│ │ │ └── desktop
│ │ │ │ ├── styles.ts
│ │ │ │ └── utils.ts
│ │ ├── types.ts
│ │ ├── __snapshots__
│ │ │ └── index.test.tsx.snap
│ │ └── styles.ts
│ ├── proposal_details
│ │ ├── components
│ │ │ ├── votes_graph
│ │ │ │ ├── components
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── quorum_explanation
│ │ │ │ │ │ ├── styles.ts
│ │ │ │ │ │ └── index.tsx
│ │ │ │ └── types.ts
│ │ │ ├── overview
│ │ │ │ └── components
│ │ │ │ │ └── index.ts
│ │ │ ├── deposits
│ │ │ │ ├── components
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── paginate
│ │ │ │ │ │ ├── styles.ts
│ │ │ │ │ │ ├── __snapshots__
│ │ │ │ │ │ │ └── index.test.tsx.snap
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── desktop
│ │ │ │ │ │ └── utils.ts
│ │ │ │ ├── types.ts
│ │ │ │ └── styles.tsx
│ │ │ ├── index.ts
│ │ │ └── votes
│ │ │ │ ├── components
│ │ │ │ ├── index.ts
│ │ │ │ ├── paginate
│ │ │ │ │ ├── styles.ts
│ │ │ │ │ ├── __snapshots__
│ │ │ │ │ │ └── index.test.tsx.snap
│ │ │ │ │ └── index.tsx
│ │ │ │ └── desktop
│ │ │ │ │ └── utils.ts
│ │ │ │ └── types.ts
│ │ └── types.ts
│ ├── block_details
│ │ ├── components
│ │ │ ├── signatures
│ │ │ │ └── components
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── desktop
│ │ │ │ │ ├── styles.ts
│ │ │ │ │ └── utils.tsx
│ │ │ └── index.ts
│ │ └── types.ts
│ ├── account_details
│ │ ├── components
│ │ │ ├── other_tokens
│ │ │ │ ├── components
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── desktop
│ │ │ │ │ │ └── utils.ts
│ │ │ │ └── styles.tsx
│ │ │ ├── staking
│ │ │ │ ├── components
│ │ │ │ │ ├── delegations
│ │ │ │ │ │ ├── types.ts
│ │ │ │ │ │ ├── components
│ │ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ │ └── desktop
│ │ │ │ │ │ │ │ └── utils.ts
│ │ │ │ │ │ └── styles.tsx
│ │ │ │ │ ├── unbondings
│ │ │ │ │ │ ├── types.ts
│ │ │ │ │ │ ├── components
│ │ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ │ └── desktop
│ │ │ │ │ │ │ │ └── utils.ts
│ │ │ │ │ │ └── styles.tsx
│ │ │ │ │ ├── redelegations
│ │ │ │ │ │ ├── components
│ │ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ │ └── desktop
│ │ │ │ │ │ │ │ └── utils.ts
│ │ │ │ │ │ ├── types.ts
│ │ │ │ │ │ └── styles.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ └── styles.tsx
│ │ │ ├── transactions
│ │ │ │ ├── types.ts
│ │ │ │ └── styles.ts
│ │ │ ├── index.ts
│ │ │ └── overview
│ │ │ │ └── hooks.ts
│ │ └── types.ts
│ ├── validator_details
│ │ ├── components
│ │ │ ├── staking
│ │ │ │ ├── components
│ │ │ │ │ ├── delegations
│ │ │ │ │ │ ├── types.ts
│ │ │ │ │ │ ├── components
│ │ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ │ └── desktop
│ │ │ │ │ │ │ │ └── utils.ts
│ │ │ │ │ │ └── styles.tsx
│ │ │ │ │ ├── unbondings
│ │ │ │ │ │ ├── types.ts
│ │ │ │ │ │ ├── components
│ │ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ │ └── desktop
│ │ │ │ │ │ │ │ └── utils.ts
│ │ │ │ │ │ └── styles.tsx
│ │ │ │ │ ├── redelegations
│ │ │ │ │ │ ├── components
│ │ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ │ └── desktop
│ │ │ │ │ │ │ │ └── utils.ts
│ │ │ │ │ │ ├── types.ts
│ │ │ │ │ │ └── styles.tsx
│ │ │ │ │ └── index.ts
│ │ │ │ └── styles.tsx
│ │ │ ├── transactions
│ │ │ │ ├── types.ts
│ │ │ │ └── styles.ts
│ │ │ ├── validator_overview
│ │ │ │ ├── hooks.ts
│ │ │ │ └── utils.ts
│ │ │ └── index.ts
│ │ └── types.ts
│ ├── transactions
│ │ ├── types.ts
│ │ └── styles.ts
│ ├── transaction_details
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ ├── overview
│ │ │ │ └── styles.ts
│ │ │ └── logs
│ │ │ │ ├── styles.tsx
│ │ │ │ └── index.tsx
│ │ └── types.ts
│ ├── params
│ │ └── styles.ts
│ └── error
│ │ └── styles.ts
├── components
│ ├── footer
│ │ └── components
│ │ │ ├── social_media
│ │ │ ├── types.ts
│ │ │ ├── index.test.tsx
│ │ │ ├── index.tsx
│ │ │ └── utils.tsx
│ │ │ └── index.ts
│ ├── pagination
│ │ └── components
│ │ │ ├── index.ts
│ │ │ └── actions
│ │ │ └── index.test.tsx
│ ├── transactions_list_details
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ └── list
│ │ │ │ ├── components
│ │ │ │ └── index.ts
│ │ │ │ └── styles.ts
│ │ └── types.ts
│ ├── desmos_profile
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ └── connections
│ │ │ │ └── components
│ │ │ │ ├── index.ts
│ │ │ │ └── desktop
│ │ │ │ └── utils.ts
│ │ └── hooks.ts
│ ├── nav
│ │ ├── components
│ │ │ ├── desktop
│ │ │ │ └── components
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── action_bar
│ │ │ │ │ └── components
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── network_list
│ │ │ │ │ ├── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ │ │ └── styles.ts
│ │ │ ├── networks
│ │ │ │ ├── components
│ │ │ │ │ └── index.ts
│ │ │ │ ├── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ │ └── styles.tsx
│ │ │ ├── mobile
│ │ │ │ └── components
│ │ │ │ │ ├── menu
│ │ │ │ │ └── types.ts
│ │ │ │ │ ├── navbar
│ │ │ │ │ └── types.ts
│ │ │ │ │ └── index.ts
│ │ │ ├── seach_bar
│ │ │ │ ├── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ │ └── index.tsx
│ │ │ └── index.ts
│ │ ├── __snapshots__
│ │ │ └── index.test.tsx.snap
│ │ ├── styles.tsx
│ │ └── index.tsx
│ ├── transactions_list
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ ├── mobile
│ │ │ │ └── styles.ts
│ │ │ └── desktop
│ │ │ │ ├── styles.ts
│ │ │ │ └── utils.ts
│ │ ├── types.ts
│ │ └── styles.ts
│ ├── layout
│ │ ├── types.ts
│ │ └── __snapshots__
│ │ │ └── index.test.tsx.snap
│ ├── msg
│ │ ├── bank
│ │ │ ├── send
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ └── multisend
│ │ │ │ └── styles.tsx
│ │ ├── distribution
│ │ │ ├── fund
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ ├── withdraw_reward
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ ├── withdraw_commission
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ └── set_withdrawal_address
│ │ │ │ └── __snapshots__
│ │ │ │ └── index.test.tsx.snap
│ │ ├── governance
│ │ │ ├── vote
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ ├── deposit_proposal
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ └── submit_proposal
│ │ │ │ └── __snapshots__
│ │ │ │ └── index.test.tsx.snap
│ │ ├── unknown
│ │ │ ├── __snapshots__
│ │ │ │ └── index.test.tsx.snap
│ │ │ ├── index.tsx
│ │ │ └── styles.tsx
│ │ ├── slashing
│ │ │ └── unjail
│ │ │ │ └── __snapshots__
│ │ │ │ └── index.test.tsx.snap
│ │ ├── profiles
│ │ │ ├── block_user
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ ├── save_profile
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ ├── unblock_user
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ ├── delete_profile
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ ├── create_relationship
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ ├── dtag_accept_transfer
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ ├── dtag_cancel_transfer
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ ├── dtag_refuse_transfer
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ └── dtag_transfer_request
│ │ │ │ └── __snapshots__
│ │ │ │ └── index.test.tsx.snap
│ │ ├── staking
│ │ │ ├── delegate
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ ├── redelegate
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ ├── undelegate
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ ├── edit_validator
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ └── create_validator
│ │ │ │ └── __snapshots__
│ │ │ │ └── index.test.tsx.snap
│ │ ├── crisis
│ │ │ └── verify_invariant
│ │ │ │ └── __snapshots__
│ │ │ │ └── index.test.tsx.snap
│ │ ├── vesting
│ │ │ ├── create_vesting_account
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ └── create_periodic_vesting_account
│ │ │ │ └── __snapshots__
│ │ │ │ └── index.test.tsx.snap
│ │ ├── authz
│ │ │ ├── grant
│ │ │ │ └── __snapshots__
│ │ │ │ │ └── index.test.tsx.snap
│ │ │ └── revoke
│ │ │ │ └── __snapshots__
│ │ │ │ └── index.test.tsx.snap
│ │ └── feegrant
│ │ │ ├── grant_allowance
│ │ │ └── __snapshots__
│ │ │ │ └── index.test.tsx.snap
│ │ │ └── revoke_allowance
│ │ │ └── __snapshots__
│ │ │ └── index.test.tsx.snap
│ ├── tag
│ │ ├── __snapshots__
│ │ │ └── index.test.tsx.snap
│ │ ├── index.tsx
│ │ └── index.test.tsx
│ ├── loading
│ │ ├── styles.tsx
│ │ ├── index.tsx
│ │ └── index.test.tsx
│ ├── box
│ │ ├── index.tsx
│ │ └── styles.tsx
│ ├── custom_tool_tip
│ │ ├── styles.tsx
│ │ └── index.tsx
│ ├── name
│ │ ├── styles.ts
│ │ └── index.tsx
│ ├── linear_loading
│ │ ├── index.tsx
│ │ └── styles.tsx
│ ├── info_popover
│ │ ├── hooks.tsx
│ │ └── styles.tsx
│ ├── icons
│ │ └── index.tsx
│ ├── transaction_messages_filter
│ │ └── hooks.tsx
│ ├── load_and_exist
│ │ └── index.tsx
│ ├── tab_panel
│ │ └── index.tsx
│ ├── avatar
│ │ ├── __snapshots__
│ │ │ └── index.test.tsx.snap
│ │ └── styles.ts
│ ├── avatar_name
│ │ └── styles.ts
│ ├── search
│ │ ├── styles.ts
│ │ └── hooks.ts
│ └── no_data
│ │ └── styles.tsx
├── recoil
│ ├── validators
│ │ ├── types.ts
│ │ ├── atom.ts
│ │ └── index.ts
│ ├── market
│ │ ├── types.ts
│ │ ├── index.ts
│ │ ├── atom.ts
│ │ └── selectors.ts
│ ├── profiles
│ │ ├── types.ts
│ │ ├── atom.ts
│ │ └── index.ts
│ ├── big_dipper_networks
│ │ ├── types.ts
│ │ ├── atom.ts
│ │ └── index.ts
│ └── settings
│ │ ├── types.ts
│ │ ├── atom.ts
│ │ └── index.ts
├── graphql
│ └── general
│ │ ├── chain_id.graphql
│ │ ├── block_height.graphql
│ │ ├── proposals.graphql
│ │ ├── tokenomics.graphql
│ │ ├── block_time.graphql
│ │ ├── active_validator_count.graphql
│ │ ├── transaction_details.graphql
│ │ ├── messages_by_address.graphql
│ │ ├── token_price.graphql
│ │ ├── market_data.graphql
│ │ ├── online_voting_power.graphql
│ │ ├── params.graphql
│ │ └── transactions.graphql
├── pages
│ ├── 404.tsx
│ ├── _app.tsx
│ ├── index.tsx
│ ├── blocks
│ │ ├── index.tsx
│ │ └── [height].tsx
│ ├── params
│ │ └── index.tsx
│ ├── proposals
│ │ ├── index.tsx
│ │ └── [id].tsx
│ ├── validators
│ │ ├── index.tsx
│ │ └── [address].tsx
│ ├── [dtag].tsx
│ ├── transactions
│ │ ├── index.tsx
│ │ └── [tx].tsx
│ ├── accounts
│ │ └── [address].tsx
│ ├── account
│ │ └── [address].tsx
│ ├── transaction
│ │ └── [tx].tsx
│ ├── validator
│ │ └── [address].tsx
│ └── _error.tsx
├── utils
│ ├── replace_nan.ts
│ ├── allyProps.ts
│ ├── time.ts
│ ├── hex_to_bech32.ts
│ ├── merge_state_change.ts
│ ├── prefix_convert.ts
│ ├── merge_refs.ts
│ └── get_middle_ellipsis.ts
├── models
│ └── msg
│ │ ├── types.ts
│ │ ├── msg_unknown.ts
│ │ ├── governance
│ │ └── msg_text_proposal.ts
│ │ ├── profiles
│ │ ├── msg_save_profile.ts
│ │ ├── msg_delete_profile.ts
│ │ ├── msg_dtag_cancel_transfer.ts
│ │ ├── msg_dtag_refuse_transfer.ts
│ │ ├── msg_dtag_transfer_request.ts
│ │ ├── msg_block_user.ts
│ │ ├── msg_create_relationship.ts
│ │ └── msg_dtag_accept_transfer.ts
│ │ ├── ibc
│ │ ├── msg_channel.ts
│ │ ├── msg_client_height.ts
│ │ ├── msg_channel_packet.ts
│ │ ├── msg_channel_timeout.ts
│ │ ├── msg_connection_version.ts
│ │ ├── msg_connection_end.ts
│ │ ├── msg_channel_timeout_on_close.ts
│ │ ├── msg_channel_counterparty.ts
│ │ ├── msg_connection_counterparty.ts
│ │ ├── msg_client_upgrade_client.ts
│ │ ├── msg_client_create_client.ts
│ │ ├── msg_client_submit_misbehaviour.ts
│ │ ├── msg_channel_acknowledgement.ts
│ │ └── msg_connection_open_confirm.ts
│ │ ├── slashing
│ │ └── msg_unjail.ts
│ │ ├── authz
│ │ ├── msg_grant.ts
│ │ └── msg_revoke.ts
│ │ ├── feegrant
│ │ ├── msg_grant_allowance.ts
│ │ └── msg_revoke_allowance.ts
│ │ └── distribution
│ │ └── msg_set_withdrawal_address.ts
├── configs
│ ├── general_config.json
│ ├── chain_config.mainnet.json
│ ├── index.ts
│ └── chain_config.testnet.json
├── hooks
│ ├── use_window.ts
│ ├── use_get_component_dimension.ts
│ ├── use_interval.ts
│ └── index.ts
├── styles
│ ├── index.ts
│ └── createMixins.d.ts
└── assets
│ ├── icon-sort-down.svg
│ ├── icon-next.svg
│ └── icon-share.svg
├── .misc
└── themes
│ ├── band
│ └── dark.png
│ ├── agoric
│ └── light.png
│ ├── bitsong
│ └── dark.png
│ ├── default
│ ├── dark.png
│ └── light.png
│ ├── desmos
│ ├── dark.png
│ └── light.png
│ ├── emoney
│ └── dark.png
│ ├── osmosis
│ └── dark.png
│ ├── terra
│ └── light.png
│ ├── likecoin
│ └── light.png
│ └── sifchain
│ └── light.png
├── tests
└── utils
│ ├── index.ts
│ ├── wait.ts
│ └── mock_theme.tsx
├── .eslintignore
├── cypress
├── tsconfig.json
├── fixtures
│ └── example.json
├── integration
│ └── examples
│ │ └── sample.spec.ts
├── support
│ └── index.js
└── plugins
│ └── index.js
├── next-env.d.ts
├── nodemon.json
├── tsconfig.server.json
├── next.config.js
├── .codecov.yml
├── .gitignore
├── .env.sample
├── codegen.yml
├── i18n.js
└── .github
└── pull_request_template.md
/cypress.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | npm-debug.log
3 | .env
4 |
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "next/babel"
4 | ],
5 | "plugins": []
6 | }
7 |
--------------------------------------------------------------------------------
/public/locales/en/profiles.json:
--------------------------------------------------------------------------------
1 | {
2 | "profileDetails": "Profile Details"
3 | }
4 |
5 |
--------------------------------------------------------------------------------
/src/screens/proposals/components/index.ts:
--------------------------------------------------------------------------------
1 | import List from './list';
2 |
3 | export {
4 | List,
5 | };
6 |
--------------------------------------------------------------------------------
/src/screens/validators/components/index.ts:
--------------------------------------------------------------------------------
1 | import List from './list';
2 |
3 | export {
4 | List,
5 | };
6 |
--------------------------------------------------------------------------------
/public/icons/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/public/icons/favicon.ico
--------------------------------------------------------------------------------
/src/components/footer/components/social_media/types.ts:
--------------------------------------------------------------------------------
1 | export interface Props {
2 | className?: string;
3 | }
4 |
--------------------------------------------------------------------------------
/.misc/themes/band/dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/.misc/themes/band/dark.png
--------------------------------------------------------------------------------
/src/components/pagination/components/index.ts:
--------------------------------------------------------------------------------
1 | import Actions from './actions';
2 |
3 | export {
4 | Actions,
5 | };
6 |
--------------------------------------------------------------------------------
/.misc/themes/agoric/light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/.misc/themes/agoric/light.png
--------------------------------------------------------------------------------
/.misc/themes/bitsong/dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/.misc/themes/bitsong/dark.png
--------------------------------------------------------------------------------
/.misc/themes/default/dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/.misc/themes/default/dark.png
--------------------------------------------------------------------------------
/.misc/themes/desmos/dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/.misc/themes/desmos/dark.png
--------------------------------------------------------------------------------
/.misc/themes/desmos/light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/.misc/themes/desmos/light.png
--------------------------------------------------------------------------------
/.misc/themes/emoney/dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/.misc/themes/emoney/dark.png
--------------------------------------------------------------------------------
/.misc/themes/osmosis/dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/.misc/themes/osmosis/dark.png
--------------------------------------------------------------------------------
/.misc/themes/terra/light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/.misc/themes/terra/light.png
--------------------------------------------------------------------------------
/src/components/transactions_list_details/components/index.ts:
--------------------------------------------------------------------------------
1 | import List from './list';
2 |
3 | export {
4 | List,
5 | };
6 |
--------------------------------------------------------------------------------
/src/recoil/validators/types.ts:
--------------------------------------------------------------------------------
1 | export type AtomState = {
2 | delegator: string;
3 | validator: string;
4 | } | null;
5 |
--------------------------------------------------------------------------------
/.misc/themes/default/light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/.misc/themes/default/light.png
--------------------------------------------------------------------------------
/.misc/themes/likecoin/light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/.misc/themes/likecoin/light.png
--------------------------------------------------------------------------------
/.misc/themes/sifchain/light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/.misc/themes/sifchain/light.png
--------------------------------------------------------------------------------
/public/icons/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/public/icons/favicon-16x16.png
--------------------------------------------------------------------------------
/public/icons/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/public/icons/favicon-32x32.png
--------------------------------------------------------------------------------
/public/icons/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/public/icons/mstile-150x150.png
--------------------------------------------------------------------------------
/src/components/footer/components/index.ts:
--------------------------------------------------------------------------------
1 | import SocialMedia from './social_media';
2 |
3 | export {
4 | SocialMedia,
5 | };
6 |
--------------------------------------------------------------------------------
/public/icons/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/public/icons/apple-touch-icon.png
--------------------------------------------------------------------------------
/src/components/desmos_profile/components/index.ts:
--------------------------------------------------------------------------------
1 | import Connections from './connections';
2 |
3 | export {
4 | Connections,
5 | };
6 |
--------------------------------------------------------------------------------
/src/screens/profile_details/components/index.ts:
--------------------------------------------------------------------------------
1 | import Connections from './connections';
2 |
3 | export {
4 | Connections,
5 | };
6 |
--------------------------------------------------------------------------------
/public/fonts/HindMadurai-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/public/fonts/HindMadurai-Medium.ttf
--------------------------------------------------------------------------------
/public/fonts/HindMadurai-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/public/fonts/HindMadurai-Regular.ttf
--------------------------------------------------------------------------------
/src/components/nav/components/desktop/components/index.ts:
--------------------------------------------------------------------------------
1 | import ActionBar from './action_bar';
2 |
3 | export {
4 | ActionBar,
5 | };
6 |
--------------------------------------------------------------------------------
/public/icons/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/public/icons/android-chrome-192x192.png
--------------------------------------------------------------------------------
/public/icons/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/public/icons/android-chrome-512x512.png
--------------------------------------------------------------------------------
/public/images/default_cover_pattern.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NodesBlocks/big-dipper-2.0-cosmos/HEAD/public/images/default_cover_pattern.png
--------------------------------------------------------------------------------
/src/screens/home/components/data_blocks/components/index.ts:
--------------------------------------------------------------------------------
1 | import SingleBlock from './single_block';
2 |
3 | export {
4 | SingleBlock,
5 | };
6 |
--------------------------------------------------------------------------------
/src/components/nav/components/networks/components/index.ts:
--------------------------------------------------------------------------------
1 | import SingleNetwork from './single_network';
2 |
3 | export {
4 | SingleNetwork,
5 | };
6 |
--------------------------------------------------------------------------------
/src/screens/validators/components/list/components/tabs/utils.ts:
--------------------------------------------------------------------------------
1 | export const tabLabels = [
2 | 'active',
3 | 'inactive',
4 | 'allValidators',
5 | ];
6 |
--------------------------------------------------------------------------------
/src/components/nav/components/mobile/components/menu/types.ts:
--------------------------------------------------------------------------------
1 | export interface MenuProps {
2 | className?: string;
3 | toggleNavMenus: () => void;
4 | }
5 |
--------------------------------------------------------------------------------
/src/graphql/general/chain_id.graphql:
--------------------------------------------------------------------------------
1 | query ChainId {
2 | genesis(limit: 1, order_by: {time: desc}) {
3 | chainId: chain_id
4 | time
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/pages/404.tsx:
--------------------------------------------------------------------------------
1 | import NotFound from '@screens/404';
2 |
3 | const Custom404 = () => {
4 | return ;
5 | };
6 |
7 | export default Custom404;
8 |
--------------------------------------------------------------------------------
/src/screens/app/components/index.ts:
--------------------------------------------------------------------------------
1 | import InnerApp from './inner_app';
2 | import Main from './main';
3 |
4 | export {
5 | InnerApp,
6 | Main,
7 | };
8 |
--------------------------------------------------------------------------------
/src/screens/blocks/components/index.ts:
--------------------------------------------------------------------------------
1 | import Mobile from './mobile';
2 | import Desktop from './desktop';
3 |
4 | export {
5 | Mobile,
6 | Desktop,
7 | };
8 |
--------------------------------------------------------------------------------
/tests/utils/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | wait,
3 | } from './wait';
4 | import MockTheme from './mock_theme';
5 |
6 | export {
7 | wait,
8 | MockTheme,
9 | };
10 |
--------------------------------------------------------------------------------
/src/components/transactions_list/components/index.ts:
--------------------------------------------------------------------------------
1 | import Desktop from './desktop';
2 | import Mobile from './mobile';
3 |
4 | export {
5 | Desktop,
6 | Mobile,
7 | };
8 |
--------------------------------------------------------------------------------
/src/pages/_app.tsx:
--------------------------------------------------------------------------------
1 | import '@src/styles/global.css';
2 | import 'react-toastify/dist/ReactToastify.css';
3 | import App from '../screens/app';
4 |
5 | export default App;
6 |
--------------------------------------------------------------------------------
/src/screens/validators/components/list/components/mobile/component/index.ts:
--------------------------------------------------------------------------------
1 | import SingleValidator from './single_validator';
2 |
3 | export {
4 | SingleValidator,
5 | };
6 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | **/node_modules/*
2 | **/out/*
3 | **/.next/*
4 | **/dist/*
5 | **/cypress/support/*
6 | **/cypress/plugins/*
7 | **/cypress/fixtures/*
8 | **/src/graphql/types/*
9 |
--------------------------------------------------------------------------------
/cypress/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": ["es5", "dom"],
5 | "types": ["cypress"]
6 | },
7 | "include": ["**/*.ts"]
8 | }
9 |
--------------------------------------------------------------------------------
/src/pages/index.tsx:
--------------------------------------------------------------------------------
1 | import Home from '@screens/home';
2 |
3 | const HomePage = () => {
4 | return (
5 |
6 | );
7 | };
8 |
9 | export default HomePage;
10 |
--------------------------------------------------------------------------------
/src/screens/home/components/blocks/components/index.ts:
--------------------------------------------------------------------------------
1 | import Mobile from './mobile';
2 | import Desktop from './desktop';
3 |
4 | export {
5 | Mobile,
6 | Desktop,
7 | };
8 |
--------------------------------------------------------------------------------
/src/screens/profile_details/types.ts:
--------------------------------------------------------------------------------
1 | export type ProfileDetailState = {
2 | loading: boolean;
3 | exists: boolean;
4 | desmosProfile: DesmosProfile | null;
5 | }
6 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/votes_graph/components/index.tsx:
--------------------------------------------------------------------------------
1 | import QuorumExplanation from './quorum_explanation';
2 |
3 | export {
4 | QuorumExplanation,
5 | };
6 |
--------------------------------------------------------------------------------
/src/components/nav/components/networks/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: Nav/Networks it renders 1`] = `
`;
4 |
--------------------------------------------------------------------------------
/src/components/transactions_list_details/components/list/components/index.ts:
--------------------------------------------------------------------------------
1 | import SingleTransaction from './single_transaction';
2 |
3 | export {
4 | SingleTransaction,
5 | };
6 |
--------------------------------------------------------------------------------
/src/screens/home/components/transactions/components/index.ts:
--------------------------------------------------------------------------------
1 | import Desktop from './desktop';
2 | import Mobile from './mobile';
3 |
4 | export {
5 | Desktop,
6 | Mobile,
7 | };
8 |
--------------------------------------------------------------------------------
/src/components/layout/types.ts:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export interface LayoutProps {
4 | children: React.ReactNode;
5 | navTitle?: string;
6 | className?: string;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/nav/components/mobile/components/navbar/types.ts:
--------------------------------------------------------------------------------
1 | export interface NavbarProps {
2 | isOpen: boolean;
3 | openNetwork: () => void;
4 | toggleNavMenus: () => void;
5 | }
6 |
--------------------------------------------------------------------------------
/src/screens/block_details/components/signatures/components/index.ts:
--------------------------------------------------------------------------------
1 | import Desktop from './desktop';
2 | import Mobile from './mobile';
3 |
4 | export {
5 | Desktop,
6 | Mobile,
7 | };
8 |
--------------------------------------------------------------------------------
/src/components/desmos_profile/components/connections/components/index.ts:
--------------------------------------------------------------------------------
1 | import Desktop from './desktop';
2 | import Mobile from './mobile';
3 |
4 | export {
5 | Desktop,
6 | Mobile,
7 | };
8 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/other_tokens/components/index.ts:
--------------------------------------------------------------------------------
1 | import Desktop from './desktop';
2 | import Mobile from './mobile';
3 |
4 | export {
5 | Desktop,
6 | Mobile,
7 | };
8 |
--------------------------------------------------------------------------------
/src/screens/profile_details/components/connections/components/index.ts:
--------------------------------------------------------------------------------
1 | import Desktop from './desktop';
2 | import Mobile from './mobile';
3 |
4 | export {
5 | Desktop,
6 | Mobile,
7 | };
8 |
--------------------------------------------------------------------------------
/cypress/fixtures/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Using fixtures to represent data",
3 | "email": "hello@cypress.io",
4 | "body": "Fixtures are a great way to mock data for responses to routes"
5 | }
6 |
--------------------------------------------------------------------------------
/src/graphql/general/block_height.graphql:
--------------------------------------------------------------------------------
1 | subscription LatestBlockHeightListener($offset: Int = 0) {
2 | height: block(order_by: {height: desc}, limit: 1, offset: $offset) {
3 | height
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/pages/blocks/index.tsx:
--------------------------------------------------------------------------------
1 | import Blocks from '@src/screens/blocks';
2 |
3 | const BlocksPage = () => {
4 | return (
5 |
6 | );
7 | };
8 |
9 | export default BlocksPage;
10 |
--------------------------------------------------------------------------------
/src/pages/params/index.tsx:
--------------------------------------------------------------------------------
1 | import Params from '@src/screens/params';
2 |
3 | const ParamsPage = () => {
4 | return (
5 |
6 | );
7 | };
8 |
9 | export default ParamsPage;
10 |
--------------------------------------------------------------------------------
/src/pages/proposals/index.tsx:
--------------------------------------------------------------------------------
1 | import Tokens from '@src/screens/proposals';
2 |
3 | const TokensPage = () => {
4 | return (
5 |
6 | );
7 | };
8 |
9 | export default TokensPage;
10 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/staking/components/delegations/types.ts:
--------------------------------------------------------------------------------
1 | import { DelegationType } from '../../types';
2 |
3 | export type ItemType = Override
4 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/staking/components/unbondings/types.ts:
--------------------------------------------------------------------------------
1 | import { UnbondingType } from '../../types';
2 |
3 | export type ItemType = Override
4 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/staking/components/delegations/types.ts:
--------------------------------------------------------------------------------
1 | import { DelegationType } from '../../types';
2 |
3 | export type ItemType = Override
4 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/staking/components/unbondings/types.ts:
--------------------------------------------------------------------------------
1 | import { UnbondingType } from '../../types';
2 |
3 | export type ItemType = Override
4 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/staking/components/delegations/components/index.ts:
--------------------------------------------------------------------------------
1 | import Desktop from './desktop';
2 | import Mobile from './mobile';
3 |
4 | export {
5 | Desktop,
6 | Mobile,
7 | };
8 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/staking/components/redelegations/components/index.ts:
--------------------------------------------------------------------------------
1 | import Desktop from './desktop';
2 | import Mobile from './mobile';
3 |
4 | export {
5 | Desktop,
6 | Mobile,
7 | };
8 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/staking/components/unbondings/components/index.ts:
--------------------------------------------------------------------------------
1 | import Desktop from './desktop';
2 | import Mobile from './mobile';
3 |
4 | export {
5 | Desktop,
6 | Mobile,
7 | };
8 |
--------------------------------------------------------------------------------
/src/screens/transactions/types.ts:
--------------------------------------------------------------------------------
1 | export type TransactionsState = {
2 | loading: boolean;
3 | exists: boolean;
4 | hasNextPage: boolean;
5 | isNextPageLoading: boolean;
6 | items: Transactions[];
7 | }
8 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/staking/components/delegations/components/index.ts:
--------------------------------------------------------------------------------
1 | import Desktop from './desktop';
2 | import Mobile from './mobile';
3 |
4 | export {
5 | Desktop,
6 | Mobile,
7 | };
8 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/staking/components/unbondings/components/index.ts:
--------------------------------------------------------------------------------
1 | import Desktop from './desktop';
2 | import Mobile from './mobile';
3 |
4 | export {
5 | Desktop,
6 | Mobile,
7 | };
8 |
--------------------------------------------------------------------------------
/src/recoil/market/types.ts:
--------------------------------------------------------------------------------
1 | export type AtomState = {
2 | price: number | null;
3 | supply: TokenUnit;
4 | marketCap: number | null;
5 | inflation: number;
6 | communityPool: TokenUnit;
7 | apr: number;
8 | }
9 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/transactions/types.ts:
--------------------------------------------------------------------------------
1 | export type TransactionState = {
2 | hasNextPage: boolean;
3 | isNextPageLoading: boolean;
4 | offsetCount: number;
5 | data: Transactions[];
6 | }
7 |
--------------------------------------------------------------------------------
/src/screens/home/components/hero/components/index.ts:
--------------------------------------------------------------------------------
1 | import OnlineVotingPower from './online_voting_power';
2 | import TokenPrice from './token_price';
3 |
4 | export {
5 | OnlineVotingPower,
6 | TokenPrice,
7 | };
8 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/staking/components/redelegations/components/index.ts:
--------------------------------------------------------------------------------
1 | import Desktop from './desktop';
2 | import Mobile from './mobile';
3 |
4 | export {
5 | Desktop,
6 | Mobile,
7 | };
8 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/transactions/types.ts:
--------------------------------------------------------------------------------
1 | export type TransactionState = {
2 | hasNextPage: boolean;
3 | isNextPageLoading: boolean;
4 | offsetCount: number;
5 | data: Transactions[];
6 | }
7 |
--------------------------------------------------------------------------------
/src/components/nav/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`Component: Nav it renders 1`] = `
4 |
8 | `;
9 |
--------------------------------------------------------------------------------
/src/pages/validators/index.tsx:
--------------------------------------------------------------------------------
1 | import Validators from '@screens/validators';
2 |
3 | const ValidatorsPage = () => {
4 | return (
5 |
6 | );
7 | };
8 |
9 | export default ValidatorsPage;
10 |
--------------------------------------------------------------------------------
/src/recoil/profiles/types.ts:
--------------------------------------------------------------------------------
1 | export type AtomState = {
2 | moniker: string;
3 | imageUrl?: string;
4 | } | null | boolean;
5 |
6 | export type Profile = {
7 | moniker: string;
8 | imageUrl?: string;
9 | }
10 |
--------------------------------------------------------------------------------
/src/screens/proposals/components/list/components/index.ts:
--------------------------------------------------------------------------------
1 | import Total from './total';
2 | import SingleProposal from '../../../../../components/single_proposal';
3 |
4 | export {
5 | Total,
6 | SingleProposal,
7 | };
8 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/staking/components/redelegations/types.ts:
--------------------------------------------------------------------------------
1 | import { RedelegationType } from '../../types';
2 |
3 | export type ItemType = Override
4 |
--------------------------------------------------------------------------------
/next-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | // NOTE: This file should not be edited
5 | // see https://nextjs.org/docs/basic-features/typescript for more information.
6 |
--------------------------------------------------------------------------------
/src/pages/[dtag].tsx:
--------------------------------------------------------------------------------
1 | import ProfileDetails from '@screens/profile_details';
2 |
3 | const ProfileDetailsPage = () => {
4 | return (
5 |
6 | );
7 | };
8 |
9 | export default ProfileDetailsPage;
10 |
--------------------------------------------------------------------------------
/src/pages/blocks/[height].tsx:
--------------------------------------------------------------------------------
1 | import BlockDetails from '@src/screens/block_details';
2 |
3 | const BlockDetailsPage = () => {
4 | return (
5 |
6 | );
7 | };
8 |
9 | export default BlockDetailsPage;
10 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/overview/components/index.ts:
--------------------------------------------------------------------------------
1 | import ParamsChange from './params_change';
2 | import SoftwareUpgrade from './software_upgrade';
3 |
4 | export {
5 | ParamsChange,
6 | SoftwareUpgrade,
7 | };
8 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/staking/components/redelegations/types.ts:
--------------------------------------------------------------------------------
1 | import { RedelegationType } from '../../types';
2 |
3 | export type ItemType = Override
4 |
--------------------------------------------------------------------------------
/src/pages/transactions/index.tsx:
--------------------------------------------------------------------------------
1 | import Transactions from '@src/screens/transactions';
2 |
3 | const TransactionsPage = () => {
4 | return (
5 |
6 | );
7 | };
8 |
9 | export default TransactionsPage;
10 |
--------------------------------------------------------------------------------
/src/screens/transaction_details/components/index.ts:
--------------------------------------------------------------------------------
1 | import Overview from './overview';
2 | import Messages from './messages';
3 | import Logs from './logs';
4 |
5 | export {
6 | Overview,
7 | Messages,
8 | Logs,
9 | };
10 |
--------------------------------------------------------------------------------
/src/components/nav/components/mobile/components/index.ts:
--------------------------------------------------------------------------------
1 | import Menu from './menu';
2 | import Navbar from './navbar';
3 | import SearchBar from '../../seach_bar';
4 |
5 | export {
6 | Menu,
7 | Navbar,
8 | SearchBar,
9 | };
10 |
--------------------------------------------------------------------------------
/src/pages/proposals/[id].tsx:
--------------------------------------------------------------------------------
1 | import ProposalDetails from '@src/screens/proposal_details';
2 |
3 | const TokenDetailsPage = () => {
4 | return (
5 |
6 | );
7 | };
8 |
9 | export default TokenDetailsPage;
10 |
--------------------------------------------------------------------------------
/nodemon.json:
--------------------------------------------------------------------------------
1 | {
2 | "watch": [
3 | "server",
4 | "public",
5 | ".yalc"
6 | ],
7 | "ignore": [
8 | "src"
9 | ],
10 | "exec": "ts-node --project tsconfig.server.json server/index.ts",
11 | "ext": "json, js"
12 | }
13 |
--------------------------------------------------------------------------------
/src/pages/accounts/[address].tsx:
--------------------------------------------------------------------------------
1 | import AccountDetails from '@src/screens/account_details';
2 |
3 | const AccountDetailsPage = () => {
4 | return (
5 |
6 | );
7 | };
8 |
9 | export default AccountDetailsPage;
10 |
--------------------------------------------------------------------------------
/tsconfig.server.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "dist",
6 | "noEmit": false
7 | },
8 | "include": [
9 | "server/index.ts"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/src/pages/validators/[address].tsx:
--------------------------------------------------------------------------------
1 | import ValidatorDetails from '@screens/validator_details';
2 |
3 | const ValidatorDetailsPage = () => {
4 | return (
5 |
6 | );
7 | };
8 |
9 | export default ValidatorDetailsPage;
10 |
--------------------------------------------------------------------------------
/src/screens/block_details/components/index.ts:
--------------------------------------------------------------------------------
1 | import Overview from './overview';
2 | import Transactions from './transactions';
3 | import Signatures from './signatures';
4 |
5 | export {
6 | Overview,
7 | Transactions,
8 | Signatures,
9 | };
10 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/deposits/components/index.ts:
--------------------------------------------------------------------------------
1 | import Desktop from './desktop';
2 | import Mobile from './mobile';
3 | import Paginate from './paginate';
4 |
5 | export {
6 | Desktop,
7 | Mobile,
8 | Paginate,
9 | };
10 |
--------------------------------------------------------------------------------
/src/screens/home/components/hero/types.ts:
--------------------------------------------------------------------------------
1 | export type TokenPriceType = {
2 | time: string;
3 | value: number;
4 | }
5 |
6 | export type HeroState = {
7 | loading: boolean;
8 | exists: boolean;
9 | tokenPriceHistory: TokenPriceType[];
10 | }
11 |
--------------------------------------------------------------------------------
/src/pages/transactions/[tx].tsx:
--------------------------------------------------------------------------------
1 | import TransactionDetails from '@src/screens/transaction_details';
2 |
3 | const TransactionDetailsPage = () => {
4 | return (
5 |
6 | );
7 | };
8 |
9 | export default TransactionDetailsPage;
10 |
--------------------------------------------------------------------------------
/src/screens/validators/components/list/components/condition/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: Validators/Condition matches snapshot 1`] = `
4 |
7 | `;
8 |
--------------------------------------------------------------------------------
/src/recoil/big_dipper_networks/types.ts:
--------------------------------------------------------------------------------
1 | import { BigDipperNetwork } from '@models';
2 |
3 | export type Networks = BigDipperNetwork[];
4 | export type Selected = string;
5 |
6 | export type AtomState = {
7 | networks: Networks;
8 | selected: Selected;
9 | }
10 |
--------------------------------------------------------------------------------
/src/components/nav/components/desktop/components/action_bar/components/index.ts:
--------------------------------------------------------------------------------
1 | import Network from './network';
2 | import NetworkList from './network_list';
3 | import SettingsList from './setting_list';
4 |
5 | export {
6 | Network,
7 | NetworkList,
8 | SettingsList,
9 | };
10 |
--------------------------------------------------------------------------------
/src/recoil/profiles/atom.ts:
--------------------------------------------------------------------------------
1 | import { atomFamily } from 'recoil';
2 | import { AtomState } from './types';
3 |
4 | const initialState: AtomState = null;
5 |
6 | export const atomFamilyState = atomFamily({
7 | key: 'profile',
8 | default: initialState,
9 | });
10 |
--------------------------------------------------------------------------------
/src/screens/home/components/transactions/types.ts:
--------------------------------------------------------------------------------
1 | export type TransactionType = {
2 | height: number;
3 | hash: string;
4 | success: boolean;
5 | timestamp: string;
6 | messages: number;
7 | }
8 |
9 | export type TransactionsState = {
10 | items: TransactionType[]
11 | }
12 |
--------------------------------------------------------------------------------
/src/recoil/validators/atom.ts:
--------------------------------------------------------------------------------
1 | import { atomFamily } from 'recoil';
2 | import { AtomState } from './types';
3 |
4 | const initialState: AtomState = null;
5 |
6 | export const atomFamilyState = atomFamily({
7 | key: 'validator',
8 | default: initialState,
9 | });
10 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/index.ts:
--------------------------------------------------------------------------------
1 | import Overview from './overview';
2 | import Votes from './votes';
3 | import Deposits from './deposits';
4 | import VotesGraph from './votes_graph';
5 |
6 | export {
7 | Overview,
8 | Votes,
9 | Deposits,
10 | VotesGraph,
11 | };
12 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/votes/components/index.ts:
--------------------------------------------------------------------------------
1 | import Tabs from './tabs';
2 | import Desktop from './desktop';
3 | import Mobile from './mobile';
4 | import Paginate from './paginate';
5 |
6 | export {
7 | Tabs,
8 | Desktop,
9 | Mobile,
10 | Paginate,
11 | };
12 |
--------------------------------------------------------------------------------
/src/components/nav/components/seach_bar/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: Nav/SearchBar it renders 1`] = `
4 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/votes_graph/types.ts:
--------------------------------------------------------------------------------
1 | export type VotesType = {
2 | yes: TokenUnit;
3 | no: TokenUnit;
4 | abstain: TokenUnit;
5 | veto: TokenUnit;
6 | }
7 | export type VotesGraphState = {
8 | votes: VotesType;
9 | bonded: TokenUnit;
10 | quorum: number;
11 | }
12 |
--------------------------------------------------------------------------------
/src/components/msg/bank/send/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/MsgSend matches snapshot 1`] = `
4 |
7 | message_contents:txSendContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/msg/distribution/fund/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/Fund matches snapshot 1`] = `
4 |
7 | message_contents:txFundContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/msg/governance/vote/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/MsgVote matches snapshot 1`] = `
4 |
7 | message_contents:txVoteContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/msg/unknown/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/Unknown matches snapshot 1`] = `
4 |
7 |
8 | "{\\"hello\\":\\"world\\"}"
9 |
10 |
11 | `;
12 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/deposits/types.ts:
--------------------------------------------------------------------------------
1 | export type DepositType = {
2 | amount: TokenUnit;
3 | user: string;
4 | timestamp: string;
5 | }
6 |
7 | export type DepositState = {
8 | data: DepositType[];
9 | }
10 |
11 | export type ItemType = Override;
12 |
--------------------------------------------------------------------------------
/src/utils/replace_nan.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Util that replaces the word NaN and Infinity to 100
3 | * @param format string
4 | * @param base 0
5 | * @returns new string
6 | */
7 | export const replaceNaN = (format: string, base = '0') => {
8 | return format.replace('NaN', base).replace('Infinity', '100');
9 | };
10 |
--------------------------------------------------------------------------------
/src/components/msg/slashing/unjail/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/UnBlockUser matches snapshot 1`] = `
4 |
7 | message_contents:txUnjailContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/public/icons/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | #da532c
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/components/msg/profiles/block_user/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/BlockUser matches snapshot 1`] = `
4 |
7 | message_contents:txBlockUserContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/msg/staking/delegate/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/MsgDelegate matches snapshot 1`] = `
4 |
7 | message_contents:txDelegateContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/msg/staking/redelegate/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/Redelegate matches snapshot 1`] = `
4 |
7 | message_contents:txRedelegateContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/msg/staking/undelegate/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/Undelegate matches snapshot 1`] = `
4 |
7 | message_contents:txUndelegateContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/models/msg/types.ts:
--------------------------------------------------------------------------------
1 | export type BaseCategories = 'bank' | 'crisis' | 'distribution' | 'governance' | 'slashing' | 'staking' | 'profiles' | 'ibc' | 'ibc-transfer' | 'authz' | 'feegrant' | 'vesting' | 'others'
2 | export type CustomCategories = ''; // custom modules
3 | export type Categories = BaseCategories | CustomCategories
4 |
--------------------------------------------------------------------------------
/src/recoil/settings/types.ts:
--------------------------------------------------------------------------------
1 | export type Theme = 'light' | 'dark' | 'device' | 'deuteranopia' | 'tritanopia' | 'achromatopsia';
2 | export type Date = 'locale' | 'utc';
3 | export type Tx = 'compact' | 'detailed';
4 |
5 | export type AtomState = {
6 | theme: Theme;
7 | dateFormat: Date;
8 | txListFormat: Tx;
9 | }
10 |
--------------------------------------------------------------------------------
/src/components/msg/profiles/save_profile/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/SaveProfile matches snapshot 1`] = `
4 |
7 | message_contents:txSaveProfileContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/msg/profiles/unblock_user/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/UnBlockUser matches snapshot 1`] = `
4 |
7 | message_contents:txUnblockUserContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/recoil/market/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | atomState,
3 | } from './atom';
4 |
5 | import {
6 | useMarketRecoil,
7 | } from './hooks';
8 |
9 | import {
10 | readMarket,
11 | writeMarket,
12 | } from './selectors';
13 |
14 | export {
15 | atomState,
16 | useMarketRecoil,
17 | readMarket,
18 | writeMarket,
19 | };
20 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/staking/components/index.ts:
--------------------------------------------------------------------------------
1 | import Tabs from './tabs';
2 | import Unbondings from './unbondings';
3 | import Redelgations from './redelegations';
4 | import Delegations from './delegations';
5 |
6 | export {
7 | Tabs,
8 | Unbondings,
9 | Redelgations,
10 | Delegations,
11 | };
12 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/staking/components/index.ts:
--------------------------------------------------------------------------------
1 | import Tabs from './tabs';
2 | import Unbondings from './unbondings';
3 | import Redelgations from './redelegations';
4 | import Delegations from './delegations';
5 |
6 | export {
7 | Tabs,
8 | Unbondings,
9 | Redelgations,
10 | Delegations,
11 | };
12 |
--------------------------------------------------------------------------------
/src/screens/validators/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: Validators matches snapshot 1`] = `
4 |
13 | `;
14 |
--------------------------------------------------------------------------------
/src/components/msg/staking/edit_validator/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/EditValidator matches snapshot 1`] = `
4 |
7 | message_contents:txEditValidatorContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/msg/governance/deposit_proposal/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/DepositProposal matches snapshot 1`] = `
4 |
7 | message_contents:txDepositContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/msg/profiles/delete_profile/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/DeleteProfile matches snapshot 1`] = `
4 |
7 | message_contents:txDeleteProfileContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/screens/home/components/blocks/types.ts:
--------------------------------------------------------------------------------
1 | export type BlockType = {
2 | height: number;
3 | txs: number;
4 | timestamp: string;
5 | proposer: string;
6 | hash: string;
7 | }
8 |
9 | export type BlocksState = {
10 | items: BlockType[];
11 | }
12 |
13 | export type ItemType = Override
14 |
--------------------------------------------------------------------------------
/src/utils/allyProps.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Mui helper to return allyProps tabs
3 | * @param index the index of the tab
4 | * @returns an object with `id` and `aria-controls`
5 | */
6 | export const a11yProps = (index) => {
7 | return {
8 | id: `simple-tab-${index}`,
9 | 'aria-controls': `simple-tabpanel-${index}`,
10 | };
11 | };
12 |
--------------------------------------------------------------------------------
/next.config.js:
--------------------------------------------------------------------------------
1 | const nextTranslate = require('next-translate');
2 |
3 | module.exports = nextTranslate({
4 | poweredByHeader: false,
5 | basePath: '/desmos',
6 | webpack: (config) => {
7 | config.module.rules.push({
8 | test: /\.svg$/,
9 | use: ['@svgr/webpack'],
10 | });
11 | return config;
12 | },
13 | });
14 |
--------------------------------------------------------------------------------
/src/components/msg/crisis/verify_invariant/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/MsgVerifyInvariant matches snapshot 1`] = `
4 |
7 | message_contents:txVerifyInvariantContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/msg/distribution/withdraw_reward/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/WithdrawReward matches snapshot 1`] = `
4 |
7 | message_contents:txWithdrawRewardContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/msg/governance/submit_proposal/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/SubmitProposal matches snapshot 1`] = `
4 |
7 | message_contents:txSubmitProposalContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/msg/staking/create_validator/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/CreateValidator matches snapshot 1`] = `
4 |
7 | message_contents:txCreateValidatorContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/tag/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`components: Tag matches snapshot 1`] = `
4 |
7 |
10 | hello world
11 |
12 |
13 | `;
14 |
--------------------------------------------------------------------------------
/src/recoil/settings/atom.ts:
--------------------------------------------------------------------------------
1 | import { atom } from 'recoil';
2 | import { AtomState } from './types';
3 |
4 | const initialState: AtomState = {
5 | theme: 'light',
6 | dateFormat: 'locale',
7 | txListFormat: 'compact',
8 | };
9 |
10 | export const atomState = atom({
11 | key: 'settings',
12 | default: initialState,
13 | });
14 |
--------------------------------------------------------------------------------
/src/components/msg/distribution/withdraw_commission/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/WithdrawCommission matches snapshot 1`] = `
4 |
7 | message_contents:txWithdrawCommissionContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/msg/profiles/create_relationship/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/CreateRelationship matches snapshot 1`] = `
4 |
7 | message_contents:txCreateRelationshipContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/msg/profiles/dtag_accept_transfer/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/DtagAcceptTransfer matches snapshot 1`] = `
4 |
7 | message_contents:txAcceptDTagTransferContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/msg/profiles/dtag_cancel_transfer/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/MsgDtagCancelTransfer matches snapshot 1`] = `
4 |
7 | message_contents:txCancelDTagTransferContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/msg/profiles/dtag_refuse_transfer/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/MsgDtagCancelTransfer matches snapshot 1`] = `
4 |
7 | message_contents:txRefuseDTagTransferContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/msg/profiles/dtag_transfer_request/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/DtagTransferRequest matches snapshot 1`] = `
4 |
7 | message_contents:txRequestDTagTransferContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/screens/blocks/components/mobile/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | () => {
6 | return ({
7 | root: {
8 | height: '100%',
9 | },
10 | });
11 | },
12 | )();
13 |
14 | return styles;
15 | };
16 |
--------------------------------------------------------------------------------
/src/components/msg/bank/multisend/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | () => {
6 | return ({
7 | multisend: {
8 | marginTop: '0',
9 | },
10 | });
11 | },
12 | )();
13 |
14 | return styles;
15 | };
16 |
--------------------------------------------------------------------------------
/src/components/msg/distribution/set_withdrawal_address/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/SetWithdrawalAddress matches snapshot 1`] = `
4 |
7 | message_contents:txsetRewardAddressContent
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/src/components/transactions_list/types.ts:
--------------------------------------------------------------------------------
1 | export type TransactionsListState = {
2 | className?: string;
3 | hasNextPage?: boolean;
4 | isNextPageLoading?: boolean;
5 | loadNextPage?: (any) => void;
6 | loadMoreItems?: (any) => void;
7 | isItemLoaded?: (index: number) => boolean;
8 | itemCount: number;
9 | transactions: Transactions[];
10 | }
11 |
--------------------------------------------------------------------------------
/src/graphql/general/proposals.graphql:
--------------------------------------------------------------------------------
1 | query Proposals ($limit: Int = 7, $offset: Int = 0) {
2 | proposals: proposal (limit: $limit, offset: $offset, order_by: {id: desc}) {
3 | title
4 | proposalId: id
5 | status
6 | description
7 | }
8 | total: proposal_aggregate {
9 | aggregate {
10 | count
11 | }
12 | }
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/src/graphql/general/tokenomics.graphql:
--------------------------------------------------------------------------------
1 | query Tokenomics{
2 | stakingParams: staking_params(limit: 1) {
3 | params
4 | }
5 | stakingPool: staking_pool(order_by: {height: desc}, limit: 1) {
6 | bonded: bonded_tokens
7 | unbonded: not_bonded_tokens
8 | }
9 | supply: supply(order_by: {height: desc}, limit: 1) {
10 | coins
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/recoil/validators/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | atomFamilyState,
3 | } from './atom';
4 |
5 | import {
6 | useValidatorRecoil,
7 | } from './hooks';
8 |
9 | import {
10 | readValidator,
11 | writeValidator,
12 | } from './selectors';
13 |
14 | export {
15 | atomFamilyState,
16 | useValidatorRecoil,
17 | readValidator,
18 | writeValidator,
19 | };
20 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/index.ts:
--------------------------------------------------------------------------------
1 | import Overview from './overview';
2 | import Balance from './balance';
3 | import Staking from './staking';
4 | import Transactions from './transactions';
5 | import OtherTokens from './other_tokens';
6 |
7 | export {
8 | Overview,
9 | Balance,
10 | Staking,
11 | Transactions,
12 | OtherTokens,
13 | };
14 |
--------------------------------------------------------------------------------
/src/components/transactions_list/components/mobile/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | () => {
6 | return ({
7 | root: {
8 | height: '100%',
9 | },
10 | });
11 | },
12 | )();
13 |
14 | return styles;
15 | };
16 |
--------------------------------------------------------------------------------
/src/graphql/general/block_time.graphql:
--------------------------------------------------------------------------------
1 | query AverageBlockTime {
2 | averageBlockTime: average_block_time_per_hour(limit: 1, order_by: {height: desc}) {
3 | averageTime: average_time
4 | }
5 | }
6 |
7 | query LatestBlockTimestamp($offset: Int = 0) {
8 | block: block(order_by: {height: desc}, limit: 1, offset: $offset) {
9 | timestamp
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/components/transactions_list_details/components/list/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | () => {
6 | return ({
7 | root: {
8 | height: '100%',
9 | },
10 | });
11 | },
12 | )();
13 |
14 | return styles;
15 | };
16 |
--------------------------------------------------------------------------------
/src/components/transactions_list_details/types.ts:
--------------------------------------------------------------------------------
1 | export type TransactionsListDetailsState = {
2 | className?: string;
3 | hasNextPage?: boolean;
4 | isNextPageLoading?: boolean;
5 | loadNextPage?: (any) => void;
6 | loadMoreItems?: (any) => void;
7 | isItemLoaded?: (index: number) => boolean;
8 | itemCount: number;
9 | transactions: Transactions[];
10 | }
11 |
--------------------------------------------------------------------------------
/src/pages/account/[address].tsx:
--------------------------------------------------------------------------------
1 | import { useEffect } from 'react';
2 | import { useRouter } from 'next/router';
3 |
4 | const AccountDetailsPage = () => {
5 | const router = useRouter();
6 |
7 | useEffect(() => {
8 | router.replace(`/accounts/${router.query.address}`);
9 | }, []);
10 |
11 | return null;
12 | };
13 |
14 | export default AccountDetailsPage;
15 |
--------------------------------------------------------------------------------
/src/screens/proposals/types.ts:
--------------------------------------------------------------------------------
1 | export type ProposalType = {
2 | id: number;
3 | title: string;
4 | description: string;
5 | status: string;
6 | }
7 |
8 | export type ProposalsState = {
9 | loading: boolean;
10 | exists: boolean;
11 | hasNextPage: boolean;
12 | isNextPageLoading: boolean;
13 | rawDataTotal: number;
14 | items: ProposalType[];
15 | }
16 |
--------------------------------------------------------------------------------
/tests/utils/wait.ts:
--------------------------------------------------------------------------------
1 | import renderer from 'react-test-renderer';
2 |
3 | /**
4 | * helper test util to wait for the dom to update
5 | * before asserting tests
6 | * @param ms
7 | */
8 | export const wait = async (ms = 50) => {
9 | await renderer.act(() => {
10 | return new Promise((resolve) => {
11 | setTimeout(resolve, ms);
12 | });
13 | });
14 | };
15 |
--------------------------------------------------------------------------------
/src/pages/transaction/[tx].tsx:
--------------------------------------------------------------------------------
1 | import { useEffect } from 'react';
2 | import { useRouter } from 'next/router';
3 |
4 | const TransactionDetailsPage = () => {
5 | const router = useRouter();
6 |
7 | useEffect(() => {
8 | router.replace(`/transactions/${router.query.tx}`);
9 | }, []);
10 |
11 | return null;
12 | };
13 |
14 | export default TransactionDetailsPage;
15 |
--------------------------------------------------------------------------------
/src/screens/app/components/inner_app/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { AppProps } from 'next/app';
3 | import { useChainHealthCheck } from './hooks';
4 |
5 | function InnerApp({
6 | Component, pageProps,
7 | }: AppProps) {
8 | useChainHealthCheck();
9 | return (
10 |
11 | );
12 | }
13 |
14 | export default InnerApp;
15 |
--------------------------------------------------------------------------------
/src/pages/validator/[address].tsx:
--------------------------------------------------------------------------------
1 | import { useEffect } from 'react';
2 | import { useRouter } from 'next/router';
3 |
4 | const ValidatorDetailsPage = () => {
5 | const router = useRouter();
6 |
7 | useEffect(() => {
8 | router.replace(`/validators/${router.query.address}`);
9 | }, []);
10 |
11 | return null;
12 | };
13 |
14 | export default ValidatorDetailsPage;
15 |
--------------------------------------------------------------------------------
/src/configs/general_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "maintainer": {
3 | "name": "Forbole",
4 | "url": "https://forbole.com"
5 | },
6 | "github": {
7 | "reportIssue": "https://github.com/forbole/big-dipper-2.0-cosmos/issues"
8 | },
9 | "basePath": "/desmos",
10 | "previewImage": "https://bigdipper.live/images/big-dipper-social-media.png",
11 | "version": "base-v2.1.1"
12 | }
13 |
--------------------------------------------------------------------------------
/src/recoil/big_dipper_networks/atom.ts:
--------------------------------------------------------------------------------
1 | import { atom } from 'recoil';
2 | import { chainConfig } from '@configs';
3 | import { AtomState } from './types';
4 |
5 | const initialState: AtomState = {
6 | networks: [],
7 | selected: chainConfig.network,
8 | };
9 |
10 | export const atomState = atom({
11 | key: 'bigDipperNetworks',
12 | default: initialState,
13 | });
14 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/validator_overview/hooks.ts:
--------------------------------------------------------------------------------
1 | import { toast } from 'react-toastify';
2 | import copy from 'copy-to-clipboard';
3 |
4 | export const useAddress = (t) => {
5 | const handleCopyToClipboard = (value: string) => {
6 | copy(value);
7 | toast(t('common:copied'));
8 | };
9 |
10 | return {
11 | handleCopyToClipboard,
12 | };
13 | };
14 |
--------------------------------------------------------------------------------
/src/components/nav/components/index.ts:
--------------------------------------------------------------------------------
1 | import Mobile from './mobile';
2 | import Desktop from './desktop';
3 | import MenuItems from './menu_items';
4 | import SearchBar from './seach_bar';
5 | import Networks from './networks';
6 | import TitleBar from './title_bar';
7 |
8 | export {
9 | Mobile,
10 | Desktop,
11 | MenuItems,
12 | SearchBar,
13 | Networks,
14 | TitleBar,
15 | };
16 |
--------------------------------------------------------------------------------
/src/screens/validators/components/list/components/voting_power_explanation/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | () => {
6 | return ({
7 | root: {
8 | height: '100%',
9 | },
10 | });
11 | },
12 | )();
13 |
14 | return styles;
15 | };
16 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/votes/components/paginate/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | marginTop: theme.spacing(3),
9 | },
10 | });
11 | },
12 | )();
13 |
14 | return styles;
15 | };
16 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/votes_graph/components/quorum_explanation/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | () => {
6 | return ({
7 | root: {
8 | height: '100%',
9 | },
10 | });
11 | },
12 | )();
13 |
14 | return styles;
15 | };
16 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/staking/components/delegations/components/desktop/utils.ts:
--------------------------------------------------------------------------------
1 | export const columns:{
2 | key: string;
3 | align?: 'left' | 'center' | 'right' | 'justify' | 'inherit';
4 | width: number;
5 | }[] = [
6 | {
7 | key: 'address',
8 | width: 50,
9 | },
10 | {
11 | key: 'amount',
12 | width: 50,
13 | align: 'right',
14 | },
15 | ];
16 |
--------------------------------------------------------------------------------
/src/hooks/use_window.ts:
--------------------------------------------------------------------------------
1 | import {
2 | useState, useEffect,
3 | } from 'react';
4 |
5 | export const useWindowOrigin = () => {
6 | const isClient = typeof window === 'object';
7 | const [location, setLocation] = useState('');
8 |
9 | useEffect(() => {
10 | if (!isClient) return;
11 | setLocation(window.location.origin);
12 | }, []);
13 |
14 | return { location };
15 | };
16 |
--------------------------------------------------------------------------------
/src/screens/home/components/index.ts:
--------------------------------------------------------------------------------
1 | import DataBlocks from './data_blocks';
2 | import Consensus from './consensus';
3 | import Tokenomics from './tokenomics';
4 | import Blocks from './blocks';
5 | import Transactions from './transactions';
6 | import Hero from './hero';
7 |
8 | export {
9 | DataBlocks,
10 | Consensus,
11 | Tokenomics,
12 | Blocks,
13 | Transactions,
14 | Hero,
15 | };
16 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/deposits/components/paginate/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | marginTop: theme.spacing(3),
9 | },
10 | });
11 | },
12 | )();
13 |
14 | return styles;
15 | };
16 |
--------------------------------------------------------------------------------
/src/screens/404/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {
3 | Layout,
4 | NotFound as NotFoundLogo,
5 | } from '@components';
6 | import { useStyles } from './styles';
7 |
8 | const NotFound = () => {
9 | const classes = useStyles();
10 | return (
11 |
12 |
13 |
14 | );
15 | };
16 |
17 | export default NotFound;
18 |
--------------------------------------------------------------------------------
/src/screens/block_details/types.ts:
--------------------------------------------------------------------------------
1 | export type OverviewType = {
2 | height: number;
3 | hash: string;
4 | txs: number;
5 | timestamp: string;
6 | proposer: string;
7 | // votingPower: number;
8 | }
9 |
10 | export type BlockDetailState = {
11 | loading: boolean;
12 | exists: boolean;
13 | overview: OverviewType;
14 | signatures: string[];
15 | transactions: Transactions[];
16 | }
17 |
--------------------------------------------------------------------------------
/src/styles/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | lightTemplate,
3 | darkTemplate,
4 | deuteranopiaTemplate,
5 | tritanopiaTemplate,
6 | // lightTheme,
7 | // darkTheme,
8 | // deuteranopiaTheme,
9 | } from './theme';
10 |
11 | export {
12 | lightTemplate,
13 | darkTemplate,
14 | deuteranopiaTemplate,
15 | tritanopiaTemplate,
16 | // lightTheme,
17 | // darkTheme,
18 | // deuteranopiaTheme,
19 | };
20 |
--------------------------------------------------------------------------------
/src/utils/time.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * util to conver nano to seconds
3 | * @param nano
4 | * @returns seconds
5 | */
6 | export const nanoToSeconds = (nano: number) => {
7 | return nano / 1000000000;
8 | };
9 |
10 | /**
11 | * Util to convert seconds to days
12 | * @param seconds
13 | * @returns days
14 | */
15 | export const secondsToDays = (seconds: number) => {
16 | return seconds / (3600 * 24);
17 | };
18 |
--------------------------------------------------------------------------------
/cypress/integration/examples/sample.spec.ts:
--------------------------------------------------------------------------------
1 | describe('Example', () => {
2 | beforeEach(() => {
3 | cy.visit('http://localhost:3000');
4 | });
5 |
6 | it('Displays english', () => {
7 | cy.contains('Big ol\' welcome to this boilerplate').should('be.visible');
8 | cy.contains('change lang').click();
9 | cy.contains('中文 Big ol\' welcome to this boilerplate').should('be.visible');
10 | });
11 | });
12 |
--------------------------------------------------------------------------------
/src/screens/validators/components/list/components/mobile/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: Validators/Tabs matches snapshot 1`] = `
4 |
17 | `;
18 |
--------------------------------------------------------------------------------
/src/utils/hex_to_bech32.ts:
--------------------------------------------------------------------------------
1 | import { bech32 } from 'bech32';
2 |
3 | /**
4 | * Util that converts a hex in to bech32
5 | * @param address address
6 | * @param prefix chain address prefix
7 | * @returns bech32
8 | */
9 | export const hexToBech32 = (address: string, prefix: string) => {
10 | const addressBuffer = Buffer.from(address, 'hex');
11 | return bech32.encode(prefix, bech32.toWords(addressBuffer));
12 | };
13 |
--------------------------------------------------------------------------------
/src/screens/blocks/types.ts:
--------------------------------------------------------------------------------
1 | export type BlockType = {
2 | height: number;
3 | txs: number;
4 | timestamp: string;
5 | proposer: string;
6 | hash: string;
7 | }
8 |
9 | export type BlocksState = {
10 | loading: boolean;
11 | exists: boolean;
12 | hasNextPage: boolean;
13 | isNextPageLoading: boolean;
14 | items: BlockType[];
15 | }
16 |
17 | export type ItemType = Override
18 |
--------------------------------------------------------------------------------
/src/styles/createMixins.d.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable*/
2 | import * as createMixins from '@material-ui/core/styles/createMixins';
3 |
4 | declare module '@material-ui/core/styles/createMixins' {
5 | interface MixinsOptions {
6 | layout?: CSSProperties;
7 | tableCell?: CSSProperties;
8 | }
9 |
10 | interface Mixins {
11 | layout: CSSProperties;
12 | tableCell: CSSProperties;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/public/locales/en/blocks.json:
--------------------------------------------------------------------------------
1 | {
2 | "blocks": "Blocks",
3 | "blockDetails": "Block Details",
4 | "height": "Height",
5 | "validator": "Validator",
6 | "hash": "Hash",
7 | "txs": "Txs",
8 | "time": "Time",
9 | "overview": "Overview",
10 | "signedVotingPower": "Signed Voting Power",
11 | "proposer": "Proposer",
12 | "signatures": "Signatures",
13 | "votingPower": "Voting Power",
14 | "signed": "Signed"
15 | }
16 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/index.ts:
--------------------------------------------------------------------------------
1 | import Profile from './profile';
2 | import VotingPower from './voting_power';
3 | import Transactions from './transactions';
4 | import Staking from './staking';
5 | import Blocks from './blocks';
6 | import ValidatorOverview from './validator_overview';
7 |
8 | export {
9 | Profile,
10 | VotingPower,
11 | Transactions,
12 | Staking,
13 | Blocks,
14 | ValidatorOverview,
15 | };
16 |
--------------------------------------------------------------------------------
/src/screens/validators/components/list/components/desktop/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: Validators/Desktop matches snapshot 1`] = `
4 |
17 | `;
18 |
--------------------------------------------------------------------------------
/.codecov.yml:
--------------------------------------------------------------------------------
1 | # https://docs.codecov.io/docs/commit-status
2 | coverage:
3 | status:
4 | project:
5 | default:
6 | # basic
7 | target: 0%
8 | threshold: 0%
9 | base: 0%
10 | # advanced
11 | branches: null
12 | if_no_uploads: error
13 | if_not_found: success
14 | if_ci_failed: error
15 | only_pulls: false
16 | flags: null
17 | paths: null
18 |
--------------------------------------------------------------------------------
/src/screens/404/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | ...theme.mixins.layout,
9 | '& a': {
10 | color: theme.palette.custom.fonts.highlight,
11 | },
12 | },
13 | });
14 | },
15 | )();
16 |
17 | return styles;
18 | };
19 |
--------------------------------------------------------------------------------
/src/screens/home/components/blocks/components/desktop/utils.ts:
--------------------------------------------------------------------------------
1 | export const columns:{
2 | key: string;
3 | align?: 'left' | 'center' | 'right' | 'justify' | 'inherit';
4 | }[] = [
5 | {
6 | key: 'height',
7 | },
8 | {
9 | key: 'proposer',
10 | },
11 | {
12 | key: 'hash',
13 | },
14 | {
15 | key: 'txs',
16 | align: 'right',
17 | },
18 | {
19 | key: 'time',
20 | align: 'right',
21 | },
22 | ];
23 |
--------------------------------------------------------------------------------
/src/screens/validators/components/list/components/condition/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classnames from 'classnames';
3 | import { useStyles } from './styles';
4 |
5 | const Condition: React.FC<{
6 | className?: string;
7 | }> = ({ className }) => {
8 | const classes = useStyles();
9 |
10 | return (
11 |
12 | );
13 | };
14 |
15 | export default Condition;
16 |
--------------------------------------------------------------------------------
/src/graphql/general/active_validator_count.graphql:
--------------------------------------------------------------------------------
1 | query ActiveValidatorCount {
2 | activeTotal: validator_status_aggregate(where: {status: {_eq: 3}}) {
3 | aggregate {
4 | count
5 | }
6 | }
7 | inactiveTotal: validator_status_aggregate(where: {status: {_neq: 3}}) {
8 | aggregate {
9 | count
10 | }
11 | }
12 | total: validator_status_aggregate {
13 | aggregate {
14 | count
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/pages/_error.tsx:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | import { NextPageContext } from 'next';
3 | import Error from '@screens/error';
4 |
5 | const ErrorPage = () => {
6 | return (
7 |
8 | );
9 | };
10 |
11 | ErrorPage.getInitialProps = ({
12 | res, err,
13 | }: NextPageContext) => {
14 | const statusCode = res ? res.statusCode : err ? err.statusCode : 404;
15 | return { statusCode };
16 | };
17 |
18 | export default ErrorPage;
19 |
--------------------------------------------------------------------------------
/src/screens/proposals/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | ...theme.mixins.layout,
9 | '& a': {
10 | color: theme.palette.custom.fonts.highlight,
11 | },
12 | },
13 | });
14 | },
15 | )();
16 |
17 | return styles;
18 | };
19 |
--------------------------------------------------------------------------------
/src/screens/validators/components/list/components/index.ts:
--------------------------------------------------------------------------------
1 | import Desktop from './desktop';
2 | import Mobile from './mobile';
3 | import Tabs from './tabs';
4 | import Condition from './condition';
5 | import VotingPower from './voting_power';
6 | import VotingPowerExplanation from './voting_power_explanation';
7 |
8 | export {
9 | Desktop,
10 | Mobile,
11 | Tabs,
12 | Condition,
13 | VotingPower,
14 | VotingPowerExplanation,
15 | };
16 |
--------------------------------------------------------------------------------
/src/graphql/general/transaction_details.graphql:
--------------------------------------------------------------------------------
1 | query TransactionDetails($hash: String) {
2 | transaction(where: {hash: {_eq: $hash}}, limit: 1) {
3 | hash: hash
4 | height: height
5 | block: block {
6 | timestamp: timestamp
7 | }
8 | fee: fee
9 | gasUsed: gas_used
10 | gasWanted: gas_wanted
11 | success: success
12 | memo: memo
13 | messages: messages
14 | logs
15 | rawLog: raw_log
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/screens/validators/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | ...theme.mixins.layout,
9 | '& a': {
10 | color: theme.palette.custom.fonts.highlight,
11 | },
12 | },
13 | });
14 | },
15 | )();
16 |
17 | return styles;
18 | };
19 |
--------------------------------------------------------------------------------
/src/screens/blocks/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: Blocks matches snapshot 1`] = `
4 |
20 | `;
21 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/deposits/components/desktop/utils.ts:
--------------------------------------------------------------------------------
1 | export const columns:{
2 | key: string;
3 | align?: 'left' | 'center' | 'right' | 'justify' | 'inherit';
4 | width: number;
5 | }[] = [
6 | {
7 | key: 'depositor',
8 | width: 40,
9 | },
10 | {
11 | key: 'amount',
12 | width: 30,
13 | align: 'right',
14 | },
15 | {
16 | key: 'time',
17 | width: 30,
18 | align: 'right',
19 | },
20 | ];
21 |
--------------------------------------------------------------------------------
/src/utils/merge_state_change.ts:
--------------------------------------------------------------------------------
1 | import * as R from 'ramda';
2 |
3 | /**
4 | * Util function to merge 2 objects together
5 | * Mostly used for recoil state changes
6 | * @param prevState prevstate object
7 | * @param change change object
8 | * @returns newly merged object replacing prev state items with new state items
9 | */
10 | export const mergeStateChange = (prevState:any, change: any) => {
11 | return R.mergeDeepLeft(change, prevState);
12 | };
13 |
--------------------------------------------------------------------------------
/src/components/loading/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | padding: theme.spacing(2, 0),
9 | display: 'flex',
10 | alignItems: 'center',
11 | justifyContent: 'center',
12 | },
13 | });
14 | },
15 | )();
16 |
17 | return styles;
18 | };
19 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/types.ts:
--------------------------------------------------------------------------------
1 | export type OverviewType = {
2 | title: string;
3 | id: number;
4 | proposer: string;
5 | description: string;
6 | status: string;
7 | submitTime: string;
8 | depositEndTime: string;
9 | votingStartTime: string | null;
10 | votingEndTime: string | null;
11 | content: string;
12 | }
13 |
14 | export type ProposalState = {
15 | loading: boolean;
16 | exists: boolean;
17 | overview: OverviewType;
18 | }
19 |
--------------------------------------------------------------------------------
/src/screens/profile_details/components/connections/components/desktop/utils.ts:
--------------------------------------------------------------------------------
1 | export const columns:{
2 | key: string;
3 | align?: 'left' | 'center' | 'right' | 'justify' | 'inherit';
4 | width: number;
5 | }[] = [
6 | {
7 | key: 'network',
8 | width: 25,
9 | },
10 | {
11 | key: 'identifier',
12 | width: 50,
13 | align: 'left',
14 | },
15 | {
16 | key: 'creationTime',
17 | width: 25,
18 | align: 'right',
19 | },
20 | ];
21 |
--------------------------------------------------------------------------------
/src/components/desmos_profile/components/connections/components/desktop/utils.ts:
--------------------------------------------------------------------------------
1 | export const columns:{
2 | key: string;
3 | align?: 'left' | 'center' | 'right' | 'justify' | 'inherit';
4 | width: number;
5 | }[] = [
6 | {
7 | key: 'network',
8 | width: 25,
9 | },
10 | {
11 | key: 'identifier',
12 | width: 50,
13 | align: 'left',
14 | },
15 | {
16 | key: 'creationTime',
17 | width: 25,
18 | align: 'right',
19 | },
20 | ];
21 |
--------------------------------------------------------------------------------
/src/components/box/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classnames from 'classnames';
3 | import { useStyles } from './styles';
4 |
5 | const Box: React.FC<{
6 | className?: string;
7 | children: React.ReactNode;
8 | }> = ({
9 | className, children,
10 | }) => {
11 | const classes = useStyles();
12 | return (
13 |
14 | {children}
15 |
16 | );
17 | };
18 |
19 | export default Box;
20 |
--------------------------------------------------------------------------------
/src/components/custom_tool_tip/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 | import Color from 'color';
3 |
4 | export const useStyles = () => {
5 | const styles = makeStyles(
6 | (theme) => {
7 | return ({
8 | root: {
9 | padding: theme.spacing(2),
10 | background: Color(theme.palette.background.paper).alpha(0.9).string(),
11 | },
12 | });
13 | },
14 | )();
15 |
16 | return styles;
17 | };
18 |
--------------------------------------------------------------------------------
/src/graphql/general/messages_by_address.graphql:
--------------------------------------------------------------------------------
1 | query GetMessagesByAddress($address: _text, $limit: bigint = 50, $offset: bigint = 0 $types: _text = "{}") {
2 | messagesByAddress: messages_by_address(args: {addresses: $address, types: $types, limit: $limit, offset: $offset}) {
3 | transaction {
4 | height
5 | hash
6 | success
7 | messages
8 | logs
9 | block {
10 | height
11 | timestamp
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/recoil/big_dipper_networks/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | atomState,
3 | } from './atom';
4 |
5 | import {
6 | useBigDipperNetworksRecoil,
7 | } from './hooks';
8 |
9 | import {
10 | writeNetworks,
11 | writeSelectedNetwork,
12 | readNetworks,
13 | readSelectedNetwork,
14 | } from './selectors';
15 |
16 | export {
17 | atomState,
18 | useBigDipperNetworksRecoil,
19 | writeNetworks,
20 | writeSelectedNetwork,
21 | readNetworks,
22 | readSelectedNetwork,
23 | };
24 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/staking/components/delegations/components/desktop/utils.ts:
--------------------------------------------------------------------------------
1 | export const columns:{
2 | key: string;
3 | align?: 'left' | 'center' | 'right' | 'justify' | 'inherit';
4 | width: number;
5 | }[] = [
6 | {
7 | key: 'validator',
8 | width: 25,
9 | },
10 | {
11 | key: 'amount',
12 | width: 25,
13 | align: 'right',
14 | },
15 | {
16 | key: 'reward',
17 | width: 25,
18 | align: 'right',
19 | },
20 | ];
21 |
--------------------------------------------------------------------------------
/src/components/name/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | color: theme.palette.custom.fonts.highlight,
9 | wordBreak: 'break-all',
10 | '&:hover': {
11 | cursor: 'pointer',
12 | },
13 | },
14 | });
15 | },
16 | )();
17 |
18 | return styles;
19 | };
20 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/staking/components/unbondings/components/desktop/utils.ts:
--------------------------------------------------------------------------------
1 | export const columns:{
2 | key: string;
3 | align?: 'left' | 'center' | 'right' | 'justify' | 'inherit';
4 | width: number;
5 | }[] = [
6 | {
7 | key: 'validator',
8 | width: 40,
9 | },
10 | {
11 | key: 'amount',
12 | align: 'right',
13 | width: 30,
14 | },
15 | {
16 | key: 'completionTime',
17 | align: 'right',
18 | width: 30,
19 | },
20 | ];
21 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/staking/components/unbondings/components/desktop/utils.ts:
--------------------------------------------------------------------------------
1 | export const columns:{
2 | key: string;
3 | align?: 'left' | 'center' | 'right' | 'justify' | 'inherit';
4 | width: number;
5 | }[] = [
6 | {
7 | key: 'address',
8 | width: 40,
9 | },
10 | {
11 | key: 'amount',
12 | align: 'right',
13 | width: 30,
14 | },
15 | {
16 | key: 'completionTime',
17 | align: 'right',
18 | width: 30,
19 | },
20 | ];
21 |
--------------------------------------------------------------------------------
/src/components/box/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | overflow: 'auto',
9 | padding: theme.spacing(2),
10 | borderRadius: theme.shape.borderRadius,
11 | background: theme.palette.background.paper,
12 | },
13 | });
14 | },
15 | )();
16 |
17 | return styles;
18 | };
19 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/votes/types.ts:
--------------------------------------------------------------------------------
1 | export type VoteType = {
2 | vote: string;
3 | user: string;
4 | }
5 |
6 | export type VoteCount = {
7 | yes: number;
8 | no: number;
9 | veto: number;
10 | abstain: number;
11 | didNotVote: number;
12 | }
13 | export type VoteState = {
14 | data: VoteType[];
15 | voteCount: VoteCount;
16 | validatorsNotVoted: VoteType[];
17 | tab: number;
18 | };
19 |
20 | export type ItemType = Override
21 |
--------------------------------------------------------------------------------
/src/components/desmos_profile/hooks.ts:
--------------------------------------------------------------------------------
1 | import { useState } from 'react';
2 |
3 | export const useDesmosProfile = () => {
4 | const [connectionsOpen, setConnectionsOpen] = useState(false);
5 |
6 | const handleConnectionsOpen = () => {
7 | setConnectionsOpen(true);
8 | };
9 |
10 | const handleConnectionsClose = () => {
11 | setConnectionsOpen(false);
12 | };
13 |
14 | return {
15 | connectionsOpen,
16 | handleConnectionsClose,
17 | handleConnectionsOpen,
18 | };
19 | };
20 |
--------------------------------------------------------------------------------
/src/graphql/general/token_price.graphql:
--------------------------------------------------------------------------------
1 | subscription TokenPriceListener($denom: String) {
2 | tokenPrice: token_price(where: {unit_name: {_eq: $denom}}) {
3 | id
4 | price
5 | timestamp
6 | marketCap: market_cap
7 | unitName: unit_name
8 | }
9 | }
10 |
11 | query TokenPriceHistory($denom: String, $limit: Int = 10) {
12 | tokenPrice: token_price_history(where: {unit_name: {_eq: $denom}}, limit: $limit, order_by: {timestamp: desc}) {
13 | price
14 | timestamp
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/screens/home/components/transactions/components/desktop/utils.ts:
--------------------------------------------------------------------------------
1 | export const columns:{
2 | key: string;
3 | align?: 'left' | 'center' | 'right' | 'justify' | 'inherit';
4 | width: number,
5 | }[] = [
6 | {
7 | key: 'block',
8 | width: 25,
9 | },
10 | {
11 | key: 'hash',
12 | width: 25,
13 | },
14 | {
15 | key: 'result',
16 | align: 'right',
17 | width: 25,
18 | },
19 | {
20 | key: 'time',
21 | align: 'right',
22 | width: 25,
23 | },
24 | ];
25 |
--------------------------------------------------------------------------------
/src/components/loading/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classnames from 'classnames';
3 | import { CircularProgress } from '@material-ui/core';
4 | import { useStyles } from './styles';
5 |
6 | const Loading: React.FC<{
7 | className?: string;
8 | }> = ({
9 | className,
10 | }) => {
11 | const classes = useStyles();
12 | return (
13 |
14 |
15 |
16 | );
17 | };
18 |
19 | export default Loading;
20 |
--------------------------------------------------------------------------------
/src/components/nav/components/desktop/components/action_bar/components/network_list/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: Nav/NetworkList it renders 1`] = `
4 |
7 |
14 | < />
15 |
16 |
19 |
20 | `;
21 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/staking/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | overflow: 'hidden',
9 | [theme.breakpoints.up('md')]: {
10 | // display: 'flex',
11 | // flexDirection: 'column',
12 | },
13 | },
14 | });
15 | },
16 | )();
17 |
18 | return styles;
19 | };
20 |
--------------------------------------------------------------------------------
/src/components/linear_loading/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classnames from 'classnames';
3 | import { LinearProgress } from '@material-ui/core';
4 | import { useStyles } from './styles';
5 |
6 | const LinearLoading: React.FC<{
7 | className?: string;
8 | }> = ({ className }) => {
9 | const classes = useStyles();
10 | return (
11 |
12 |
13 |
14 | );
15 | };
16 |
17 | export default LinearLoading;
18 |
--------------------------------------------------------------------------------
/src/components/msg/unknown/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { MsgUnknown } from '@models';
3 | import { useGetStyles } from './styles';
4 |
5 | const Unknown = (props: {
6 | message: MsgUnknown;
7 | }) => {
8 | const { message } = props;
9 |
10 | const { classes } = useGetStyles();
11 | return (
12 |
13 |
14 | {JSON.stringify(message.json, null, '\t')}
15 |
16 |
17 | );
18 | };
19 |
20 | export default Unknown;
21 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/votes/components/desktop/utils.ts:
--------------------------------------------------------------------------------
1 | export const columns:{
2 | key: string;
3 | align?: 'left' | 'center' | 'right' | 'justify' | 'inherit';
4 | width: number;
5 | }[] = [
6 | {
7 | key: 'voter',
8 | // width: 34,
9 | width: 50,
10 | },
11 | // {
12 | // key: 'votingPower',
13 | // width: 33,
14 | // align: 'right',
15 | // },
16 | {
17 | key: 'vote',
18 | // width: 33,
19 | width: 50,
20 | align: 'right',
21 | },
22 | ];
23 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/staking/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | overflow: 'hidden',
9 | [theme.breakpoints.up('md')]: {
10 | // display: 'flex',
11 | // flexDirection: 'column',
12 | },
13 | },
14 | });
15 | },
16 | )();
17 |
18 | return styles;
19 | };
20 |
--------------------------------------------------------------------------------
/src/models/msg/msg_unknown.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from './types';
2 |
3 | class MsgUnknown {
4 | public category: Categories;
5 | public type: string;
6 | public json: JSON;
7 |
8 | constructor(payload: any) {
9 | this.category = 'others';
10 | this.type = payload.type;
11 | this.json = payload.json;
12 | }
13 |
14 | static fromJson(json: any) {
15 | return new MsgUnknown({
16 | type: json['@type'] ?? '',
17 | json,
18 | });
19 | }
20 | }
21 |
22 | export default MsgUnknown;
23 |
--------------------------------------------------------------------------------
/src/screens/blocks/components/desktop/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | height: '100%',
9 | },
10 | cell: {
11 | ...theme.mixins.tableCell,
12 | },
13 | body: {
14 | color: theme.palette.custom.fonts.fontTwo,
15 | },
16 | });
17 | },
18 | )();
19 |
20 | return styles;
21 | };
22 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # next.js
12 | /.next/
13 | /out/
14 |
15 | # production
16 | /build
17 | /dist
18 |
19 | # misc
20 | .DS_Store
21 | *.pem
22 |
23 | # debug
24 | npm-debug.log*
25 | yarn-debug.log*
26 | yarn-error.log*
27 |
28 | # local env files
29 | .env
30 | .env.*
31 | !.env.sample
32 |
33 | # vercel
34 | .vercel
35 |
36 |
37 | test.js
38 |
--------------------------------------------------------------------------------
/src/components/info_popover/hooks.tsx:
--------------------------------------------------------------------------------
1 | import { useState } from 'react';
2 |
3 | export const useInfoPopover = () => {
4 | const [anchorEl, setAnchorEl] = useState(null);
5 |
6 | const handlePopoverOpen = (event: any) => {
7 | setAnchorEl(event.currentTarget);
8 | };
9 |
10 | const handlePopoverClose = () => {
11 | setAnchorEl(null);
12 | };
13 |
14 | const open = Boolean(anchorEl);
15 |
16 | return {
17 | handlePopoverOpen,
18 | handlePopoverClose,
19 | anchorEl,
20 | open,
21 | };
22 | };
23 |
--------------------------------------------------------------------------------
/src/screens/transaction_details/types.ts:
--------------------------------------------------------------------------------
1 | export type OverviewType = {
2 | hash: string;
3 | height: number;
4 | timestamp: string;
5 | fee: TokenUnit;
6 | gasUsed: number;
7 | gasWanted: number;
8 | success: boolean;
9 | memo: string;
10 | error: string;
11 | }
12 |
13 | export type TransactionState = {
14 | loading: boolean;
15 | exists: boolean;
16 | overview: OverviewType;
17 | logs: null | [];
18 | messages: {
19 | filterBy: string;
20 | viewRaw: boolean;
21 | items: any[];
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/components/icons/index.tsx:
--------------------------------------------------------------------------------
1 | import FacebookIcon from './facebook';
2 | import ForboleIcon from './forbole';
3 | import GithubIcon from './github';
4 | import LinkedinIcon from './linkedIn';
5 | import MediumIcon from './medium';
6 | import TelegramIcon from './telegram';
7 | import YoutubeIcon from './youtube';
8 | import TwitterIcon from './twitter';
9 |
10 | export {
11 | FacebookIcon,
12 | ForboleIcon,
13 | GithubIcon,
14 | LinkedinIcon,
15 | MediumIcon,
16 | TelegramIcon,
17 | YoutubeIcon,
18 | TwitterIcon,
19 | };
20 |
--------------------------------------------------------------------------------
/src/components/transactions_list/components/desktop/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | height: '100%',
9 | },
10 | cell: {
11 | ...theme.mixins.tableCell,
12 | },
13 | body: {
14 | color: theme.palette.custom.fonts.fontTwo,
15 | },
16 | });
17 | },
18 | )();
19 |
20 | return styles;
21 | };
22 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/staking/components/redelegations/components/desktop/utils.ts:
--------------------------------------------------------------------------------
1 | export const columns:{
2 | key: string;
3 | align?: 'left' | 'center' | 'right' | 'justify' | 'inherit';
4 | width: number;
5 | }[] = [
6 | {
7 | key: 'from',
8 | width: 25,
9 | },
10 | {
11 | key: 'to',
12 | width: 25,
13 | },
14 | {
15 | key: 'amount',
16 | align: 'right',
17 | width: 25,
18 | },
19 | {
20 | key: 'completionTime',
21 | align: 'right',
22 | width: 25,
23 | },
24 | ];
25 |
--------------------------------------------------------------------------------
/src/screens/transaction_details/components/overview/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | '& .memo': {
9 | alignItems: 'flex-start',
10 | '& .label': {
11 | marginRight: theme.spacing(5),
12 | },
13 | },
14 | },
15 | });
16 | }, { index: 1 },
17 | )();
18 |
19 | return styles;
20 | };
21 |
--------------------------------------------------------------------------------
/src/screens/blocks/components/desktop/utils.ts:
--------------------------------------------------------------------------------
1 | export const columns:{
2 | key: string;
3 | align?: 'left' | 'center' | 'right' | 'justify' | 'inherit';
4 | width: number;
5 | }[] = [
6 | {
7 | key: 'height',
8 | width: 15,
9 | },
10 | {
11 | key: 'proposer',
12 | width: 25,
13 | },
14 | {
15 | key: 'hash',
16 | width: 25,
17 | },
18 | {
19 | key: 'txs',
20 | align: 'right',
21 | width: 15,
22 | },
23 | {
24 | key: 'time',
25 | align: 'right',
26 | width: 20,
27 | },
28 | ];
29 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/staking/components/redelegations/components/desktop/utils.ts:
--------------------------------------------------------------------------------
1 | export const columns:{
2 | key: string;
3 | align?: 'left' | 'center' | 'right' | 'justify' | 'inherit';
4 | width: number;
5 | }[] = [
6 | {
7 | key: 'address',
8 | width: 25,
9 | },
10 | {
11 | key: 'to',
12 | width: 25,
13 | },
14 | {
15 | key: 'amount',
16 | align: 'right',
17 | width: 20,
18 | },
19 | {
20 | key: 'completionTime',
21 | align: 'right',
22 | width: 30,
23 | },
24 | ];
25 |
--------------------------------------------------------------------------------
/src/components/msg/vesting/create_vesting_account/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/Grant matches snapshot 1`] = `
4 |
7 |
,
14 | ]
15 | }
16 | i18nKey="message_contents:MsgCreateVestingAccount"
17 | id="Trans"
18 | />
19 |
20 | `;
21 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/other_tokens/components/desktop/utils.ts:
--------------------------------------------------------------------------------
1 | export const columns:{
2 | key: string;
3 | align?: 'left' | 'center' | 'right' | 'justify' | 'inherit';
4 | width: number;
5 | }[] = [
6 | {
7 | key: 'token',
8 | width: 25,
9 | },
10 | {
11 | key: 'available',
12 | width: 25,
13 | align: 'right',
14 | },
15 | {
16 | key: 'reward',
17 | width: 25,
18 | align: 'right',
19 | },
20 | {
21 | key: 'commission',
22 | width: 25,
23 | align: 'right',
24 | },
25 | ];
26 |
--------------------------------------------------------------------------------
/public/icons/site.webmanifest:
--------------------------------------------------------------------------------
1 | {
2 | "name": "",
3 | "short_name": "",
4 | "icons": [
5 | {
6 | "src": "/images/icons/android-chrome-192x192.png",
7 | "sizes": "192x192",
8 | "type": "image/png"
9 | },
10 | {
11 | "src": "/images/icons/android-chrome-512x512.png",
12 | "sizes": "512x512",
13 | "type": "image/png"
14 | }
15 | ],
16 | "theme_color": "#ffffff",
17 | "background_color": "#ffffff",
18 | "display": "standalone"
19 | }
20 |
--------------------------------------------------------------------------------
/src/components/msg/unknown/styles.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | makeStyles, createStyles,
3 | } from '@material-ui/styles';
4 |
5 | export const useGetStyles = () => {
6 | const useStyles = makeStyles((theme: any) => createStyles({
7 | root: {
8 | overflow: 'auto',
9 | padding: '1rem',
10 | margin: '0',
11 | background: theme.palette.background.default,
12 | flex: 1,
13 | '& code': {
14 | whiteSpace: 'pre-wrap',
15 | },
16 | },
17 | }));
18 |
19 | return {
20 | classes: useStyles(),
21 | };
22 | };
23 |
--------------------------------------------------------------------------------
/src/screens/block_details/components/signatures/components/desktop/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | height: '100%',
9 | },
10 | cell: {
11 | ...theme.mixins.tableCell,
12 | },
13 | body: {
14 | color: theme.palette.custom.fonts.fontTwo,
15 | },
16 | });
17 | },
18 | )();
19 |
20 | return styles;
21 | };
22 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/validator_overview/utils.ts:
--------------------------------------------------------------------------------
1 | import { getValidatorStatus } from '@utils/get_validator_status';
2 |
3 | export const getStatusTheme = getValidatorStatus;
4 |
5 | export const getCondition = (condition: number, status: number) => {
6 | let result = 'na';
7 | if (status === 3) {
8 | if (condition > 90) {
9 | result = 'good';
10 | } else if (condition > 70 && condition < 90) {
11 | result = 'moderate';
12 | } else {
13 | result = 'bad';
14 | }
15 | }
16 | return result;
17 | };
18 |
--------------------------------------------------------------------------------
/src/utils/prefix_convert.ts:
--------------------------------------------------------------------------------
1 | import { bech32 } from 'bech32';
2 | import { chainConfig } from '@configs';
3 |
4 | export const toValidatorAddress = (address: string) => {
5 | if (!address) {
6 | return '';
7 | }
8 | const decode = bech32.decode(address).words;
9 | return bech32.encode(chainConfig.prefix.validator, decode);
10 | };
11 |
12 | export const isValidAddress = (address: string) => {
13 | try {
14 | const decoded = bech32.decode(address).words;
15 | return !!decoded;
16 | } catch {
17 | return false;
18 | }
19 | };
20 |
--------------------------------------------------------------------------------
/src/screens/home/components/data_blocks/components/single_block/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: Home/SingleBlock matches snapshot 1`] = `
4 |
7 |
10 | Price
11 |
12 |
15 |
18 | $4.40
19 |
20 |
21 |
22 | `;
23 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/votes/components/paginate/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TokenDetails/Paginate matches snapshot 1`] = `
4 |
21 | `;
22 |
--------------------------------------------------------------------------------
/src/screens/validators/components/list/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: Validators/List matches snapshot 1`] = `
4 |
24 | `;
25 |
--------------------------------------------------------------------------------
/.env.sample:
--------------------------------------------------------------------------------
1 | # This is a sample .env file for use in local development.
2 | # Duplicate this file as .env in the root of the project
3 | # and update the environment variables to match your
4 | # desired config
5 | #
6 | # See the README for full descriptions of each of the
7 | # available configurations.
8 |
9 | NEXT_PUBLIC_GRAPHQL_URL=http://localhost:8080/v1/graphql
10 | NEXT_PUBLIC_GRAPHQL_WS=ws://localhost:8080/v1/graphql
11 | NODE_ENV=development
12 | PORT=3000
13 | NEXT_PUBLIC_RPC_WEBSOCKET=http://localhost:26657/websocket
14 | NEXT_PUBLIC_CHAIN_TYPE=testnet
15 |
--------------------------------------------------------------------------------
/src/components/msg/vesting/create_periodic_vesting_account/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/Grant matches snapshot 1`] = `
4 |
7 |
,
14 | ]
15 | }
16 | i18nKey="message_contents:MsgCreatePeriodicVestingAccount"
17 | id="Trans"
18 | />
19 |
20 | `;
21 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/deposits/components/paginate/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TokenDetails/Paginate matches snapshot 1`] = `
4 |
21 | `;
22 |
--------------------------------------------------------------------------------
/src/components/transaction_messages_filter/hooks.tsx:
--------------------------------------------------------------------------------
1 | import { useState } from 'react';
2 |
3 | export const useTransactionsFilter = (callback: (value: string) => void) => {
4 | const [selectedFilter, setSelectedFilter] = useState('');
5 |
6 | const handleSelect = (selected) => {
7 | const newSelectedFilter = selected.key === 'none' ? '' : selected.key;
8 | setSelectedFilter(newSelectedFilter);
9 | if (callback) {
10 | callback(selected.key);
11 | }
12 | };
13 |
14 | return {
15 | handleSelect,
16 | selectedFilter,
17 | };
18 | };
19 |
--------------------------------------------------------------------------------
/src/screens/app/components/recoil_debugger/index.tsx:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | import React, { useEffect } from 'react';
3 | import { useRecoilSnapshot } from 'recoil';
4 |
5 | function DebugObserver() {
6 | const snapshot = useRecoilSnapshot();
7 | useEffect(() => {
8 | console.log('The following atoms were modified:');
9 | for (const node of snapshot.getNodes_UNSTABLE({ isModified: true })) {
10 | console.log(node.key, snapshot.getLoadable(node));
11 | }
12 | }, [snapshot]);
13 |
14 | return null;
15 | }
16 |
17 | export default DebugObserver;
18 |
--------------------------------------------------------------------------------
/src/components/nav/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | mobile: {
8 | [theme.breakpoints.up('lg')]: {
9 | display: 'none',
10 | },
11 | },
12 | desktop: {
13 | display: 'none',
14 | [theme.breakpoints.up('lg')]: {
15 | display: 'block',
16 | },
17 | },
18 | });
19 | },
20 | )();
21 |
22 | return styles;
23 | };
24 |
--------------------------------------------------------------------------------
/src/models/msg/governance/msg_text_proposal.ts:
--------------------------------------------------------------------------------
1 | class MsgTextProposal {
2 | public type: string;
3 | public title: string;
4 | public description: string;
5 |
6 | constructor(payload: any) {
7 | this.type = payload.type;
8 | this.title = payload.title;
9 | this.description = payload.description;
10 | }
11 |
12 | static fromJson(json: any) {
13 | return new MsgTextProposal({
14 | type: json['@type'],
15 | title: json.title,
16 | description: json.description,
17 | });
18 | }
19 | }
20 |
21 | export default MsgTextProposal;
22 |
--------------------------------------------------------------------------------
/src/recoil/market/atom.ts:
--------------------------------------------------------------------------------
1 | import { atom } from 'recoil';
2 | import { AtomState } from './types';
3 |
4 | const initialState: AtomState = {
5 | price: null,
6 | supply: {
7 | value: '0',
8 | displayDenom: '',
9 | baseDenom: '',
10 | exponent: 0,
11 | },
12 | marketCap: null,
13 | inflation: 0,
14 | communityPool: {
15 | value: '0',
16 | displayDenom: '',
17 | baseDenom: '',
18 | exponent: 0,
19 | },
20 | apr: 0,
21 | };
22 |
23 | export const atomState = atom({
24 | key: 'market',
25 | default: initialState,
26 | });
27 |
--------------------------------------------------------------------------------
/src/components/transactions_list/components/desktop/utils.ts:
--------------------------------------------------------------------------------
1 | export const columns:{
2 | key: string;
3 | align?: 'left' | 'center' | 'right' | 'justify' | 'inherit';
4 | width: number;
5 | }[] = [
6 | {
7 | key: 'block',
8 | width: 15,
9 | },
10 | {
11 | key: 'hash',
12 | width: 30,
13 | },
14 | {
15 | key: 'messages',
16 | align: 'right',
17 | width: 15,
18 | },
19 | {
20 | key: 'result',
21 | align: 'right',
22 | width: 20,
23 | },
24 | {
25 | key: 'time',
26 | align: 'right',
27 | width: 20,
28 | },
29 | ];
30 |
--------------------------------------------------------------------------------
/src/screens/home/components/transactions/components/desktop/styles.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | makeStyles,
3 | } from '@material-ui/core/styles';
4 |
5 | export const useStyles = () => {
6 | const styles = makeStyles(
7 | () => {
8 | return ({
9 | root: {
10 | overflow: 'auto',
11 | },
12 | table: {
13 | '& .MuiTableBody-root': {
14 | '& .MuiTableCell-root': {
15 | whiteSpace: 'nowrap',
16 | },
17 | },
18 | },
19 | });
20 | },
21 | )();
22 |
23 | return styles;
24 | };
25 |
--------------------------------------------------------------------------------
/src/utils/merge_refs.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-restricted-syntax */
2 |
3 | /**
4 | * helper function to merge multiple refs
5 | * @param refs
6 | */
7 | export const mergeRefs = (...refs) => {
8 | const filteredRefs = refs.filter(Boolean);
9 | if (!filteredRefs.length) return null;
10 | if (filteredRefs.length === 1) return filteredRefs[0];
11 | return (inst) => {
12 | for (const ref of filteredRefs) {
13 | if (typeof ref === 'function') {
14 | ref(inst);
15 | } else if (ref) {
16 | ref.current = inst;
17 | }
18 | }
19 | };
20 | };
21 |
--------------------------------------------------------------------------------
/src/graphql/general/market_data.graphql:
--------------------------------------------------------------------------------
1 | query MarketData ($denom: String) {
2 | communityPool: community_pool(order_by: {height: desc}, limit: 1) {
3 | coins
4 | }
5 | inflation: inflation(order_by: {height: desc}, limit: 1) {
6 | value
7 | }
8 | tokenPrice: token_price(where: {unit_name: {_eq: $denom}}) {
9 | marketCap: market_cap
10 | price
11 | }
12 | supply {
13 | coins
14 | }
15 | bondedTokens: staking_pool(order_by: {height: desc}, limit: 1) {
16 | bonded_tokens
17 | }
18 | distributionParams: distribution_params {
19 | params
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/components/transactions_list/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | mobile: {
8 | [theme.breakpoints.up('lg')]: {
9 | display: 'none',
10 | },
11 | },
12 | desktop: {
13 | display: 'none',
14 | [theme.breakpoints.up('lg')]: {
15 | display: 'block',
16 | },
17 | },
18 | });
19 | }, { index: 1 },
20 | )();
21 |
22 | return styles;
23 | };
24 |
--------------------------------------------------------------------------------
/src/screens/home/components/hero/components/token_price/hooks.ts:
--------------------------------------------------------------------------------
1 | import dayjs from '@utils/dayjs';
2 | import numeral from 'numeral';
3 |
4 | export const usePrice = () => {
5 | const formatTime = (time: dayjs.Dayjs, mode: 'locale' | 'utc' = 'locale') => {
6 | if (mode === 'utc') {
7 | return time.format('HH:mm');
8 | }
9 |
10 | return time.local().format('HH:mm');
11 | };
12 |
13 | const tickPriceFormatter = (num: number) => {
14 | return `$${numeral(num).format('0,0.[00]')}`;
15 | };
16 |
17 | return {
18 | tickPriceFormatter,
19 | formatTime,
20 | };
21 | };
22 |
--------------------------------------------------------------------------------
/src/components/load_and_exist/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {
3 | NotFound,
4 | LinearLoading,
5 | } from '@components';
6 |
7 | const LoadAndExist = (props: {
8 | loading: boolean;
9 | exists: boolean;
10 | children: React.ReactNode;
11 | }) => {
12 | const {
13 | loading,
14 | exists,
15 | children,
16 | } = props;
17 |
18 | if (loading) {
19 | return ;
20 | } if (!exists && !loading) {
21 | return ;
22 | }
23 | return (
24 | <>
25 | {children}
26 | >
27 | );
28 | };
29 |
30 | export default LoadAndExist;
31 |
--------------------------------------------------------------------------------
/src/components/msg/authz/grant/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/Grant matches snapshot 1`] = `
4 |
7 |
,
14 | ,
18 | ]
19 | }
20 | i18nKey="message_contents:MsgGrant"
21 | id="Trans"
22 | />
23 |
24 | `;
25 |
--------------------------------------------------------------------------------
/src/screens/home/components/hero/components/token_price/styles.ts:
--------------------------------------------------------------------------------
1 | import {
2 | makeStyles, useTheme,
3 | } from '@material-ui/core/styles';
4 |
5 | export const useStyles = () => {
6 | const styles = makeStyles(
7 | () => {
8 | return ({
9 | chart: {
10 | height: '285px',
11 | width: '100%',
12 | '& .yAxis .recharts-cartesian-axis-tick:first-child': {
13 | display: 'none',
14 | },
15 | },
16 | });
17 | }, { index: 1 },
18 | )();
19 |
20 | return {
21 | classes: styles,
22 | theme: useTheme(),
23 | };
24 | };
25 |
--------------------------------------------------------------------------------
/src/components/msg/authz/revoke/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/Revoke matches snapshot 1`] = `
4 |
7 |
,
14 | ,
18 | ]
19 | }
20 | i18nKey="message_contents:MsgRevoke"
21 | id="Trans"
22 | />
23 |
24 | `;
25 |
--------------------------------------------------------------------------------
/src/components/tag/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classnames from 'classnames';
3 | import { Typography } from '@material-ui/core';
4 | import { useStyles } from './styles';
5 |
6 | const Tag:React.FC<{
7 | className?: string;
8 | value: string;
9 | theme?: TagTheme;
10 | }> = ({
11 | className, value, theme,
12 | }) => {
13 | const classes = useStyles();
14 | return (
15 |
16 |
17 | {value}
18 |
19 |
20 | );
21 | };
22 |
23 | export default Tag;
24 |
--------------------------------------------------------------------------------
/src/graphql/general/online_voting_power.graphql:
--------------------------------------------------------------------------------
1 | query OnlineVotingPower {
2 | activeTotal: validator_status_aggregate(where: {status: {_eq: 3}}) {
3 | aggregate {
4 | count
5 | }
6 | }
7 | validatorVotingPowerAggregate: validator_voting_power_aggregate(where: {validator: {validator_statuses: {status: {_eq: 3}}}}) {
8 | aggregate {
9 | sum {
10 | votingPower: voting_power
11 | }
12 | }
13 | }
14 | stakingPool: staking_pool(order_by: {height: desc}, limit: 1) {
15 | bonded: bonded_tokens
16 | }
17 | stakingParams: staking_params(limit: 1) {
18 | params
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/graphql/general/params.graphql:
--------------------------------------------------------------------------------
1 | query Params {
2 | stakingParams: staking_params(limit: 1, order_by: {height: desc}) {
3 | params
4 | }
5 | slashingParams: slashing_params(limit: 1, order_by: {height: desc}) {
6 | params
7 | }
8 | mintParams: mint_params(limit: 1, order_by: {height: desc}) {
9 | params
10 | }
11 | distributionParams: distribution_params(limit: 1, order_by: {height: desc}) {
12 | params
13 | }
14 | govParams: gov_params (limit: 1, order_by: {height: desc}) {
15 | depositParams: deposit_params
16 | tallyParams: tally_params
17 | votingParams: voting_params
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/graphql/general/transactions.graphql:
--------------------------------------------------------------------------------
1 | subscription TransactionsListener($limit: Int = 7, $offset: Int = 0) {
2 | transactions: transaction(limit: $limit, offset: $offset, order_by: {height: desc}) {
3 | height
4 | hash
5 | success
6 | block {
7 | timestamp
8 | }
9 | messages
10 | logs
11 | }
12 | }
13 |
14 | query Transactions($limit: Int = 7, $offset: Int = 0) {
15 | transactions: transaction(limit: $limit, offset: $offset, order_by: {height: desc}) {
16 | height
17 | hash
18 | success
19 | block {
20 | timestamp
21 | }
22 | messages
23 | logs
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/components/msg/feegrant/grant_allowance/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/Grant matches snapshot 1`] = `
4 |
7 |
,
14 | ,
18 | ]
19 | }
20 | i18nKey="message_contents:MsgGrantAllowance"
21 | id="Trans"
22 | />
23 |
24 | `;
25 |
--------------------------------------------------------------------------------
/src/components/msg/feegrant/revoke_allowance/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: TransactionDetails/Revoke matches snapshot 1`] = `
4 |
7 |
,
14 | ,
18 | ]
19 | }
20 | i18nKey="message_contents:MsgRevokeAllowance"
21 | id="Trans"
22 | />
23 |
24 | `;
25 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/transactions/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | '& .MuiTypography-h2': {
9 | marginBottom: theme.spacing(2),
10 | },
11 | },
12 | list: {
13 | minHeight: '500px',
14 | height: '50vh',
15 | [theme.breakpoints.up('lg')]: {
16 | minHeight: '65vh',
17 | },
18 | },
19 | });
20 | },
21 | )();
22 |
23 | return styles;
24 | };
25 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/transactions/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | '& .MuiTypography-h2': {
9 | marginBottom: theme.spacing(2),
10 | },
11 | },
12 | list: {
13 | minHeight: '500px',
14 | height: '50vh',
15 | [theme.breakpoints.up('lg')]: {
16 | minHeight: '65vh',
17 | },
18 | },
19 | });
20 | },
21 | )();
22 |
23 | return styles;
24 | };
25 |
--------------------------------------------------------------------------------
/src/components/tab_panel/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classnames from 'classnames';
3 |
4 | const TabPanel: React.FC<{
5 | children?: React.ReactNode;
6 | index: any;
7 | value: any;
8 | className?: string;
9 | }> = (props) => {
10 | const {
11 | children, value, index, className,
12 | } = props;
13 | return (
14 |
19 | {value === index && (
20 | <>
21 | {children}
22 | >
23 | )}
24 |
25 | );
26 | };
27 |
28 | export default TabPanel;
29 |
--------------------------------------------------------------------------------
/src/models/msg/profiles/msg_save_profile.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgSaveProfile {
4 | public category: Categories;
5 | public type: string;
6 | public json: any;
7 | public creator: string;
8 |
9 | constructor(payload: any) {
10 | this.category = 'profiles';
11 | this.type = payload.type;
12 | this.creator = payload.creator;
13 | this.json = payload.json;
14 | }
15 |
16 | static fromJson(json: any) {
17 | return new MsgSaveProfile({
18 | type: json['@type'],
19 | creator: json.creator,
20 | json,
21 | });
22 | }
23 | }
24 |
25 | export default MsgSaveProfile;
26 |
--------------------------------------------------------------------------------
/src/models/msg/ibc/msg_channel.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgChannel {
4 | public category: Categories;
5 | public type: string;
6 | public signer: string;
7 | public json: any;
8 |
9 | constructor(payload: any) {
10 | this.category = 'ibc';
11 | this.type = payload.type;
12 | this.signer = payload.signer;
13 | this.json = payload.json;
14 | }
15 |
16 | static fromJson(json: any) {
17 | return new MsgChannel({
18 | json,
19 | type: json['@type'],
20 | signer: json.signer,
21 | });
22 | }
23 | }
24 |
25 | export default MsgChannel;
26 |
--------------------------------------------------------------------------------
/src/models/msg/ibc/msg_client_height.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgHeight {
4 | public category: Categories;
5 | public type: string;
6 | public signer: string;
7 | public json: any;
8 |
9 | constructor(payload: any) {
10 | this.category = 'ibc';
11 | this.type = payload.type;
12 | this.signer = payload.signer;
13 | this.json = payload.json;
14 | }
15 |
16 | static fromJson(json: any) {
17 | return new MsgHeight({
18 | json,
19 | type: json['@type'],
20 | signer: json.signer,
21 | });
22 | }
23 | }
24 |
25 | export default MsgHeight;
26 |
--------------------------------------------------------------------------------
/src/utils/get_middle_ellipsis.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Helper function to help generate ellpsis in the middle of text
3 | */
4 | export const getMiddleEllipsis = (str:string, options?: {
5 | beginning?: number,
6 | ending?: number,
7 | }) => {
8 | const oneThird = Math.floor(str.length / 3);
9 | const {
10 | beginning = oneThird + oneThird,
11 | ending = oneThird,
12 | } = options ?? {
13 | };
14 |
15 | const startEndTotal = beginning + ending;
16 |
17 | if (startEndTotal && startEndTotal < str.length) {
18 | return `${str.substr(0, beginning)}...${str.substr(str.length - ending, str.length)}`;
19 | }
20 |
21 | return str;
22 | };
23 |
--------------------------------------------------------------------------------
/src/models/msg/ibc/msg_channel_packet.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgPacket {
4 | public category: Categories;
5 | public type: string;
6 | public signer: string;
7 | public json: any;
8 |
9 | constructor(payload: any) {
10 | this.category = 'ibc';
11 | this.type = payload.type;
12 | this.signer = payload.signer;
13 | this.json = payload.json;
14 | }
15 |
16 | static fromJson(json: any) {
17 | return new MsgPacket({
18 | json,
19 | type: json['@type'],
20 | signer: json.signer,
21 | });
22 | }
23 | }
24 |
25 | export default MsgPacket;
26 |
--------------------------------------------------------------------------------
/src/models/msg/ibc/msg_channel_timeout.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgTimeout {
4 | public category: Categories;
5 | public type: string;
6 | public signer: string;
7 | public json: any;
8 |
9 | constructor(payload: any) {
10 | this.category = 'ibc';
11 | this.type = payload.type;
12 | this.signer = payload.signer;
13 | this.json = payload.json;
14 | }
15 |
16 | static fromJson(json: any) {
17 | return new MsgTimeout({
18 | json,
19 | type: json['@type'],
20 | signer: json.signer,
21 | });
22 | }
23 | }
24 |
25 | export default MsgTimeout;
26 |
--------------------------------------------------------------------------------
/src/models/msg/profiles/msg_delete_profile.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgDeleteProfile {
4 | public category: Categories;
5 | public type: string;
6 | public creator: string;
7 | public json: any;
8 |
9 | constructor(payload: any) {
10 | this.category = 'profiles';
11 | this.type = payload.type;
12 | this.creator = payload.creator;
13 | this.json = payload.json;
14 | }
15 |
16 | static fromJson(json: any) {
17 | return new MsgDeleteProfile({
18 | type: json['@type'],
19 | creator: json.creator,
20 | json,
21 | });
22 | }
23 | }
24 |
25 | export default MsgDeleteProfile;
26 |
--------------------------------------------------------------------------------
/src/screens/proposals/components/list/components/total/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import useTranslation from 'next-translate/useTranslation';
3 | import classnames from 'classnames';
4 | import { Typography } from '@material-ui/core';
5 |
6 | const Total: React.FC<{
7 | className?: string;
8 | total: string;
9 | }> = ({
10 | className, total,
11 | }) => {
12 | const { t } = useTranslation('proposals');
13 | return (
14 |
15 | {t('totalProposals', {
16 | amount: total,
17 | })}
18 |
19 | );
20 | };
21 |
22 | export default Total;
23 |
--------------------------------------------------------------------------------
/src/components/avatar/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`component: Avatar matches snapshot 1`] = `
4 |
7 |
12 |
13 | `;
14 |
15 | exports[`component: Avatar matches snapshot with imageUrl 1`] = `
16 |
19 |
24 |
25 | `;
26 |
--------------------------------------------------------------------------------
/src/models/msg/ibc/msg_connection_version.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgVersion {
4 | public category: Categories;
5 | public type: string;
6 | public signer: string;
7 | public json: any;
8 |
9 | constructor(payload: any) {
10 | this.category = 'ibc';
11 | this.type = payload.type;
12 | this.signer = payload.signer;
13 | this.json = payload.json;
14 | }
15 |
16 | static fromJson(json: any) {
17 | return new MsgVersion({
18 | json,
19 | type: json['@type'],
20 | signer: json.signer,
21 | });
22 | }
23 | }
24 |
25 | export default MsgVersion;
26 |
--------------------------------------------------------------------------------
/src/screens/validators/components/list/types.ts:
--------------------------------------------------------------------------------
1 | export type ValidatorType = {
2 | validator: string;
3 | votingPower: number;
4 | votingPowerPercent: number;
5 | commission: number;
6 | condition: number;
7 | status: number;
8 | jailed: boolean;
9 | tombstoned: boolean;
10 | topVotingPower?: boolean; // top 34% VP
11 | }
12 |
13 | export type ValidatorsState = {
14 | loading: boolean;
15 | exists: boolean;
16 | tab: number;
17 | sortKey: string;
18 | sortDirection: 'asc' | 'desc';
19 | votingPowerOverall: number;
20 | items: ValidatorType[];
21 | }
22 |
23 | export type ItemType = Override;
24 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/overview/hooks.ts:
--------------------------------------------------------------------------------
1 | import { useState } from 'react';
2 | import { toast } from 'react-toastify';
3 | import copy from 'copy-to-clipboard';
4 |
5 | export const useOverview = (t) => {
6 | const [open, setOpen] = useState(false);
7 |
8 | const handleClose = () => {
9 | setOpen(false);
10 | };
11 |
12 | const handleOpen = () => {
13 | setOpen(true);
14 | };
15 |
16 | const handleCopyToClipboard = (value: string) => {
17 | copy(value);
18 | toast(t('common:copied'));
19 | };
20 |
21 | return {
22 | open,
23 | handleClose,
24 | handleOpen,
25 | handleCopyToClipboard,
26 | };
27 | };
28 |
--------------------------------------------------------------------------------
/codegen.yml:
--------------------------------------------------------------------------------
1 | overwrite: true
2 | config:
3 | # omitOperationSuffix: true
4 | skipTypeNameForRoot: true
5 | generates:
6 | ./src/graphql/types/general_types.tsx:
7 | documents:
8 | - 'src/graphql/general/*'
9 | schema: https://gql.desmos.forbole.com/v1/graphql
10 | plugins:
11 | - "typescript"
12 | - "typescript-operations"
13 | - "typescript-react-apollo" # To generate custom hooks per query
14 | ./src/graphql/types/profile_types.ts:
15 | schema: https://gql.mainnet.desmos.network/v1/graphql
16 | documents:
17 | - 'src/graphql/profiles/*'
18 | plugins:
19 | - "typescript"
20 | - "typescript-operations"
21 |
--------------------------------------------------------------------------------
/src/components/loading/index.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import renderer from 'react-test-renderer';
3 | import { MockTheme } from '@tests/utils';
4 | import Loading from '.';
5 |
6 | // ==================================
7 | // unit tests
8 | // ==================================
9 | describe('components: Result', () => {
10 | it('matches snapshot', () => {
11 | const component = renderer.create(
12 |
13 |
14 | ,
15 | );
16 | const tree = component.toJSON();
17 | expect(tree).toMatchSnapshot();
18 | });
19 |
20 | afterEach(() => {
21 | jest.clearAllMocks();
22 | });
23 | });
24 |
--------------------------------------------------------------------------------
/src/components/nav/components/networks/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | networkList: {
8 | display: 'flex',
9 | alignItems: 'flex-start',
10 | justifyContent: 'flex-start',
11 | '& img': {
12 | width: '25px',
13 | marginRight: theme.spacing(2),
14 | },
15 | '& .network': {
16 | flex: 1,
17 | minWidth: 0,
18 | },
19 | },
20 | });
21 | },
22 | )();
23 |
24 | return styles;
25 | };
26 |
--------------------------------------------------------------------------------
/src/models/msg/slashing/msg_unjail.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgUnjail {
4 | public category: Categories;
5 | public type: string;
6 | public validatorAddress: string;
7 | public json: any;
8 |
9 | constructor(payload: any) {
10 | this.category = 'slashing';
11 | this.type = payload.type;
12 | this.validatorAddress = payload.validatorAddress;
13 | this.json = payload.json;
14 | }
15 |
16 | static fromJson(json: any) {
17 | return new MsgUnjail({
18 | json,
19 | type: json['@type'],
20 | validatorAddress: json.validator_addr,
21 | });
22 | }
23 | }
24 |
25 | export default MsgUnjail;
26 |
--------------------------------------------------------------------------------
/src/screens/profile_details/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | ...theme.mixins.layout,
9 | display: 'grid',
10 | gridTemplateRows: 'auto',
11 | gridGap: theme.spacing(1),
12 | '& a': {
13 | color: theme.palette.custom.fonts.highlight,
14 | },
15 | [theme.breakpoints.up('lg')]: {
16 | gridGap: theme.spacing(2),
17 | },
18 | },
19 | });
20 | },
21 | )();
22 |
23 | return styles;
24 | };
25 |
--------------------------------------------------------------------------------
/src/models/msg/ibc/msg_connection_end.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgConnectionEnd {
4 | public category: Categories;
5 | public type: string;
6 | public signer: string;
7 | public json: any;
8 |
9 | constructor(payload: any) {
10 | this.category = 'ibc';
11 | this.type = payload.type;
12 | this.signer = payload.signer;
13 | this.json = payload.json;
14 | }
15 |
16 | static fromJson(json: any) {
17 | return new MsgConnectionEnd({
18 | json,
19 | type: json['@type'],
20 | signer: json.signer,
21 | });
22 | }
23 | }
24 |
25 | export default MsgConnectionEnd;
26 |
--------------------------------------------------------------------------------
/src/screens/blocks/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | ...theme.mixins.layout,
9 | '& a': {
10 | color: theme.palette.custom.fonts.highlight,
11 | },
12 | },
13 | box: {
14 | minHeight: '500px',
15 | height: '50vh',
16 | [theme.breakpoints.up('lg')]: {
17 | height: '100%',
18 | minHeight: '65vh',
19 | },
20 | },
21 | });
22 | },
23 | )();
24 |
25 | return styles;
26 | };
27 |
--------------------------------------------------------------------------------
/src/screens/transactions/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | ...theme.mixins.layout,
9 | '& a': {
10 | color: theme.palette.custom.fonts.highlight,
11 | },
12 | },
13 | box: {
14 | minHeight: '500px',
15 | height: '50vh',
16 | [theme.breakpoints.up('lg')]: {
17 | height: '100%',
18 | minHeight: '65vh',
19 | },
20 | },
21 | });
22 | },
23 | )();
24 |
25 | return styles;
26 | };
27 |
--------------------------------------------------------------------------------
/src/screens/validators/components/list/components/voting_power_explanation/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Trans from 'next-translate/Trans';
3 | import { Typography } from '@material-ui/core';
4 | import { useStyles } from './styles';
5 |
6 | const VotingPowerExplanation = () => {
7 | const classes = useStyles();
8 |
9 | return (
10 |
11 |
12 | ,
16 | ]}
17 | />
18 |
19 |
20 | );
21 | };
22 |
23 | export default VotingPowerExplanation;
24 |
--------------------------------------------------------------------------------
/src/components/tag/index.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import renderer from 'react-test-renderer';
3 | import { MockTheme } from '@tests/utils';
4 | import Tag from '.';
5 |
6 | // ==================================
7 | // unit tests
8 | // ==================================
9 | describe('components: Tag', () => {
10 | it('matches snapshot', () => {
11 | const component = renderer.create(
12 |
13 |
14 | ,
15 | );
16 | const tree = component.toJSON();
17 | expect(tree).toMatchSnapshot();
18 | });
19 |
20 | afterEach(() => {
21 | jest.clearAllMocks();
22 | });
23 | });
24 |
--------------------------------------------------------------------------------
/src/models/msg/ibc/msg_channel_timeout_on_close.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgTimeoutOnClose {
4 | public category: Categories;
5 | public type: string;
6 | public signer: string;
7 | public json: any;
8 |
9 | constructor(payload: any) {
10 | this.category = 'ibc';
11 | this.type = payload.type;
12 | this.signer = payload.signer;
13 | this.json = payload.json;
14 | }
15 |
16 | static fromJson(json: any) {
17 | return new MsgTimeoutOnClose({
18 | json,
19 | type: json['@type'],
20 | signer: json.signer,
21 | });
22 | }
23 | }
24 |
25 | export default MsgTimeoutOnClose;
26 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/other_tokens/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | paginate: {
8 | marginTop: theme.spacing(3),
9 | },
10 | mobile: {
11 | [theme.breakpoints.up('lg')]: {
12 | display: 'none',
13 | },
14 | },
15 | desktop: {
16 | display: 'none',
17 | [theme.breakpoints.up('lg')]: {
18 | display: 'flex',
19 | },
20 | },
21 | });
22 | },
23 | )();
24 |
25 | return styles;
26 | };
27 |
--------------------------------------------------------------------------------
/src/configs/chain_config.mainnet.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Desmos Block Explorer",
3 | "network": "desmos-mainnet-1",
4 | "icon": "/desmos/images/icon.svg",
5 | "logo": {
6 | "default": "/desmos/images/logo.svg"
7 | },
8 | "prefix": {
9 | "consensus": "desmosvalcons",
10 | "validator": "desmosvaloper",
11 | "account": "desmos"
12 | },
13 | "genesis": {
14 | "time": "2021-07-13T08:00:00",
15 | "height": 1
16 | },
17 | "primaryTokenUnit": "udsm",
18 | "votingPowerTokenUnit": "udsm",
19 | "tokenUnits": {
20 | "udsm": {
21 | "display": "dsm",
22 | "exponent": 6
23 | }
24 | },
25 | "extra": {
26 | "profile": true
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/configs/index.ts:
--------------------------------------------------------------------------------
1 | import chainConfigTestnet from './chain_config.testnet.json';
2 | import chainConfigMainnet from './chain_config.mainnet.json';
3 | import generalConfig from './general_config.json';
4 |
5 | /**
6 | * Helper function to return different configs based on the same chain
7 | * @returns config
8 | */
9 | const getChainConfig = () => {
10 | const chainType = process.env.NEXT_PUBLIC_CHAIN_TYPE || process.env.NEXT_PUBLIC_CHAIN_STATUS;
11 | if (chainType === 'mainnet') {
12 | return chainConfigMainnet;
13 | }
14 | return chainConfigTestnet;
15 | };
16 |
17 | const chainConfig = getChainConfig();
18 |
19 | export {
20 | chainConfig,
21 | generalConfig,
22 | };
23 |
--------------------------------------------------------------------------------
/src/screens/home/components/blocks/components/desktop/styles.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | makeStyles,
3 | } from '@material-ui/core/styles';
4 |
5 | export const useStyles = () => {
6 | const styles = makeStyles(
7 | (theme) => {
8 | return ({
9 | root: {
10 | overflow: 'auto',
11 | '& a': {
12 | color: theme.palette.custom.fonts.highlight,
13 | },
14 | },
15 | table: {
16 | '& .MuiTableBody-root': {
17 | '& .MuiTableCell-root': {
18 | whiteSpace: 'nowrap',
19 | },
20 | },
21 | },
22 |
23 | });
24 | },
25 | )();
26 |
27 | return styles;
28 | };
29 |
--------------------------------------------------------------------------------
/src/screens/block_details/components/signatures/components/desktop/utils.tsx:
--------------------------------------------------------------------------------
1 | import { AvatarName } from '@components';
2 |
3 | export const columns:{
4 | key: string;
5 | align?: 'left' | 'center' | 'right' | 'justify' | 'inherit';
6 | width: number;
7 | }[] = [
8 | {
9 | key: 'validator',
10 | width: 100,
11 | },
12 | ];
13 |
14 | export const formatRows = (data: AvatarName[]) => {
15 | return data.map((x) => {
16 | return (
17 | {
18 | validator: (
19 |
24 | ),
25 | }
26 | );
27 | });
28 | };
29 |
--------------------------------------------------------------------------------
/src/screens/proposals/components/list/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: Proposals/List matches snapshot 1`] = `
4 |
31 | `;
32 |
--------------------------------------------------------------------------------
/src/models/msg/ibc/msg_channel_counterparty.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgCounterpartyChannel {
4 | public category: Categories;
5 | public type: string;
6 | public signer: string;
7 | public json: any;
8 |
9 | constructor(payload: any) {
10 | this.category = 'ibc';
11 | this.type = payload.type;
12 | this.signer = payload.signer;
13 | this.json = payload.json;
14 | }
15 |
16 | static fromJson(json: any) {
17 | return new MsgCounterpartyChannel({
18 | json,
19 | type: json['@type'],
20 | signer: json.signer,
21 | });
22 | }
23 | }
24 |
25 | export default MsgCounterpartyChannel;
26 |
--------------------------------------------------------------------------------
/src/recoil/settings/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | atomState,
3 | } from './atom';
4 |
5 | import {
6 | writeTheme,
7 | readTheme,
8 | writeDate,
9 | readDate,
10 | writeTx,
11 | readTx,
12 | } from './selectors';
13 |
14 | import {
15 | THEME_LIST,
16 | THEME_DICTIONARY,
17 | DATE_LIST,
18 | TX_LIST,
19 | getThemeTemplate,
20 | } from './utils';
21 |
22 | import {
23 | useSettingsRecoil,
24 | } from './hooks';
25 |
26 | export {
27 | THEME_LIST,
28 | THEME_DICTIONARY,
29 | DATE_LIST,
30 | TX_LIST,
31 | useSettingsRecoil,
32 | atomState,
33 | writeTheme,
34 | getThemeTemplate,
35 | readTheme,
36 | writeDate,
37 | readDate,
38 | writeTx,
39 | readTx,
40 | };
41 |
--------------------------------------------------------------------------------
/src/components/footer/components/social_media/index.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import renderer from 'react-test-renderer';
3 | import { MockTheme } from '@tests/utils';
4 | import SocialMedia from '.';
5 |
6 | // ==================================
7 | // unit tests
8 | // ==================================
9 | describe('component: layout/footer', () => {
10 | it('matches snapshot', () => {
11 | const component = renderer.create(
12 |
13 |
14 | ,
15 | );
16 | const tree = component.toJSON();
17 | expect(tree).toMatchSnapshot();
18 | });
19 |
20 | afterEach(() => {
21 | jest.clearAllMocks();
22 | });
23 | });
24 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/staking/components/delegations/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | paginate: {
8 | marginTop: theme.spacing(3),
9 | },
10 | mobile: {
11 | [theme.breakpoints.up('lg')]: {
12 | display: 'none',
13 | },
14 | },
15 | desktop: {
16 | display: 'none',
17 | [theme.breakpoints.up('lg')]: {
18 | display: 'flex',
19 | },
20 | },
21 | });
22 | },
23 | )();
24 |
25 | return styles;
26 | };
27 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/staking/components/redelegations/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | paginate: {
8 | marginTop: theme.spacing(3),
9 | },
10 | mobile: {
11 | [theme.breakpoints.up('lg')]: {
12 | display: 'none',
13 | },
14 | },
15 | desktop: {
16 | display: 'none',
17 | [theme.breakpoints.up('lg')]: {
18 | display: 'flex',
19 | },
20 | },
21 | });
22 | },
23 | )();
24 |
25 | return styles;
26 | };
27 |
--------------------------------------------------------------------------------
/src/screens/account_details/components/staking/components/unbondings/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | paginate: {
8 | marginTop: theme.spacing(3),
9 | },
10 | mobile: {
11 | [theme.breakpoints.up('lg')]: {
12 | display: 'none',
13 | },
14 | },
15 | desktop: {
16 | display: 'none',
17 | [theme.breakpoints.up('lg')]: {
18 | display: 'flex',
19 | },
20 | },
21 | });
22 | },
23 | )();
24 |
25 | return styles;
26 | };
27 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/staking/components/delegations/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | paginate: {
8 | marginTop: theme.spacing(3),
9 | },
10 | mobile: {
11 | [theme.breakpoints.up('lg')]: {
12 | display: 'none',
13 | },
14 | },
15 | desktop: {
16 | display: 'none',
17 | [theme.breakpoints.up('lg')]: {
18 | display: 'flex',
19 | },
20 | },
21 | });
22 | },
23 | )();
24 |
25 | return styles;
26 | };
27 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/staking/components/unbondings/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | paginate: {
8 | marginTop: theme.spacing(3),
9 | },
10 | mobile: {
11 | [theme.breakpoints.up('lg')]: {
12 | display: 'none',
13 | },
14 | },
15 | desktop: {
16 | display: 'none',
17 | [theme.breakpoints.up('lg')]: {
18 | display: 'flex',
19 | },
20 | },
21 | });
22 | },
23 | )();
24 |
25 | return styles;
26 | };
27 |
--------------------------------------------------------------------------------
/src/models/msg/ibc/msg_connection_counterparty.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgCounterpartyConnection {
4 | public category: Categories;
5 | public type: string;
6 | public signer: string;
7 | public json: any;
8 |
9 | constructor(payload: any) {
10 | this.category = 'ibc';
11 | this.type = payload.type;
12 | this.signer = payload.signer;
13 | this.json = payload.json;
14 | }
15 |
16 | static fromJson(json: any) {
17 | return new MsgCounterpartyConnection({
18 | json,
19 | type: json['@type'],
20 | signer: json.signer,
21 | });
22 | }
23 | }
24 |
25 | export default MsgCounterpartyConnection;
26 |
--------------------------------------------------------------------------------
/src/screens/validator_details/components/staking/components/redelegations/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | paginate: {
8 | marginTop: theme.spacing(3),
9 | },
10 | mobile: {
11 | [theme.breakpoints.up('lg')]: {
12 | display: 'none',
13 | },
14 | },
15 | desktop: {
16 | display: 'none',
17 | [theme.breakpoints.up('lg')]: {
18 | display: 'flex',
19 | },
20 | },
21 | });
22 | },
23 | )();
24 |
25 | return styles;
26 | };
27 |
--------------------------------------------------------------------------------
/src/hooks/use_get_component_dimension.ts:
--------------------------------------------------------------------------------
1 | import {
2 | useEffect,
3 | useState,
4 | useRef,
5 | } from 'react';
6 |
7 | /**
8 | * Nav hook helper to get the component height
9 | */
10 | export const useGetComponentDimension = () => {
11 | const [height, setHeight] = useState(0);
12 | const [width, setWidth] = useState(0);
13 | const ref: any = useRef(null);
14 | useEffect(() => {
15 | if (ref?.current?.clientHeight) {
16 | setHeight(ref.current.clientHeight);
17 | }
18 | if (ref?.current?.clientWidth) {
19 | setWidth(ref.current.clientWidth);
20 | }
21 | }, [ref?.current?.clientHeight]);
22 |
23 | return {
24 | width,
25 | height,
26 | ref,
27 | };
28 | };
29 |
--------------------------------------------------------------------------------
/src/models/msg/authz/msg_grant.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgGrant {
4 | public category: Categories;
5 | public type: string;
6 | public json: any;
7 | public granter: string;
8 | public grantee: string;
9 |
10 | constructor(payload: any) {
11 | this.category = 'authz';
12 | this.type = payload.type;
13 | this.json = payload.json;
14 | this.granter = payload.granter;
15 | this.grantee = payload.grantee;
16 | }
17 |
18 | static fromJson(json: any) {
19 | return new MsgGrant({
20 | json,
21 | type: json['@type'],
22 | granter: json.granter,
23 | grantee: json.grantee,
24 | });
25 | }
26 | }
27 |
28 | export default MsgGrant;
29 |
--------------------------------------------------------------------------------
/src/screens/params/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | ...theme.mixins.layout,
9 | display: 'grid',
10 | gridTemplateRows: 'auto',
11 | gridGap: theme.spacing(1),
12 | '& a': {
13 | color: theme.palette.custom.fonts.highlight,
14 | },
15 | [theme.breakpoints.up('lg')]: {
16 | gridGap: theme.spacing(2),
17 | gridTemplateColumns: 'repeat(2, 1fr)',
18 | },
19 | },
20 | });
21 | },
22 | )();
23 |
24 | return styles;
25 | };
26 |
--------------------------------------------------------------------------------
/src/hooks/use_interval.ts:
--------------------------------------------------------------------------------
1 | import {
2 | useEffect, useRef,
3 | } from 'react';
4 |
5 | export const useInterval = (callback: () => void, delay: number) => {
6 | const savedCallback = useRef(callback);
7 |
8 | // Remember the latest callback.
9 | useEffect(() => {
10 | savedCallback.current = callback;
11 | }, [callback]);
12 |
13 | // initial call
14 | useEffect(() => {
15 | savedCallback.current();
16 | }, []);
17 |
18 | // Set up the interval.
19 | useEffect(() => {
20 | function tick() {
21 | savedCallback.current();
22 | }
23 | if (delay !== null) {
24 | const id = setInterval(tick, delay);
25 | return () => clearInterval(id);
26 | }
27 | }, [delay]);
28 | };
29 |
--------------------------------------------------------------------------------
/src/models/msg/authz/msg_revoke.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgRevoke {
4 | public category: Categories;
5 | public type: string;
6 | public json: any;
7 | public granter: string;
8 | public grantee: string;
9 |
10 | constructor(payload: any) {
11 | this.category = 'authz';
12 | this.type = payload.type;
13 | this.json = payload.json;
14 | this.granter = payload.granter;
15 | this.grantee = payload.grantee;
16 | }
17 |
18 | static fromJson(json: any) {
19 | return new MsgRevoke({
20 | json,
21 | type: json['@type'],
22 | granter: json.granter,
23 | grantee: json.grantee,
24 | });
25 | }
26 | }
27 |
28 | export default MsgRevoke;
29 |
--------------------------------------------------------------------------------
/src/recoil/profiles/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | atomFamilyState,
3 | } from './atom';
4 |
5 | import {
6 | useProfileRecoil,
7 | useProfilesRecoil,
8 | } from './hooks';
9 |
10 | import {
11 | readProfile,
12 | readProfiles,
13 | writeProfile,
14 | readDelegatorAddress,
15 | readDelegatorAddresses,
16 | readProfileExist,
17 | readProfilesExist,
18 | validatorToDelegatorAddress,
19 | } from './selectors';
20 |
21 | export {
22 | validatorToDelegatorAddress,
23 | atomFamilyState,
24 | useProfileRecoil,
25 | useProfilesRecoil,
26 | readProfile,
27 | readProfiles,
28 | writeProfile,
29 | readDelegatorAddress,
30 | readDelegatorAddresses,
31 | readProfileExist,
32 | readProfilesExist,
33 | };
34 |
--------------------------------------------------------------------------------
/src/screens/home/components/hero/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Box } from '@components';
3 | import {
4 | OnlineVotingPower, TokenPrice,
5 | } from './components';
6 | import { useHero } from './hooks';
7 |
8 | const Hero: React.FC = (props) => {
9 | const { state } = useHero();
10 | let component = null;
11 | if (!state.loading) {
12 | if (state.tokenPriceHistory.length) {
13 | component = ;
14 | } else {
15 | component = ;
16 | }
17 | }
18 |
19 | return (
20 |
21 | {component}
22 |
23 | );
24 | };
25 |
26 | export default Hero;
27 |
--------------------------------------------------------------------------------
/src/screens/home/components/transactions/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: Home/Blocks/Mobile matches snapshot 1`] = `
4 |
29 | `;
30 |
--------------------------------------------------------------------------------
/src/components/info_popover/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | display: 'flex',
9 | alignItems: 'center',
10 | },
11 | icon: {
12 | display: 'inline-block',
13 | fontSize: '1rem',
14 | margin: theme.spacing(0, 0.5),
15 | },
16 | popover: {
17 | pointerEvents: 'none',
18 | '& .MuiPopover-paper': {
19 | padding: '1rem',
20 | maxWidth: '300px',
21 | },
22 | },
23 | });
24 | },
25 | )();
26 |
27 | return styles;
28 | };
29 |
--------------------------------------------------------------------------------
/src/components/layout/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`component: Layout it renders 1`] = `
4 |
7 |
10 |
13 |
16 |
19 |
22 |
23 | hello world
24 |
25 |
26 |
27 |
28 |
32 |
33 | `;
34 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/deposits/components/paginate/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Pagination } from '@components';
3 | import { useStyles } from './styles';
4 |
5 | const Paginate = ({
6 | total,
7 | page,
8 | rowsPerPage,
9 | handleChangePage,
10 | handleChangeRowsPerPage,
11 | }) => {
12 | const classes = useStyles();
13 | return (
14 |
23 | );
24 | };
25 |
26 | export default Paginate;
27 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/votes/components/paginate/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Pagination } from '@components';
3 | import { useStyles } from './styles';
4 |
5 | const Paginate = ({
6 | total,
7 | page,
8 | rowsPerPage,
9 | handleChangePage,
10 | handleChangeRowsPerPage,
11 | }) => {
12 | const classes = useStyles();
13 | return (
14 |
23 | );
24 | };
25 |
26 | export default Paginate;
27 |
--------------------------------------------------------------------------------
/src/screens/transaction_details/components/logs/styles.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | makeStyles, createStyles,
3 | } from '@material-ui/styles';
4 |
5 | export const useGetStyles = () => {
6 | const useStyles = makeStyles((theme: any) => createStyles({
7 | root: {
8 | overflow: 'hidden',
9 | },
10 | header: {
11 | paddingBottom: theme.spacing(2),
12 | },
13 | pre: {
14 | maxHeight: '400px',
15 | overflow: 'auto',
16 | padding: '1rem',
17 | margin: '0',
18 | background: theme.palette.background.default,
19 | flex: 1,
20 | '& code': {
21 | whiteSpace: 'pre-wrap',
22 | },
23 | },
24 | }));
25 |
26 | return {
27 | classes: useStyles(),
28 | };
29 | };
30 |
--------------------------------------------------------------------------------
/src/screens/home/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: Home matches snapshot 1`] = `
4 |
8 |
12 |
16 |
20 |
24 |
28 |
32 |
33 | `;
34 |
--------------------------------------------------------------------------------
/src/screens/profile_details/components/connections/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: ProfileDetails/Connections matches snapshot 1`] = `
4 |
7 |
10 | accounts:connectionsTitle
11 |
12 |
29 |
30 | `;
31 |
--------------------------------------------------------------------------------
/src/hooks/index.ts:
--------------------------------------------------------------------------------
1 | import { usePersistedState } from './use_persisted_state';
2 | import { useScreenSize } from './use_screen_size';
3 | import { useGetComponentDimension } from './use_get_component_dimension';
4 | import {
5 | useList, useListRow, useGrid,
6 | } from './use_react_window';
7 | import { usePagination } from './use_pagination';
8 | import { useInterval } from './use_interval';
9 | import { useDesmosProfile } from './use_desmos_profile';
10 | import { useWindowOrigin } from './use_window';
11 |
12 | export {
13 | usePersistedState,
14 | useScreenSize,
15 | useGetComponentDimension,
16 | useList,
17 | useListRow,
18 | useGrid,
19 | usePagination,
20 | useInterval,
21 | useDesmosProfile,
22 | useWindowOrigin,
23 | };
24 |
--------------------------------------------------------------------------------
/src/models/msg/feegrant/msg_grant_allowance.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgGrantAllowance {
4 | public category: Categories;
5 | public type: string;
6 | public json: any;
7 | public granter: string;
8 | public grantee: string;
9 |
10 | constructor(payload: any) {
11 | this.category = 'feegrant';
12 | this.type = payload.type;
13 | this.json = payload.json;
14 | this.granter = payload.granter;
15 | this.grantee = payload.grantee;
16 | }
17 |
18 | static fromJson(json: any) {
19 | return new MsgGrantAllowance({
20 | json,
21 | type: json['@type'],
22 | granter: json.granter,
23 | grantee: json.grantee,
24 | });
25 | }
26 | }
27 |
28 | export default MsgGrantAllowance;
29 |
--------------------------------------------------------------------------------
/src/recoil/market/selectors.ts:
--------------------------------------------------------------------------------
1 | import { selector } from 'recoil';
2 | import { mergeStateChange } from '@utils/merge_state_change';
3 | import { atomState } from './atom';
4 | import { AtomState } from './types';
5 |
6 | const getMarket = ({ get }): AtomState => {
7 | const state = get(atomState);
8 | return state;
9 | };
10 |
11 | export const writeMarket = selector({
12 | key: 'market.write.market',
13 | get: getMarket,
14 | set: ({
15 | get, set,
16 | }, value: AtomState) => {
17 | const prevState = get(atomState);
18 | const newState = mergeStateChange(prevState, value);
19 | set(atomState, newState);
20 | },
21 | });
22 |
23 | export const readMarket = selector({
24 | key: 'market.read.market',
25 | get: getMarket,
26 | });
27 |
--------------------------------------------------------------------------------
/cypress/support/index.js:
--------------------------------------------------------------------------------
1 | // ***********************************************************
2 | // This example support/index.js is processed and
3 | // loaded automatically before your test files.
4 | //
5 | // This is a great place to put global configuration and
6 | // behavior that modifies Cypress.
7 | //
8 | // You can change the location of this file or turn off
9 | // automatically serving support files with the
10 | // 'supportFile' configuration option.
11 | //
12 | // You can read more here:
13 | // https://on.cypress.io/configuration
14 | // ***********************************************************
15 |
16 | // Import commands.js using ES2015 syntax:
17 | import './commands';
18 |
19 | // Alternatively you can use CommonJS syntax:
20 | // require('./commands')
21 |
--------------------------------------------------------------------------------
/src/components/avatar_name/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | display: 'flex',
9 | alignItems: 'center',
10 | justifyContent: 'flex-start',
11 | '& p': {
12 | color: theme.palette.custom.fonts.highlight,
13 | marginLeft: theme.spacing(1),
14 | whiteSpace: 'nowrap',
15 | overflow: 'hidden',
16 | textOverflow: 'ellipsis',
17 | },
18 | '&:hover': {
19 | cursor: 'pointer',
20 | },
21 | },
22 | });
23 | },
24 | )();
25 |
26 | return styles;
27 | };
28 |
--------------------------------------------------------------------------------
/src/components/linear_loading/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | flex: 1,
9 | display: 'flex',
10 | alignItems: 'center',
11 | justifyContent: 'center',
12 | height: '100%',
13 | minHeight: '150px',
14 | padding: theme.spacing(2),
15 | '& > *': {
16 | width: '70%',
17 | },
18 | [theme.breakpoints.up('md')]: {
19 | '& > *': {
20 | width: '40%',
21 | },
22 | },
23 | },
24 | });
25 | },
26 | )();
27 |
28 | return styles;
29 | };
30 |
--------------------------------------------------------------------------------
/src/models/msg/feegrant/msg_revoke_allowance.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgRevokeAllowance {
4 | public category: Categories;
5 | public type: string;
6 | public json: any;
7 | public granter: string;
8 | public grantee: string;
9 |
10 | constructor(payload: any) {
11 | this.category = 'feegrant';
12 | this.type = payload.type;
13 | this.json = payload.json;
14 | this.granter = payload.granter;
15 | this.grantee = payload.grantee;
16 | }
17 |
18 | static fromJson(json: any) {
19 | return new MsgRevokeAllowance({
20 | json,
21 | type: json['@type'],
22 | granter: json.granter,
23 | grantee: json.grantee,
24 | });
25 | }
26 | }
27 |
28 | export default MsgRevokeAllowance;
29 |
--------------------------------------------------------------------------------
/src/assets/icon-sort-down.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
9 |
10 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/components/search/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | '& .MuiInputBase-root': {
9 | width: '100%',
10 | background: theme.palette.background.paper,
11 | padding: theme.spacing(0.4, 1.2),
12 | borderRadius: theme.shape.borderRadius,
13 | },
14 | '& .MuiInputBase-input': {
15 | textOverflow: 'ellipsis',
16 | '&::placeholder': {
17 | color: theme.palette.custom.fonts.fontFour,
18 | },
19 | },
20 | },
21 | });
22 | },
23 | )();
24 |
25 | return styles;
26 | };
27 |
--------------------------------------------------------------------------------
/src/models/msg/profiles/msg_dtag_cancel_transfer.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgDtagCancelTransfer {
4 | public category: Categories;
5 | public type: string;
6 | public json: any;
7 | public sender: string;
8 | public receiver: string;
9 |
10 | constructor(payload: any) {
11 | this.category = 'profiles';
12 | this.type = payload.type;
13 | this.json = payload.json;
14 | this.sender = payload.sender;
15 | this.receiver = payload.receiver;
16 | }
17 |
18 | static fromJson(json: any) {
19 | return new MsgDtagCancelTransfer({
20 | json,
21 | type: json['@type'],
22 | sender: json.sender,
23 | receiver: json.receiver,
24 | });
25 | }
26 | }
27 |
28 | export default MsgDtagCancelTransfer;
29 |
--------------------------------------------------------------------------------
/src/models/msg/profiles/msg_dtag_refuse_transfer.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgDtagRefuseTransfer {
4 | public category: Categories;
5 | public type: string;
6 | public json: any;
7 | public sender: string;
8 | public receiver: string;
9 |
10 | constructor(payload: any) {
11 | this.category = 'profiles';
12 | this.type = payload.type;
13 | this.json = payload.json;
14 | this.sender = payload.sender;
15 | this.receiver = payload.receiver;
16 | }
17 |
18 | static fromJson(json: any) {
19 | return new MsgDtagRefuseTransfer({
20 | json,
21 | type: json['@type'],
22 | sender: json.sender,
23 | receiver: json.receiver,
24 | });
25 | }
26 | }
27 |
28 | export default MsgDtagRefuseTransfer;
29 |
--------------------------------------------------------------------------------
/src/models/msg/profiles/msg_dtag_transfer_request.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgDtagTransferRequest {
4 | public category: Categories;
5 | public type: string;
6 | public json: any;
7 | public sender: string;
8 | public receiver: string;
9 |
10 | constructor(payload: any) {
11 | this.category = 'profiles';
12 | this.type = payload.type;
13 | this.json = payload.json;
14 | this.sender = payload.sender;
15 | this.receiver = payload.receiver;
16 | }
17 |
18 | static fromJson(json: any) {
19 | return new MsgDtagTransferRequest({
20 | json,
21 | type: json['@type'],
22 | sender: json.sender,
23 | receiver: json.receiver,
24 | });
25 | }
26 | }
27 |
28 | export default MsgDtagTransferRequest;
29 |
--------------------------------------------------------------------------------
/src/screens/home/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Layout } from '@components';
3 | import { useStyles } from './styles';
4 | import {
5 | DataBlocks,
6 | Consensus,
7 | Tokenomics,
8 | Blocks,
9 | Transactions,
10 | Hero,
11 | } from './components';
12 |
13 | const Home = () => {
14 | const classes = useStyles();
15 |
16 | return (
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | );
26 | };
27 |
28 | export default Home;
29 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/votes_graph/components/quorum_explanation/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Trans from 'next-translate/Trans';
3 | import { Typography } from '@material-ui/core';
4 | import { useStyles } from './styles';
5 |
6 | const QuorumExplanation = (props: {
7 | quorum: number;
8 | }) => {
9 | const classes = useStyles();
10 |
11 | return (
12 |
13 |
14 | ,
18 | ]}
19 | values={{
20 | quorum: props.quorum,
21 | }}
22 | />
23 |
24 |
25 | );
26 | };
27 |
28 | export default QuorumExplanation;
29 |
--------------------------------------------------------------------------------
/src/screens/home/components/data_blocks/components/single_block/index.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import renderer from 'react-test-renderer';
3 | import { MockTheme } from '@tests/utils';
4 | import SingleBlock from '.';
5 |
6 | // ==================================
7 | // unit tests
8 | // ==================================
9 | describe('screen: Home/SingleBlock', () => {
10 | it('matches snapshot', () => {
11 | const component = renderer.create(
12 |
13 |
17 | ,
18 | );
19 | const tree = component.toJSON();
20 | expect(tree).toMatchSnapshot();
21 | });
22 |
23 | afterEach(() => {
24 | jest.clearAllMocks();
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/src/models/msg/ibc/msg_client_upgrade_client.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgUpgradeClient {
4 | public category: Categories;
5 | public type: string;
6 | public signer: string;
7 | public clientId: string;
8 | public json: any;
9 |
10 | constructor(payload: any) {
11 | this.category = 'ibc';
12 | this.type = payload.type;
13 | this.signer = payload.signer;
14 | this.clientId = payload.clientId;
15 | this.json = payload.json;
16 | }
17 |
18 | static fromJson(json: any) {
19 | return new MsgUpgradeClient({
20 | json,
21 | type: json['@type'],
22 | signer: json.signer,
23 | clientId: json.client_id,
24 | });
25 | }
26 | }
27 |
28 | export default MsgUpgradeClient;
29 |
--------------------------------------------------------------------------------
/src/models/msg/ibc/msg_client_create_client.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgCreateClient {
4 | public category: Categories;
5 | public type: string;
6 | public signer: string;
7 | public chainId: string;
8 | public json: any;
9 |
10 | constructor(payload: any) {
11 | this.category = 'ibc';
12 | this.type = payload.type;
13 | this.signer = payload.signer;
14 | this.chainId = payload.chainId;
15 | this.json = payload.json;
16 | }
17 |
18 | static fromJson(json: any) {
19 | return new MsgCreateClient({
20 | json,
21 | type: json['@type'],
22 | signer: json.signer,
23 | chainId: json.client_state?.chain_id,
24 | });
25 | }
26 | }
27 |
28 | export default MsgCreateClient;
29 |
--------------------------------------------------------------------------------
/src/components/nav/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import dynamic from 'next/dynamic';
3 | import { useScreenSize } from '@hooks';
4 | import { Mobile } from './components';
5 | import { useStyles } from './styles';
6 |
7 | const Desktop = dynamic(() => import('./components/desktop'));
8 |
9 | const Nav:React.FC<{
10 | title?: string;
11 | }> = ({ title }) => {
12 | const classes = useStyles();
13 | const { isDesktop } = useScreenSize();
14 | return (
15 | <>
16 | {isDesktop ? (
17 |
21 | ) : (
22 |
26 | )}
27 | >
28 | );
29 | };
30 |
31 | export default Nav;
32 |
--------------------------------------------------------------------------------
/src/components/name/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classnames from 'classnames';
3 | import Link from 'next/link';
4 | import { Typography } from '@material-ui/core';
5 | import { ADDRESS_DETAILS } from '@utils/go_to_page';
6 | import { useStyles } from './styles';
7 |
8 | const Name: React.FC<{
9 | className?: string;
10 | address: string;
11 | name: string;
12 | href?: (address: string) => string;
13 | }> = ({
14 | className, address, name, href = ADDRESS_DETAILS,
15 | }) => {
16 | const classes = useStyles();
17 |
18 | return (
19 |
20 |
21 | {name}
22 |
23 |
24 | );
25 | };
26 |
27 | export default Name;
28 |
--------------------------------------------------------------------------------
/src/screens/error/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | display: 'flex',
9 | alignItems: 'center',
10 | justifyContent: 'center',
11 | flexDirection: 'column',
12 | minHeight: '100vh',
13 | padding: theme.spacing(6),
14 | '& .MuiTypography-h2': {
15 | marginBottom: theme.spacing(2),
16 | },
17 | '& .details': {
18 | marginBottom: theme.spacing(5),
19 | },
20 | '& .container': {
21 | maxWidth: '600px',
22 | },
23 | },
24 | });
25 | },
26 | )();
27 |
28 | return styles;
29 | };
30 |
--------------------------------------------------------------------------------
/src/screens/proposal_details/components/deposits/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | overflow: 'hidden',
9 | },
10 | list: {
11 | flex: 1,
12 | },
13 | title: {
14 | marginBottom: theme.spacing(2),
15 | },
16 | mobile: {
17 | [theme.breakpoints.up('lg')]: {
18 | display: 'none',
19 | },
20 | },
21 | desktop: {
22 | display: 'none',
23 | [theme.breakpoints.up('lg')]: {
24 | display: 'flex',
25 | },
26 | },
27 | });
28 | },
29 | )();
30 |
31 | return styles;
32 | };
33 |
--------------------------------------------------------------------------------
/src/screens/validators/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import useTranslation from 'next-translate/useTranslation';
3 | import { NextSeo } from 'next-seo';
4 | import {
5 | Layout,
6 | } from '@components';
7 | import { useStyles } from './styles';
8 | import { List } from './components';
9 |
10 | const Validators = () => {
11 | const { t } = useTranslation('validators');
12 | const classes = useStyles();
13 | return (
14 | <>
15 |
21 |
25 |
26 |
27 | >
28 | );
29 | };
30 |
31 | export default Validators;
32 |
--------------------------------------------------------------------------------
/cypress/plugins/index.js:
--------------------------------------------------------------------------------
1 | ///
2 | // ***********************************************************
3 | // This example plugins/index.js can be used to load plugins
4 | //
5 | // You can change the location of this file or turn off loading
6 | // the plugins file with the 'pluginsFile' configuration option.
7 | //
8 | // You can read more here:
9 | // https://on.cypress.io/plugins-guide
10 | // ***********************************************************
11 |
12 | // This function is called when a project is opened or re-opened (e.g. due to
13 | // the project's config changing)
14 |
15 | /**
16 | * @type {Cypress.PluginConfig}
17 | */
18 | module.exports = (on, config) => {
19 | // `on` is used to hook into various events Cypress emits
20 | // `config` is the resolved Cypress config
21 | }
22 |
--------------------------------------------------------------------------------
/src/models/msg/ibc/msg_client_submit_misbehaviour.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgSubmitMisbehaviour {
4 | public category: Categories;
5 | public type: string;
6 | public signer: string;
7 | public clientId: string;
8 | public json: any;
9 |
10 | constructor(payload: any) {
11 | this.category = 'ibc';
12 | this.type = payload.type;
13 | this.signer = payload.signer;
14 | this.clientId = payload.clientId;
15 | this.json = payload.json;
16 | }
17 |
18 | static fromJson(json: any) {
19 | return new MsgSubmitMisbehaviour({
20 | json,
21 | type: json['@type'],
22 | signer: json.signer,
23 | clientId: json.client_id,
24 | });
25 | }
26 | }
27 |
28 | export default MsgSubmitMisbehaviour;
29 |
--------------------------------------------------------------------------------
/src/screens/validators/components/list/components/condition/index.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import renderer from 'react-test-renderer';
3 | import { MockTheme } from '@tests/utils';
4 | import Condition from '.';
5 |
6 | // ==================================
7 | // mocks
8 | // ==================================
9 |
10 | // ==================================
11 | // unit tests
12 | // ==================================
13 | describe('screen: Validators/Condition', () => {
14 | it('matches snapshot', () => {
15 | const component = renderer.create(
16 |
17 |
18 | ,
19 | );
20 | const tree = component.toJSON();
21 | expect(tree).toMatchSnapshot();
22 | });
23 |
24 | afterEach(() => {
25 | jest.clearAllMocks();
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/src/screens/validators/components/list/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | list: {
8 | minHeight: '500px',
9 | height: '50vh',
10 | [theme.breakpoints.up('lg')]: {
11 | minHeight: '65vh',
12 | },
13 | },
14 | mobile: {
15 | height: '100%',
16 | [theme.breakpoints.up('lg')]: {
17 | display: 'none',
18 | },
19 | },
20 | desktop: {
21 | display: 'none',
22 | [theme.breakpoints.up('lg')]: {
23 | display: 'block',
24 | },
25 | },
26 | });
27 | },
28 | )();
29 |
30 | return styles;
31 | };
32 |
--------------------------------------------------------------------------------
/src/screens/validator_details/types.ts:
--------------------------------------------------------------------------------
1 | export type OverviewType = {
2 | validator: string;
3 | operatorAddress: string;
4 | selfDelegateAddress: string;
5 | description: string;
6 | website: string;
7 | }
8 |
9 | export type StatusType = {
10 | status: number;
11 | jailed: boolean;
12 | tombstoned: boolean;
13 | condition: number;
14 | commission: number;
15 | signedBlockWindow: number;
16 | missedBlockCounter: number;
17 | maxRate: string;
18 | }
19 |
20 | export type VotingPowerType = {
21 | height: number;
22 | overall: TokenUnit;
23 | self: number;
24 | }
25 |
26 | export type ValidatorDetailsState = {
27 | loading: boolean;
28 | exists: boolean;
29 | desmosProfile: DesmosProfile | null;
30 | overview: OverviewType;
31 | status: StatusType;
32 | votingPower: VotingPowerType;
33 | }
34 |
--------------------------------------------------------------------------------
/i18n.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | // locales: ['en', 'zht'],
3 | locales: ['en'],
4 | defaultLocale: 'en',
5 | pages: {
6 | '*': ['common'],
7 | '/': ['home', 'blocks', 'transactions'],
8 | 'rgx:^/@*': ['profiles', 'accounts'],
9 | 'rgx:^/blocks': ['blocks', 'transactions', 'message_labels', 'message_contents'],
10 | 'rgx:^/transactions': ['transactions', 'message_labels', 'message_contents'],
11 | 'rgx:^/proposals': ['proposals'],
12 | 'rgx:^/validators': ['validators', 'transactions', 'accounts', 'message_labels', 'message_contents'],
13 | 'rgx:^/accounts': ['accounts', 'transactions', 'validators', 'message_labels', 'message_contents'],
14 | 'rgx:^/params': ['params'],
15 | },
16 | loadLocaleFrom: (lang, ns) => import(`./public/locales/${lang}/${ns}.json`).then((m) => m.default),
17 | };
18 |
--------------------------------------------------------------------------------
/src/components/custom_tool_tip/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classnames from 'classnames';
3 | import { useStyles } from './styles';
4 |
5 | /**
6 | * Custom tooltips for recharts
7 | */
8 | const CustomToolTip: React.FC<{
9 | className?: string;
10 | children: (data) => React.ReactNode;
11 | active?: boolean;
12 | payload?: any;
13 | }> = (props) => {
14 | const {
15 | active,
16 | payload,
17 | className,
18 | children,
19 | } = props;
20 |
21 | const classes = useStyles();
22 |
23 | if (payload && active) {
24 | const { payload: data } = payload?.[0];
25 | return (
26 |
27 | {children(data)}
28 |
29 | );
30 | }
31 |
32 | return null;
33 | };
34 |
35 | export default CustomToolTip;
36 |
--------------------------------------------------------------------------------
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 |
6 |
7 | ## Description
8 |
9 |
10 |
11 | ## Checklist
12 | - [ ] Ran Linting
13 | - [ ] Targeted PR against correct branch.
14 | - [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
15 | - [ ] Wrote unit tests.
16 | - [ ] Added an entry to the `CHANGELOG.md` file.
17 | - [ ] Re-reviewed `Files changed` in the Github PR explorer.
18 |
--------------------------------------------------------------------------------
/src/models/msg/ibc/msg_channel_acknowledgement.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgAcknowledgement {
4 | public category: Categories;
5 | public type: string;
6 | public signer: string;
7 | public sourceChannel: string;
8 | public json: any;
9 |
10 | constructor(payload: any) {
11 | this.category = 'ibc';
12 | this.type = payload.type;
13 | this.signer = payload.signer;
14 | this.sourceChannel = payload.sourceChannel;
15 | this.json = payload.json;
16 | }
17 |
18 | static fromJson(json: any) {
19 | return new MsgAcknowledgement({
20 | json,
21 | type: json['@type'],
22 | signer: json.signer,
23 | sourceChannel: json.packet?.source_channel,
24 | });
25 | }
26 | }
27 |
28 | export default MsgAcknowledgement;
29 |
--------------------------------------------------------------------------------
/src/components/footer/components/social_media/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { socialMediaLinks } from './utils';
3 | import { useStyles } from './styles';
4 | import { Props } from './types';
5 |
6 | const SocialMedia = (props: Props) => {
7 | const { className = '' } = props;
8 | const classes = useStyles();
9 | return (
10 |
25 | );
26 | };
27 |
28 | export default SocialMedia;
29 |
--------------------------------------------------------------------------------
/src/configs/chain_config.testnet.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Desmos Block Explorer",
3 | "network": "morpheus-apollo-2",
4 | "icon": "https://raw.githubusercontent.com/forbole/big-dipper-assets/master/desmos/icon.svg?sanitize=true",
5 | "logo": {
6 | "default": "https://raw.githubusercontent.com/forbole/big-dipper-assets/master/desmos/logo.svg?sanitize=true"
7 | },
8 | "prefix": {
9 | "consensus": "desmosvalcons",
10 | "validator": "desmosvaloper",
11 | "account": "desmos"
12 | },
13 | "genesis": {
14 | "time": "2021-07-13T08:00:00",
15 | "height": 1
16 | },
17 | "primaryTokenUnit": "udaric",
18 | "votingPowerTokenUnit": "udaric",
19 | "tokenUnits": {
20 | "udaric": {
21 | "display": "daric",
22 | "exponent": 6
23 | }
24 | },
25 | "extra": {
26 | "profile": true
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/models/msg/ibc/msg_connection_open_confirm.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgConnectionOpenConfirm {
4 | public category: Categories;
5 | public type: string;
6 | public signer: string;
7 | public connectionId: string;
8 | public json: any;
9 |
10 | constructor(payload: any) {
11 | this.category = 'ibc';
12 | this.type = payload.type;
13 | this.signer = payload.signer;
14 | this.connectionId = payload.connectionId;
15 | this.json = payload.json;
16 | }
17 |
18 | static fromJson(json: any) {
19 | return new MsgConnectionOpenConfirm({
20 | json,
21 | type: json['@type'],
22 | signer: json.signer,
23 | connectionId: json.connection_id,
24 | });
25 | }
26 | }
27 |
28 | export default MsgConnectionOpenConfirm;
29 |
--------------------------------------------------------------------------------
/src/screens/home/components/data_blocks/__snapshots__/index.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`screen: Home/DataBlocks matches snapshot 1`] = `
4 |
33 | `;
34 |
--------------------------------------------------------------------------------
/src/screens/transaction_details/components/logs/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import useTranslation from 'next-translate/useTranslation';
3 | import { Typography } from '@material-ui/core';
4 | import { Box } from '@components';
5 | import { useGetStyles } from './styles';
6 |
7 | const Logs: React.FC<{
8 | logs: null | any[];
9 | } & ComponentDefault> = ({ logs }) => {
10 | const { classes } = useGetStyles();
11 | const { t } = useTranslation('transactions');
12 | return (
13 |
14 |
15 | {t('logs')}
16 |
17 |
18 |
19 | {JSON.stringify(logs, null, 4)}
20 |
21 |
22 |
23 | );
24 | };
25 |
26 | export default Logs;
27 |
--------------------------------------------------------------------------------
/src/components/footer/components/social_media/utils.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {
3 | TelegramIcon,
4 | LinkedinIcon,
5 | TwitterIcon,
6 | GithubIcon,
7 | } from '@icons';
8 |
9 | export const socialMediaLinks:{
10 | component: React.ReactNode;
11 | className: string;
12 | url: string;
13 | }[] = [
14 | {
15 | component: ,
16 | className: 'telegram',
17 | url: 'https://t.me/forbole',
18 | },
19 | {
20 | component: ,
21 | className: 'linkedin',
22 | url: 'https://www.linkedin.com/company/forbole',
23 | },
24 | {
25 | component: ,
26 | className: 'twitter',
27 | url: 'https://twitter.com/bigdipperlive',
28 | },
29 | {
30 | component: ,
31 | className: 'github',
32 | url: 'https://github.com/forbole',
33 | },
34 | ];
35 |
--------------------------------------------------------------------------------
/src/screens/validators/components/list/components/condition/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | width: '10px',
9 | height: '10px',
10 | background: theme.palette.custom.condition.zero,
11 | margin: '0 auto',
12 | borderRadius: '50%',
13 | '&.green': {
14 | background: theme.palette.custom.condition.one,
15 | },
16 | '&.yellow': {
17 | background: theme.palette.custom.condition.two,
18 | },
19 | '&.red': {
20 | background: theme.palette.custom.condition.three,
21 | },
22 | },
23 | });
24 | },
25 | )();
26 |
27 | return styles;
28 | };
29 |
--------------------------------------------------------------------------------
/tests/utils/mock_theme.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {
3 | ThemeProvider, createMuiTheme,
4 | } from '@material-ui/core/styles';
5 |
6 | import {
7 | StylesProvider, StylesOptions,
8 | } from '@material-ui/styles/';
9 |
10 | import { lightTemplate } from '@styles';
11 |
12 | /**
13 | * Theme mocker to handle custom keys
14 | */
15 | const MockTheme = ({ children }: {children: React.ReactNode}) => {
16 | const generateClassName: StylesOptions['generateClassName'] = (
17 | rule,
18 | sheet,
19 | ): string => `${sheet!.options.classNamePrefix}-${rule.key}`;
20 |
21 | return (
22 |
23 |
24 | {children}
25 |
26 |
27 | );
28 | };
29 |
30 | export default MockTheme;
31 |
--------------------------------------------------------------------------------
/src/components/avatar/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | width: '28px',
9 | height: '28px',
10 | minWidth: '28px',
11 | minHeight: '28px',
12 | borderRadius: '50%',
13 | overflow: 'hidden',
14 | background: theme.palette.custom.general.surfaceTwo,
15 | display: 'flex',
16 | alignItems: 'center',
17 | justifyContent: 'center',
18 | '& img': {
19 | width: '100%',
20 | height: '100%',
21 | objectFit: 'cover',
22 | objectPosition: 'center center',
23 | },
24 | },
25 | });
26 | },
27 | )();
28 |
29 | return styles;
30 | };
31 |
--------------------------------------------------------------------------------
/src/components/no_data/styles.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | flex: 1,
9 | display: 'flex',
10 | alignItems: 'center',
11 | justifyContent: 'center',
12 | minHeight: '400px',
13 | '& .MuiTypography-body1': {
14 | marginTop: theme.spacing(2),
15 | color: theme.palette.custom.fonts.fontFour,
16 | },
17 | },
18 | content: {
19 | display: 'flex',
20 | alignItems: 'center',
21 | justifyContent: 'center',
22 | flexDirection: 'column',
23 | padding: theme.spacing(2),
24 | },
25 | });
26 | },
27 | )();
28 |
29 | return styles;
30 | };
31 |
--------------------------------------------------------------------------------
/src/assets/icon-next.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
9 |
10 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/components/nav/components/desktop/components/action_bar/components/network_list/styles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from '@material-ui/core/styles';
2 |
3 | export const useStyles = () => {
4 | const styles = makeStyles(
5 | (theme) => {
6 | return ({
7 | root: {
8 | background: theme.palette.background.paper,
9 | '& svg': {
10 | width: '216px',
11 | // padding: '16px 12px 20px',
12 | padding: theme.spacing(2, 1.75, 2.5),
13 | },
14 | },
15 | content: {
16 | padding: theme.spacing(3),
17 | height: '400px',
18 | overflow: 'auto',
19 | display: 'grid',
20 | gridTemplateColumns: 'repeat(4, 1fr)',
21 | gridGap: theme.spacing(3, 2),
22 | },
23 | });
24 | },
25 | )();
26 |
27 | return styles;
28 | };
29 |
--------------------------------------------------------------------------------
/src/components/search/hooks.ts:
--------------------------------------------------------------------------------
1 | import { useState } from 'react';
2 |
3 | export const useSearch = (callback: (value: string, clear?: () => void) => void) => {
4 | const [value, setValue] = useState('');
5 | const handleOnChange = (e:any) => {
6 | const newValue = e?.target?.value ?? '';
7 | setValue(newValue);
8 | };
9 |
10 | const handleOnSubmit = () => {
11 | callback(value, clear);
12 | };
13 |
14 | const handleKeyDown = (e:any) => {
15 | const shift = e?.shiftKey;
16 | const isEnter = e?.keyCode === 13 || e?.key === 'Enter';
17 | if (isEnter && !shift) {
18 | e.preventDefault();
19 | callback(value, clear);
20 | }
21 | };
22 |
23 | const clear = () => {
24 | setValue('');
25 | };
26 |
27 | return {
28 | handleOnChange,
29 | handleOnSubmit,
30 | value,
31 | handleKeyDown,
32 | };
33 | };
34 |
--------------------------------------------------------------------------------
/src/components/nav/components/seach_bar/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import useTranslation from 'next-translate/useTranslation';
3 | import { Search } from '@components';
4 | import { chainConfig } from '@src/configs';
5 | import { useSearchBar } from './hooks';
6 |
7 | const SearchBar: React.FC<{className?: string}> = ({ className }) => {
8 | const { t } = useTranslation('common');
9 | const {
10 | handleOnSubmit,
11 | } = useSearchBar(t);
12 |
13 | let placeholderText;
14 | if (chainConfig.extra.profile) {
15 | placeholderText = t('searchBarPlaceholderDtag');
16 | } else {
17 | placeholderText = t('searchBarPlaceholder');
18 | }
19 |
20 | return (
21 |
26 | );
27 | };
28 |
29 | export default SearchBar;
30 |
--------------------------------------------------------------------------------
/src/models/msg/distribution/msg_set_withdrawal_address.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgSetWithdrawAddress {
4 | public category: Categories;
5 | public type: string;
6 | public delegatorAddress: string;
7 | public withdrawalAddress: string;
8 | public json: any;
9 |
10 | constructor(payload: any) {
11 | this.json = payload.json;
12 | this.category = 'distribution';
13 | this.type = payload.type;
14 | this.delegatorAddress = payload.delegatorAddress;
15 | this.withdrawalAddress = payload.withdrawalAddress;
16 | }
17 |
18 | static fromJson(json: any) {
19 | return new MsgSetWithdrawAddress({
20 | json,
21 | type: json['@type'],
22 | delegatorAddress: json.delegator_address,
23 | withdrawalAddress: json.withdraw_address,
24 | });
25 | }
26 | }
27 |
28 | export default MsgSetWithdrawAddress;
29 |
--------------------------------------------------------------------------------
/src/models/msg/profiles/msg_block_user.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgBlockUser {
4 | public category: Categories;
5 | public type: string;
6 | public json: any;
7 | public reason: string;
8 | public blocked: string;
9 | public blocker: string;
10 | public subspace: string;
11 |
12 | constructor(payload: any) {
13 | this.category = 'profiles';
14 | this.type = payload.type;
15 | this.json = payload.json;
16 | this.blocked = payload.blocked;
17 | this.blocker = payload.blocker;
18 | this.subspace = payload.subspace;
19 | }
20 |
21 | static fromJson(json: any) {
22 | return new MsgBlockUser({
23 | json,
24 | type: json['@type'],
25 | blocked: json.blocked,
26 | blocker: json.blocker,
27 | subspace: json.subspace,
28 | });
29 | }
30 | }
31 |
32 | export default MsgBlockUser;
33 |
--------------------------------------------------------------------------------
/src/screens/account_details/types.ts:
--------------------------------------------------------------------------------
1 | export type OverviewType = {
2 | address: string;
3 | withdrawalAddress: string;
4 | }
5 |
6 | export type BalanceType = {
7 | available: TokenUnit;
8 | delegate: TokenUnit;
9 | unbonding: TokenUnit;
10 | reward: TokenUnit;
11 | commission?: TokenUnit;
12 | total: TokenUnit;
13 | }
14 |
15 | export type OtherTokenType = {
16 | denom: string;
17 | available: TokenUnit;
18 | reward: TokenUnit;
19 | commission: TokenUnit;
20 | }
21 |
22 | export type RewardsType = {
23 | [value:string]: TokenUnit[];
24 | }
25 |
26 | export type AccountDetailState = {
27 | loading: boolean;
28 | exists: boolean;
29 | desmosProfile: DesmosProfile | null;
30 | overview: OverviewType;
31 | balance: BalanceType;
32 | otherTokens: {
33 | data: OtherTokenType[];
34 | count: number;
35 | };
36 | rewards: RewardsType;
37 | }
38 |
--------------------------------------------------------------------------------
/src/components/pagination/components/actions/index.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import renderer from 'react-test-renderer';
3 | import { MockTheme } from '@tests/utils';
4 | import Actions from '.';
5 |
6 | // ==================================
7 | // unit tests
8 | // ==================================
9 | describe('components: Pagination/Actions', () => {
10 | it('matches snapshot', () => {
11 | const component = renderer.create(
12 |
13 |
20 | ,
21 | );
22 | const tree = component.toJSON();
23 | expect(tree).toMatchSnapshot();
24 | });
25 |
26 | afterEach(() => {
27 | jest.clearAllMocks();
28 | });
29 | });
30 |
--------------------------------------------------------------------------------
/src/models/msg/profiles/msg_create_relationship.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgCreateRelationship {
4 | public category: Categories;
5 | public type: string;
6 | public json: any;
7 | public sender: string;
8 | public receiver: string;
9 | public subspace: string;
10 |
11 | constructor(payload: any) {
12 | this.category = 'profiles';
13 | this.type = payload.type;
14 | this.json = payload.json;
15 | this.sender = payload.sender;
16 | this.receiver = payload.receiver;
17 | this.subspace = payload.subspace;
18 | }
19 |
20 | static fromJson(json: any) {
21 | return new MsgCreateRelationship({
22 | json,
23 | type: json['@type'],
24 | sender: json.sender,
25 | receiver: json.receiver,
26 | subspace: json.subspace,
27 | });
28 | }
29 | }
30 |
31 | export default MsgCreateRelationship;
32 |
--------------------------------------------------------------------------------
/src/models/msg/profiles/msg_dtag_accept_transfer.ts:
--------------------------------------------------------------------------------
1 | import { Categories } from '../types';
2 |
3 | class MsgDtagAcceptTransfer {
4 | public category: Categories;
5 | public type: string;
6 | public json: any;
7 | public sender: string;
8 | public receiver: string;
9 | public newDtag: string;
10 |
11 | constructor(payload: any) {
12 | this.category = 'profiles';
13 | this.type = payload.type;
14 | this.json = payload.json;
15 | this.sender = payload.sender;
16 | this.receiver = payload.receiver;
17 | this.newDtag = payload.newDtag;
18 | }
19 |
20 | static fromJson(json: any) {
21 | return new MsgDtagAcceptTransfer({
22 | json,
23 | type: json['@type'],
24 | sender: json.sender,
25 | receiver: json.receiver,
26 | newDtag: json.new_dtag,
27 | });
28 | }
29 | }
30 |
31 | export default MsgDtagAcceptTransfer;
32 |
--------------------------------------------------------------------------------
/src/assets/icon-share.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
9 |
13 |
14 |
--------------------------------------------------------------------------------