SmartTokenLabs / TokenScript

TokenScript schema, specs and paper
http://tokenscript.org
MIT License
242 stars 71 forks source link

misalignment which might be triggered by an actvitiy view in the default ERC20 TokenScript #382

Open zhangzhongnan928 opened 4 years ago

zhangzhongnan928 commented 4 years ago

I think the views need to be tweaked. Eg. format the token values so they are 4 decimal places. The following screenshot was on iOS

Note that there is actually no ERC20 transactions between

0xca38ecae4441c36e16a9b2b3e67f9923b2f8ff4b6e36fcfc5c753644793b64e3

and

0xca38ecae4441c36e16a9b2b3e67f9923b2f8ff4b6e36fcfc5c753644793b64e3

(involving 0.000087058686687515 and 0.407994623666129863 units being transferred, respectively)

@hboon said:

The problem should also go away if we remove the views from the overriding TokenScript file if/since they look the same as the native version.

SmartLayer commented 3 years ago

Unrelated to, but reported by Victor together with https://github.com/AlphaWallet/alpha-wallet-ios/issues/2140

hboon commented 3 years ago

misalignment which might be triggered by an actvitiy view in the default ERC20 TokenScript

Not necessary in the default ERC20 TokenScript because the iOS TokenScript engine doesn't use the activity views defined in the base ERC20 TokenScript files. It's natively rendered. There's likely a separate overriding (or from the repo) TokenScript file installed for aETH here. That's the one that should be fixed.

(At the risk of being long-winded: it might be a problem in the default ERC20 TokenScript file if the aETH activity views were copied from it)