Commit d9434aa
fix(sdk-coin-flrp): subtract minImportToPFee from ExportInC outputAmount
For C→P imports, the wallet platform shows the ExportInC transaction
as the pending import amount on the FLRP (P-chain) wallet before the
ImportInP is confirmed. The ExportInC exportedOutputs hold the gross
P-chain UTXO amount (which includes the import fee premium), causing
the pending display to show a higher amount than the actual P-chain
credit delivered by the ImportInP.
Fix: in `Flrp.explainTransaction`, when the transaction is a C-chain
export (ExportInC), subtract the network's `minImportToPFee` from the
`outputAmount` and each output's amount. This yields the minimum
expected net P-chain receipt, aligning the pending display with the
confirmed P-chain balance and resolving the amount discrepancy reported
in CECHO-1450.
The `verifyTransaction` path continues to use the gross UTXO amount for
validation (via `tx.explainTransaction()` directly), so existing export
validation logic is unaffected.
Ticket: CECHO-1450
Session-Id: 53bbdb3d-3f67-4bc4-b5cd-a8be1b2d8857
Task-Id: 99e7fafb-287d-487c-b5fb-9c7f4c2f28f71 parent d426bd5 commit d9434aa
2 files changed
Lines changed: 42 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | | - | |
432 | | - | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
433 | 455 | | |
434 | 456 | | |
435 | 457 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
298 | 316 | | |
299 | 317 | | |
300 | 318 | | |
| |||
0 commit comments