Fixed wrapped SOL in settle_funds by adding the missing signer. (#83)
This commit is contained in:
parent
954732976d
commit
4ab65b0de7
|
@ -158,12 +158,14 @@ class AsyncMarket(MarketCore):
|
|||
min_bal_for_rent_exemption = mbfre_resp["result"]
|
||||
else:
|
||||
min_bal_for_rent_exemption = 0 # value only matters if should_wrap_sol
|
||||
signers = [owner]
|
||||
transaction = self._build_settle_funds_tx(
|
||||
owner=owner,
|
||||
signers=signers,
|
||||
open_orders=open_orders,
|
||||
base_wallet=base_wallet,
|
||||
quote_wallet=quote_wallet,
|
||||
min_bal_for_rent_exemption=min_bal_for_rent_exemption,
|
||||
should_wrap_sol=should_wrap_sol,
|
||||
)
|
||||
return await self._conn.send_transaction(transaction, owner, opts=opts)
|
||||
return await self._conn.send_transaction(transaction, *signers, opts=opts)
|
||||
|
|
|
@ -377,6 +377,7 @@ class MarketCore:
|
|||
def _build_settle_funds_tx( # pylint: disable=too-many-arguments
|
||||
self,
|
||||
owner: Account,
|
||||
signers: List[Account],
|
||||
open_orders: Union[OpenOrdersAccount, AsyncOpenOrdersAccount],
|
||||
base_wallet: PublicKey,
|
||||
quote_wallet: PublicKey, # TODO: add referrer_quote_wallet.
|
||||
|
@ -391,7 +392,6 @@ class MarketCore:
|
|||
self.state.program_id(),
|
||||
)
|
||||
transaction = Transaction()
|
||||
signers: List[Account] = [owner]
|
||||
|
||||
if should_wrap_sol:
|
||||
wrapped_sol_account = Account()
|
||||
|
|
|
@ -156,12 +156,14 @@ class Market(MarketCore):
|
|||
min_bal_for_rent_exemption = (
|
||||
self._conn.get_minimum_balance_for_rent_exemption(165)["result"] if should_wrap_sol else 0
|
||||
) # value only matters if should_wrap_sol
|
||||
signers = [owner]
|
||||
transaction = self._build_settle_funds_tx(
|
||||
owner=owner,
|
||||
signers=signers,
|
||||
open_orders=open_orders,
|
||||
base_wallet=base_wallet,
|
||||
quote_wallet=quote_wallet,
|
||||
min_bal_for_rent_exemption=min_bal_for_rent_exemption,
|
||||
should_wrap_sol=should_wrap_sol,
|
||||
)
|
||||
return self._conn.send_transaction(transaction, owner, opts=opts)
|
||||
return self._conn.send_transaction(transaction, *signers, opts=opts)
|
||||
|
|
Loading…
Reference in New Issue