• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

decentraland / atlas-server / 13264627278
40%
master: 40%

Build:
Build:
LAST BUILD BRANCH: chore/enhance-docs
DEFAULT BRANCH: master
Ran 11 Feb 2025 02:01PM UTC
Jobs 1
Files 39
Run time 241min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 Feb 2025 01:09PM UTC coverage: 40.088% (+1.8%) from 38.329%
13264627278

push

github

web-flow
feat: Add trades to tiles (#124)

# Add Off-Chain Trade Prices to Atlas Tiles

## Overview
This PR adds support for displaying off-chain trade prices in the Atlas
map tiles. Previously, the map only showed prices from on-chain orders,
but now it will also display prices from off-chain trades (marketplace
trades), using the most recent price between both sources.

## Changes
- Added new `trades` component to fetch active trades from the
marketplace database
- Modified map component to integrate off-chain trade prices with
existing tile data
- Added price comparison logic to use the most recent price between
on-chain orders and off-chain trades
- Added tests for the new trades component
- Improved logging for better debugging and monitoring

## Technical Details
- Created a new database query to fetch active trades filtered by parcel
and estate categories
- Added `updateTilesWithTrades` function that:
  - Fetches active trades from the database
  - Matches trades with tiles based on contract address and token ID
- Updates tile prices if a trade is more recent than the current
on-chain order
- Integrated trade price updates in both initialization paths (cached
and fresh data)

## Testing
- Added unit tests for the trades component covering:
  - Successful trade fetching
  - Error handling
  - Category filtering
- Manually tested price updates with both on-chain orders and off-chain
trades

## Notes
- The system prioritizes the most recent price between on-chain orders
and off-chain trades
- Trade prices are converted from wei to ETH for display
- All price updates are persisted to S3 for caching

159 of 217 branches covered (73.27%)

Branch coverage included in aggregate %.

167 of 260 new or added lines in 4 files covered. (64.23%)

1485 of 3884 relevant lines covered (38.23%)

5.71 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
5
0.0
0.0% src/types.ts
13
0.0
0.0% src/components.ts
75
0.0
0.0% src/modules/map/component.ts
Jobs
ID Job ID Ran Files Coverage
1 13264627278.1 11 Feb 2025 02:01PM UTC 39
40.09
GitHub Action Run
Source Files on build 13264627278
  • Tree
  • List 39
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 3d8cfd28 on github
  • Prev Build on master (#12908836070)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc