Skip to content

Commit

Permalink
Merge pull request #718 from haqq-network/dev
Browse files Browse the repository at this point in the history
release
  • Loading branch information
olegshilov authored Mar 5, 2024
2 parents 03ac9de + 6320645 commit 32f3098
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 26 deletions.
4 changes: 0 additions & 4 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cacheFolder: .yarn/cache

changesetBaseRefs:
- dev
- origin/dev
Expand All @@ -9,8 +7,6 @@ compressionLevel: mixed

defaultSemverRangePrefix: ""

enableGlobalCache: false

nodeLinker: node-modules

npmScopes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ProposalDepositModal as ProposalDepositModalComponent } from './proposa

const meta: Meta<typeof ProposalDepositModalComponent> = {
component: ProposalDepositModalComponent,
title: 'shell/ui-kit',
title: 'shell/ui-kit/modals/plug-and-play',
parameters: {
layout: 'centered',
},
Expand All @@ -14,7 +14,7 @@ type Story = StoryObj<typeof ProposalDepositModalComponent>;

export const ProposalDepositModal: Story = {
args: {
balance: 250,
balance: 250.48819,
isOpen: true,
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ type Story = StoryObj<typeof MemberModalCardComponent>;

export const MemberModalCard: Story = {
args: {
title: 'Sheikh Dr. Hazza bin Sultan bin Zayed Al Nahyan',
title: 'Alexander Jonathan Sebastian-Carrington',
description:
"His Highness Sheikh Dr. Hazza Bin Sultan Bin Zayed Al Nahyan is Chairman of the Board of Directors of the Management of H. H. Sheikh Sultan Bin Zayed Al Nahyan. He also chairs the Board of Directors of holding companies concerned with Real Estate and Economic Development. Sheikh Dr. Hazza completed his Ph.D. in natural resources, Economic Development and Security in the United Arab Emirates from Bangor University in the United Kingdom in 2009. This is after completing his master's thesis in the philosophy of modern societies and global transformation from the University of Cambridge, United Kingdom, in 2007.",
image: 'https://picsum.photos/200/300',
'Alexander Jonathan Sebastian-Carrington is a renowned historian and linguist, known for his extensive research in ancient Mediterranean civilizations. With a career spanning over three decades, Alexander has contributed significantly to the understanding of early human societies through his innovative approach to deciphering ancient scripts. His work has not only enriched academic discourse but also made ancient history accessible to a wider audience, earning him numerous awards and accolades in the field of historical studies.',
image: 'https://picsum.photos/400/300',
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import { NewsCard as NewsCardComponent } from './news-card';
const meta: Meta<typeof NewsCardComponent> = {
component: NewsCardComponent,
title: 'islamic-website/ui-kit',
parameters: {
layout: 'centered',
},
};

export default meta;
Expand All @@ -20,9 +17,9 @@ export const NewsCard: Story = {
description:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.Lorem ipsum dolor sit amet, consectetur adipiscing elit.Lorem ipsum dolor sit amet, consectetur adipiscing elit.Lorem ipsum dolor sit amet, consectetur adipiscing elit.Lorem ipsum dolor sit amet, consectetur adipiscing elit.Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
image: {
height: 300,
width: 200,
src: 'https://picsum.photos/200/300',
height: 1800,
width: 1000,
src: 'https://picsum.photos/1800/1000',
},
source: 'https://picsum.photos',
type: 'type',
Expand Down
3 changes: 0 additions & 3 deletions libs/shell/ui-kit/src/components/modal-input/modal-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ const defaultMaskOptions = {
prefix: '',
suffix: '',
includeThousandsSeparator: true,
thousandsSeparatorSymbol: ',',
allowDecimal: true,
decimalSymbol: '.',
decimalLimit: 3,
allowNegative: false,
allowLeadingZeroes: false,
// integerLimit: 7,
};

const CurrencyInput = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ export const DelegateModal: Story = {
delegation: 1000,
isDisabled: false,
unboundingTime: 21,
validatorCommission: '100',
validatorCommission: 10,
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ export function DelegateModal({
onSubmit,
}: DelegateModalProps) {
const handleMaxButtonClick = useCallback(() => {
onChange(toFixedAmount(delegation, 3) ?? 0);
}, [delegation, onChange]);
onChange(Math.floor(balance));
}, [balance, onChange]);

const handleInputChange = useCallback(
(value: string | undefined) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function RedelegateModal({
onValidatorChange,
}: RedelegateModalProps) {
const handleMaxButtonClick = useCallback(() => {
onChange(toFixedAmount(delegation, 3) ?? 0);
onChange(Math.floor(delegation));
}, [delegation, onChange]);

const handleInputChange = useCallback(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,20 +107,20 @@ export function UndelegateModalHooked({
undelegate,
validatorAddress,
undelegateAmount,
balance,
fee,
toast,
onClose,
explorer.cosmos,
]);

useEffect(() => {
const fixedDelegation = toFixedAmount(delegation, 3) ?? 0;

if (throttledUndelegateAmount && throttledUndelegateAmount <= 0) {
setUndelegateEnabled(false);
setAmountError('min');
} else if (
throttledUndelegateAmount &&
throttledUndelegateAmount > fixedDelegation
throttledUndelegateAmount > delegation
) {
setUndelegateEnabled(false);
setAmountError('max');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function UndelegateModal({
onSubmit,
}: UndelegateModalProps) {
const handleMaxButtonClick = useCallback(() => {
onChange(toFixedAmount(delegation, 3) ?? 0);
onChange(Math.floor(delegation));
}, [delegation, onChange]);

const handleInputChange = useCallback(
Expand Down

0 comments on commit 32f3098

Please sign in to comment.