@unicitylabs/sphere-sdk 0.14.7 → 0.14.8
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/connect/index.cjs +1 -1
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +1 -1
- package/dist/connect/index.js.map +1 -1
- package/dist/core/index.cjs +22 -1
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +22 -1
- package/dist/core/index.js.map +1 -1
- package/dist/impl/browser/connect/index.cjs +1 -1
- package/dist/impl/browser/connect/index.cjs.map +1 -1
- package/dist/impl/browser/connect/index.js +1 -1
- package/dist/impl/browser/connect/index.js.map +1 -1
- package/dist/index.cjs +22 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/dist/modules/payments-v2/index.cjs +22 -1
- package/dist/modules/payments-v2/index.cjs.map +1 -1
- package/dist/modules/payments-v2/index.js +22 -1
- package/dist/modules/payments-v2/index.js.map +1 -1
- package/package.json +1 -1
package/dist/core/index.cjs
CHANGED
|
@@ -11627,16 +11627,37 @@ var TransferMachine = class {
|
|
|
11627
11627
|
...plan.memo !== void 0 ? { memo: plan.memo } : {}
|
|
11628
11628
|
};
|
|
11629
11629
|
const outcomes = [];
|
|
11630
|
+
const certified = [];
|
|
11630
11631
|
for (let at = 0; at < plan.ops.length; at += CERTIFY_WIDTH) {
|
|
11631
11632
|
const batch = plan.ops.slice(at, at + CERTIFY_WIDTH);
|
|
11632
11633
|
const settled = await Promise.all(
|
|
11633
|
-
batch.map(
|
|
11634
|
+
batch.map(
|
|
11635
|
+
(op) => this.certifyOne(ctx, engine, op, plan.sources.get(op.sourceTokenId)).then((o) => {
|
|
11636
|
+
if (o.certified) {
|
|
11637
|
+
certified.push(o);
|
|
11638
|
+
this.emitProgress(plan, certified);
|
|
11639
|
+
}
|
|
11640
|
+
return o;
|
|
11641
|
+
})
|
|
11642
|
+
)
|
|
11634
11643
|
);
|
|
11635
11644
|
outcomes.push(...settled);
|
|
11636
11645
|
if (settled.some((o) => o.error !== void 0 && !o.certified)) break;
|
|
11637
11646
|
}
|
|
11638
11647
|
return outcomes;
|
|
11639
11648
|
}
|
|
11649
|
+
/** In-flight snapshot: `tokenTransfers` holds the legs certified SO FAR. */
|
|
11650
|
+
emitProgress(plan, certified) {
|
|
11651
|
+
this.deps.emit("transfer:updated", {
|
|
11652
|
+
id: plan.transferId,
|
|
11653
|
+
status: "submitted",
|
|
11654
|
+
tokens: [],
|
|
11655
|
+
tokenTransfers: certified.map((o) => ({
|
|
11656
|
+
sourceTokenId: o.op.sourceTokenId,
|
|
11657
|
+
method: o.op.kind
|
|
11658
|
+
}))
|
|
11659
|
+
});
|
|
11660
|
+
}
|
|
11640
11661
|
async certifyOne(ctx, engine, op, source) {
|
|
11641
11662
|
if (source === void 0) {
|
|
11642
11663
|
return {
|