From edcb58ee4785d39371b60fa76dc739f43326d56b Mon Sep 17 00:00:00 2001 From: Ali Behjati Date: Mon, 16 Sep 2024 18:58:37 +0200 Subject: [PATCH 1/2] fix: don't make buffer account if it exists --- program_admin/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/program_admin/__init__.py b/program_admin/__init__.py index 99cdb2d..1fa8dc7 100644 --- a/program_admin/__init__.py +++ b/program_admin/__init__.py @@ -724,6 +724,9 @@ 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, @@ -731,8 +734,6 @@ async def sync_price_store( buffer_account, ) - instructions.extend( - [create_buffer_instruction, initialize_publisher_config_instruction] - ) + instructions.append(initialize_publisher_config_instruction) return (instructions, [authority]) From 88ac2c72fc20e3cd3edfe86b44a7515c13f4a7de Mon Sep 17 00:00:00 2001 From: Ali Behjati Date: Tue, 17 Sep 2024 16:26:08 +0200 Subject: [PATCH 2/2] chore: bump patch version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4b527e4..4fe5f11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ known_local_folder = ["program_admin"] authors = ["Thomaz "] 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"