@yodlpay/payment-decoder 1.3.1 → 1.3.2

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -269,7 +269,12 @@ function areMirrorTransfers(a, b) {
269
269
  }
270
270
  function detectMirrorTokens(allTransfers) {
271
271
  const mirrors = /* @__PURE__ */ new Map();
272
- const byToken = Map.groupBy(allTransfers, (t) => getAddress(t.token));
272
+ const byToken = /* @__PURE__ */ new Map();
273
+ for (const t of allTransfers) {
274
+ const key = getAddress(t.token);
275
+ const group = byToken.get(key);
276
+ group ? group.push(t) : byToken.set(key, [t]);
277
+ }
273
278
  const tokens = [...byToken.keys()];
274
279
  for (const [i, tokenA] of tokens.entries()) {
275
280
  if (mirrors.has(tokenA)) continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yodlpay/payment-decoder",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Decode Yodl payment hashes into structured payment data",
5
5
  "keywords": [
6
6
  "yodl",