@deriverse/kit 1.0.3 → 1.0.4
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.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +18 -2
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -239,6 +239,12 @@ class Engine {
|
|
|
239
239
|
else {
|
|
240
240
|
this.commitment = args.commitment;
|
|
241
241
|
}
|
|
242
|
+
if (args == undefined || args.uiNumbers == null || args.uiNumbers == undefined) {
|
|
243
|
+
this.uiNumbers = true;
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
this.uiNumbers = args.uiNumbers;
|
|
247
|
+
}
|
|
242
248
|
}
|
|
243
249
|
logsDecode(data) {
|
|
244
250
|
let assetTokenDec = null;
|
|
@@ -1231,8 +1237,18 @@ class Engine {
|
|
|
1231
1237
|
});
|
|
1232
1238
|
}
|
|
1233
1239
|
tokenDec(tokenId) {
|
|
1234
|
-
|
|
1235
|
-
|
|
1240
|
+
if (this.uiNumbers) {
|
|
1241
|
+
const token = this.tokens.get(tokenId);
|
|
1242
|
+
if (token) {
|
|
1243
|
+
return Math.pow(10, token.mask & 0xFF);
|
|
1244
|
+
}
|
|
1245
|
+
else {
|
|
1246
|
+
return 1;
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
else {
|
|
1250
|
+
return 1;
|
|
1251
|
+
}
|
|
1236
1252
|
}
|
|
1237
1253
|
/**
|
|
1238
1254
|
* Get general information about open orders in particular instrument (spot)
|
package/dist/types.d.ts
CHANGED