Added 'processed' commitment to client calls where it was missing.
This commit is contained in:
parent
206a95e39a
commit
f4e034a943
|
@ -56,7 +56,7 @@ class AccountInfo:
|
|||
|
||||
@staticmethod
|
||||
def load(context: Context, address: PublicKey) -> typing.Optional["AccountInfo"]:
|
||||
response: RPCResponse = context.client.get_account_info(address)
|
||||
response: RPCResponse = context.client.get_account_info(address, commitment=context.commitment)
|
||||
result = context.unwrap_or_raise_exception(response)
|
||||
if result["value"] is None:
|
||||
return None
|
||||
|
|
|
@ -471,7 +471,8 @@ class CreateSplAccountInstructionBuilder(InstructionBuilder):
|
|||
self.lamports: int = lamports
|
||||
|
||||
def build(self) -> TransactionInstruction:
|
||||
minimum_balance_response = self.context.client.get_minimum_balance_for_rent_exemption(ACCOUNT_LEN)
|
||||
minimum_balance_response = self.context.client.get_minimum_balance_for_rent_exemption(
|
||||
ACCOUNT_LEN, commitment=self.context.commitment)
|
||||
minimum_balance = self.context.unwrap_or_raise_exception(minimum_balance_response)
|
||||
return create_account(
|
||||
CreateAccountParams(self.wallet.address, self.address, self.lamports + minimum_balance, ACCOUNT_LEN, TOKEN_PROGRAM_ID))
|
||||
|
@ -543,7 +544,8 @@ class CreateSerumOpenOrdersInstructionBuilder(InstructionBuilder):
|
|||
self.open_orders_address: PublicKey = open_orders_address
|
||||
|
||||
def build(self) -> TransactionInstruction:
|
||||
response = self.context.client.get_minimum_balance_for_rent_exemption(layouts.OPEN_ORDERS.sizeof())
|
||||
response = self.context.client.get_minimum_balance_for_rent_exemption(
|
||||
layouts.OPEN_ORDERS.sizeof(), commitment=self.context.commitment)
|
||||
balanced_needed = self.context.unwrap_or_raise_exception(response)
|
||||
instruction = make_create_account_instruction(
|
||||
owner_address=self.wallet.address,
|
||||
|
|
Loading…
Reference in New Issue