opportunity-service 0.0.527 → 0.0.528

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,8 @@
1
- import * as addresses from '../../blockchain/addresses.json';
2
- const ethNetwork = 'mainnet'; //'mainnet'
3
- const addressMapToString = JSON.stringify(addresses);
4
- const addressMap = JSON.parse(addressMapToString);
5
- const dig = (obj, target) => target in obj ?
6
- obj[target] :
7
- Object.values(obj).reduce((acc, val) => {
8
- if (acc !== undefined)
9
- return acc;
10
- if (typeof val === 'object')
11
- return dig(val, target);
12
- }, undefined);
1
+ import * as addressMap from '../../blockchain/addresses.json';
13
2
  export default {
14
- 'MarketFactory': dig(addressMap, 'MarketFactory'),
15
- 'UserRegistration': dig(addressMap, 'UserRegistration'),
16
- 'Dai': dig(addressMap, 'Dai'),
17
- 'Scheduler': dig(addressMap, 'Scheduler')
3
+ 'MarketFactory': addressMap['MarketFactory'],
4
+ 'UserRegistration': addressMap['UserRegistration'],
5
+ 'Dai': addressMap['Dai'],
6
+ 'Scheduler': addressMap['Scheduler'],
18
7
  };
19
8
  //# sourceMappingURL=addresses.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"addresses.js","sourceRoot":"","sources":["../../../src/api/internal/addresses.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,iCAAiC,CAAC;AAE7D,MAAM,UAAU,GAAG,SAAS,CAAA,CAAC,WAAW;AACxC,MAAM,kBAAkB,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;AACpD,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAA;AAEjD,MAAM,GAAG,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,CACzB,MAAM,IAAI,GAAG,CAAC,CAAC;IACf,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACb,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QACpC,IAAI,GAAG,KAAK,SAAS;YAAE,OAAO,GAAG,CAAC;QAClC,IAAI,OAAO,GAAG,KAAK,QAAQ;YAAE,OAAO,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACxD,CAAC,EAAE,SAAS,CAAC,CAAC;AAGjB,eAAe;IACX,eAAe,EAAE,GAAG,CAAC,UAAU,EAAE,eAAe,CAAC;IACjD,kBAAkB,EAAE,GAAG,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACvD,KAAK,EAAE,GAAG,CAAC,UAAU,EAAE,KAAK,CAAC;IAC7B,WAAW,EAAE,GAAG,CAAC,UAAU,EAAE,WAAW,CAAC;CAC5C,CAAA"}
1
+ {"version":3,"file":"addresses.js","sourceRoot":"","sources":["../../../src/api/internal/addresses.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAC;AAE9D,eAAe;IACX,eAAe,EAAE,UAAU,CAAC,eAAe,CAAC;IAC5C,kBAAkB,EAAE,UAAU,CAAC,kBAAkB,CAAC;IAClD,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC;IACxB,WAAW,EAAE,UAAU,CAAC,WAAW,CAAC;CACvC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opportunity-service",
3
- "version": "0.0.527",
3
+ "version": "0.0.528",
4
4
  "description": "A service layer that connects all services between the blockchain and ui.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,22 +1,9 @@
1
1
  import opportunityService from '../../OpportunityService';
2
- import * as addresses from '../../blockchain/addresses.json';
3
-
4
- const ethNetwork = 'mainnet' //'mainnet'
5
- const addressMapToString = JSON.stringify(addresses)
6
- const addressMap = JSON.parse(addressMapToString)
7
-
8
- const dig = (obj, target) =>
9
- target in obj ?
10
- obj[target] :
11
- Object.values(obj).reduce((acc, val) => {
12
- if (acc !== undefined) return acc;
13
- if (typeof val === 'object') return dig(val, target);
14
- }, undefined);
15
-
2
+ import * as addressMap from '../../blockchain/addresses.json';
16
3
 
17
4
  export default {
18
- 'MarketFactory': dig(addressMap, 'MarketFactory'),
19
- 'UserRegistration': dig(addressMap, 'UserRegistration'),
20
- 'Dai': dig(addressMap, 'Dai'),
21
- 'Scheduler': dig(addressMap, 'Scheduler')
5
+ 'MarketFactory': addressMap['MarketFactory'],
6
+ 'UserRegistration': addressMap['UserRegistration'],
7
+ 'Dai': addressMap['Dai'],
8
+ 'Scheduler': addressMap['Scheduler'],
22
9
  }