Skip to content

Commit

Permalink
chore: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
teebszet committed Jul 7, 2023
1 parent 07889ab commit b7aecac
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/app/utils/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ export function checkNftExists(
): boolean {
const principal: string[] = nft?.fully_qualified_token_id?.split('::');
const transaction = pendingTransactions.find(
(tx) => tx.contractCall?.contract_id === principal[0]
&& tx.contractCall.function_args[0].repr.substring(1) === nft.token_id.toString(),
(tx) =>
tx.contractCall?.contract_id === principal[0] &&
tx.contractCall.function_args[0].repr.substring(1) === nft.token_id.toString(),
);
if (transaction) return true;
return false;
Expand Down Expand Up @@ -156,11 +157,14 @@ export async function isValidBtcApi(url: string, network: NetworkType) {
throw new Error('Invalid URL');
}

export const getNetworkType = (stxNetwork) => (stxNetwork.chainId === ChainID.Mainnet ? 'Mainnet' : 'Testnet');
export const getNetworkType = (stxNetwork) =>
stxNetwork.chainId === ChainID.Mainnet ? 'Mainnet' : 'Testnet';

export const isHardwareAccount = (account: Account | null): boolean => !!account?.accountType && account?.accountType !== 'software';
export const isHardwareAccount = (account: Account | null): boolean =>
!!account?.accountType && account?.accountType !== 'software';

export const isLedgerAccount = (account: Account | null): boolean => account?.accountType === 'ledger';
export const isLedgerAccount = (account: Account | null): boolean =>
account?.accountType === 'ledger';

export const isInOptions = (): boolean => !!window.location?.pathname?.match(/options.html$/);

Expand Down

0 comments on commit b7aecac

Please sign in to comment.