Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
fix: coords validation
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-calavera committed Oct 25, 2019
1 parent 2fa1e01 commit 2d65298
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/v2/stores/nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ class Store {
({nodePubkey: pubkey = '', tpu: gossip, coordinates, identity}) => ({
pubkey,
gossip,
coordinates,
coordinates:
-180 < coordinates[0] &&
coordinates[0] < 180 &&
(-90 < coordinates[1] && coordinates[1] < 90)
? coordinates
: [0, 0],
name: getOr(pubkey, 'name')(identity),
avatarUrl: getOr('', 'avatarUrl')(identity),
}),
Expand Down

0 comments on commit 2d65298

Please sign in to comment.