neo-project / neo-modules

MIT License
60 stars 100 forks source link

getbalance isn't able to return value when invoking non-native nep5 sc #182

Closed superboyiii closed 4 years ago

superboyiii commented 4 years ago

I deployed an nep5 sc and it works well when making transaction and RpcNepTracker is able to catch its balance and transaction record. Then I made a wallet with two addresses. One has nep5 asset, the other is a clean address. However when I tried to invoke getbalance via RPC, it always return 0 on value . Then I made a single-address wallet within nep5 asset, it did return correct value. And when I invoke native sc (neo and gas), it always returns correct value. I think there might be some issues happened when balance=0 (Maybe it doesn't return 0 but null). image

bettybao1209 commented 4 years ago

image The balanceOf method in my nep5 sc can output the result correctly. I think the issue may be caused here.