Skip to content

Commit cda8882

Browse files
committed
Only fetch and show NFTs that are known to work
1 parent 101d098 commit cda8882

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Seabug/Contract/MarketPlaceListNft.purs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Contract.Prelude
99
import Contract.Address (getNetworkId, typedValidatorEnterpriseAddress)
1010
import Contract.Monad (Contract, liftContractE, liftedM)
1111
import Contract.PlutusData (fromData, getDatumsByHashes)
12+
import Contract.Prim.ByteArray (hexToByteArrayUnsafe)
1213
import Contract.Transaction
1314
( TransactionInput
1415
, TransactionOutput(TransactionOutput)
@@ -59,6 +60,16 @@ marketPlaceListNft = do
5960
=<< (_ `Map.lookup` datums)
6061
=<< out.dataHash
6162
guard $ valueOf out.amount curr name == one
63+
-- TODO: this is a temporary solution to only show NFTs
64+
-- known to work. When minting an NFT, the sgNft's
65+
-- transaction hash should be added here
66+
guard $ any
67+
( \txHash -> (unwrap input # _.transactionId) ==
68+
(wrap $ hexToByteArrayUnsafe txHash)
69+
)
70+
[ "db55d6708d1d38c3a85b498c89cf34ef1bcf40295092fcbff2550daefe289cd1"
71+
, "ee692437895d27c92f34f6fb43ccc8ed14fec0a4ea2274073dcf07a8cf0662a6"
72+
]
6273
metadata <- MaybeT $ map hush $
6374
getFullSeabugMetadataWithBackoff (curr /\ name) projectId
6475
pure { input, output, metadata }

0 commit comments

Comments
 (0)