Skip to content

Commit fc513f0

Browse files
authored
fix: don't make buffer account if it exists (#47)
* fix: don't make buffer account if it exists * chore: bump patch version
1 parent b941e7c commit fc513f0

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

program_admin/__init__.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -724,15 +724,16 @@ async def sync_price_store(
724724
lamports,
725725
)
726726

727+
if not (await account_exists(self.rpc_endpoint, buffer_account)):
728+
instructions.append(create_buffer_instruction)
729+
727730
initialize_publisher_config_instruction = initialize_publisher_config(
728731
self.price_store_key,
729732
publisher,
730733
authority.public_key,
731734
buffer_account,
732735
)
733736

734-
instructions.extend(
735-
[create_buffer_instruction, initialize_publisher_config_instruction]
736-
)
737+
instructions.append(initialize_publisher_config_instruction)
737738

738739
return (instructions, [authority])

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ known_local_folder = ["program_admin"]
99
authors = ["Thomaz <[email protected]>"]
1010
description = "Syncs products and publishers of the Pyth program"
1111
name = "program-admin"
12-
version = "0.1.5"
12+
version = "0.1.6"
1313

1414
[tool.poetry.dependencies]
1515
click = "^8.1.0"

0 commit comments

Comments
 (0)