Merge pull request #198 from status-im/fix/map-infinite-loading

Fix Map in Status + shared chains
This commit is contained in:
Jonathan Rainville 2019-05-08 09:55:40 -04:00 committed by GitHub
commit a0ef6631bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 69 additions and 8 deletions

View File

@ -14,7 +14,8 @@
"embarkjs-connector-web3": {},
"@trailofbits/embark-contract-info": {
"flags": ""
}
},
"embark-solc": {}
},
"options": {
"solc": {

View File

@ -139,11 +139,12 @@ module.exports = {
// merges with the settings in default
// used with "embark run testnet"
testnet: {
tracking: 'shared.chains.json',
deployment: {
accounts: [
{
mnemonic: secret.mnemonic,
hdpath: "m/44'/1'/0'/0/",
hdpath: secret.hdpath || "m/44'/60'/0'/0/",
numAddresses: "10"
}
],

View File

@ -51,6 +51,7 @@
"cryptocompare": "^0.7.0",
"css-loader": "^2.1.0",
"embark": "^4.0.2",
"embark-solc": "^4.0.2",
"embark-solium": "0.0.1",
"embarkjs-connector-web3": "^4.0.0",
"ethereumjs-util": "^6.0.0",

42
shared.chains.json Normal file
View File

@ -0,0 +1,42 @@
{
"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177": {
"contracts": {
"0x3043b04ad856d169c8f0b0509c0bc63192dc7edd92d6933c58708298a0e381be": {
"name": "ENSRegistry",
"address": "0xe7410170f87102DF0055eB195163A03B7F2Bff4A"
},
"0x573ce922ef30ea27239add0fb9f2af8d008314dc4a0b3eaefa0adaf8963e44fa": {
"name": "StandardToken",
"address": "0x59D8879eEF830dDA7d88D10E35C7B2cF038B33F1"
},
"0x823f81eb5239fd857afd6bb050d2d628acddcaf2394ef641cd91cf0b8ff874b9": {
"name": "ERC20Receiver",
"address": "0xebfBDa0F3cA6034ACe216Af75E57f7142674cfe3"
},
"0xc9e884a03e7e4f76203ccb9bf9e266d6618889baa506014d1bad4123e0404e60": {
"name": "MiniMeTokenFactory",
"address": "0x61c6e9EeA406231a402788D8FbCBEDBb7ab6b9b1"
},
"0x80ef9942fa92b4917e4fcfcb2d0e1770b837c9c9a86758a7ec10f74f2e58b8e2": {
"name": "SNT",
"address": "0xC2866aFd9594fAfE4e4B3b41b989Da84cA818783"
},
"0x7d188b6d86b8f51ea9c96e68023572a6e17ff441bfd8f7d84c8326151de8615c": {
"name": "Arbitration",
"address": "0x672D88a25E05235239Da96e87AD50DA9cfc8c3e1"
},
"0xf7197481ff573e6fa7581f71dcf69827114d0a45b03ac076a538c55275cd51d7": {
"name": "License",
"address": "0x6DEf7bDD45B0Fb7863398724A28630fEFAD9613a"
},
"0x44b24e729ff465bc6e0c683728c9b4a478e0ab28d308f0b2f1bd2700daf3d9df": {
"name": "MetadataStore",
"address": "0xAB74A51206E315a722bcE59D0A072BddEcE1eAe6"
},
"0xd0f70293e65e29a88e0c3aeec8cb5079de953adcf327a508171740571c39b7cb": {
"name": "Escrow",
"address": "0xB2609E888726e450bdA9D53Af4C475de3621f7bd"
}
}
}
}

View File

@ -1,6 +1,13 @@
$search-field-height: 52px;
$autocomplete-height: 157px;
.map-error {
position: absolute;
z-index: 9000;
left: 0;
right: 0;
}
.map-component {
height: 88%;
position: absolute;

View File

@ -38,14 +38,14 @@ class OffersMap extends Component {
let {error, coords} = this.state;
const {t, tokens, usersWithOffers} = this.props;
if (error && error.indexOf('denied') > -1) {
if (error) {
coords = {
latitude: 45.492611,
longitude: -73.617959
};
error = t('map.denied');
} else if (error) {
return (<Alert color="danger">{error}</Alert>);
if (error.indexOf('denied') > -1) {
error = t('map.denied');
}
}
if (!coords || !coords.latitude) {
@ -64,7 +64,7 @@ class OffersMap extends Component {
return (
<Fragment>
{error && <p className="text-danger">{error}</p>}
{error && <Alert color="danger" className="map-error">{error}</Alert>}
<Map error={error} coords={coords} goToProfile={this.goToProfile} markers={markers}/>
</Fragment>

View File

@ -6226,6 +6226,15 @@ embark-reset@^4.0.0:
dependencies:
rimraf "2.6.3"
embark-solc@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/embark-solc/-/embark-solc-4.0.2.tgz#c3ee068a14d0f046646067a299c696277f6a51aa"
integrity sha512-KKTyeEnvEhypSzs5s9ZlEeHWCn/WfLWSJiQFI0246OKDwF7WdZYrffXXpdq+Ps0TjW8VQg9covuqRpjFMfOUfg==
dependencies:
async "^2.6.0"
semver "^5.6.0"
shelljs "^0.8.1"
embark-solium@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/embark-solium/-/embark-solium-0.0.1.tgz#0a6ee5bccd74d8fb0c153c5b22adb06bdf113411"
@ -16015,7 +16024,7 @@ shelljs@0.5.3:
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.5.3.tgz#c54982b996c76ef0c1e6b59fbdc5825f5b713113"
integrity sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=
shelljs@^0.8.2:
shelljs@^0.8.1, shelljs@^0.8.2:
version "0.8.3"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097"
integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==