@argonprotocol/mainchain 1.3.4 → 1.3.5
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/browser/index.d.ts +1 -1
- package/browser/index.js +4 -4
- package/browser/index.js.map +1 -1
- package/lib/{chunk-QVXW4O7X.js → chunk-2J7IEVVC.js} +2 -2
- package/lib/{chunk-LB6BAURC.cjs → chunk-BP7Y2NWQ.cjs} +51 -51
- package/lib/{chunk-LB6BAURC.cjs.map → chunk-BP7Y2NWQ.cjs.map} +1 -1
- package/lib/{chunk-P3OMJABP.js → chunk-GZ2TLGCG.js} +5 -5
- package/lib/{chunk-P3OMJABP.js.map → chunk-GZ2TLGCG.js.map} +1 -1
- package/lib/{chunk-W5SOPU7I.cjs → chunk-P5WWWRSU.cjs} +5 -5
- package/lib/{chunk-W5SOPU7I.cjs.map → chunk-P5WWWRSU.cjs.map} +1 -1
- package/lib/cli.cjs +6 -6
- package/lib/cli.js +2 -2
- package/lib/clis/index.cjs +3 -3
- package/lib/clis/index.js +2 -2
- package/lib/index.cjs +2 -2
- package/lib/index.d.cts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +2 -2
- /package/lib/{chunk-QVXW4O7X.js.map → chunk-2J7IEVVC.js.map} +0 -0
package/browser/index.d.ts
CHANGED
|
@@ -11299,7 +11299,7 @@ declare class AccountRegistry {
|
|
|
11299
11299
|
}
|
|
11300
11300
|
|
|
11301
11301
|
declare const MICROGONS_PER_ARGON = 1000000;
|
|
11302
|
-
declare function formatArgons(
|
|
11302
|
+
declare function formatArgons(microgons: bigint | number): string;
|
|
11303
11303
|
declare function formatPercent(x: BigNumber | undefined): string;
|
|
11304
11304
|
type NonNullableProps<T> = {
|
|
11305
11305
|
[K in keyof T]-?: Exclude<T[K], undefined | null>;
|
package/browser/index.js
CHANGED
|
@@ -256,10 +256,10 @@ var TxResult = class {
|
|
|
256
256
|
};
|
|
257
257
|
var { ROUND_FLOOR } = BigNumber;
|
|
258
258
|
var MICROGONS_PER_ARGON = 1e6;
|
|
259
|
-
function formatArgons(
|
|
260
|
-
if (
|
|
261
|
-
const isNegative =
|
|
262
|
-
let format = BigNumber__default(
|
|
259
|
+
function formatArgons(microgons) {
|
|
260
|
+
if (microgons === void 0 || microgons === null) return "na";
|
|
261
|
+
const isNegative = microgons < 0;
|
|
262
|
+
let format = BigNumber__default(microgons.toString()).abs().div(MICROGONS_PER_ARGON).toFormat(2, ROUND_FLOOR);
|
|
263
263
|
if (format.endsWith(".00")) {
|
|
264
264
|
format = format.slice(0, -3);
|
|
265
265
|
}
|