Skip to content

Commit

Permalink
Merge branch 'develop' into sc-platform/issue-3464-rename-deny-list
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriyr authored Oct 22, 2024
2 parents a2436d5 + 5e005f4 commit e9e5eac
Show file tree
Hide file tree
Showing 46 changed files with 386 additions and 621 deletions.
106 changes: 53 additions & 53 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ members = [

[workspace.package]
# This version string will be inherited by iota-core, iota-faucet, iota-node, iota-tools, iota-sdk, iota-move-build, and iota crates.
version = "0.3.1"
version = "0.4.0"

[profile.release]
# debug = 1 means line charts only, which is minimum needed for good stack traces
Expand Down
62 changes: 42 additions & 20 deletions apps/explorer/src/components/activity/Activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import { useFeatureIsOn } from '@growthbook/growthbook-react';
import { useState } from 'react';
import toast from 'react-hot-toast';

import { Feature } from '@iota/core';
import { CheckpointsTable } from '../checkpoints/CheckpointsTable';
import { EpochsActivityTable } from './EpochsActivityTable';
Expand Down Expand Up @@ -53,6 +52,7 @@ export function Activity({ initialLimit, disablePagination }: ActivityProps): JS
const pollingTxnTableEnabled = useFeatureIsOn(Feature.PollingTxnTable as string);

const [paused, setPaused] = useState(false);
// const [showTransactionDropdown, setShowTransactionDropdown] = useState(false);
const [selectedCategory, setSelectedCategory] = useState<ActivityCategory>(
ActivityCategory.Transactions,
);
Expand Down Expand Up @@ -98,25 +98,47 @@ export function Activity({ initialLimit, disablePagination }: ActivityProps): JS
</SegmentedButton>
<div className="absolute inset-y-0 -top-1 right-sm flex items-center gap-sm text-2xl">
{/* TODO re-enable this when index is stable */}
{/*activeTab === 'transactions' && isTransactionKindFilterEnabled ? (
<DropdownMenu
trigger={<Filter16 className="p-1" />}
content={
<DropdownMenuCheckboxItem
checked={showSystemTransactions}
label="Show System Transactions"
onSelect={(e) => {
e.preventDefault();
}}
onCheckedChange={() => {
setShowSystemTransaction((value) => !value);
}}
/>
}
modal={false}
align="end"
/>
) : null */}
{/*selectedCategory === ActivityCategory.Transactions &&
isTransactionKindFilterEnabled ? (
<>
<div className="relative z-10">
<Button
type={ButtonType.Ghost}
onClick={() => setShowTransactionDropdown((prev) => !prev)}
icon={
<FilterList className="h-md w-md text-neutral-10 dark:text-neutral-92" />
}
/>
</div>
<div className="absolute bottom-0 right-0 z-10 translate-y-full">
<Transition
show={showTransactionDropdown}
enter="transition duration-300"
enterFrom="opacity-0 scale-75"
enterTo="opacity-100 scale-100"
leave="transition duration-150"
leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-75"
>
<Dropdown>
<ListItem
hideBottomBorder
onClick={() =>
setShowSystemTransaction(!showSystemTransactions)
}
>
<div className="flex flex-row gap-x-xs">
<span className="w-max text-label-lg">
Show System Transactions
</span>
<Checkbox isChecked={showSystemTransactions} />
</div>
</ListItem>
</Dropdown>
</Transition>
</div>
</>
) : null*/}
{/* todo: re-enable this when rpc is stable */}
{pollingTxnTableEnabled &&
selectedCategory === ActivityCategory.Transactions && (
Expand Down
70 changes: 0 additions & 70 deletions apps/explorer/src/components/ui/DropdownMenu.tsx

This file was deleted.

1 change: 0 additions & 1 deletion apps/explorer/src/components/ui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export * from './Banner';
export * from './ButtonOrLink';
export * from './Card';
export * from './Divider';
export * from './DropdownMenu';
export * from './ExpandableList';
export * from './FilterList';
export * from './ImageIcon';
Expand Down
15 changes: 0 additions & 15 deletions apps/ui-kit/src/lib/tailwind/base.preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,6 @@ export const BASE_CONFIG: Config = {
'alliance-no2': ['AllianceNo2', 'sans-serif'],
inter: ['Inter', 'sans-serif'],
},
backgroundImage: {
placeholderShimmer:
'linear-gradient(90deg, #ecf1f4 -24.18%, rgba(237 242 245 / 40%) 73.61%, #f3f7f9 114.81%, #ecf1f4 114.82%)',
placeholderShimmerDark:
'linear-gradient(90deg, #1d1e20 -24.18%, #5e636e 73.61%, #111213 114.81%, #1d1e20 114.82%)',
},
keyframes: {
shimmer: {
'0%': { 'background-position': '-1000px 0' },
'100%': { 'background-position': '1000px 0' },
},
},
animation: {
shimmer: 'shimmer 2s infinite linear',
},
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ export const CustomOptions: Story = {
),
},
{
id: 'smr',
id: 'other coin',
renderLabel: () => (
<div className="flex items-center gap-2">
<PlaceholderReplace />
SMR
Other Coin
</div>
),
},
Expand Down
6 changes: 0 additions & 6 deletions apps/wallet/src/dapp-interface/WalletStandardInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,6 @@ export class IotaWallet implements Wallet {
};

#signTransaction: IotaSignTransactionMethod = async ({ transaction, account, ...input }) => {
if (!isTransaction(transaction)) {
throw new Error(
'Unexpected transaction format found. Ensure that you are using the `Transaction` class.',
);
}

return mapToPromise(
this.#send<SignTransactionRequest, SignTransactionResponse>({
type: 'sign-transaction-request',
Expand Down
17 changes: 0 additions & 17 deletions apps/wallet/src/ui/app/accounts-finder/AccountsFinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export enum AllowedAccountSourceTypes {

export enum AllowedBip44CoinTypes {
IOTA = 4218,
Shimmer = 4219,
}

export enum SearchAlgorithm {
Expand Down Expand Up @@ -66,26 +65,10 @@ const GAP_CONFIGURATION: { [key in AllowedBip44CoinTypes]: GapConfigurationByCoi
addressGapLimit: 10,
},
},
// In shimmer we focus on accounts indexes and never rotate addresses
[AllowedBip44CoinTypes.Shimmer]: {
[AllowedAccountSourceTypes.LedgerDerived]: {
accountGapLimit: 3,
addressGapLimit: 0,
},
[AllowedAccountSourceTypes.MnemonicDerived]: {
accountGapLimit: 10,
addressGapLimit: 0,
},
[AllowedAccountSourceTypes.SeedDerived]: {
accountGapLimit: 10,
addressGapLimit: 0,
},
},
};

const CHANGE_INDEXES: { [key in AllowedBip44CoinTypes]: number[] } = {
[AllowedBip44CoinTypes.IOTA]: [0, 1],
[AllowedBip44CoinTypes.Shimmer]: [0],
};

export class AccountsFinder {
Expand Down
31 changes: 11 additions & 20 deletions apps/wallet/src/ui/app/components/PasswordInputDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@

import { useBackgroundClient } from '_src/ui/app/hooks/useBackgroundClient';
import { Button } from '_src/ui/app/shared/ButtonUI';
import FieldLabel from '_src/ui/app/shared/field-label';
import { PasswordInputField } from '_src/ui/app/shared/input/password';
import { Text } from '_src/ui/app/shared/text';
import classNames from 'clsx';
import { ErrorMessage, Form, Formik } from 'formik';
import { Form, Formik } from 'formik';
import { toast } from 'react-hot-toast';
import { useNavigate } from 'react-router-dom';
import { object, string as YupString } from 'yup';
import { ArrowLeft, ArrowRight, Warning } from '@iota/ui-icons';
import { Header, InfoBox, InfoBoxStyle, InfoBoxType } from '@iota/apps-ui-kit';
import { ArrowLeft, ArrowRight } from '@iota/ui-icons';
import { Header, InputType } from '@iota/apps-ui-kit';
import { PasswordInputField } from '../shared/input/password';

const validation = object({
password: YupString().ensure().required().label('Password'),
Expand Down Expand Up @@ -61,7 +60,7 @@ export function PasswordInputDialog({
validationSchema={validation}
validateOnMount
>
{({ isSubmitting, isValid }) => (
{({ isSubmitting, isValid, errors }) => (
<Form
className={classNames('flex flex-1 flex-col flex-nowrap items-center gap-7.5', {
'bg-white': background,
Expand All @@ -70,20 +69,12 @@ export function PasswordInputDialog({
>
<Header title={title} titleCentered />
<div className="flex-1 self-stretch">
<FieldLabel txt="Enter Wallet Password to Continue">
<PasswordInputField name="password" />
<ErrorMessage
render={(error) => (
<InfoBox
type={InfoBoxType.Error}
title={error}
icon={<Warning />}
style={InfoBoxStyle.Elevated}
/>
)}
name="password"
/>
</FieldLabel>
<PasswordInputField
name="password"
type={InputType.Password}
label="Enter your wallet password to continue"
errorMessage={errors.password}
/>
<div className="mt-4 text-center">
<Text variant="pBodySmall" color="steel-dark" weight="normal">
This is the password you currently use to lock and unlock your IOTA
Expand Down
27 changes: 15 additions & 12 deletions apps/wallet/src/ui/app/components/accounts/PasswordInputDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ export function PasswordModalDialog({
<Header title={title} onClose={onClose} />
<DialogBody>
<Form form={form} id={formID} onSubmit={handleOnSubmit}>
<div className="flex flex-col gap-y-6">
<div className="flex flex-col gap-y-3">
<div className="flex flex-col gap-y-lg">
<div className="flex flex-col gap-y-sm">
<Input
autoFocus
type={InputType.Password}
Expand All @@ -107,16 +107,19 @@ export function PasswordModalDialog({
{...register('password')}
name="password"
/>

{showForgotPassword && hasAccountsSources ? (
<Link
to="/accounts/forgot-password"
onClick={onClose}
className="text-body-sm text-neutral-40 no-underline"
>
Forgot Password?
</Link>
) : null}
{showForgotPassword && (
<div className="relative p-xs">
{hasAccountsSources ? (
<Link
to="/accounts/forgot-password"
onClick={onClose}
className="absolute top-0 text-body-sm text-neutral-40 no-underline"
>
Forgot Password?
</Link>
) : null}
</div>
)}
</div>
<div className="flex flex-col gap-3">
<div className="flex gap-2.5">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export function AccountGroup({
hideArrow
hideBorder
render={({ isOpen }) => (
<div className="relative flex w-full items-center justify-between gap-1 py-2 pl-1 pr-sm">
<div className="relative flex min-h-[52px] w-full items-center justify-between gap-1 py-2 pl-1 pr-sm">
<div className="flex items-center gap-1">
<TriangleDown
className={clsx(
Expand Down
16 changes: 0 additions & 16 deletions apps/wallet/src/ui/app/shared/forms/controls/Input.tsx

This file was deleted.

Loading

0 comments on commit e9e5eac

Please sign in to comment.