Support for Zebra 2.1.0 #102
1 changed files with 16 additions and 16 deletions
|
@ -137,22 +137,22 @@ createTransaction sapAnchor orchAnchor tSpend sSpend oSpend outgoing znet bh bui
|
||||||
processResult $! txResult
|
processResult $! txResult
|
||||||
where
|
where
|
||||||
processResult :: HexString -> Either TxError HexString
|
processResult :: HexString -> Either TxError HexString
|
||||||
processResult input =
|
processResult input
|
||||||
if BS.length (hexBytes input) > 1
|
| BS.length (hexBytes input) > 1 = Right input
|
||||||
then Right input
|
| otherwise =
|
||||||
else case head (BS.unpack $ hexBytes input) of
|
case head (BS.unpack $ hexBytes input) of
|
||||||
0 -> Left InsufficientFunds
|
0 -> Left InsufficientFunds
|
||||||
1 -> Left ChangeRequired
|
1 -> Left ChangeRequired
|
||||||
2 -> Left Fee
|
2 -> Left Fee
|
||||||
3 -> Left Balance
|
3 -> Left Balance
|
||||||
4 -> Left TransparentBuild
|
4 -> Left TransparentBuild
|
||||||
5 -> Left SaplingBuild
|
5 -> Left SaplingBuild
|
||||||
6 -> Left OrchardBuild
|
6 -> Left OrchardBuild
|
||||||
7 -> Left OrchardSpend
|
7 -> Left OrchardSpend
|
||||||
8 -> Left OrchardRecipient
|
8 -> Left OrchardRecipient
|
||||||
9 -> Left SaplingBuilderNotAvailable
|
9 -> Left SaplingBuilderNotAvailable
|
||||||
10 -> Left OrchardBuilderNotAvailable
|
10 -> Left OrchardBuilderNotAvailable
|
||||||
_ -> Left ZHError
|
_ -> Left ZHError
|
||||||
txResult =
|
txResult =
|
||||||
withPureBorshVarBuffer $
|
withPureBorshVarBuffer $
|
||||||
rustWrapperCreateTx
|
rustWrapperCreateTx
|
||||||
|
|
Loading…
Reference in a new issue