Skip to content

Commit

Permalink
Enable decoding of grouped/account/multisig addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
Anviking committed Jun 17, 2019
1 parent 3d56540 commit 12863d7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/jormungandr/src/Cardano/Wallet/Jormungandr/Binary.hs
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,10 @@ getAddress = do
let kind = kindValue headerByte
let _discrimination = discriminationValue headerByte
case kind of
-- Single Address
0x3 -> Address <$> getByteString 33
0x4 -> error "unimplemented group address decoder"
0x5 -> error "unimplemented account address decoder"
0x6 -> error "unimplemented multisig address decoder"
0x3 -> Address <$> getByteString 33 -- single address
0x4 -> Address <$> getByteString 65 -- grouped address
0x5 -> Address <$> getByteString 65 -- account address
0x6 -> Address <$> getByteString 33 -- multisig address
other -> fail $ "Invalid address type: " ++ show other
where
kindValue :: Word8 -> Word8
Expand Down

0 comments on commit 12863d7

Please sign in to comment.