Skip to content

Commit

Permalink
Update sendSmartTransaction's lastValidBlockHeightOffset type definit…
Browse files Browse the repository at this point in the history
…ion (#132)

lastValidBlockHeightOffset is meant to default to 150, and should not be required by the consumer to specify. So I'm simply updating the type here to be an optional parameter because if we don't the change would be seemingly non-backwards-compatible (users can just specify lastValidBlockHeightOffset of 150 though) and would require a major version change otherwise
  • Loading branch information
chukwumaokere authored Aug 17, 2024
1 parent aca3ade commit acea551
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RpcClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ export class RpcClient {
lookupTables: AddressLookupTableAccount[] = [],
sendOptions: SendOptions & {
feePayer?: Signer;
lastValidBlockHeightOffset: number;
lastValidBlockHeightOffset?: number;
} = { skipPreflight: false, lastValidBlockHeightOffset: 150 }
): Promise<TransactionSignature> {
if (sendOptions.lastValidBlockHeightOffset < 0)
Expand Down

0 comments on commit acea551

Please sign in to comment.