@daimo/pay
Version:
Seamless crypto payments. Onboard users from any chain, any coin into your app with one click.
19 lines (16 loc) • 530 B
JavaScript
import { waitForState, createStore } from '../stateStore.js';
import { paymentReducer, initialPaymentState } from './paymentFsm.js';
function createPaymentStore() {
const store = createStore(paymentReducer, initialPaymentState);
return store;
}
function waitForPaymentState(store, ...validTypes) {
return waitForState(
store,
(s) => validTypes.includes(s.type),
(s) => s.type === "error",
(s) => s.message
);
}
export { createPaymentStore, waitForPaymentState };
//# sourceMappingURL=paymentStore.js.map