File tree Expand file tree Collapse file tree 2 files changed +7
-13
lines changed
apps/namadillo/src/App/Transactions Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -36,22 +36,21 @@ export const LocalStorageTransactionCard = ({
36
36
const namadaAssetsMap = useAtomValue ( namadaRegistryChainAssetsMapAtom ) ;
37
37
const namadaAsset =
38
38
namadaAssetsMap . data &&
39
- Object . values ( namadaAssetsMap . data ) . find ( ( namadaAsset ) => transaction . asset . symbol &&
40
- namadaAsset . symbol === transaction . asset . symbol ) ;
39
+ Object . values ( namadaAssetsMap . data ) . find (
40
+ ( namadaAsset ) => namadaAsset . symbol === transaction . asset . symbol
41
+ ) ;
41
42
42
43
// Use the Namada asset address if available, otherwise try the original asset address
43
44
const assetAddress = namadaAsset ?. address || transaction . asset . address ;
44
45
45
46
const tokenPrices = useAtomValue (
46
47
tokenPricesFamily ( assetAddress ? [ assetAddress ] : [ ] )
47
48
) ;
48
- const tokenPrice =
49
- assetAddress && tokenPrices . data ?. [ assetAddress ] ;
49
+ const tokenPrice = assetAddress && tokenPrices . data ?. [ assetAddress ] ;
50
50
51
51
// Ensure displayAmount is a BigNumber before performing calculations
52
52
const displayAmount = BigNumber ( transaction . displayAmount ) ;
53
- const dollarAmount =
54
- tokenPrice && displayAmount . multipliedBy ( tokenPrice ) ;
53
+ const dollarAmount = tokenPrice && displayAmount . multipliedBy ( tokenPrice ) ;
55
54
56
55
const renderKeplrIcon = ( address : string ) : JSX . Element | null => {
57
56
if ( isShieldedAddress ( address ) ) return null ;
Original file line number Diff line number Diff line change @@ -87,13 +87,8 @@ export function getToken(
87
87
return undefined ;
88
88
}
89
89
90
- const getVoteTransactionInfo = ( tx : Tx [ "tx" ] ) : VoteTransactionInfo => {
91
- if ( ! tx ?. data )
92
- return {
93
- proposalId : "" ,
94
- vote : "" ,
95
- } ;
96
-
90
+ const getVoteTransactionInfo = ( tx : Tx [ "tx" ] ) : VoteTransactionInfo | void => {
91
+ if ( ! tx ?. data ) return ;
97
92
let parsed ;
98
93
try {
99
94
parsed = JSON . parse ( tx . data ) ;
You can’t perform that action at this time.
0 commit comments