UNPKG

@test-org122/merchant-iframe

Version:

Mediator iFrame package. This is used to sandbox the connector code away from the running hypernet core.

21 lines (16 loc) 649 B
import { MerchantContext } from "@merchant-iframe/interfaces/objects"; import { IContextProvider } from "@merchant-iframe/interfaces/utils"; import { IMerchantConnector } from "packages/merchant-connector/dist"; import { Subject } from "rxjs"; export class ContextProvider implements IContextProvider { protected context: MerchantContext; constructor(merchantUrl: URL) { this.context = new MerchantContext(merchantUrl, new Subject<IMerchantConnector>(), null, null, null); } getMerchantContext(): MerchantContext { return this.context; } setMerchantContext(context: MerchantContext): void { this.context = context; } }