Skip to content

Commit

Permalink
added event removal
Browse files Browse the repository at this point in the history
  • Loading branch information
mishramonalisha76 committed Aug 9, 2024
1 parent e02538f commit 6db5fc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions src/modules/addNewChain/components/VerifyAliasChain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import APP_PATHS from 'config/AppPaths';

import { Box, Button, Text, TextInput } from 'blocks';

import { convertAddressToAddrCaip } from 'helpers/CaipHelper';

import { UserStoreType } from 'types';

import { useChainAliasForm } from '../AddNewChain.form';
Expand All @@ -29,14 +27,13 @@ const VerifyAliasChain: FC = () => {
const toast = useToast();
const navigate = useNavigate();

const selectedChainId = parseInt(formValues.chainId);
const aliasAddress = formValues.alias;

const handleVerifyAliasChain = () => {
verifyAliasChain(
{
userPushSDKInstance,
alias: convertAddressToAddrCaip(aliasAddress, selectedChainId),
channelAddress: account,
},
{
onSuccess: () => {
Expand Down
6 changes: 3 additions & 3 deletions src/queries/services/channels/verifyAliasChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { verifyAliasChainModelCreator } from '../../models';

type VerifyAliasChainParams = {
userPushSDKInstance: PushAPI;
alias: string; //chain address in caip format
channelAddress: string; //chain address in caip format
};

export const verifyAliasChain = ({ userPushSDKInstance, alias }: VerifyAliasChainParams) =>
userPushSDKInstance.channel.alias.verify(alias).then(verifyAliasChainModelCreator);
export const verifyAliasChain = ({ userPushSDKInstance, channelAddress }: VerifyAliasChainParams) =>
userPushSDKInstance.channel.alias.verify(channelAddress).then(verifyAliasChainModelCreator);

0 comments on commit 6db5fc9

Please sign in to comment.