@polymarbot/shared 0.5.3 → 0.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polymarbot/shared",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "type": "module",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
@@ -80,7 +80,6 @@ interface TokenTradeStepOrder {
80
80
  size: number;
81
81
  status: string;
82
82
  updatedAt: number;
83
- expiresAt?: number;
84
83
  keep?: boolean;
85
84
  }
86
85
 
@@ -80,7 +80,6 @@ interface TokenTradeStepOrder {
80
80
  size: number;
81
81
  status: string;
82
82
  updatedAt: number;
83
- expiresAt?: number;
84
83
  keep?: boolean;
85
84
  }
86
85
 
package/wallet.cjs CHANGED
@@ -59,7 +59,8 @@ var getPublicClient = /* @__PURE__ */ (() => {
59
59
  };
60
60
  })();
61
61
  function formatBalance(rawBalance, decimals = USDC_DECIMALS) {
62
- return parseFloat((0, import_viem.formatUnits)(BigInt(rawBalance), decimals)).toFixed(2);
62
+ const num = parseFloat((0, import_viem.formatUnits)(BigInt(rawBalance), decimals));
63
+ return (Math.floor(num * 100) / 100).toFixed(2);
63
64
  }
64
65
  async function getUSDCBalance(address) {
65
66
  const publicClient = getPublicClient();
package/wallet.js CHANGED
@@ -30,7 +30,8 @@ var getPublicClient = /* @__PURE__ */ (() => {
30
30
  };
31
31
  })();
32
32
  function formatBalance(rawBalance, decimals = USDC_DECIMALS) {
33
- return parseFloat(formatUnits(BigInt(rawBalance), decimals)).toFixed(2);
33
+ const num = parseFloat(formatUnits(BigInt(rawBalance), decimals));
34
+ return (Math.floor(num * 100) / 100).toFixed(2);
34
35
  }
35
36
  async function getUSDCBalance(address) {
36
37
  const publicClient = getPublicClient();