File tree Expand file tree Collapse file tree 4 files changed +7
-3
lines changed
apps/hyperdrive-trading/src/ui/portfolio
packages/hyperdrive-js/src/hyperdrive Expand file tree Collapse file tree 4 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,10 @@ export function OpenLongsContainer({
4141 ) ;
4242 }
4343
44- if ( openLongPositions ?. every ( ( position ) => ! position . openLongs . length ) ) {
44+ if (
45+ ! openLongPositions ||
46+ openLongPositions . every ( ( position ) => ! position . openLongs . length )
47+ ) {
4548 return (
4649 < PositionContainer className = "my-28" >
4750 < NonIdealState
Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ export function OpenShortsContainer({
4040 }
4141
4242 if (
43- openShortPositions ?. every ( ( position ) => position . openShorts . length === 0 )
43+ ! openShortPositions ||
44+ openShortPositions . every ( ( position ) => position . openShorts . length === 0 )
4445 ) {
4546 return (
4647 < PositionContainer className = "my-28" >
Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ export function usePortfolioShortsDataFromHyperdrives({
8484 address : hyperdrive . address ,
8585 drift : getDrift ( { chainId : hyperdrive . chainId } ) ,
8686 earliestBlock : hyperdrive . initializationBlock ,
87+ debugName : hyperdrive . name ,
8788 zapContractAddress :
8889 appConfigForConnectedChain . zaps [ hyperdrive . chainId ]
8990 ?. address ,
Original file line number Diff line number Diff line change @@ -987,7 +987,6 @@ export class ReadHyperdrive extends ReadClient {
987987 } ) ;
988988
989989 // Create a default empty short that we will update based on the events
990- // const short: OpenShort = openShorts[assetId] || {
991990 openShorts [ assetId ] = openShorts [ assetId ] || {
992991 hyperdriveAddress,
993992 assetId : event . args . assetId ,
You can’t perform that action at this time.
0 commit comments