Fix SmartContract History#596
Conversation
| t.SpendTxTime as TimeStamp, | ||
| IFNULL(p.SendValue, 0) AS Amount, | ||
| t.Fee, | ||
| p.SpendScriptPubKey as Address, |
There was a problem hiding this comment.
Just double checking this... The controller method receives a address and not the ScriptPubKey representation of it. Should we "convert" the address we filter against to the script pub key here (or earlier) ?
There was a problem hiding this comment.
That is the SendToScriptPubKey (according to the first query of the UNION ALL, which takes precedence in the naming of columns) and its converted here:

However, I am assuming that address filtering is for fine-grained access into the Wallet->Account->Address hierarchy, so I think in that case we would be using the HDTransactionData's Address field to compare against?
fassadlr
left a comment
There was a problem hiding this comment.
Looks @quantumagi, please test thoroughly before we approve/merge.
* Fix SmartContract History * Update GetHistory * Update GetHistory * Update GetHistory * Update query * Update query * Fix column name * Add address filter to wallet service * Fix query * Refactor * Use SC ScriptAddressReader * Refactor
* Bump Nuget versions * Validate cross-chain deposit target (#561) * Validate cross-chain transaction target * Add more changes * Change validation network * Refactor * Add ValidateCrossChainTransferAddress method * Rename method * Add some comments * Update tests * Add validation to SmartContractTransactionService * Add minimum * Fix spelling * Fix message * Update CirrusAddressValidationNetwork * Add comments * Refactor * Remove whitespace * Test for federation * Move OpReturnDataReader to Stratis.Bitcoin * Add reference * Add Ethereum address check to InterFluxOpReturnEncoder (#601) * Bump version to 1.0.9.1 * [Interflux] Explicitly specify Enum values for DestinationChain (#602) * Explicitly specify Enum values for DestinationChain * Fix order * [InterFlux] Only allow ETH Interflux conversions (#608) * Only allow ETH Interflux conversions * Update src/Stratis.Bitcoin.Features.Wallet/Controllers/WalletController.cs Co-authored-by: zeptin <zeptin@gmail.com> Co-authored-by: zeptin <zeptin@gmail.com> * Add Ethereum address check to InterFluxOpReturnEncoder (#601) * Support legacy ETH conversion OP_RETURNs (#615) * Fix SmartContract History (#596) * Fix SmartContract History * Update GetHistory * Update GetHistory * Update GetHistory * Update query * Update query * Fix column name * Add address filter to wallet service * Fix query * Refactor * Use SC ScriptAddressReader * Refactor Co-authored-by: quantumagi <someguy.fromafrica@gmail.com> Co-authored-by: zeptin <zeptin@gmail.com>
* Bump Nuget versions * Validate cross-chain deposit target (#561) * Validate cross-chain transaction target * Add more changes * Change validation network * Refactor * Add ValidateCrossChainTransferAddress method * Rename method * Add some comments * Update tests * Add validation to SmartContractTransactionService * Add minimum * Fix spelling * Fix message * Update CirrusAddressValidationNetwork * Add comments * Refactor * Remove whitespace * Test for federation * Move OpReturnDataReader to Stratis.Bitcoin * Add reference * Add Ethereum address check to InterFluxOpReturnEncoder (#601) * Bump version to 1.0.9.1 * [Interflux] Explicitly specify Enum values for DestinationChain (#602) * Explicitly specify Enum values for DestinationChain * Fix order * [InterFlux] Only allow ETH Interflux conversions (#608) * Only allow ETH Interflux conversions * Update src/Stratis.Bitcoin.Features.Wallet/Controllers/WalletController.cs Co-authored-by: zeptin <zeptin@gmail.com> Co-authored-by: zeptin <zeptin@gmail.com> * Add Ethereum address check to InterFluxOpReturnEncoder (#601) * Support legacy ETH conversion OP_RETURNs (#615) * Fix SmartContract History (#596) * Fix SmartContract History * Update GetHistory * Update GetHistory * Update GetHistory * Update query * Update query * Fix column name * Add address filter to wallet service * Fix query * Refactor * Use SC ScriptAddressReader * Refactor * Update network check points (#619) * Update network check points * Fix tests * Only reserve UTXOs once the transaction has been built successfully. (#618) * Update StraxTest.cs (#630) * Update launch script (#638) * Remove Password Check and GETH Check * Signed Script * Contract dynamic swagger endpoint (#527) Co-authored-by: quantumagi <someguy.fromafrica@gmail.com> Co-authored-by: zeptin <zeptin@gmail.com> Co-authored-by: StratisIain <32906542+StratisIain@users.noreply.github.com> Co-authored-by: Rowan de Haas <rowandh@users.noreply.github.com>

No description provided.