Chia-Network / chia-blockchain

Chia blockchain python implementation (full node, farmer, harvester, timelord, and wallet)
Apache License 2.0
10.82k stars 2.03k forks source link

[Bug] Token-vs-NFT offer accept fails when token is just 1 mojo #14744

Closed andyharless closed 1 year ago

andyharless commented 1 year ago

What happened?

I created an offer file (posted on Dexie) to sell an NFT for 0.001 of a token (Asset ID 0fe711bf57d0222603a8d3e13df54b29382373ab2b05261c69667360a5738d64). I tried to accept the offer form another account. After clicking the "accept offer" button, I got "Error ('clvm raise', '80')". (That's from the Chia GUI. I got a different error trying to accept it from a different account on Pawket.) The offer is apparently still active, and the GUI still lets me click the button and gives the same error. Factors that may be relevant:

Version

1.7.0

What platform are you using?

Linux

What ui mode are you using?

GUI

Relevant log output

2023-03-04T15:57:52.701 wallet chia.wallet.wallet_state_manager: INFO     Start: Creating puzzle hashes from 730 to 730 for wallet_id: 11
2023-03-04T15:57:52.707 wallet chia.wallet.wallet_state_manager: INFO     Done: Creating puzzle hashes from 730 to 730 for wallet_id: 11 Time: 0.07550764083862305 seconds
2023-03-04T15:57:52.710 wallet chia.wallet.wallet_state_manager: INFO     Updating last used derivation index: 305
2023-03-04T15:57:52.717 wallet chia.wallet.cat_wallet.cat_wallet: INFO     Confirmed balance for cat wallet 11 is 11
2023-03-04T15:57:52.767 wallet chia.wallet.trade_manager  : ERROR    Error with creating trade offer: <class 'ValueError'>Traceback (most recent call last):
  File "chia/wallet/trade_manager.py", line 519, in _create_offer_for_ids
  File "chia/wallet/trade_manager.py", line 812, in check_for_special_offer_making
  File "chia/wallet/nft_wallet/nft_wallet.py", line 1048, in make_nft1_offer
  File "chia/wallet/outer_puzzles.py", line 58, in solve_puzzle
  File "chia/wallet/cat_wallet/cat_outer_puzzle.py", line 119, in solve
  File "chia/wallet/cat_wallet/cat_utils.py", line 113, in unsigned_spend_bundle_for_spendable_cats
  File "chia/util/condition_tools.py", line 127, in conditions_dict_for_solution
  File "chia/util/condition_tools.py", line 140, in conditions_for_solution
  File "chia/types/blockchain_format/program.py", line 117, in run_with_cost
  File "<string>", line 1, in <module>
ValueError: ('clvm raise', '80')

2023-03-04T15:57:52.768 wallet chia.rpc.rpc_server        : WARNING  Error while handling message: Traceback (most recent call last):
  File "chia/rpc/rpc_server.py", line 331, in safe_handle
  File "chia/rpc/rpc_server.py", line 322, in ws_api
  File "chia/rpc/wallet_rpc_api.py", line 1616, in take_offer
  File "chia/wallet/trade_manager.py", line 742, in respond_to_offer
ValueError: ('clvm raise', '80')
MumfMeisterT commented 1 year ago

You can try upgrading to the latest main and this should be resolved with a recent PR, and please let us know if this resolves. thx.

andyharless commented 1 year ago

I was able to successfully make and accept such an offer with version 1.8.0b4-dev30, so the issue appears to have been resolved.

trepca commented 1 year ago

Great, thanks.