Skip to content

Commit

Permalink
remove useless if-else
Browse files Browse the repository at this point in the history
  • Loading branch information
ayazabbas committed Jun 28, 2024
1 parent d9713bf commit 10ebc91
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions program_admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,26 +228,19 @@ async def sync(
# Fetch program accounts from the network
await self.refresh_program_accounts()

if ref_authority_permissions:
# Sync authority permissions
(
authority_instructions,
authority_signers,
) = await self.sync_authority_permissions_instructions(
ref_authority_permissions
)
# Sync authority permissions
(
authority_instructions,
authority_signers,
) = await self.sync_authority_permissions_instructions(
ref_authority_permissions
)

if authority_instructions:
instructions.extend(authority_instructions)
if authority_instructions:
instructions.extend(authority_instructions)

if send_transactions:
await self.send_transaction(
authority_instructions, authority_signers
)
else:
logger.debug(
"Reference data for authority permissions is not defined, skipping..."
)
if send_transactions:
await self.send_transaction(authority_instructions, authority_signers)

# Sync mapping accounts
mapping_instructions, mapping_keypairs = await self.sync_mapping_instructions(
Expand Down

0 comments on commit 10ebc91

Please sign in to comment.