Skip to content

Commit

Permalink
grpc
Browse files Browse the repository at this point in the history
  • Loading branch information
pyramation committed Apr 5, 2024
1 parent 7a27d2d commit 18d757c
Show file tree
Hide file tree
Showing 14 changed files with 186 additions and 1,436 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// @ts-nocheck

import {
Box,
Button,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { StdFee } from '@cosmjs/amino';
import type {
Validator,
DelegationResponse as Delegation,
} from 'interchain/types/codegen/cosmos/staking/v1beta1/staking';
} from '../../codegen_grpc_gateway/cosmos/staking/v1beta1/staking';
import { TransactionResult } from '../types';
import { ChainName } from 'cosmos-kit';
import BigNumber from 'bignumber.js';
Expand All @@ -65,6 +65,7 @@ export const Thumbnail = ({
return (
<>
{identity && thumbnailUrl ? (
// @ts-ignore
<Image
borderRadius="full"
boxSize="30px"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
/* eslint-disable react-hooks/rules-of-hooks */
import React from 'react';
import {
Expand Down Expand Up @@ -30,8 +31,11 @@ import {

const SkeletonOptions = () => {
return (
// @ts-ignore
<Stack isInline={true} alignItems="center" spacing={3}>
{/* @ts-ignore */}
<SkeletonCircle w={10} h={10} />
{/* @ts-ignore */}
<Skeleton w={40} h={6} />
</Stack>
);
Expand Down Expand Up @@ -137,7 +141,9 @@ const SelectOptions = ({ data, value, onChange }: ChangeChainMenuType) => {
...props
}: DropdownIndicatorProps<ChainOption, false, GroupBase<ChainOption>>) => {
return (
// @ts-ignore
<chakraComponents.DropdownIndicator {...props}>
{/* @ts-ignore */}
<Icon
as={FiChevronDown}
w={6}
Expand All @@ -150,7 +156,9 @@ const SelectOptions = ({ data, value, onChange }: ChangeChainMenuType) => {
const Placeholder = (props: PlaceholderProps<ChainOption>) => {
if (props.hasValue) {
return (
// @ts-ignore
<chakraComponents.Placeholder {...props}>
{/* @ts-ignore */}
<Stack
id={props.getValue()[0].label}
isInline={true}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
import {
Heading,
Table,
Expand Down Expand Up @@ -42,8 +43,8 @@ import { MyValidator, TransactionResult } from '../types';
import type {
Validator,
DelegationResponse as Delegation,
} from 'interchain/types/codegen/cosmos/staking/v1beta1/staking';
import type { DelegationDelegatorReward as Reward } from 'interchain/types/codegen/cosmos/distribution/v1beta1/distribution';
} from '../../codegen_grpc_gateway/cosmos/staking/v1beta1/staking';
import type { DelegationDelegatorReward as Reward } from '../../codegen_grpc_gateway/cosmos/distribution/v1beta1/distribution';
import { ChainName } from 'cosmos-kit';
import { MaxAmountAndFee, Thumbnail } from './all-validators';
import {
Expand Down Expand Up @@ -371,6 +372,7 @@ const MyValidators = ({

return (
<>
{ /* @ts-ignore */ }
<Heading as="h4" size="md" mt={12} mb={6}>
My Validators
</Heading>
Expand Down
5 changes: 3 additions & 2 deletions examples/grpc-web-grpc-gateway/components/react/staking.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
/* eslint-disable react-hooks/exhaustive-deps */
import { useCallback, useEffect, useState } from 'react';
import { useChain } from '@cosmos-kit/react';
Expand All @@ -9,8 +10,8 @@ import Long from 'long';
import type {
Validator,
DelegationResponse as Delegation,
} from 'interchain/types/codegen/cosmos/staking/v1beta1/staking';
import type { DelegationDelegatorReward as Reward } from 'interchain/types/codegen/cosmos/distribution/v1beta1/distribution';
} from '../../codegen_grpc_gateway//cosmos/staking/v1beta1/staking';
import type { DelegationDelegatorReward as Reward } from '../../codegen_grpc_gateway//cosmos/distribution/v1beta1/distribution';
import Stats from './stats';
import MyValidators from './my-validators';
import AllValidators from './all-validators';
Expand Down
3 changes: 2 additions & 1 deletion examples/grpc-web-grpc-gateway/components/react/stats.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
import {
Stat,
StatLabel,
Expand All @@ -11,7 +12,7 @@ import { useChain } from '@cosmos-kit/react';
import { useState } from 'react';
import { cosmos } from 'interchain';
import { getCoin } from '../../config';
import type { DelegationDelegatorReward as Reward } from 'interchain/types/codegen/cosmos/distribution/v1beta1/distribution';
import type { DelegationDelegatorReward as Reward } from '../../codegen_grpc_gateway/cosmos/distribution/v1beta1/distribution';
import { TransactionResult } from '../types';
import { ChainName } from 'cosmos-kit';
import { useFeeEstimation, useTransactionToast } from '../../hooks';
Expand Down
3 changes: 2 additions & 1 deletion examples/grpc-web-grpc-gateway/components/wallet.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
import { useChain, useManager } from '@cosmos-kit/react';
import {
Box,
Expand Down Expand Up @@ -64,7 +65,7 @@ export const WalletSection = ({

const chainOptions = useMemo(
() =>
chainRecords.map((chainRecord) => {
chainRecords.map((chainRecord: any) => {
return {
chainName: chainRecord?.name,
label: chainRecord?.chain.pretty_name,
Expand Down
1 change: 1 addition & 0 deletions examples/grpc-web-grpc-gateway/hooks/useInputBox.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
import { ChangeEvent, useState } from 'react';
import {
Text,
Expand Down
2 changes: 1 addition & 1 deletion examples/grpc-web-grpc-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"cosmos-kit": "2.8.6",
"fast-fuzzy": "1.12.0",
"framer-motion": "9.0.7",
"interchain": "1.10.1",
"interchain": "^1.10.1",
"next": "^13",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand Down
2 changes: 2 additions & 0 deletions examples/grpc-web-grpc-gateway/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
import '../styles/globals.css';
import '@interchain-ui/react/styles';

Expand All @@ -14,6 +15,7 @@ import { defaultTheme } from '../config';

function CreateCosmosApp({ Component, pageProps }: AppProps) {
const signerOptions: SignerOptions = {
// @ts-ignore
signingStargate: () => {
return getSigningCosmosClientOptions();
},
Expand Down
1 change: 1 addition & 0 deletions examples/grpc-web-grpc-gateway/pages/grpc-gateway.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
import { useState } from 'react';
import Head from 'next/head';
import { useChain } from '@cosmos-kit/react';
Expand Down
1 change: 1 addition & 0 deletions examples/grpc-web-grpc-gateway/pages/grpc-web.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
import { useState } from 'react';
import Head from 'next/head';
import { useChain } from '@cosmos-kit/react';
Expand Down
Loading

0 comments on commit 18d757c

Please sign in to comment.