-
Notifications
You must be signed in to change notification settings - Fork 632
[CO-373] Move wallet@Pos.Util.Mnemonic
to wallet-new@Cardano.Wallet.Kernel.BIP39
#3663
Conversation
Actually, I've broken stuff in I've missed
fixing Hm, Dbgen might be a bit tricky… |
wallet-new/src/Cardano/Wallet/API/V1/LegacyHandlers/Transactions.hs
Outdated
Show resolved
Hide resolved
initMeta <- V0.CWalletMeta <$> pure newwalName | ||
<*> migrate newwalAssuranceLevel | ||
<*> pure 0 | ||
let walletInit = V0.CWalletInit initMeta (V0.CBackupPhrase backupPhrase) | ||
let walletInit = V0.CWalletInit initMeta $ error "TODO: File should be removed" |
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.
Same here.
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.
We then get problems since wallet
and wallet-new
are using different Mnemonic
types.
/Users/Johannes/IOHK/cardano-sl/wallet-new/src/Cardano/Wallet/API/V1/LegacyHandlers/Wallets.hs:93:64: error:
• Couldn't match expected type ‘Pos.Util.Mnemonic.Mnemonic 12’
with actual type ‘Cardano.Wallet.Kernel.BIP39.Mnemonic 12’
NB: ‘Cardano.Wallet.Kernel.BIP39.Mnemonic’ is defined at
src/Cardano/Wallet/Kernel/BIP39.hs:(84,1)-(87,25)
‘Pos.Util.Mnemonic.Mnemonic’
is defined in ‘Pos.Util.Mnemonic’
in package ‘cardano-sl-wallet-1.3.0’
• In the first argument of ‘V0.CBackupPhrase’, namely
‘backupPhrase’
In the second argument of ‘V0.CWalletInit’, namely
‘(V0.CBackupPhrase backupPhrase)’
In the expression:
V0.CWalletInit initMeta (V0.CBackupPhrase backupPhrase)
|
93 | let walletInit = V0.CWalletInit initMeta (V0.CBackupPhrase backupPhrase)
| ^^^^^^^^^^^^
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.
Meh. That's exactly why I wanted to remove all those modules first :/ ...
Fine then, but let's only replace the minimum to make stuff compile and wait for the external handlers to be moved
7959781
to
5c7adf8
Compare
1c9b048
to
8d73b2f
Compare
8d73b2f
to
57c9ce0
Compare
e69f703
to
b9cea6b
Compare
Also move MnemonicSpec.hs
Some of these must be revisited at a later stage
- Remove references to V0 API - Use RecordWildCards instead of huge tuple
57c9ce0
to
3e39033
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.
runTests | ||
[ Test.Pos.Tools.Dbgen.Json.tests | ||
] | ||
runTests [] |
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.
runTests []
😅 ... talking about useless tests huh?
No big deal though.
…emonic [CO-373] Move `wallet@Pos.Util.Mnemonic` to `wallet-new@Cardano.Wallet.Kernel.BIP39`
…emonic [CO-373] Move `wallet@Pos.Util.Mnemonic` to `wallet-new@Cardano.Wallet.Kernel.BIP39`
…emonic [CO-373] Move `wallet@Pos.Util.Mnemonic` to `wallet-new@Cardano.Wallet.Kernel.BIP39`
…emonic [CO-373] Move `wallet@Pos.Util.Mnemonic` to `wallet-new@Cardano.Wallet.Kernel.BIP39`
…emonic [CO-373] Move `wallet@Pos.Util.Mnemonic` to `wallet-new@Cardano.Wallet.Kernel.BIP39`
…emonic [CO-373] Move `wallet@Pos.Util.Mnemonic` to `wallet-new@Cardano.Wallet.Kernel.BIP39`
Description
The old
wallet
code should be removed. This pr movesMnemonic
fromwallet
towallet-new
asBIP39
.At the same time I replaced the
TestVector
tuple with record wildcards in the containedBIP39Spec.hs
. Feel free to disagree.Note Probably easiest to view changes per commit rather than all at once. The first commit merely moves/copies, while subsequent commits make the important changes.
Would make sense to squash everything later.
Depends on #3667.
Linked issue
CO-373
Type of change
Developer checklist
Testing checklist
QA Steps
Screenshots (if available)