Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
lorisleiva committed Mar 21, 2024
1 parent ce00f97 commit c91d968
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export {{ 'async' if useAsync }} function {{ functionName }}<{{ typeParamsFragme
{{ resolvedFragment }}

{% if hasAccounts %}
const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');
const getAccountMeta = getAccountMetaFactory(programAddress, '{{ 'omitted' if instruction.optionalAccountStrategy === 'omitted' else 'programId' }}');
{% endif %}
const instruction = {
{%- if hasAccounts -%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ export function getValidateInstruction<
'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;
}

const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');
const getAccountMeta = getAccountMetaFactory(programAddress, 'omitted');
const instruction = {
accounts: [
getAccountMeta(accounts.payer),
Expand All @@ -388,7 +388,7 @@ export function getValidateInstruction<
getAccountMeta(accounts.optRuleNonsigner3),
getAccountMeta(accounts.optRuleNonsigner4),
getAccountMeta(accounts.optRuleNonsigner5),
].filter(<T>(x: T | undefined): x is T => x !== undefined),
].filter(<T,>(x: T | undefined): x is T => x !== undefined),
programAddress,
data: getValidateInstructionDataEncoder().encode(
args as ValidateInstructionDataArgs
Expand Down

0 comments on commit c91d968

Please sign in to comment.