Skip to content

Commit

Permalink
Pass projectAccessKey into MuxMessageProvider (#615)
Browse files Browse the repository at this point in the history
* Pass projectAccessKey into MuxMessageProvider

* Removing projectAccessKey from MuxMessageProvider constructor args
  • Loading branch information
corbanbrook authored Dec 3, 2024
1 parent 03b2b0b commit 446efdc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/provider/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export class SequenceClient {

constructor(transport: ProviderTransport | MuxTransportTemplate, store: ItemStore, options?: SequenceClientOptions) {
if (isMuxTransportTemplate(transport)) {
this.transport = MuxMessageProvider.new(transport)
this.transport = MuxMessageProvider.new(transport, options?.projectAccessKey)
} else if (isProviderTransport(transport)) {
this.transport = transport
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,10 @@ export function isMuxTransportTemplate(obj: any): obj is MuxTransportTemplate {
export class MuxMessageProvider implements ProviderTransport {
private messageProviders: ProviderTransport[]
private provider: ProviderTransport | undefined
private projectAccessKey?: string

constructor(messageProviders: ProviderTransport[] = [], projectAccessKey?: string) {
constructor(messageProviders: ProviderTransport[] = []) {
this.messageProviders = messageProviders
this.provider = undefined
this.projectAccessKey = projectAccessKey
}

static new(template: MuxTransportTemplate, projectAccessKey?: string): MuxMessageProvider {
Expand Down

0 comments on commit 446efdc

Please sign in to comment.