Skip to content

Commit

Permalink
fix _create_multisig_args
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey committed Jul 5, 2024
1 parent 1c54661 commit 37b4b75
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/spl/token/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ async def create_multisig(
recent_blockhash_to_use = (
(await self._conn.get_latest_blockhash()).value.blockhash if recent_blockhash is None else recent_blockhash
)
txn, payer, multisig = self._create_multisig_args(m, multi_signers, balance_needed, recent_blockhash_to_use)
txn, multisig = self._create_multisig_args(m, multi_signers, balance_needed, recent_blockhash_to_use)
opts_to_use = TxOpts(preflight_commitment=self._conn.commitment) if opts is None else opts
await self._conn.send_transaction(txn, opts=opts_to_use)
return multisig.pubkey()
Expand Down
2 changes: 1 addition & 1 deletion src/spl/token/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def create_multisig(
recent_blockhash_to_use = (
self._conn.get_latest_blockhash().value.blockhash if recent_blockhash is None else recent_blockhash
)
txn, payer, multisig = self._create_multisig_args(m, multi_signers, balance_needed, recent_blockhash_to_use)
txn, multisig = self._create_multisig_args(m, multi_signers, balance_needed, recent_blockhash_to_use)
opts_to_use = TxOpts(preflight_commitment=self._conn.commitment) if opts is None else opts
self._conn.send_transaction(txn, opts=opts_to_use)
return multisig.pubkey()
Expand Down
6 changes: 3 additions & 3 deletions src/spl/token/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ def _burn_args(

def _create_multisig_args(
self, m: int, signers: List[Pubkey], balance_needed: int, recent_blockhash: Blockhash
) -> Tuple[Transaction, Keypair, Keypair]:
) -> Tuple[Transaction, Keypair]:
multisig_keypair = Keypair()
ixs = [
sp.create_account(
Expand All @@ -632,8 +632,8 @@ def _create_multisig_args(
),
]
msg = Message.new_with_blockhash(ixs, self.payer.pubkey(), recent_blockhash)
txn = Transaction([self.payer], msg, recent_blockhash)
return txn, self.payer, multisig_keypair
txn = Transaction([self.payer, multisig_keypair], msg, recent_blockhash)
return txn, multisig_keypair

def _transfer_checked_args(
self,
Expand Down

0 comments on commit 37b4b75

Please sign in to comment.