- Fix timelock unlock signature error, add mainnet tests
- add relook test
Showing 1 of 3 files from the diff.
src/Binance/Serialization.cpp
changed.
Other files ignored by Codecov
tests/Binance/SignerTests.cpp
has changed.
swift/Tests/Blockchains/BinanceChainTests.swift
has changed.
@@ -125,14 +125,19 @@
Loading
125 | 125 | j["amount"] = tokensJSON(input.time_lock_order().amount()); |
|
126 | 126 | j["lock_time"] = input.time_lock_order().lock_time(); |
|
127 | 127 | } else if (input.has_time_relock_order()) { |
|
128 | + | const auto amount = input.time_relock_order().amount(); |
|
128 | 129 | j["from"] = addressString(input.time_relock_order().from_address()); |
|
129 | - | j["id"] = input.time_relock_order().id(); |
|
130 | + | j["time_lock_id"] = input.time_relock_order().id(); |
|
130 | 131 | j["description"] = input.time_relock_order().description(); |
|
131 | - | j["amount"] = tokensJSON(input.time_relock_order().amount()); |
|
132 | + | // if amount is empty or omitted, set null to avoid signature verification error |
|
133 | + | j["amount"] = nullptr; |
|
134 | + | if (amount.size() > 0) { |
|
135 | + | j["amount"] = tokensJSON(amount); |
|
136 | + | } |
|
132 | 137 | j["lock_time"] = input.time_relock_order().lock_time(); |
|
133 | 138 | } else if (input.has_time_unlock_order()) { |
|
134 | 139 | j["from"] = addressString(input.time_unlock_order().from_address()); |
|
135 | - | j["id"] = input.time_unlock_order().id(); |
|
140 | + | j["time_lock_id"] = input.time_unlock_order().id(); |
|
136 | 141 | } |
|
137 | 142 | return j; |
|
138 | 143 | } |
Files | Coverage |
---|---|
src | 95.25% |
walletconsole/lib | 95.09% |
Project Totals (430 files) | 95.25% |
314399272
314339889
314622603
314590719
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.