Comparing version 10.4.2 to 10.4.3
@@ -26,11 +26,14 @@ "use strict"; | ||
// Read extra currencies | ||
const extraCurrencies = slice.readOptDict(32, (s) => s.readVarUIntNumber(5)); | ||
let extraCurrenciesConverted = null; | ||
if (extraCurrencies) { | ||
extraCurrenciesConverted = new Map(); | ||
for (let e of extraCurrencies) { | ||
extraCurrenciesConverted.set(parseInt(e[0], 10), e[1]); | ||
let extraCurrencies = null; | ||
if (slice.readBit()) { | ||
let dc = slice.readCell(); | ||
if (!dc.isExotic) { | ||
let pd = (0, parseDict_1.parseDict)(dc.beginParse(), 32, (s) => s.readVarUIntNumber(5)); | ||
extraCurrencies = new Map(); | ||
for (let e of pd) { | ||
extraCurrencies.set(parseInt(e[0], 10), e[1]); | ||
} | ||
} | ||
} | ||
return { extraCurrencies: extraCurrenciesConverted, coins }; | ||
return { extraCurrencies, coins }; | ||
} | ||
@@ -37,0 +40,0 @@ exports.parseCurrencyCollection = parseCurrencyCollection; |
@@ -31,4 +31,5 @@ /// <reference types="bn.js" /> | ||
readCell: () => Cell; | ||
preloadCell: () => Cell; | ||
clone: () => Slice; | ||
toCell: () => Cell; | ||
} |
@@ -91,2 +91,11 @@ "use strict"; | ||
}; | ||
this.preloadCell = () => { | ||
let first = this.refs[0]; | ||
if (first) { | ||
return first; | ||
} | ||
else { | ||
throw Error('No ref'); | ||
} | ||
}; | ||
this.clone = () => { | ||
@@ -93,0 +102,0 @@ // Copy remaining |
{ | ||
"name": "ton", | ||
"version": "10.4.2", | ||
"version": "10.4.3", | ||
"repository": "https://github.com/tonwhales/ton.git", | ||
@@ -5,0 +5,0 @@ "author": "Steve Korshakov <steve@korshakov.com>", |
365340
9424