-
Notifications
You must be signed in to change notification settings - Fork 632
[RCD-40] Enforce address discrimination check when sending transactions #3823
[RCD-40] Enforce address discrimination check when sending transactions #3823
Conversation
a502bb8
to
d311d12
Compare
genPayeeWithNM :: NetworkMagic -> Core.Utxo -> Pay -> Gen (NonEmpty Core.TxOut) | ||
genPayeeWithNM nm _utxo payment = do | ||
let balance = toLovelaces payment | ||
genTxOutWithNM nm StakeGenOptions { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Genuine question: I thought stake distribution wasn't used in cardano addresses?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it important to get an answer to this?
LGTM. I can't approve on github because I created the PR 🙃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a small question...
6bbe086
to
b51501a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I'll leave the final approval for @KtorZ
f06a813
to
1ce9786
Compare
…rkMagic` in `wallet-new` API V1 (cherry picked from commit a6373f6)
Both changes (new tests for fees sanity check and network magic validation) were introduced in parallel and merged concomitanttly. As a result, CI accepted both changes whereas the newly introduced tests should also be fixed.
1ce9786
to
c91aafa
Compare
*Fixed invalid tests newly introduced by CSL-2526 which also need to account for NetworkMagic when generating new payee. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Odd for me to do this, but I'm just going to go ahead and approve it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, besides unanswered question.
Description
On release/2.0.0, one can attempt to construct and send transactions to addresses which are of a different network via the wallet-new V1 API. Even though the nodes reject this transaction since it's invalid (as a result of CO-410), an error should be returned by the API in order to prevent users from even attempting this.
Linked issue
[RCD-40]
Type of change
Developer checklist
Testing checklist
QA Steps
Screenshots (if available)