fudgebucket27 / Lexplorer

Loopring explorer alternative
14 stars 10 forks source link

Alternative properties syntax causes metadata deserialisation to fail #210

Closed modersohn closed 2 years ago

modersohn commented 2 years ago

As mentioned at the end of #207 :

This is now causing problems with - IMO - malformed JSON, e.g. for 0x32f006a901505c8c015714cc4390f7f5447c1b07983b050c9cd92da90777584c.

The JSON looks like this:

{
   "image":"ipfs://QmTfNgyzsH6KhbFbawhNks1Xwm1pkh6ofMiXTfFYrupCXL",
   "name":"Welcome to L2",
   "royalty_percentage":10,
   "description":"Gifted with 💙 by @ThisBeTom via https://github.com/tomfuertes/free-loopring-nft",
   "properties":[
      {
         "key":"PowerTo",
         "value":"ThePlayers"
      },
      {
         "key":"Love",
         "value":"Everyone"
      },
      {
         "key":"AndTell",
         "value":"TheTruth"
      }
   ]
}

The problem is, that causes the whole deserialisation to fail, so it doesn't show any of the meta data.

We need to at least make it gracefully fail, but ideally we should support both syntaxes.