(d: Decoder, fields: Iterator<string>)
| 567 | } |
| 568 | |
| 569 | function processMarketRuleMsg(d: Decoder, fields: Iterator<string>): void { |
| 570 | decodeInt(fields) // msgId |
| 571 | const marketRuleId = decodeInt(fields) |
| 572 | |
| 573 | const nPriceIncrements = decodeInt(fields) |
| 574 | const priceIncrements: PriceIncrement[] = [] |
| 575 | |
| 576 | if (nPriceIncrements > 0) { |
| 577 | for (let i = 0; i < nPriceIncrements; i++) { |
| 578 | const prcInc = new PriceIncrement() |
| 579 | prcInc.lowEdge = decodeFloat(fields) |
| 580 | prcInc.increment = decodeFloat(fields) |
| 581 | priceIncrements.push(prcInc) |
| 582 | } |
| 583 | } |
| 584 | |
| 585 | d.wrapper.marketRule(marketRuleId, priceIncrements) |
| 586 | } |
| 587 | |
| 588 | // --------------------------------------------------------------------------- |
| 589 | // Protobuf handlers |
nothing calls this directly
no test coverage detected