Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
wphan committed Jan 24, 2024
2 parents bade66d + 38a92a5 commit 21d3370
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions sdk/src/priorityFee/priorityFeeSubscriber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,22 @@ export class PriorityFeeSubscriber {
}

public async load(): Promise<void> {
if (this.priorityFeeMethod === PriorityFeeMethod.SOLANA) {
await this.loadForSolana();
} else if (this.priorityFeeMethod === PriorityFeeMethod.HELIUS) {
await this.loadForHelius();
} else {
throw new Error(`${this.priorityFeeMethod} load not implemented`);
try {
if (this.priorityFeeMethod === PriorityFeeMethod.SOLANA) {
await this.loadForSolana();
} else if (this.priorityFeeMethod === PriorityFeeMethod.HELIUS) {
await this.loadForHelius();
} else {
throw new Error(`${this.priorityFeeMethod} load not implemented`);
}
} catch (err) {
const e = err as Error;
console.error(
`Error loading priority fee ${this.priorityFeeMethod}: ${e.message}\n${
e.stack ? e.stack : ''
}`
);
return;
}
}

Expand Down

0 comments on commit 21d3370

Please sign in to comment.