RPC Server #103

Merged
pitmutt merged 129 commits from rav001 into milestone3 2024-11-21 15:30:22 +00:00
Showing only changes of commit 0e5f476e28 - Show all commits

View file

@ -827,7 +827,6 @@ shieldTransparentNotes pool zebraHost zebraPort znet za bh = do
dRecvs
forM fNotes $ \trNotes -> do
let noteTotal = getTotalAmount (trNotes, [], [])
let fee = calculateTxFee (trNotes, [], []) 4
tSpends <-
liftIO $
prepTSpends
@ -839,12 +838,38 @@ shieldTransparentNotes pool zebraHost zebraPort znet za bh = do
let oRcvr =
fromJust $
o_rec =<< isValidUnifiedAddress (E.encodeUtf8 internalUA)
let snote =
let dummy =
OutgoingNote
4
(getBytes $ getOrchSK $ zcashAccountOrchSpendKey $ entityVal acc)
(getBytes oRcvr)
(fromIntegral $ noteTotal - fee)
(fromIntegral $ noteTotal - 5000)
""
True
let feeResponse =
createTransaction
Nothing
Nothing
tSpends
[]
[]
[dummy]
znet
bh
False
case feeResponse of
Left e1 -> return $ Left Fee
Right fee -> do
let feeAmt =
fromIntegral
(runGet getInt64le $ LBS.fromStrict $ toBytes fee)
let snote =
OutgoingNote
4
(getBytes $
getOrchSK $ zcashAccountOrchSpendKey $ entityVal acc)
(getBytes oRcvr)
(fromIntegral $ noteTotal - feeAmt)
""
True
let tx =