Support for Zebra 2.1.0 #102
1 changed files with 16 additions and 15 deletions
|
@ -135,21 +135,22 @@ createTransaction ::
|
||||||
-> IO (Either TxError HexString)
|
-> IO (Either TxError HexString)
|
||||||
createTransaction sapAnchor orchAnchor tSpend sSpend oSpend outgoing znet bh build = do
|
createTransaction sapAnchor orchAnchor tSpend sSpend oSpend outgoing znet bh build = do
|
||||||
txResult <-
|
txResult <-
|
||||||
withBorshBufferOfInitSize 10240 $
|
do print "calling FFI"
|
||||||
rustWrapperCreateTx
|
withBorshBufferOfInitSize 51200 $
|
||||||
(case sapAnchor of
|
rustWrapperCreateTx
|
||||||
Nothing -> "0"
|
(case sapAnchor of
|
||||||
Just sA -> toBytes $ sapTree sA)
|
Nothing -> "0"
|
||||||
(case orchAnchor of
|
Just sA -> toBytes $ sapTree sA)
|
||||||
Nothing -> "0"
|
(case orchAnchor of
|
||||||
Just oA -> toBytes $ orchTree oA)
|
Nothing -> "0"
|
||||||
tSpend
|
Just oA -> toBytes $ orchTree oA)
|
||||||
sSpend
|
tSpend
|
||||||
oSpend
|
sSpend
|
||||||
outgoing
|
oSpend
|
||||||
(znet == MainNet)
|
outgoing
|
||||||
(fromIntegral bh)
|
(znet == MainNet)
|
||||||
build
|
(fromIntegral bh)
|
||||||
|
build
|
||||||
if BS.length (hexBytes txResult) > 1
|
if BS.length (hexBytes txResult) > 1
|
||||||
then pure $ Right txResult
|
then pure $ Right txResult
|
||||||
else case head (BS.unpack $ hexBytes txResult) of
|
else case head (BS.unpack $ hexBytes txResult) of
|
||||||
|
|
Loading…
Reference in a new issue