Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settle_funds got signature issue. #109

Open
jimmyntu opened this issue May 1, 2022 · 1 comment
Open

Settle_funds got signature issue. #109

jimmyntu opened this issue May 1, 2022 · 1 comment

Comments

@jimmyntu
Copy link

jimmyntu commented May 1, 2022

Hi, I'm facing the error "transaction has not been signed correctly" when calling settle_funds. For way to reproduce:

  1. place order for SOL/USDC buy pair
  2. cancel the order
  3. settle back to the account.

Sample code:

result = market.settle_funds(
    owner=wallet, 
    open_orders=open_order_account, 
    base_wallet = PublicKey('....'),  # account for wrapped SOL
    quote_wallet = PublicKey('....'),  # account for USDC, this should where the balance of USDC goes to, after cancel the order.
    opts=TxOpts(skip_preflight=True))

print(f'Settle funds {result}')

Exception:

Traceback (most recent call last):
  File "/Users/xxxx/test/test-serum.py", line 108, in <module>
    result = market.settle_funds(
  File "/usr/local/lib/python3.9/site-packages/pyserum/market/market.py", line 169, in settle_funds
    return self._conn.send_transaction(transaction, owner, opts=opts)
  File "/usr/local/lib/python3.9/site-packages/solana/rpc/api.py", line 1281, in send_transaction
    txn_resp = self.send_raw_transaction(txn.serialize(), opts=opts)
  File "/usr/local/lib/python3.9/site-packages/solana/transaction.py", line 368, in serialize
    raise AttributeError("transaction has not been signed correctly")
AttributeError: transaction has not been signed correctly
@v0idum
Copy link

v0idum commented May 16, 2022

image
Going to settle_funds() method in market.py and updating line 169 to return self._conn.send_transaction(transaction, *signers, opts=opts) helped me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants