opportunity-service 0.0.543 → 0.0.544
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,19 @@
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
+
});
|
9
|
+
};
|
1
10
|
import opportunityService from '../../OpportunityService';
|
2
11
|
import * as addressMap from '../../blockchain/addresses.json';
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
12
|
+
function getAddressMap() {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
const network = yield opportunityService.getEthNetwork();
|
15
|
+
return addressMap[network];
|
16
|
+
});
|
17
|
+
}
|
18
|
+
export default getAddressMap();
|
10
19
|
//# sourceMappingURL=addresses.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"addresses.js","sourceRoot":"","sources":["../../../src/api/internal/addresses.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAC;
|
1
|
+
{"version":3,"file":"addresses.js","sourceRoot":"","sources":["../../../src/api/internal/addresses.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAC;AAG9D,SAAe,aAAa;;QACxB,MAAM,OAAO,GAAG,MAAM,kBAAkB,CAAC,aAAa,EAAE,CAAA;QACxD,OAAO,UAAU,CAAC,OAAO,CAAC,CAAA;IAC9B,CAAC;CAAA;AAED,eAAe,aAAa,EAAE,CAAA"}
|
package/package.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
import opportunityService from '../../OpportunityService';
|
2
2
|
import * as addressMap from '../../blockchain/addresses.json';
|
3
|
+
import { EthNetworkID } from 'dvote-js';
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
}
|
5
|
+
async function getAddressMap() {
|
6
|
+
const network = await opportunityService.getEthNetwork()
|
7
|
+
return addressMap[network]
|
8
|
+
}
|
9
|
+
|
10
|
+
export default getAddressMap()
|