Skip to content

Commit

Permalink
Merge branch 'refactor/green-variant-in-theme-icon' of https://github…
Browse files Browse the repository at this point in the history
….com/ArdentHQ/arkvault into refactor/green-variant-in-theme-icon
  • Loading branch information
patricio0312rev committed Nov 12, 2024
2 parents f001121 + 9b1c9a4 commit e38cc80
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const ThemeIcon = ({
...properties
}: ThemeIconProperties): JSX.Element => {
const { isDarkMode } = useTheme();

let icon = isDarkMode ? darkIcon : lightIcon;

if (greenDarkIcon && greenLightIcon) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ export const ReviewStep = ({
title={t("TRANSACTION.REVIEW_STEP.TITLE")}
subtitle={t("TRANSACTION.REVIEW_STEP.DESCRIPTION")}
titleIcon={
<ThemeIcon dimensions={[24, 24]} lightIcon="SendTransactionLight" darkIcon="SendTransactionDark" greenLightIcon="SendTransactionLightGreen" greenDarkIcon="SendTransactionDarkGreen" />
<ThemeIcon
dimensions={[24, 24]}
lightIcon="SendTransactionLight"
darkIcon="SendTransactionDark"
greenLightIcon="SendTransactionLightGreen"
greenDarkIcon="SendTransactionDarkGreen"
/>
}
/>

Expand Down
6 changes: 3 additions & 3 deletions src/domains/transaction/validations/SendTransfer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe("Send transfer validations", () => {
const invalidAddress = sendTransfer(translationMock).recipientAddress(profile, network, [], false);

await expect(invalidAddress.validate.valid("invalid")).resolves.toBe("COMMON.VALIDATION.RECIPIENT_INVALID");
})
});

it("amount", () => {
const noBalance = sendTransfer(translationMock).amount(network, BigNumber.ZERO, [], false);
Expand All @@ -52,10 +52,10 @@ describe("Send transfer validations", () => {

expect(amountTooSmall.validate.valid(0)).toBe("TRANSACTION.VALIDATION.AMOUNT_BELOW_MINIMUM");
});
it('memo', () => {
it("memo", () => {
const memo = sendTransfer(translationMock).memo();

expect(memo.maxLength.value).toBe(255);
expect(memo.maxLength.message).toBe("COMMON.VALIDATION.MAX_LENGTH");
})
});
});
2 changes: 1 addition & 1 deletion src/utils/theme.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const shouldUseDarkColors = () => document.querySelector("html")?.classList.contains("dark");

const getCurrentAccentColor = (): 'green' | 'navy' => {
const getCurrentAccentColor = (): "green" | "navy" => {
if (document.body.classList.contains("blue")) {
return "navy";
}
Expand Down

0 comments on commit e38cc80

Please sign in to comment.