@azuro-org/toolkit
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -15,3 +15,2 @@ import { type Dictionaries } from '@azuro-org/dictionaries'; | ||
lpAddress: string; | ||
coreAddress: string; | ||
conditions: { | ||
@@ -22,2 +21,5 @@ [key: string]: any; | ||
outcomeId: string; | ||
core: { | ||
address: string; | ||
}; | ||
}[]; | ||
@@ -24,0 +26,0 @@ }[]; |
import {getMarketKey,getMarketName,assembleSelectionName}from'@azuro-org/dictionaries';function aggregateOutcomesByMarkets(props) { | ||
var lpAddress = props.lpAddress, coreAddress = props.coreAddress, conditions = props.conditions, dictionaries = props.dictionaries; | ||
var lpAddress = props.lpAddress, conditions = props.conditions, dictionaries = props.dictionaries; | ||
// group conditions by marketId | ||
@@ -9,3 +9,3 @@ var outcomesByMarketKey = {}; | ||
outcomes.forEach(function (_a) { | ||
var outcomeId = _a.outcomeId; | ||
var outcomeId = _a.outcomeId, core = _a.core; | ||
var marketKey = getMarketKey(outcomeId, dictionaries); | ||
@@ -19,3 +19,3 @@ var marketName = getMarketName(outcomeId, dictionaries); | ||
lpAddress: lpAddress, | ||
coreAddress: coreAddress, | ||
coreAddress: core.address, | ||
}; | ||
@@ -22,0 +22,0 @@ // it's important to use "marketKey" because it's unique |
@@ -15,3 +15,2 @@ import { type Dictionaries } from '@azuro-org/dictionaries'; | ||
lpAddress: string; | ||
coreAddress: string; | ||
conditions: { | ||
@@ -22,2 +21,5 @@ [key: string]: any; | ||
outcomeId: string; | ||
core: { | ||
address: string; | ||
}; | ||
}[]; | ||
@@ -24,0 +26,0 @@ }[]; |
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var dictionaries=require('@azuro-org/dictionaries');function aggregateOutcomesByMarkets(props) { | ||
var lpAddress = props.lpAddress, coreAddress = props.coreAddress, conditions = props.conditions, dictionaries$1 = props.dictionaries; | ||
var lpAddress = props.lpAddress, conditions = props.conditions, dictionaries$1 = props.dictionaries; | ||
// group conditions by marketId | ||
@@ -9,3 +9,3 @@ var outcomesByMarketKey = {}; | ||
outcomes.forEach(function (_a) { | ||
var outcomeId = _a.outcomeId; | ||
var outcomeId = _a.outcomeId, core = _a.core; | ||
var marketKey = dictionaries.getMarketKey(outcomeId, dictionaries$1); | ||
@@ -19,3 +19,3 @@ var marketName = dictionaries.getMarketName(outcomeId, dictionaries$1); | ||
lpAddress: lpAddress, | ||
coreAddress: coreAddress, | ||
coreAddress: core.address, | ||
}; | ||
@@ -22,0 +22,0 @@ // it's important to use "marketKey" because it's unique |
{ | ||
"name": "@azuro-org/toolkit", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Set of helpers to work with Azuro protocol", | ||
@@ -5,0 +5,0 @@ "module": "dist/index.es.js", |
14322
231