Skip to content

Commit

Permalink
make programId/address input into getFee optional
Browse files Browse the repository at this point in the history
  • Loading branch information
nazreen committed Dec 19, 2024
1 parent 9ac6f6a commit 8fbdfb1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/oft-solana/tasks/solana/getPrioFees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface GetPrioFeesTaskArgs {

task('lz:solana:get-priority-fees', 'Fetches prioritization fees from the Solana network')
.addParam('eid', 'The endpoint ID for the Solana network', undefined, devtoolsTypes.eid)
.addParam(
.addOptionalParam(
'address',
'The address (program ID or account address) that will be written to',
undefined,
Expand Down
4 changes: 2 additions & 2 deletions examples/oft-solana/tasks/utils/getFee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ interface Config {

const getPrioritizationFees = async (
connection: Connection,
programId: string
programId?: string // TODO: change to array of addresses / public keys to match lockedWritableAccounts' type
): Promise<{
averageFeeIncludingZeros: number
averageFeeExcludingZeros: number
medianFee: number
}> => {
try {
const publicKey = new PublicKey(programId) // the account that will be written to
const publicKey = new PublicKey(programId || PublicKey.default) // the account that will be written to

const config: Config = {
lockedWritableAccounts: [publicKey],
Expand Down

0 comments on commit 8fbdfb1

Please sign in to comment.