bitshares / bitshares-core

BitShares Blockchain node and command-line wallet
https://bitshares.github.io/
Other
1.17k stars 643 forks source link

Add return value (what and how much is refunded) to virtual `limit_order_cancel` operation #2729

Closed abitmore closed 1 year ago

abitmore commented 1 year ago

When a limit order is canceled due to expiration or because it is too small to fill, a virtual limit_order_cancel operation is recorded in account history. However, we didn't save the result of the operation correctly, it was always null_result ([0,{}]), but should be an asset object which indicates what and how much is refunded. This PR should fix it.

Example of old data:

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication