-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #288 from bnb-chain/feat/upperLimit0107
feat: Fee loading timeout and stargate input decimal contraints
- Loading branch information
Showing
13 changed files
with
181 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...s/canonical-bridge-widget/src/modules/transfer/components/Modal/FeeTimeoutModal/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { useIntl } from '@bnb-chain/space'; | ||
|
||
import { StateModal, StateModalProps } from '@/core/components/StateModal'; | ||
|
||
export const FeeTimeoutModal = (props: Omit<StateModalProps, 'title'>) => { | ||
const { ...restProps } = props; | ||
const { formatMessage } = useIntl(); | ||
|
||
return ( | ||
<StateModal | ||
className="bccb-widget-fee-timeout-modal" | ||
type="error" | ||
title={formatMessage({ id: 'modal.fee-timeout.error.title' })} | ||
description={formatMessage({ id: 'modal.fee-timeout.error.desc' })} | ||
buttonText={formatMessage({ id: 'modal.fee-timeout.error.button.close' })} | ||
bodyProps={{ | ||
px: ['16px', '16px', '40px'], | ||
}} | ||
footerProps={{ | ||
pb: ['32px', '32px', '40px'], | ||
px: ['16px', '16px', '40px'], | ||
}} | ||
{...restProps} | ||
/> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
packages/canonical-bridge-widget/src/modules/transfer/hooks/modal/useFeeLoadTimeout.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { useCallback } from 'react'; | ||
|
||
import { useAppDispatch } from '@/modules/store/StoreProvider'; | ||
import { setIsFeeTimeoutModalOpen } from '@/modules/transfer/action'; | ||
|
||
export const useFeeLoadTimeout = () => { | ||
const dispatch = useAppDispatch(); | ||
|
||
const onOpenFeeTimeoutModal = useCallback(() => { | ||
dispatch(setIsFeeTimeoutModalOpen(true)); | ||
}, [dispatch]); | ||
|
||
const onCloseFeeTimeoutModal = useCallback(() => { | ||
dispatch(setIsFeeTimeoutModalOpen(false)); | ||
}, [dispatch]); | ||
return { | ||
onOpenFeeTimeoutModal, | ||
onCloseFeeTimeoutModal, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.