Skip to content

Commit

Permalink
chore: rename type
Browse files Browse the repository at this point in the history
  • Loading branch information
khanti42 committed Dec 11, 2024
1 parent 4503cc9 commit 6ef547c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
} as Meta;

const transaction: Transaction = {
txnHash: '0x3d82342a73d5562d65986c40b88123913a8f0b72be390b3d54377ca3216825d',
txnHash: '0x1321951d3102d45abd6dd9ac556b6a86190c78b1026279a8d44cb18c0008eb6',
txnType: 'invoke',
chainId: '0x534e5f5345504f4c4941',
senderAddress:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IconProp } from '@fortawesome/fontawesome-svg-core';
import { Transaction, TransactionStatus, VoyagerTransactionType } from 'types';
import { Transaction, TransactionStatus, StarkscanTransactionType } from 'types';
import { ethers } from 'ethers';

export const getIcon = (transactionName: string): IconProp => {
Expand All @@ -21,7 +21,7 @@ export const getTxnName = (
contractAddress: string,
): string => {
switch (transaction.txnType) {
case VoyagerTransactionType.INVOKE:
case StarkscanTransactionType.INVOKE:
if (
transaction.accountCalls &&
transaction.accountCalls[contractAddress]
Expand All @@ -41,9 +41,9 @@ export const getTxnName = (
}
}
return 'Contract Interaction';
case VoyagerTransactionType.DEPLOY:
case StarkscanTransactionType.DEPLOY:
return 'Depoly';
case VoyagerTransactionType.DEPLOY_ACCOUNT:
case StarkscanTransactionType.DEPLOY_ACCOUNT:
return 'Deploy Account';
default:
return 'Unknown';
Expand Down
6 changes: 3 additions & 3 deletions packages/wallet-ui/src/services/useStarkNetSnap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
getTokenBalanceWithDetails,
} from '../utils/utils';
import { setWalletConnection } from '../slices/walletSlice';
import { Network, VoyagerTransactionType } from '../types';
import { Network, StarkscanTransactionType } from '../types';
import { Account } from '../types';
import { Erc20TokenBalance, Erc20Token } from '../types';
import { disableLoading, enableLoadingWithMessage } from '../slices/UISlice';
Expand Down Expand Up @@ -590,8 +590,8 @@ export const useStarkNetSnap = () => {
//Set the deploy transaction
const deployTransaction = storedTxns.find(
(txn: Transaction) =>
txn.txnType.toLowerCase() === VoyagerTransactionType.DEPLOY ||
txn.txnType.toLowerCase() === VoyagerTransactionType.DEPLOY_ACCOUNT,
txn.txnType.toLowerCase() === StarkscanTransactionType.DEPLOY ||
txn.txnType.toLowerCase() === StarkscanTransactionType.DEPLOY_ACCOUNT,
);
dispatch(setTransactionDeploy(deployTransaction));

Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-ui/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export type TransactionStatusOptions =
| 'Rejected'
| 'Not Received';

export enum VoyagerTransactionType { // for retrieving txns from Voyager
export enum StarkscanTransactionType { // for retrieving txns from Voyager
DEPLOY = 'DEPLOY',
DEPLOY_ACCOUNT = 'DEPLOY_ACCOUNT',
INVOKE = 'INVOKE_FUNCTION',
Expand Down

0 comments on commit 6ef547c

Please sign in to comment.