link to transaction hash
This commit is contained in:
committed by
Bogdan-Ștefan Neacșu
parent
484f422eff
commit
3d973a8eb7
@@ -19,7 +19,8 @@ export const NymCard: React.FC<{
|
||||
action={Action}
|
||||
sx={{
|
||||
color: 'nym.background.dark',
|
||||
padding: 2.5,
|
||||
py: 2.5,
|
||||
px: 4,
|
||||
borderBottom: (theme) => `1px solid ${theme.palette.grey[200]}`,
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -20,7 +20,8 @@ export const ApplicationLayout: React.FC = ({ children }) => {
|
||||
sx={{
|
||||
background: '#121726',
|
||||
overflow: 'auto',
|
||||
p: [4, 5],
|
||||
py: 4,
|
||||
px: 5,
|
||||
}}
|
||||
>
|
||||
<Box sx={{ mb: 3 }}>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import React, { useContext } from 'react'
|
||||
import { Grid, Box, Card, CircularProgress, Link, Typography } from '@mui/material'
|
||||
import { Box, CircularProgress, Link, Typography } from '@mui/material'
|
||||
import { SendError } from './SendError'
|
||||
import { TauriTxResult } from '../../types/rust/tauritxresult'
|
||||
import { ClientContext, urls } from '../../context/main'
|
||||
import { SuccessReponse } from '../../components'
|
||||
import { TransactionDetails } from '../../components/TransactionDetails'
|
||||
import { TransactionDetails as TTransactionDetails } from '../../types'
|
||||
|
||||
export const SendConfirmation = ({
|
||||
data,
|
||||
error,
|
||||
isLoading,
|
||||
}: {
|
||||
data?: TauriTxResult['details']
|
||||
data?: TTransactionDetails & { tx_hash: string }
|
||||
error?: string
|
||||
isLoading: boolean
|
||||
}) => {
|
||||
@@ -35,7 +35,7 @@ export const SendConfirmation = ({
|
||||
subtitle={
|
||||
<>
|
||||
Check the transaction hash{' '}
|
||||
<Link href={`${urls.blockExplorer}/account/${clientDetails?.client_address}`} target="_blank">
|
||||
<Link href={`${urls.blockExplorer}/transactions/${data.tx_hash}`} target="_blank">
|
||||
here
|
||||
</Link>
|
||||
</>
|
||||
|
||||
@@ -12,8 +12,10 @@ export const SendReview = ({ transferFee }: { transferFee?: string }) => {
|
||||
variant="outlined"
|
||||
sx={{
|
||||
width: '100%',
|
||||
p: [3, 2],
|
||||
m: [3, 0],
|
||||
py: 3,
|
||||
px: 2,
|
||||
my: 3,
|
||||
mx: 0,
|
||||
}}
|
||||
>
|
||||
<Grid container spacing={2}>
|
||||
@@ -30,7 +32,7 @@ export const SendReview = ({ transferFee }: { transferFee?: string }) => {
|
||||
<Divider light />
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<SendReviewField title="Amount" subtitle={values.amount} />
|
||||
<SendReviewField title="Amount" subtitle={values.amount + ' punk'} />
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<Divider light />
|
||||
|
||||
@@ -7,7 +7,7 @@ import { SendReview } from './SendReview'
|
||||
import { SendConfirmation } from './SendConfirmation'
|
||||
import { ClientContext } from '../../context/main'
|
||||
import { validationSchema } from './validationSchema'
|
||||
import { TauriTxResult } from '../../types'
|
||||
import { TauriTxResult, TransactionDetails } from '../../types'
|
||||
import { getGasFee, majorToMinor, send } from '../../requests'
|
||||
import { checkHasEnoughFunds } from '../../utils'
|
||||
|
||||
@@ -28,7 +28,7 @@ export const SendWizard = () => {
|
||||
const [isLoading, setIsLoading] = useState(false)
|
||||
const [requestError, setRequestError] = useState<string>()
|
||||
const [transferFee, setTransferFee] = useState<string>()
|
||||
const [confirmedData, setConfirmedData] = useState<TauriTxResult['details']>()
|
||||
const [confirmedData, setConfirmedData] = useState<TransactionDetails & { tx_hash: string }>()
|
||||
|
||||
const { userBalance } = useContext(ClientContext)
|
||||
|
||||
@@ -80,12 +80,14 @@ export const SendWizard = () => {
|
||||
address: formState.to,
|
||||
memo: formState.memo,
|
||||
})
|
||||
.then((res: any) => {
|
||||
const { details } = res as TauriTxResult
|
||||
.then((res: TauriTxResult) => {
|
||||
const { details, tx_hash } = res
|
||||
|
||||
setActiveStep((s) => s + 1)
|
||||
setConfirmedData({
|
||||
...details,
|
||||
amount: { denom: 'Major', amount: formState.amount },
|
||||
tx_hash,
|
||||
})
|
||||
setIsLoading(false)
|
||||
userBalance.fetchBalance()
|
||||
@@ -119,7 +121,8 @@ export const SendWizard = () => {
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
p: [0, 3],
|
||||
py: 0,
|
||||
px: 3,
|
||||
}}
|
||||
>
|
||||
{activeStep === 0 ? (
|
||||
|
||||
@@ -71,7 +71,7 @@ export const UndelegateForm = ({
|
||||
|
||||
return (
|
||||
<FormControl fullWidth>
|
||||
<Box sx={{ p: [3, 5] }}>
|
||||
<Box sx={{ p: 4 }}>
|
||||
<Grid container spacing={3} direction="column">
|
||||
<Grid item xs={12}>
|
||||
<Controller
|
||||
|
||||
Reference in New Issue
Block a user