From 2d65298ac498f6d83c4d85af841d8b90b43f0b8b Mon Sep 17 00:00:00 2001 From: Manuel Calavera Date: Fri, 25 Oct 2019 12:02:03 -0700 Subject: [PATCH] fix: coords validation --- src/v2/stores/nodes.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/v2/stores/nodes.js b/src/v2/stores/nodes.js index 02cfc783..136737b2 100644 --- a/src/v2/stores/nodes.js +++ b/src/v2/stores/nodes.js @@ -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), }),