@pafi-dev/issuer 0.28.0 → 0.29.0
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.cjs +38 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +38 -8
- package/dist/index.js.map +1 -1
- package/package.json +12 -12
package/dist/index.cjs
CHANGED
|
@@ -2648,13 +2648,43 @@ async function handleClaimStatus(params) {
|
|
|
2648
2648
|
lock.userOpHash
|
|
2649
2649
|
);
|
|
2650
2650
|
if (receipt) {
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2651
|
+
if (receipt.success && receipt.txHash) {
|
|
2652
|
+
if (!lock.tokenAddress) {
|
|
2653
|
+
params.onWarning?.(
|
|
2654
|
+
`handleClaimStatus: lock ${lock.lockId} has no tokenAddress; falling back to status-only flip (PACI5-24 defence degraded). Migrate the ledger to the multi-token schema.`
|
|
2655
|
+
);
|
|
2656
|
+
await params.ledger.updateMintStatus(lock.lockId, "MINTED", receipt.txHash).catch((err) => {
|
|
2657
|
+
params.onWarning?.(
|
|
2658
|
+
`handleClaimStatus: ledger updateMintStatus failed for lock ${lock.lockId}: ${err}`
|
|
2659
|
+
);
|
|
2660
|
+
});
|
|
2661
|
+
status = "MINTED";
|
|
2662
|
+
txHash = receipt.txHash;
|
|
2663
|
+
} else {
|
|
2664
|
+
try {
|
|
2665
|
+
await params.ledger.deductBalance(
|
|
2666
|
+
lock.userAddress,
|
|
2667
|
+
lock.amount,
|
|
2668
|
+
receipt.txHash,
|
|
2669
|
+
lock.tokenAddress
|
|
2670
|
+
);
|
|
2671
|
+
status = "MINTED";
|
|
2672
|
+
txHash = receipt.txHash;
|
|
2673
|
+
} catch (deductErr) {
|
|
2674
|
+
params.onWarning?.(
|
|
2675
|
+
`handleClaimStatus: deductBalance failed for lock ${lock.lockId}: ${deductErr}`
|
|
2676
|
+
);
|
|
2677
|
+
}
|
|
2678
|
+
}
|
|
2679
|
+
} else {
|
|
2680
|
+
await params.ledger.updateMintStatus(lock.lockId, "FAILED", receipt.txHash).catch((err) => {
|
|
2681
|
+
params.onWarning?.(
|
|
2682
|
+
`handleClaimStatus: ledger updateMintStatus failed for lock ${lock.lockId}: ${err}`
|
|
2683
|
+
);
|
|
2684
|
+
});
|
|
2685
|
+
status = "FAILED";
|
|
2686
|
+
txHash = receipt.txHash;
|
|
2687
|
+
}
|
|
2658
2688
|
}
|
|
2659
2689
|
} catch (err) {
|
|
2660
2690
|
params.onWarning?.(
|
|
@@ -5213,7 +5243,7 @@ var MemoryRedemptionHistoryStore = class {
|
|
|
5213
5243
|
};
|
|
5214
5244
|
|
|
5215
5245
|
// src/index.ts
|
|
5216
|
-
var PAFI_ISSUER_SDK_VERSION = true ? "0.28.
|
|
5246
|
+
var PAFI_ISSUER_SDK_VERSION = true ? "0.28.1" : "dev";
|
|
5217
5247
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5218
5248
|
0 && (module.exports = {
|
|
5219
5249
|
AdapterMisconfiguredError,
|