mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-23 22:56:52 +01:00
Fix HDPurpose Mapper for non standard values (#2054)
This commit is contained in:
parent
a35b50a9f9
commit
0b9f88e03d
1 changed files with 4 additions and 3 deletions
|
@ -184,9 +184,10 @@ class DbCommonsColumnMappers(val profile: JdbcProfile) {
|
|||
|
||||
implicit val hdPurposeMapper: BaseColumnType[HDPurpose] =
|
||||
MappedColumnType
|
||||
.base[HDPurpose, Int](_.constant,
|
||||
HDPurposes.fromConstant(_).get
|
||||
) // hm rething .get
|
||||
.base[HDPurpose, Int](
|
||||
_.constant,
|
||||
purpose =>
|
||||
HDPurposes.fromConstant(purpose).getOrElse(HDPurpose(purpose)))
|
||||
|
||||
implicit val bitcoinAddressMapper: BaseColumnType[BitcoinAddress] =
|
||||
MappedColumnType
|
||||
|
|
Loading…
Add table
Reference in a new issue