Skip to content

Commit

Permalink
chore(funkit): bump funkit version 4.0.3
Browse files Browse the repository at this point in the history
chore: sign messages
  • Loading branch information
chloe-tan committed Dec 19, 2024
1 parent 963cb30 commit 8fd119d
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@dydxprotocol/v4-localization": "^1.1.257",
"@dydxprotocol/v4-proto": "^7.0.0-dev.0",
"@emotion/is-prop-valid": "^1.3.0",
"@funkit/connect": "^4.0.2",
"@funkit/connect": "^4.0.3",
"@hugocxl/react-to-image": "^0.0.9",
"@js-joda/core": "^5.5.3",
"@keplr-wallet/types": "^0.12.121",
Expand Down
45 changes: 26 additions & 19 deletions pnpm-lock.yaml

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

Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { useMemo } from 'react';

import { useFunkitMaxCheckoutUsdInfo } from '@funkit/connect';

import { STRING_KEYS } from '@/constants/localization';

import { useStringGetter } from '@/hooks/useStringGetter';
Expand All @@ -10,6 +14,11 @@ type ElementProps = {

export const FunkitToggle = ({ onToggle }: ElementProps) => {
const stringGetter = useStringGetter();
const { limitLabel } = useFunkitMaxCheckoutUsdInfo();
// This returns '5k', '2k', etc. or 'no'
const formattedLimitLabel = useMemo(() => {
return limitLabel.startsWith('$') ? limitLabel.slice(1) : limitLabel;
}, [limitLabel]);

return (
<div tw="flex w-full rounded-0.5 bg-color-layer-4">
Expand All @@ -22,7 +31,12 @@ export const FunkitToggle = ({ onToggle }: ElementProps) => {
{stringGetter({ key: STRING_KEYS.INSTANT })}
<Icon iconName={IconName.FunkitInstant} tw="float-right" />
</div>
<div tw="font-small-regular">{stringGetter({ key: STRING_KEYS.HIGHER_FEES })}</div>
<div tw="font-small-regular text-left">
{stringGetter({
key: STRING_KEYS.HIGHER_FEES,
params: { AMOUNT_USD: formattedLimitLabel },
})}
</div>
</button>
<div tw="flex w-1/2 flex-col items-start justify-center rounded-0.5 border-2 border-solid border-color-accent bg-color-layer-1 px-1 py-0.5">
<div tw="flex w-full items-center justify-between font-medium-regular">
Expand Down

0 comments on commit 8fd119d

Please sign in to comment.