Skip to content

Commit

Permalink
fix bidshiboshizone issue & reserved land issue
Browse files Browse the repository at this point in the history
  • Loading branch information
luisDev committed Apr 12, 2022
1 parent 764731a commit f6b5f58
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/components/Map/LandDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export const LandDetail = () => {
const data = response.data

const newInfo = data.length > 0 ? { ...data[0] } : {}
if( selectedInfo?.tierName && selectedInfo?.tierName !== 'hub' && selectedInfo?.tierName !== 'road' ) {
if( selectedInfo?.tierName && selectedInfo?.tierName !== 'hub' && selectedInfo?.tierName !== 'road' && !selectedInfo?.reserved ) {
const price = await fetchLandPrice({ x: selectedInfo.coordinates.x, y: selectedInfo.coordinates.y })
newInfo.price = Number( formatFromBalance(price, 18) )
}
Expand All @@ -216,7 +216,7 @@ export const LandDetail = () => {
setShowBidModal(false)
}

const hideDetail = (info: any) => info?.tierName === 'road' || info?.tierName === 'hub'
const hideDetail = (info: any) => info?.tierName === 'road' || info?.tierName === 'hub' || info?.reserved

return (
<LandDetailPanel show={ selectedInfo?.show }>
Expand All @@ -237,6 +237,7 @@ export const LandDetail = () => {

<DetailInfo>
<LandName>{ currentLandInfo?.isRoad ? 'Road' : currentLandInfo?.tierName === 'hub' ? 'Hub' : 'Land'}</LandName>
<LandType className="text-red">{ currentLandInfo?.reserved ? 'Reserved' : '' }</LandType>
<LandType>{ getLandName(currentLandInfo?.tierName, currentLandInfo) }</LandType>
<LandType>District: { checkDistrict( Number(currentLandInfo?.coordinates?.x), Number(currentLandInfo?.coordinates?.y) ) }</LandType>
</DetailInfo>
Expand Down
2 changes: 0 additions & 2 deletions src/hooks/useLandMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ const useLandMap = () => {

setMinPrice(Number(minPrice))
setMaxPrice(Number(maxPrice))

console.error(arrayData)
}, [])

const fetchAccountBidsInfo = useCallback(async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useShiberseLandAuction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const useShiberseLandAuction = (props: any) => {

if( input?.value && input?.x && input?.y && signature ) {
try {
const tx = await landContract?.bidShiboshiZone(input?.x, input?.y, signature, {
const tx = await landContract?.bidShiboshiZoneOne(input?.x, input?.y, signature, {
from: account,
value: formatToBalance(input?.value).value
})
Expand Down

0 comments on commit f6b5f58

Please sign in to comment.