Skip to content

Commit

Permalink
fix: don't make buffer account if it exists (#47)
Browse files Browse the repository at this point in the history
* fix: don't make buffer account if it exists

* chore: bump patch version
  • Loading branch information
ali-bahjati authored Sep 17, 2024
1 parent b941e7c commit fc513f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions program_admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,15 +724,16 @@ async def sync_price_store(
lamports,
)

if not (await account_exists(self.rpc_endpoint, buffer_account)):
instructions.append(create_buffer_instruction)

initialize_publisher_config_instruction = initialize_publisher_config(
self.price_store_key,
publisher,
authority.public_key,
buffer_account,
)

instructions.extend(
[create_buffer_instruction, initialize_publisher_config_instruction]
)
instructions.append(initialize_publisher_config_instruction)

return (instructions, [authority])
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ known_local_folder = ["program_admin"]
authors = ["Thomaz <thomaz@pyth.network>"]
description = "Syncs products and publishers of the Pyth program"
name = "program-admin"
version = "0.1.5"
version = "0.1.6"

[tool.poetry.dependencies]
click = "^8.1.0"
Expand Down

0 comments on commit fc513f0

Please sign in to comment.