-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix construct tx #3010
Fix construct tx #3010
Conversation
@piotr-iohk please verify if with this fix the problems (both adp-1256 and adp-1202) vanish. Thanks! |
Just (ApiPaymentAddresses content) -> | ||
pure $ F.toList (addressAmountToTxOut <$> content) | ||
Just (ApiPaymentAll _) -> do | ||
liftHandler $ throwE $ ErrConstructTxNotImplemented "ADP-909" |
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.
ADP-909 is already closed... is it a message that's potentially displayed to the user? If so it needs to be reworded 😅
path' == path'' && | ||
amt' == amt'' && | ||
assets' == assets'' | ||
testEquality _ _ = False |
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.
Perhaps we could replace this testEquality
function with ==
if we merge the ApiCoinSelectionInput
and ApiWalletInput
types. See #3012
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.
indeed, we can simplify considerably this checking for equality - did it in last two commits
5222e33
to
1b7bb29
Compare
c82f81c
to
5d29520
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.
This looks fine to me. It's much nicer now that we have only one API type for an input!
I have only proposed some small fixes to indentation. (Just making everything indent by 4 chars.)
, utxoAvailableForInputs = | ||
UTxOSelection.fromIndex utxoAvailable | ||
, utxoAvailableForCollateral = | ||
UTxOIndex.toUTxO utxoAvailable |
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.
, utxoAvailableForInputs = | |
UTxOSelection.fromIndex utxoAvailable | |
, utxoAvailableForCollateral = | |
UTxOIndex.toUTxO utxoAvailable | |
, utxoAvailableForInputs = | |
UTxOSelection.fromIndex utxoAvailable | |
, utxoAvailableForCollateral = | |
UTxOIndex.toUTxO utxoAvailable |
sel <- liftHandler $ | ||
W.assignChangeAddressesWithoutDbUpdate wrk wid genChange utx |
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.
sel <- liftHandler $ | |
W.assignChangeAddressesWithoutDbUpdate wrk wid genChange utx | |
sel <- liftHandler $ | |
W.assignChangeAddressesWithoutDbUpdate wrk wid genChange utx |
(Link.decodeTransaction @'Shelley wa) Default decodePayload | ||
let decodedInputs = getFromResponse #inputs rDecodedTxSource | ||
|
||
WalletInput <$> expectedInputs `shouldBe` decodedInputs |
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.
👍🏻
( W.assignChangeAddresses genChange sel s | ||
& uncurry (W.selectionToUnsignedTx (txWithdrawal txCtx)) |
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.
( W.assignChangeAddresses genChange sel s | |
& uncurry (W.selectionToUnsignedTx (txWithdrawal txCtx)) | |
( W.assignChangeAddresses genChange sel s | |
& uncurry (W.selectionToUnsignedTx (txWithdrawal txCtx)) |
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.
address rebase ommision
18d2460
to
53388ff
Compare
bors r+ |
1 similar comment
bors r+ |
Build succeeded: |
adp-1256
adp-1202 (possibly)
Comments
Issue Number