Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(*): Fix many more typos #5075

Merged
merged 17 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 30 additions & 22 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -1,38 +1,46 @@
[default]
extend-ignore-re = ["[a-zA-Z0-9]{44}", "[a-zA-Z0-9]{9}"]
extend-ignore-identifiers-re = [
# Short git hashes
"^[a-f0-9]{7}$",
# Base64
"^[a-zA-Z0-9_]{43}$",
"^[a-zA-Z0-9_]{44}$",
"^[a-zA-Z0-9_]{47}$",
"^[a-zA-Z0-9_]{49}$",
"^[a-zA-Z0-9_]{56,}$",
]
# Truncated hex IDs (ex. "0x9...a9b")
extend-ignore-re = ["0x[a-f0-9]\\.{3}[a-f0-9]{3}"]

[type.hex-move]
extend-glob = ["hex.move"]
extend-words = { ba = "ba" }

[default.extend-words]
# accepted plurals
froms = "froms"
alls = "alls"
somes = "somes"
# ordinal numbers (2nd, ...)
nd = "nd"
# random identifiers, variables, functions, ...
bttr = "bttr"
dbe = "dbe"
thr = "thr"
fo = "fo"
BA = "BA"
DAA = "DAA"
UE = "UE"
tto = "tto"
ser = "ser"
pn = "pn"
noo = "noo"
Ot = "Ot"
Hel = "Hel"
numer = "numer"
ratatui = "ratatui"
groth = "groth"
strat = "strat"
mistic = "mistic"
# Identity
AAS = "AAS"
# actual typos purposely used in tests
assing = "assing"
tring = "tring"
Thi = "Thi"
# better suggestions for typos
transferer = "transferrer"
# not in the correction dictionary
checkpoitn = "checkpoint"

[default.extend-identifiers]
numer = "numer"

[files]
extend-exclude = ["pnpm-lock.yaml", "external-crates/*"]
extend-exclude = [
"pnpm-lock.yaml",
"external-crates/*",
"config-patch",
"*.patch",
"*.svg",
]
4 changes: 2 additions & 2 deletions apps/apps-backend/src/features/features.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class FeaturesController {
[Feature.WalletBalanceRefetchInterval]: {
defaultValue: 1000,
},
[Feature.KioskOriginbytePackageid]: {
[Feature.KioskOriginbytePackageId]: {
defaultValue: '',
},
[Feature.WalletAppsBannerConfig]: {
Expand Down Expand Up @@ -122,7 +122,7 @@ export class FeaturesController {
[Feature.WalletBalanceRefetchInterval]: {
defaultValue: 1000,
},
[Feature.KioskOriginbytePackageid]: {
[Feature.KioskOriginbytePackageId]: {
defaultValue: '',
},
[Feature.WalletAppsBannerConfig]: {
Expand Down
2 changes: 1 addition & 1 deletion apps/core/src/enums/features.enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export enum Feature {
WalletInterstitialConfig = 'wallet-interstitial-config',
RecognizedPackages = 'recognized-packages',
WalletSentryTracing = 'wallet-sentry-tracing',
KioskOriginbytePackageid = 'kiosk-originbyte-packageid',
KioskOriginbytePackageId = 'kiosk-originbyte-package-id',
PollingTxnTable = 'polling-txn-table',
NetworkOutageOverride = 'network-outage-override',
ModuleSourceVerification = 'module-source-verification',
Expand Down
4 changes: 2 additions & 2 deletions apps/core/src/hooks/useFileExtensionType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type FileExtensionType = {
// Soft file type detection.
// Returns the file type of the given file name.
// Temporary solution until we have a better way to detect file types.
// extentionType: FileExtentionType
// extensionType: FileExtensionType
// type?: 'image' | 'audio' | 'video';
const FILE_EXTENSION_TYPE_MAP: FileExtensionType = {
jpeg: {
Expand Down Expand Up @@ -47,7 +47,7 @@ const FILE_EXTENSION_TYPE_MAP: FileExtensionType = {

/*
// TODO: extend this list with more file types.
const FILE_EXTENSION_TYPE_MAP_HEADERS: FileExtentionType = {
const FILE_EXTENSION_TYPE_MAP_HEADERS: FileExtensionType = {
'image/jpeg': {
name: 'JPEG',
type: 'image',
Expand Down
6 changes: 3 additions & 3 deletions apps/core/src/hooks/useNftDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function useNftDetails(nftId: string, accountAddress: string | null) {

const { nftFields } = useNFTBasicData(objectData);

const { data: nftDisplayData, isPending: isPendingNftDislpay } = useGetNFTDisplay(nftId);
const { data: nftDisplayData, isPending: isPendingNftDisplay } = useGetNFTDisplay(nftId);

const nftName = nftDisplayData?.name || formatAddress(nftId);
const nftImageUrl = nftDisplayData?.imageUrl || '';
Expand All @@ -53,7 +53,7 @@ export function useNftDetails(nftId: string, accountAddress: string | null) {
objectData.owner.AddressOwner) ||
'';

const isLoading = isNftLoading || isCheckingAssetTransferability || isPendingNftDislpay;
const isLoading = isNftLoading || isCheckingAssetTransferability || isPendingNftDisplay;

return {
isLoading,
Expand All @@ -69,6 +69,6 @@ export function useNftDetails(nftId: string, accountAddress: string | null) {
isContainedInKiosk,
kioskItem,
nftDisplayData,
isPendingNftDislpay,
isPendingNftDisplay,
};
}
2 changes: 1 addition & 1 deletion apps/core/src/hooks/useTransferKioskItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function useTransferKioskItem({
address?: string | null;
}) {
const client = useIotaClient();
const obPackageId = useFeatureValue(Feature.KioskOriginbytePackageid, ORIGINBYTE_PACKAGE_ID);
const obPackageId = useFeatureValue(Feature.KioskOriginbytePackageId, ORIGINBYTE_PACKAGE_ID);
const { data: kioskData } = useGetKioskContents(address); // show personal kiosks too
const objectData = useGetObject(objectId);
const kioskClient = useKioskClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: Apache-2.0

import * as Yup from 'yup';
import { createIotaAddressValidation } from './createIotaAdressValidation';
import { createIotaAddressValidation } from './createIotaAddressValidation';
import { createTokenValidation } from './createTokenValidation';

export function createValidationSchemaSendTokenForm(
Expand Down
2 changes: 1 addition & 1 deletion apps/core/src/utils/validation/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

export * from './createIotaAdressValidation';
export * from './createIotaAddressValidation';
export * from './createTokenValidation';
export * from './createValidationSchemaSendTokenForm';
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export function generateValidatorsTableColumns({
},
},
{
header: 'Comission',
header: 'Commission',
accessorKey: 'commissionRate',
cell({ getValue }) {
return (
Expand Down
2 changes: 1 addition & 1 deletion apps/explorer/src/lib/utils/analytics/ampli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export class Ampli {
this.disabled = options.disabled ?? false;

if (this.amplitude) {
console.warn('WARNING: Ampli is already intialized. Ampli.load() should be called once at application startup.');
console.warn('WARNING: Ampli is already initialized. Ampli.load() should be called once at application startup.');
return getVoidPromiseResult();
}

Expand Down
2 changes: 1 addition & 1 deletion apps/explorer/src/pages/epochs/EpochDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function EpochDetail() {
'Stake',
'Proposed next Epoch gas price',
'APY',
'Comission',
'Commission',
'Last Epoch Rewards',
'Voting Power',
'Status',
Expand Down
2 changes: 1 addition & 1 deletion apps/explorer/src/pages/validators/Validators.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function ValidatorPageResult(): JSX.Element {
'Stake',
'Proposed next Epoch gas price',
'APY',
'Comission',
'Commission',
'Last Epoch Rewards',
'Voting Power',
'Status',
Expand Down
20 changes: 10 additions & 10 deletions apps/ui-kit/src/lib/components/organisms/navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export type NavbarItemWithId = NavbarItemProps & { id: string };

export interface NavbarProps {
/**
* If this flag is true we need to leave only the icon and collapsable button
* If this flag is true we need to leave only the icon and collapsible button
*/
isCollapsable?: boolean;
isCollapsible?: boolean;

/**
* List of elements to be displayed in the navbar.
Expand All @@ -29,7 +29,7 @@ export interface NavbarProps {
onClickItem: (id: string) => void;

/**
* If the navbar is collapsable, this flag indicates if it is open or not.
* If the navbar is collapsible, this flag indicates if it is open or not.
*/
isOpen?: boolean;

Expand All @@ -43,16 +43,16 @@ export function Navbar({
items,
activeId,
onClickItem,
isCollapsable = false,
isCollapsible = false,
onToggleNavbar,
}: NavbarProps) {
return (
<div
className={cx('flex h-fit w-full', {
'flex-col px-md py-xs sm:h-full sm:w-auto sm:px-none sm:py-xl': isCollapsable,
'flex-col px-md py-xs sm:h-full sm:w-auto sm:px-none sm:py-xl': isCollapsible,
})}
>
{isCollapsable && (
{isCollapsible && (
<div className="flex w-full items-center justify-between sm:mb-[48px] sm:flex-col">
<div className="flex justify-center [&_svg]:h-[38px] [&_svg]:w-[38px]">
<IotaLogoMark className="text-neutral-10 dark:text-neutral-92" />
Expand All @@ -67,16 +67,16 @@ export function Navbar({
)}
<div
className={cx({
'flex w-full justify-between px-sm py-xxs': !isCollapsable,
'hidden sm:flex sm:flex-col sm:gap-2': isCollapsable,
'flex w-full justify-between px-sm py-xxs': !isCollapsible,
'hidden sm:flex sm:flex-col sm:gap-2': isCollapsible,
})}
>
{items.map((item) => (
<div
key={item.id}
className={cx('flex items-center', {
'px-xs py-xxs': !isCollapsable,
'py-xxs pl-xs pr-sm': isCollapsable,
'px-xs py-xxs': !isCollapsible,
'py-xxs pl-xs pr-sm': isCollapsible,
})}
data-testid={`nav-${item.id}`}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type Story = StoryObj<typeof meta>;

export const Default: Story = {};

export const Collapsable: Story = {
export const Collapsible: Story = {
args: {},
argTypes: {},
render: (args) => {
Expand All @@ -57,7 +57,7 @@ export const Collapsable: Story = {
return (
<div className="flex h-96">
<Navbar
isCollapsable
isCollapsible
items={NAVBAR_ITEMS}
activeId={activeId}
onClickItem={(id) => setActiveId(id)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function AssetDialog({ onClose, asset, refetchAssets }: AssetsDialogProps
const initView = isTokenOwnedByKiosk ? AssetsDialogView.KioskDetails : AssetsDialogView.Details;

const [view, setView] = useState<AssetsDialogView>(initView);
const [chosenKioskAsset, setChoosenKioskAsset] = useState<IotaObjectData | null>(null);
const [chosenKioskAsset, setChosenKioskAsset] = useState<IotaObjectData | null>(null);
const [digest, setDigest] = useState<string>('');

const activeAsset = chosenKioskAsset || asset;
Expand Down Expand Up @@ -98,20 +98,20 @@ export function AssetDialog({ onClose, asset, refetchAssets }: AssetsDialogProps
}
function onOpenChange() {
setView(AssetsDialogView.Details);
setChoosenKioskAsset(null);
setChosenKioskAsset(null);
onClose();
}

function onKioskItemClick(item: IotaObjectData) {
setChoosenKioskAsset(item);
setChosenKioskAsset(item);
setView(AssetsDialogView.Details);
}

function onBack() {
if (!chosenKioskAsset) {
return;
}
setChoosenKioskAsset(null);
setChosenKioskAsset(null);
setView(AssetsDialogView.KioskDetails);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function EnterAmountView({
const caption = `${maxTokenFormatted} ${maxTokenFormattedSymbol} Available`;
const infoMessage =
'You have selected an amount that will leave you with insufficient funds to pay for gas fees for unstaking or any other transactions.';
const hasEnoughRemaingBalance =
const hasEnoughRemainingBalance =
maxTokenBalance > parseAmount(values.amount, decimals) + BigInt(2) * gasBudgetBigInt;

function handleStake(): void {
Expand Down Expand Up @@ -93,7 +93,7 @@ export function EnterAmountView({
gasBudget={newStakeData?.gasBudget}
senderAddress={senderAddress}
caption={caption}
showInfo={!hasEnoughRemaingBalance}
showInfo={!hasEnoughRemainingBalance}
infoMessage={infoMessage}
isLoading={isTransactionLoading}
onBack={onBack}
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet-dashboard/lib/utils/analytics/ampli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ export class Ampli {
this.disabled = options.disabled ?? false;

if (this.amplitude) {
console.warn('WARNING: Ampli is already intialized. Ampli.load() should be called once at application startup.');
console.warn('WARNING: Ampli is already initialized. Ampli.load() should be called once at application startup.');
return getVoidPromiseResult();
}

Expand Down
2 changes: 1 addition & 1 deletion apps/wallet/src/shared/analytics/ampli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ export class Ampli {
this.disabled = options.disabled ?? false;

if (this.amplitude) {
console.warn('WARNING: Ampli is already intialized. Ampli.load() should be called once at application startup.');
console.warn('WARNING: Ampli is already initialized. Ampli.load() should be called once at application startup.');
return getVoidPromiseResult();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ export function isDeriveBipPathAccountsFinder(
return isBasePayload(payload) && payload.type === 'derive-bip-path-accounts-finder';
}

export interface DeriveBipPathAccountsFindeResponsePayload extends BasePayload {
export interface DeriveBipPathAccountsFinderResponsePayload extends BasePayload {
publicKey: string;
}

export function isDeriveBipPathAccountsFinderResponse(
payload: Payload,
): payload is DeriveBipPathAccountsFindeResponsePayload {
): payload is DeriveBipPathAccountsFinderResponsePayload {
return isBasePayload(payload) && payload.type === 'derive-bip-path-accounts-finder-response';
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const formSchema = z.object({
.length(RECOVERY_PHRASE_WORD_COUNT)
.transform((recoveryPhrase) => normalizeMnemonics(recoveryPhrase.join(' ')).split(' '))
.refine((recoveryPhrase) => validateMnemonics(recoveryPhrase.join(' ')), {
message: 'Mnenonic is invalid',
message: 'Mnemonic is invalid',
}),
});

Expand Down
4 changes: 2 additions & 2 deletions apps/wallet/src/ui/app/staking/stake/StakeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function StakeFormComponent({
const maxTokenBalance = coinBalance - gasBudget;
const [maxTokenFormatted, symbol] = useFormatCoin(maxTokenBalance, coinType, CoinFormat.FULL);

const hasEnoughRemaingBalance =
const hasEnoughRemainingBalance =
maxTokenBalance > parseAmount(values.amount, decimals) + BigInt(2) * gasBudget;

return (
Expand Down Expand Up @@ -104,7 +104,7 @@ export function StakeFormComponent({
);
}}
</Field>
{!hasEnoughRemaingBalance ? (
{!hasEnoughRemainingBalance ? (
<InfoBox
type={InfoBoxType.Error}
supportingText="You have selected an amount that will leave you with insufficient funds to pay for gas fees for unstaking or any other transactions."
Expand Down
Loading
Loading