mirror of
https://github.com/cerc-io/mars-interface.git
synced 2024-12-22 20:27:44 +00:00
fix: fixed the tx hashes for station wallet
This commit is contained in:
parent
cf9fe7d5cb
commit
7ba97af90c
@ -136,6 +136,8 @@ export const IncentivesButton = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const transactionHash = response?.hash ? response?.hash : response?.response.transactionHash || ''
|
||||||
|
|
||||||
if (!userWalletAddress) return null
|
if (!userWalletAddress) return null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -174,10 +176,7 @@ export const IncentivesButton = () => {
|
|||||||
{response ? (
|
{response ? (
|
||||||
<div className={`${styles.container} ${styles.info}`}>
|
<div className={`${styles.container} ${styles.info}`}>
|
||||||
<p className='m'>{t('incentives.successfullyClaimed')}</p>
|
<p className='m'>{t('incentives.successfullyClaimed')}</p>
|
||||||
<TxLink
|
<TxLink hash={transactionHash} link={`${explorerUrl}/txs/${transactionHash}`} />
|
||||||
hash={response?.hash || ''}
|
|
||||||
link={`${explorerUrl}/txs/${response?.hash}`}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
|
@ -16,7 +16,6 @@ interface Props {
|
|||||||
export const TxFailedContent = ({ message, hash, handleClose }: Props) => {
|
export const TxFailedContent = ({ message, hash, handleClose }: Props) => {
|
||||||
const chainInfo = useStore((s) => s.chainInfo)
|
const chainInfo = useStore((s) => s.chainInfo)
|
||||||
const explorerUrl = chainInfo && SimpleChainInfoList[chainInfo.chainId as ChainInfoID].explorer
|
const explorerUrl = chainInfo && SimpleChainInfoList[chainInfo.chainId as ChainInfoID].explorer
|
||||||
|
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -73,14 +73,11 @@ export const TxResponse = ({
|
|||||||
return [t('common.completed'), null]
|
return [t('common.completed'), null]
|
||||||
}, [txStatus, t])
|
}, [txStatus, t])
|
||||||
|
|
||||||
|
const transactionHash = response?.hash ? response?.hash : response?.response.transactionHash || ''
|
||||||
return (
|
return (
|
||||||
<Card isClose={true} onClick={handleClose} title={cardTitle}>
|
<Card isClose={true} onClick={handleClose} title={cardTitle}>
|
||||||
{txStatus === TxStatus.FAILURE ? (
|
{txStatus === TxStatus.FAILURE ? (
|
||||||
<TxFailedContent
|
<TxFailedContent handleClose={handleClose} hash={transactionHash} message={error} />
|
||||||
handleClose={handleClose}
|
|
||||||
hash={response?.response.transactionHash || ''}
|
|
||||||
message={error}
|
|
||||||
/>
|
|
||||||
) : (
|
) : (
|
||||||
<TxSuccessContent
|
<TxSuccessContent
|
||||||
handleClose={handleClose}
|
handleClose={handleClose}
|
||||||
|
@ -27,6 +27,7 @@ export const TxSuccessContent = ({
|
|||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const chainInfo = useStore((s) => s.chainInfo)
|
const chainInfo = useStore((s) => s.chainInfo)
|
||||||
const explorerUrl = chainInfo && SimpleChainInfoList[chainInfo.chainId as ChainInfoID].explorer
|
const explorerUrl = chainInfo && SimpleChainInfoList[chainInfo.chainId as ChainInfoID].explorer
|
||||||
|
const transactionHash = response?.hash ? response?.hash : response?.response.transactionHash || ''
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
@ -65,10 +66,7 @@ export const TxSuccessContent = ({
|
|||||||
</div>
|
</div>
|
||||||
<div className={styles.item}>
|
<div className={styles.item}>
|
||||||
<div className={styles.label}>{t('common.txHash')}</div>
|
<div className={styles.label}>{t('common.txHash')}</div>
|
||||||
<TxLink
|
<TxLink hash={transactionHash} link={`${explorerUrl}/txs/${transactionHash}`} />
|
||||||
hash={response?.response.transactionHash || ''}
|
|
||||||
link={`${explorerUrl}/txs/${response?.response.transactionHash}`}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
Loading…
Reference in New Issue
Block a user