From 70e3ae7a875a46e8fd1caa10c3fdf3b93c5e310f Mon Sep 17 00:00:00 2001 From: seb Date: Fri, 16 Oct 2026 02:31:54 +0200 Subject: [PATCH] u --- src/index.js | 1 + src/store/payment/create.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/index.js b/src/index.js index 050f735..5cbeb60 100644 --- a/src/index.js +++ b/src/index.js @@ -666,6 +666,7 @@ export default class LibDashStore { this.purge = storePurge(provider); this.initialize = storeInitialize(provider); + this.transaction = (fn) => provider.transaction(fn); return this.initialize().then(() => this); } diff --git a/src/store/payment/create.js b/src/store/payment/create.js index 396a9f2..d446916 100644 --- a/src/store/payment/create.js +++ b/src/store/payment/create.js @@ -69,6 +69,9 @@ export default function create(provider) { return shape(row); }; + if (tx) { + return run(makeRunner(provider, tx), tx); + } if (typeof provider?.transaction === 'function') { return provider.transaction((runner, innerTx) => run(runner, innerTx)); }