- Yeah, the transactions happen in a background worker. I'm working on a way to update the list when the sale actually happens. But that is still in the early design stages.
- The "market" list filters out your own items, so you don't accidently buy from yourself. You can filter or sort the "Market" column in "My NFT" to see your listings.
- The lists (My NFT, Market, etc) are pre-filtered (server side forced filters) lists. So the label at the bottom gets a bit confused. I'll have to fix that some day, but my ListAndEdit module isn't the easiest to maintain. It's super practical and i use it a lot, but over the years of extending it the code has had a bit of a spaghettification problem..
On the bright side, you can use ListAndEdit to just configure complex webmasks without writing code. For example, here is all i needed to implement the whole of "My NFT":
<module>
<modname>xpd_user_nft</modname>
<pm>ListAndEdit::Main</pm>
<options>
<db>maindb</db>
<pagetitle>My NFT</pagetitle>
<webpath>/xpd/nft/mynft</webpath>
<table>xpd.nft</table>
<primarykey>
<item column="nft_id"/>
</primarykey>
<orderby>creation_time DESC</orderby>
<session>sessionsettings</session>
<guess_stats>1</guess_stats>
<column_filters>1</column_filters>
<candelete>0</candelete>
<cancreate>0</cancreate>
<useserial>0</useserial>
<list>
<item header="ID" column="nft_id" type="text"/>
<item header="Time" column="creation_time" type="date"
+/>
<item header="Creator" column="creator" type="text"/>
<item header="Title" column="title" type="text"/>
<item header="Description" column="description" type="
+text"/>
<item header="Image" column="image_data_base64" type="
+image"/>
<item header="Price" column="sale_price" type="text"/>
<item header="Market" column="sell_on_market" type="bo
+olean"/>
</list>
<edit>
<item header="ID" column="nft_id" type="display"/>
<item header="Time" column="creation_time" type="displ
+ay"/>
<item header="Creator" column="creator" type="display"
+/>
<item header="Title" column="title" type="display"/>
<item header="Description" column="description" type="
+display"/>
<item header="Image" column="image_data_base64" type="
+imagedisplay"/>
<item header="Sell on market" column="sell_on_market"
+type="checkbox"/>
<item header="Price" column="sale_price" type="number"
+ value_min="0" value_max="1000000" step="1" hasdecimal="0"/>
</edit>
<restrict>
<item column="owner" value="USER"/>
</restrict>
</options>
</module>
The downside is that it takes a couple of big statemachines and a lot on startup validation&preparation code to make that work. For example, it checks against the configured database table and matches if the configured display/edit type is compatible with the column type.
perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'