Skip to content

Commit

Permalink
Merge branch 'feat/evm' into feat/network-switch
Browse files Browse the repository at this point in the history
  • Loading branch information
goga-m authored Feb 6, 2025
2 parents 6b0d7dc + 2b5b2fb commit f23cc88
Show file tree
Hide file tree
Showing 22 changed files with 534 additions and 198 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
},
"dependencies": {
"@ardenthq/arkvault-url": "^1.2.0",
"@ardenthq/sdk": "2.0.0-alpha.43",
"@ardenthq/sdk-ark": "2.0.0-alpha.43",
"@ardenthq/sdk-cryptography": "2.0.0-alpha.43",
"@ardenthq/sdk-helpers": "2.0.0-alpha.43",
"@ardenthq/sdk-intl": "2.0.0-alpha.43",
"@ardenthq/sdk-ledger": "2.0.0-alpha.43",
"@ardenthq/sdk-mainsail": "2.0.0-alpha.43",
"@ardenthq/sdk-profiles": "2.0.0-alpha.43",
"@ardenthq/sdk": "2.0.0-alpha.44",
"@ardenthq/sdk-ark": "2.0.0-alpha.44",
"@ardenthq/sdk-cryptography": "2.0.0-alpha.44",
"@ardenthq/sdk-helpers": "2.0.0-alpha.44",
"@ardenthq/sdk-intl": "2.0.0-alpha.44",
"@ardenthq/sdk-ledger": "2.0.0-alpha.44",
"@ardenthq/sdk-mainsail": "2.0.0-alpha.44",
"@ardenthq/sdk-profiles": "2.0.0-alpha.44",
"@faustbrian/node-haveibeenpwned": "^1.1.0",
"@floating-ui/react": "^0.26.25",
"@konforti/react-truncate": "^1.1.0",
Expand Down
122 changes: 61 additions & 61 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/app/components/WalletListItem/WalletListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const WalletListItem: React.VFC<WalletListItemProperties> = ({ wallet, is
<tr>
<td>
<WalletActionsModals
wallet={wallet}
wallets={[wallet]}
activeModal={activeModal}
setActiveModal={setActiveModal}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const PortfolioHeader = ({

const isRestored = wallet.hasBeenFullyRestored();
const { convert } = useExchangeRate({ exchangeTicker: wallet.exchangeCurrency(), ticker: wallet.currency() });
const { handleImport, handleCreate, handleSelectOption, handleSend, setActiveModal, activeModal } =
const { activeModal, setActiveModal, handleImport, handleCreate, handleSelectOption, handleSend } =
useWalletActions(...selectedWallets);
const { primaryOptions, secondaryOptions, additionalOptions, registrationOptions } =
useWalletOptions(selectedWallets);
Expand Down Expand Up @@ -316,7 +316,7 @@ export const PortfolioHeader = ({
/>

<WalletActionsModals
wallet={wallet}
wallets={selectedWallets}
activeModal={activeModal}
setActiveModal={setActiveModal}
onUpdateWallet={() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const DateRangeOptions = ({ isDisabled }: { isDisabled: boolean }) => {
<FormField name="dateRange">
<Dropdown
variant="options"
wrapperClass="z-50"
data-testid="TransactionExportForm--daterange-options"
options={options}
onSelect={(option) => form.setValue("dateRange", option.value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const SelectDelimiter = ({ value, onSelect }: { value: CsvDelimiter; onSelect?:
<FormField name="delimiter">
<Dropdown
data-testid="TransactionExportForm--delimiter-options"
wrapperClass="z-50"
options={delimiterOptions.options}
onSelect={(option) => onSelect?.(option.value as CsvDelimiter)}
toggleContent={(isOpen: boolean) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ describe("TransactionExportForm", () => {
});

it.each(["xs", "sm", "md", "lg", "xl"])("should render in %s", async (breakpoint: string) => {
const { asFragment } = renderWithForm(<TransactionExportForm wallet={profile.wallets().first()} />, {
breakpoint,
});
const { asFragment } = renderWithForm(
<TransactionExportForm profile={profile} wallets={[profile.wallets().first()]} />,
{
breakpoint,
},
);

expect(screen.getByTestId("TransactionExportForm")).toBeInTheDocument();

Expand All @@ -55,7 +58,9 @@ describe("TransactionExportForm", () => {
it("should emit cancel", async () => {
const onCancel = vi.fn();

renderWithForm(<TransactionExportForm wallet={profile.wallets().first()} onCancel={onCancel} />);
renderWithForm(
<TransactionExportForm profile={profile} wallets={[profile.wallets().first()]} onCancel={onCancel} />,
);

expect(screen.getByTestId("TransactionExportForm")).toBeInTheDocument();

Expand All @@ -74,7 +79,7 @@ describe("TransactionExportForm", () => {
const onCancel = vi.fn();

const { asFragment } = renderWithForm(
<TransactionExportForm onCancel={onCancel} wallet={profile.wallets().first()} />,
<TransactionExportForm onCancel={onCancel} profile={profile} wallets={[profile.wallets().first()]} />,
);

expect(screen.getByTestId("TransactionExportForm__toggle-include-fiat-amount")).toBeInTheDocument();
Expand All @@ -89,7 +94,7 @@ describe("TransactionExportForm", () => {
});

it("should select outgoing transactions", async () => {
renderWithForm(<TransactionExportForm wallet={profile.wallets().first()} />);
renderWithForm(<TransactionExportForm profile={profile} wallets={[profile.wallets().first()]} />);

expect(screen.getByTestId("TransactionExportForm")).toBeInTheDocument();

Expand All @@ -101,7 +106,7 @@ describe("TransactionExportForm", () => {
});

it("should select last month", async () => {
renderWithForm(<TransactionExportForm wallet={profile.wallets().first()} />);
renderWithForm(<TransactionExportForm profile={profile} wallets={[profile.wallets().first()]} />);

expect(screen.getByTestId("TransactionExportForm")).toBeInTheDocument();

Expand All @@ -117,17 +122,20 @@ describe("TransactionExportForm", () => {
});

it("should render custom date range", async () => {
renderWithForm(<TransactionExportForm wallet={profile.wallets().first()} onCancel={vi.fn()} />, {
defaultValues: {
from: new Date(),
to: new Date(),
},
registerCallback: ({ register }) => {
register("dateRange");
register("from");
register("to");
renderWithForm(
<TransactionExportForm profile={profile} wallets={[profile.wallets().first()]} onCancel={vi.fn()} />,
{
defaultValues: {
from: new Date(),
to: new Date(),
},
registerCallback: ({ register }) => {
register("dateRange");
register("from");
register("to");
},
},
});
);

expect(screen.getByTestId("TransactionExportForm")).toBeInTheDocument();

Expand All @@ -143,7 +151,7 @@ describe("TransactionExportForm", () => {
});

it("should select tab delimiter", async () => {
renderWithForm(<TransactionExportForm wallet={profile.wallets().first()} />, {
renderWithForm(<TransactionExportForm profile={profile} wallets={[profile.wallets().first()]} />, {
defaultValues: {
delimiter: ",",
},
Expand Down
Loading

0 comments on commit f23cc88

Please sign in to comment.