Skip to content
This repository was archived by the owner on Mar 1, 2019. It is now read-only.

Commit b7edd6d

Browse files
Merge pull request input-output-hk/cardano-sl#3661 from input-output-hk/paweljakubas/esk-address-fix
[CO-367] Fixing esk of addresses in mkSigner
2 parents 03326ce + 8375c6f commit b7edd6d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Cardano/Wallet/Kernel/Transactions.hs

+5-4
Original file line numberDiff line numberDiff line change
@@ -464,9 +464,12 @@ mkSigner spendingPassword (Just esk) snapshot addr =
464464
esk
465465
accountIndex
466466
addressIndex
467+
-- eks address fix - we need to use the esk as returned
468+
-- from Core.deriveLvl2KeyPair rather than rely on the
469+
-- one from encrypted secret key delivered to mkSigner
467470
in case res of
468-
Just (a, _) | a == addr ->
469-
Right (SafeSigner esk spendingPassword)
471+
Just (a, eskAddr) | a == addr ->
472+
Right (SafeSigner eskAddr spendingPassword)
470473
_otherwise ->
471474
Left (SignTransactionErrorNotOwned addr)
472475

@@ -589,5 +592,3 @@ redeemAda w@ActiveWallet{..} accId pw rsk = runExceptT $ do
589592
isOutput (inp, TxOutAux (TxOut addr coin)) = do
590593
guard $ addr == redeemAddr
591594
return (inp, coin)
592-
593-

0 commit comments

Comments
 (0)