opportunity-service 0.0.542 → 0.0.546
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,25 +1,22 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
},
|
10
|
-
"mainnet": {
|
11
|
-
'MarketFactory': addressMap['mainnet']['MarketFactory'],
|
12
|
-
'UserRegistration': addressMap['mainnet']['UserRegistration'],
|
13
|
-
'UserSummaryFactory': addressMap['mainnet']['UserSummaryFactory'],
|
14
|
-
'Dai': addressMap['mainnet']['Dai'],
|
15
|
-
'Participation': addressMap['mainnet']['Participation']
|
16
|
-
},
|
17
|
-
"xdai": {
|
18
|
-
'MarketFactory': addressMap['xdai']['MarketFactory'],
|
19
|
-
'UserRegistration': addressMap['xdai']['UserRegistration'],
|
20
|
-
'UserSummaryFactory': addressMap['xdai']['UserSummaryFactory'],
|
21
|
-
'Dai': addressMap['xdai']['Dai'],
|
22
|
-
'Participation': addressMap['xdai']['Participation']
|
23
|
-
}
|
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
|
+
});
|
24
9
|
};
|
10
|
+
import opportunityService from '../../OpportunityService';
|
11
|
+
import * as addressMap from '../../blockchain/addresses.json';
|
12
|
+
function getAddressMap() {
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
|
+
const network = (yield (opportunityService === null || opportunityService === void 0 ? void 0 : opportunityService.getEthNetwork())) || 'rinkeby';
|
15
|
+
console.log('@@@@');
|
16
|
+
console.log(network);
|
17
|
+
console.log(JSON.parse(addressMap[network]));
|
18
|
+
return JSON.parse(addressMap[network]);
|
19
|
+
});
|
20
|
+
}
|
21
|
+
export default getAddressMap();
|
25
22
|
//# sourceMappingURL=addresses.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"addresses.js","sourceRoot":"","sources":["../../../src/api/internal/addresses.ts"],"names":[],"mappings":"
|
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,CAAA,MAAM,CAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,aAAa,EAAE,CAAA,KAAI,SAAS,CAAA;QACtE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QACnB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QACpB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;QAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAA;IAC1C,CAAC;CAAA;AAED,eAAe,aAAa,EAAE,CAAA"}
|
package/package.json
CHANGED
@@ -1,26 +1,13 @@
|
|
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
|
-
|
11
|
-
|
12
|
-
|
13
|
-
'MarketFactory': addressMap['mainnet']['MarketFactory'],
|
14
|
-
'UserRegistration': addressMap['mainnet']['UserRegistration'],
|
15
|
-
'UserSummaryFactory': addressMap['mainnet']['UserSummaryFactory'],
|
16
|
-
'Dai': addressMap['mainnet']['Dai'],
|
17
|
-
'Participation': addressMap['mainnet']['Participation']
|
18
|
-
},
|
19
|
-
"xdai": {
|
20
|
-
'MarketFactory': addressMap['xdai']['MarketFactory'],
|
21
|
-
'UserRegistration': addressMap['xdai']['UserRegistration'],
|
22
|
-
'UserSummaryFactory': addressMap['xdai']['UserSummaryFactory'],
|
23
|
-
'Dai': addressMap['xdai']['Dai'],
|
24
|
-
'Participation': addressMap['xdai']['Participation']
|
25
|
-
}
|
26
|
-
}
|
5
|
+
async function getAddressMap() {
|
6
|
+
const network = await opportunityService?.getEthNetwork() || 'rinkeby'
|
7
|
+
console.log('@@@@')
|
8
|
+
console.log(network)
|
9
|
+
console.log(JSON.parse(addressMap[network]))
|
10
|
+
return JSON.parse(addressMap[network])
|
11
|
+
}
|
12
|
+
|
13
|
+
export default getAddressMap()
|