File tree 3 files changed +25
-1
lines changed
pages/RuntimeTransactionDetailPage
3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change
1
+ Fix Sapphire undelegate transactions: display number of shares
Original file line number Diff line number Diff line change @@ -157,7 +157,16 @@ export const RuntimeTransactions: FC<TransactionsProps> = ({
157
157
} ,
158
158
{
159
159
align : TableCellAlign . Right ,
160
- content : < RoundedBalance value = { transaction . amount } ticker = { transaction . amount_symbol } /> ,
160
+ content :
161
+ transaction . amount && transaction . amount !== '0' ? (
162
+ < RoundedBalance value = { transaction . amount } ticker = { transaction . amount_symbol } />
163
+ ) : (
164
+ < RoundedBalance
165
+ compactLargeNumbers
166
+ value = { transaction ?. body ?. shares }
167
+ ticker = { t ( 'common.shares' ) }
168
+ />
169
+ ) ,
161
170
key : 'value' ,
162
171
} ,
163
172
{
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ import { MultipleTransactionsWarning } from '../../components/Transactions/Multi
33
33
import { JsonCodeDisplay } from '../..//components/CodeDisplay'
34
34
import { isRoflTransaction } from '../../utils/transaction'
35
35
import Box from '@mui/material/Box'
36
+ import { RoundedBalance } from 'app/components/RoundedBalance'
36
37
37
38
export const RuntimeTransactionDetailPage : FC = ( ) => {
38
39
const { t } = useTranslation ( )
@@ -210,6 +211,19 @@ export const RuntimeTransactionDetailView: FC<{
210
211
: t ( 'common.missing' ) }
211
212
</ dd >
212
213
214
+ { transaction ?. body ?. shares && (
215
+ < >
216
+ < dt > { t ( 'common.shares' ) } </ dt >
217
+ < dd >
218
+ < RoundedBalance
219
+ compactLargeNumbers
220
+ value = { transaction ?. body ?. shares }
221
+ ticker = { t ( 'common.shares' ) }
222
+ />
223
+ </ dd >
224
+ </ >
225
+ ) }
226
+
213
227
{ showFiatValues &&
214
228
transaction . amount !== undefined &&
215
229
! ! amountSymbolPriceInfo &&
You can’t perform that action at this time.
0 commit comments