@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.
@@ -11299,7 +11299,7 @@ declare class AccountRegistry {
11299
11299
  }
11300
11300
 
11301
11301
  declare const MICROGONS_PER_ARGON = 1000000;
11302
- declare function formatArgons(x: bigint | number): string;
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(x) {
260
- if (x === void 0 || x === null) return "na";
261
- const isNegative = x < 0;
262
- let format = BigNumber__default(x.toString()).abs().div(MICROGONS_PER_ARGON).toFormat(2, ROUND_FLOOR);
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
  }